Tango class for operating the Zebra box (digital signal level converter and position capture box). The connection to the Zebra can be done directly to the computer using the USB connection or to a terminal server. In case the USB connection is used, the property PortNb has to be set to -1 and the IPAdress has to be set to the name of the USB device, for example /dev/ttyUSB1.
By setting the attribute Arm to 1, trigger pulses are generated in the TTL Output set in the Property TTLOutput. The time between triggers and the pulse length are set in the TriggerInterval and TriggerPulseTime attributes, respectively. The number of triggers to be generated is set in the attribute NbTriggers.
The gate for the triggers can be started based on time or in encoder position. The property GateTriggByPos allows to select between this two operation modes. If set to 0, the trigger pulses start after setting Arm to 1. If set to 1, the trigger pulses start after setting Arm to 1 when the position of the encoder connected to the first encoder signal reaches the position set in the Attribute TriggerPosStart. This position is given in physical units, the conversion to encoder units is done using the properties PosConversionFactor and PosOffset, that has to be set correctly. If the calibration of the motor encoder and the of the Zebra are synchronized the PosOffset property has to be set to 0. The Attribute TriggerPosWidth can be used for fixing a window for stopping the pulse trigger generation, if positive the direction for stopping the trigger has to be the increasing one and if negative the decreasing one. If the number of triggers want to be fixed, without taking into account the final encoder position, set the attribute TriggerPosWidth to an amount outside the posible encoder range. In position trigger mode, the trigger pulses can be also stopped setting Arm to 0.
Up to four encoder signals can be connected to the Zebra box and readout internally for each generated trigger. The property EncoderMask select which enconder signals want to be readout (ex. 1, for reading the signal connected to channel 1; 3 for reading the signals connected to channels 1 and 2; 8 for reading signal connected to channel 4, etc.). The values of the encoder signals for each trigger are exported in the spectrum attributes of the Tango class. If only one encoder signal is readout the corresponding values are in the attribute EncoderSpectrum (independently of in which channel this signal is connected), if two encoder signals are readout the values will go to the attributes EncoderSpectrum and Encoder2Spectrum and so sucessively.
A cable from the TTL output selected has to be connected to the trigger input of the device that wants to be triggered (for example, the XIA detector or the SIS3820 Multichannel Scaler). The property TTLOutputMask selects to which TTL outputs is connected the trigger signal. The status of the Tango device is set to MOVING during the trigger generation, and it goes back to ON when it is finished.
pogo_html_docu/Zebra/index.html See pogo generated info for more details.