Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

...

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

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

Code Block

[softegr@lcls-builder script]$ 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:

...