Provides support for the VHS 404 module. The base address of the module is determined in two ways. There is an address jumper, which, if installed places the module at 0x4000 in VME short IO space. When the jumper is installed, the base address can be programmed for the next time the module will be powered up with the jumper removed. See the setModuleBaseAddress method to program this address
The general strategy for using a new module is to first install it into a crate with the address jumper installed, set a new address and then remove the jumper and use the module in production at the new set address. The module is accessed via this package by creating an object for the module and then handing that object method calls which manipulate the actual module.
The -base
can be supplied on the create
to set the
base address of the module. If not supplied, the module is assumed to
have the address jumper installed and will be accessed at 0x4000
Returns a list of the bits in the module status register that are not in the normal state. These bits will appear as textually named items in the Tcl list returned by this command:
Module Temperature is bad (too hot)
Module power supply has bad voltage.
Module is in a bad state.
An event is active with the mask set.
See getChannelEventMask
The module safety loop is open.
HV Ramp is in progress.
Module has failed in some way.
If the module has a parameter it must be one of on or off. That parameter describes the new state of the module kill enable bit. If the parameter is not supplied, the kill enable bit status is not modified. Regardless, the new state of the kill enalbe bit is returned as true or false
Enables or diables the fine adjustment to regulate in the presence of temperature induced drift. This should probably always be enabled.
If the method is given a parameter it should be a value of on or off which sets the new state of the fine adjust bit. If not supplied, the bit is not modified.
Regardless, the final state of the bit is returned as a boolean.
Clears the kill conditions in all of the channels. this method does not return anything meaningful.
Returns true if the module has a pending bad temperature event.
Returns true if the module has a pending power supply no good event.
Returns true if there's a safety loop open event pending.
If the temperature bad condition no longer exists, clears the event.
If the power supply bad condition no longer exists, clears the event.
If the safety loop is no longer open, clears the latched event.
Returns a list containing the set of bits that are set in the event mask. The event mask determines which events set the EventActive event in the module status register. If an event is masked it will set that bit.
The command result is a list (possibly empty) whose values determine which bits are set in the mask register:
If set temperature events will set the EventActive bit in the module status register.
If present, power events will set the EventActive bit of the module status register.
If set Safety loop opene vents will set the EventActive bit of the status register.
Enables or disables the reporting of a temperature error as an event in the module status register. If no on/off parameter is present, no change is made to the reporting state. Regardless the reporting state is returned as the command value.
Enables or disables the posting of a power event to the module status register depending on the value of the last command word. If there is no on/off command parameter, no change is made. Regardless, the reporting state is returned as the command value.
Enables of disables the posting of a safety loop open event tothe module status register depending on the value of the last command word. If there is no on/off command parameter, no change is made. Regardless, the reporting state is returned as the command value.
Returns a possibly empty list of the channel numbers that have posted events pending.
Returns a list (possibly empty) of the set of channels that have event reporting enabled.
Sets the module event mask. Each bit in the mask represents a channel. Set bits enable the channel to produce events. Channel 0 is the lsb etc.
Sets the voltage ramp speed in percentage of target voltage.
Returns the ramp speed in percentage of the target voltage.
Returns the voltage limit (in absolute volts - this is different from just getting the contents of the VoltageMax register.
Returns the current limit (mA). Note this is different from returning the CurrentMax register.
Returns the 5V power supply value in volts.
Returns the +12V power supply level in volts.
Returns the -12V power supply level in volts.
Returns the temperture at the onboard temperature sensor in degrees C.
Returns the module serial number.
Returnst the version of the firmware as a.b.c.d
Returns the number of channels the board has. This assumes the channels are stuffed contiguously from channel 0 upwards
Returns a list of the bits that are set channel n's status register. Note that if channel n does not exist, an error is raised. The bit names in the list returned are:
Exceeded voltage limit.
Exceeded current limit.
Current tripped.
External inhibit set
Exceeded voltage bounds (regulation).
Exceeded current bounds regulation)
Voltage control is active.
Current control is active
Emergency shutdown performed.
Channel is on.
Channel Finished a ramp.
Input error
Channel off event becausem module was turned off.
Resets any events that are set on channel
n
. The events reset are
specified by a logical or of the bits:
vhs::ChannelEventVoltageLimit vhs::ChannelEventCurrentLimit vhs::ChannelEventTrip vhs::ChannelEventInhibit vhs::ChannelEventVoltageBounds vhs::ChannelEventCurrentBounds vhs::ChannelEventControlledVoltage vhs::ChannelEventControlledCurrent vhs::ChannelEventEmergencyOff vhs::ChannelEventRampEnded vhs::ChannelEventEventOnOff vhs::ChannelEventInputError
Returns a list of the events for channel
n
that are masked. The list
has the same format as the list from
getChannelEvents
, however
the bits in the list are those which are set in the
mask register.
Sets the channel event mask register associated with
channel number n
.
bitlist
has the same format as for
getChannelEvents
.
Returns the voltage set point for channel n. Note that this
may not be the actual voltage, and may not even be the
desired voltage (if the HV is off). See
e.g. getMeasuredVoltage
to
retrieve the actual voltage.
Sets the voltage set point of chanel n
to v
volts. Note that
unless the HV is on, and the channel is able ramp this will
not actually change the voltage asserted on the module
connectors.
Returns the voltage that is currently asserted on the
channel n
connector.
The result is in volts.
Returns the current measured for channel
n
in milliamps.
Returns the channel n
current trip point in milliamps.
Sets the desired over current trip point for channel
n
to i
milliamps.
Returns the regulation tolerance for voltage regulation
for channel n
Sets the regulation tolerance for channel
n
to be v
volts. This value (v
)
will be returned in subsequent
calls to getVoltageBounds
Sets the requested voltage (setpoint) for all
channels to the common value v
volts.
Sets the current trip point to i
milliamps for all channels.
Sets the regulation bound voltages for all channels
to v
Sets the current regulation bounds for all channels
to the common value of i
millivolts.
Shutds down all channels without a ramp.
Turns on all channels and ramps them to their set point voltages. The ramps will continue until either the set point is reached or channels trip.
Ramps all channels down and turns off their HV.
If the module address jumper is install,s ets the module's new base address. This base address becomes effective the next time the module is powered up with the base address jumper removed. It is not clear what happens if this function is called whent he address jumper is not installed.