next up previous contents 5
Next: Using ion chambers Up: General DCS Scripting Commands Previous: Inserting/Removing shutters and filters   Contents

Waiting for hardware

An important aspect of writing scripts that interact with hardware is being able to guarantee that a hardware related function has completed before issuing the next command. The wait_for_devices command allows the script writer to halt the script at the appropriate time and wait for a hardware component to complete its current task. This command does not freeze the BLU-ICE GUI or the scripting engine while the script is waiting for the event that will trigger the wait_for_devices command to return.

The DCS command in its general form is:

wait_for_devices deviceName1 [deviceName2 [deviceName3 [...]]]

Each deviceName argument may be the name of a motor or ion chamber. The list of devices may be in any order.

An additional command is provided to wait for shutters/filters to be inserted and removed:

wait_for_shutters shutterName1 [shutterName2 [shutterName3 [...]]]

It should be understood that the wait_for_shutters command waits for the DHS responsible for the shutter to say that the shutter is open or closed. However, because there is often no shutter state feedback to a motion controller, the shutter may still be in the mechanical process of opening or closing.

At some point the functionality of wait_for_shutters should be added to the wait_for_devices command, and the wait_for_shutters command should be phased out.

Examples:


next up previous contents 5
Next: Using ion chambers Up: General DCS Scripting Commands Previous: Inserting/Removing shutters and filters   Contents
Scott McPhillips 2011-07-06