Control Device [CD]


Control device is abstract presentation of real device which control some parameters of your setup. Typical examples could be high voltage controller, waveform generator, or step-motor controller. In any case the principal function of the device would be to set some parameter(s), even reading back the set parameter should lead to actual measuring of the real thing. Each channel has absolute (integer) and relative (float) after calibration position. The calibration should be implemented either by external utility or within Setting tab of the device.

Common parameter: ChnIdx - channel number, the normal channels have positive numbers, '0' is switchable and correspond to the default channel. The negative numbers correspond to Boolean channels 1-true/ 0-false

CD.IniSet

    (re)Initiate the device using setting in file "Defaults.CD" (if the file exists) or hard setting otherwise, the device state after IniSet is OffLine. Returns 'OK' or 'Error'.

CD.EnbGet 

    Check if the device is enabled (is it connected and switched on). Returns 'True' / 'False'

CD.EnbSet(B) 

    Switch device to Running / StandBy state ( B is true/false). Returns 'OK' or 'Error'.

CD.DftSet(ChnIdx)

    Set default control channel index to N, 

    Get back the default channel number, if N=0 it does not change default channel just gives it back.

    Returns 'OK' or 'Error'. 

If ChnIdx is omitted default channel index is assumed for the next commands.

CD.AbsGet([ChnIdx])

    Gets back the last demander absolute position or returns 'Error'

CD.RelGet( [ChnIdx])

    Gets back the last demander relative position or returns 'Error'

CD.MsrGet( [ChnIdx])

    Measure and gets back relative position or returns 'Error'

    Next four commands control the channels of CD by absolute/ relative jumps (without or with calibration) to new absolute (jump) or relative (move) position.

    Returns:

CD.AJpSet(A: integer , [ChnIdx: integer])

    Jump on position A in absolute units. Gets back the set absolute position or 'Error'

CD.RJpSet(R: float, [ChnIdx: integer])

    Jump on position R in relative units. Gets back the set relative position or 'Error'

CD.AMvSet(A: integer, [ChnIdx: integer])

    Move A absolute units forwards(+)/backwards(-). Gets back the set absolute position or 'Error'

CD.RMvSet(R: float, [ChnIdx: integer])

    Move R relative units forwards(+)/backwards(-). Gets back the set relative position or 'Error'

CD.DvcLck(B)

    if B then lock current manual device change,

    else unlock current manual device change

    Returns 'OK' or 'Error'.

CD.SetLod(FileName)

    Load from FileName CD's settings if FileName is empty the device will be read for the setting or internal defaults will be loaded. Returns the loaded filename or 'Error'.

CD.SetSav(FileName)

    Save into FileName CD's settings, if FileName is empty the the last loaded or default setting will be written. Returns the saved filename or 'Error'.

CD.SetGet(FileName)

    Gets back the current setting filename or 'Error'

CD.DimGet(ChnIdx: integer)

    Returns the name and respective units of the control device channel in format NAM[unit], only informative.

CD.CmdSet(Command)

    The device interprets this text Command and returns the result as text. That is open text command which allows you to extend the above command set with some very specific function you cannot fit in the standard command set.