class spirack.M2p_module(spi_rack, module)
M2p module interface class. This class does the low level interfacing with the M2p module. When creating an instance it requires a SPI_rack class and the module number in the rack, passed as a parameters.
Parameters:
set_remote()
Sets the module to be remote controlled by software. It initially copies the gain setting and coupling configuration as set in the front panel. If the module is already in remote mode no action is taken.
After running this function, while in remote controlled mode, changes to the front panel settings will have no effect. Changes would only be made via the software.
set_local()
Sets the module to be locally controlled from the front panel.
Beware of a potential jump in setting: The M2p would switch immediaetly to the gain and coupling settings given on the front panel. Existing settings given by software that were valid in remote mode are not maintained. As good practice, it is possible to read remotely the local settings and adapt the remote configuration to the local settings in a gradual and time-conscious manner, before switching control to local control.
After running this function, while in locally controlled mode, software changes to the setting will have no effect.
remote_set_gain_and_coupling(gain, coupling)
Sets the gain and coupling mode in remote controlled mode.
The function checks that requested values are recognized. If either of the parameters has an illegal value the function prints a warning and takes no action.
Parameters:
get_operating_mode()
Returns the present control mode of the module.
Parameters:
Returns - a string of 'local' or 'remote' representing the control mode.
get_gain_setting()
Returns the present gain setting in effect. This setting comes from either local control or the remote control, depending on the control mode.
Parameters:
Returns - the value of the gain setting, as int
get_gain_remote()
Returns the latest gain setting given via the remote control. This will be the actual gain while the M2p is set to remote control.
Parameters:
Returns - the value of the gain setting, as int
get_gain_local()
Returns the present gain setting given via the front panel rotary switch. This will be the actual gain while the M2p is set to local control.
Parameters:
Returns - the value of the gain setting, as int
get_coupling_setting()
Returns the present coupling setting in effect. This setting comes from either local control or the remote control, depending on the control mode.
Parameters:
Returns - a string of 'DC' or 'AC' representing the coupling mode.
get_coupling_remote()
Returns the latest coupling setting given via the remote control. This will be the actual coupling while the M2p is set to remote control.
Parameters:
Returns - a string of 'DC' or 'AC' representing the coupling mode.
get_coupling_local()
Returns the present coupling setting given via the front panel rotary switch. This will be the actual coupling while the M2p is set to local control.
Parameters:
Returns - a string of 'DC' or 'AC' representing the coupling mode.
get_clipped_unlatched()
Returns if the momentary output signal is clipped (overload condition) on the positive or neagtive side. This command reflects only the instantaneous status and does not affect the clip latch indicators. Clipping might harm linearity and impact resolution of the measurement.
Returns - a string representing the clipping status of the signal. Possible values are 'not clipped', 'pos and neg clipped', 'pos clipped', 'neg clipped'
get_clipped_latched()
Returns if the output signal has reached clipping levels (overload condition) on the positive or neagtive side since the last reset. This command also resets the clip indicators back to 0. Clipping might harm linearity and impact resolution of the measurement.
Returns - a string representing the clipping status of the signal. Possible values are 'not clipped', 'pos and neg clipped', 'pos clipped', 'neg clipped'
| Attribute | Info |
|---|---|
module |
the module number set by the user (must coincide with hardware) |