get_asc

Purpose:

Interface with an intelligent instrument to retrieve values and store them in a CyFlex variable, supporting periodic polling via timers and optional event-driven setting of values.

Enter:

get_asc <device> <output_label> <timer> <valid_label> <valid_count> [set_label] [evnt] &

Where:

device

Specify the root name of the device configuration file in the /specs directory with a ‘.cfg’ extension.

output_label

Specify the variable label where the response result value will be stored.

timer

Specify the timer value in milliseconds or a ‘-‘ (dash) for continuous broadcasts.

valid_label

Specify the CyFlex logical variable label which indicating response validity.

valid_count

Specify an interval count for validity.

set_label

Optional. Specify the label of an CyFlex real variable whose value will be used for setting operations.

evnt

Optional. Specify the event to trigger the ‘set’ operation. 

Example:

get_asc DW DW_temp – DW_valid 5 DW_set DW_setev &
This example is for a device called “DW” which broadcasts a temperature value. The temperature value will be placed in the variable ‘DW_temp’ whenever it is received. The DW_valid flag will remain TRUE unless no broadcast value is received for 5 seconds. If the ‘DW_setev’ event is received, the value of the DW_set variable will be sent to the DW device.

Notes:

 

See Also:

See the device configuration file, e.g., cyflex/specs.def/DW.cfg.