Hello all. We created a sequencer state machine with EPICS_BASE 7.0.7, synApps6.2, Sequencer2-2-9.
The state machine controls a set of motors with the STOP, SPMG, VAL and RBV fields based on signals from a set of limit switches (not ideal to be done with IOC but it is what it is).
i instantiate it 9 times in my st.cmd file after iocInit:
seq SwitchesStates,"user=marco, BL=SOL:, HUTCH=S:, M=UltSoft:, N=1, BL2=SOL:, Setm=m1"
seq SwitchesStates,"user=marco, BL=SOL:, HUTCH=S:, M=UltSoft:, N=2, BL2=SOL:, Setm=m2"
(...)
seq SwitchesStates,"user=marco, BL=SOL:, HUTCH=S:, M=UltSoft:, N=9, BL2=SOL:, Setm=m9"
Every PV used in the .stt code has {N} or {Setm} in its name, so i can guarantee that i dont have multiple instances of state machine looking at the same PV.
I have 9 simulated motors: SOL:S:m1, SOL:S:m2, ..., SOL:S:m9.
Whenever i start my state machines, all motors go to the position that the last motor is in. For example, if i instantiate only the first 4 state machines and comment the last 5, then SOL:S:m1, SOL:S:m2, SOL:S:m3 will all go to SOL:S:m4.RBV.
The state machine is indeed programmed to send the motor to its own RBV with:
float m;
assign m to "{BL}{HUTCH}{M}Cmdm{N}"; //PV that has <MOTOR>.VAL in its OUT
monitor m;
float m_rbv;
assign m_rbv to "{BL}{HUTCH}{M}m{N}_RBV"; //Pv that has <MOTOR>.RBV in its INP
monitor m_rbv;
(...)
m = m_rbv;
pvPut(m);
(...)
but its supposed to be invisible between instances. Why is the last instance commanding everyone to follow it?
I tried adding <app_name>_SNCFLAGS += +r in the Makefile, but to no avail.
Thanks in advance for any hints