Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

No Format
aidaget LINAC//XCOR:BDES -DMICROS=LI10-LI10 -DUNITS=1-9999
  XCOR:LI10:200  0.0
  XCOR:LI10:201  0.0
  XCOR:LI10:202  0.0
  ...

Getting data from a number of

...

devices at a time.

You can use aidaget in a standard unix pipe to Combining a file of device names, or aidalist with a unix pipe, you can get a number of values at a time. Combined with the xargs unix command you can for instance get all the values of devices in a file, or as output from aidalist. For instance, get the Twiss parameters from the online model, of all the devices in a file. Say your devices were listed in a file (eg checkDevices27Oct2008.txt_Aida_NO), then you can get their values like this:

Code Block
[tersk02]:u/cd/greg> cat checkDevices27Oct2008.txt_Aida_NO | xargs -I {} -t aidaget "{}//twiss" -DMODE=5

The -t says echo what you're about to execute before executing it.

You can use output of aidalist directly to get values of a number of devices.
Combine aidalist with caget:

Code Block

aidalist BPMS:LI27:%:X1 | xargs -I{} caget {} 
BPMS:LI27:201:X1               -0.210293 
BPMS:LI27:301:X1               0.0417948 
BPMS:LI27:401:X1               0.246912 
BPMS:LI27:501:X1               -0.252207 
BPMS:LI27:601:X1               -0.699057 
BPMS:LI27:701:X1               0.00149554 
BPMS:LI27:801:X1               0.161638 
BPMS:LI27:901:X1               -0.086897 

This example gets the twiss of all the XCORs in LI22. Note, we use the 2 argument form of aidalist to confine the the output to just the twiss attribute (rather than all the PVs of all the XCORs in LI22), then we select only the forst column of output (the device names), then call aidaget with is the device name and '//twiss' appended:

Code Block

aidalist XCOR:LI22:% twiss | awk '{print $1}' | xargs -I {} -t aidaget "{}//twiss" -DMODE=5

Setting Value: aidaset

The utility program named "aidaset" takes at least two mandatory arguments (the name of the target and the desired value), and several optional parameters control how it operates.

An AIDA data provider that supports setting values will accept either a single scalar or vector value, or a list of named scalar or vector values.  The EPICS channel access data provider is of the former sort, and the SLC Magnet server is of the latter.

NB: Presently, only the EPICS Channel Access and SLC Magnet data providers support write operations.

An example of setting a scalar EPICS process variable:

...