My solution compiled, didn't segment fault, but also does not work !!!
Thank you Al for your suggestion.
I assume you are passing tel, sys, and d0/1/2/3 as parameters to your seq program.
In my case, I would like to use a static array (~parameters are hard-coded in program)
as I have 'too' many of them (~ 50 parameters)
Now I expect around 20 arrays, each with 50 assign statements
That's why I am looking at a for loop with pvAssign
So far pvAssign doesn't work on my side..
Anyone else?
From:
[email protected]To:
[email protected]Subject: RE: SEQ with dynamic assignment of PV in array variable
Date: Mon, 3 Jun 2013 18:30:03 +0000
Hi
Emmanuel
We do the following at Keck:
float openLoop[4];
assign openLoop[0] to "{tel}{sys}{d0}openLoop";
assign openLoop[1] to "{tel}{sys}{d1}openLoop";
assign openLoop[2] to "{tel}{sys}{d2}openLoop";
assign openLoop[3] to "{tel}{sys}{d3}openLoop";
monitor openLoop;
Al
Hello,
I am working on a seq program.
For that program, I am interacting with magnet power supplies.
The interfaces to the power supplies are all the same (about 10 PV each).
For each interface PV, I would like do to something like this...
#define NB_OF_SUPPLIES 50
short enable[NB_OF_SUPPLIES];
assign enable[0] to "I:S001:PS:EnableBO";
assign enable[1] to "I:SO10:PS:EnableBO";
I looked at the docs and they are somewhat confusing.
Q: Is there a place to put the pvAssign statement?
Q: Should the array's cell be initialized/assigned to "" during declaration?
Q: Can I monitor a not-yet configured PV array?
Q: How can I find out about the connection to each of the PVs?
If anyone has an example of using pvAssign on array variables (i.e. enable), I would appreciate it.