Skip to content

DAE Pre and Post commands

Freddie Akeroyd edited this page Feb 19, 2022 · 12 revisions

It is possible to get additional actions to be carried out by DAE IOC when commands such as begin/end/pause/resume/abort are executed. These actions are typically used to do things like open/close an intermediate (fast) shutter. A PRE action is executed before the command and a POST after it has run. Whether the IOC waits for a PRE/POST to complete before the next action is controlled by whether PP or CA is passed as part of configuration, CA will wait for a completion callback and PP will just inititate processing and then carry on to start the next operation. The PV specified for PRE/POST will have the number 0 written to it for a PRE action and 1 for a POST action, often you will specify the .PROC field of a PV so just processing is initiated, but you could specify e.g. the .VAL, or another field such as .A of a calcout record, and use the 0/1 value to determine the action to take.

The PV links to use during PRE/POST are set by macros, either in the configuration or in globals.txt. They have names like PRE_BEGIN_1 and POST_BEGIN_1, to specify then in globals you would add something like

ISISDAE_01__PRE_BEGIN_1=SOME:PV:TO:ACCESS.PROC PP

Note the PP added at the end to request processing, if you wish the DAE IOC to wait for processing to finish before executing the main command (begin in this case) then change PP to CA. If the PV you are writing to is not within the DAE IOC, then only a channel access link is possible. I've not determined yet whether, in this case, adding CA make any difference to Wait behaviour or whether it will happen anyway, so it is safer to add CA if yu wish a wait.

Clone this wiki locally