Worked like a charm 🙂
IOC started behaving like i want it to. Thanks!
Out of curiosity: is this "option +r;" thing something very obvious from the c language that im too newbie to understand or is it some particularity of the sequencer compiler?
If its a particularity, i searched for it briefly in the documentation and didnt find it. Where should i have looked before?
Best regards,
Marco
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: 08 February 2023 19:05
To: Marco A. Barra Montevechi Filho <marco.filho at lnls.br>; Jemian, Pete R. <jemian at anl.gov>
Cc: SWC <swc at lnls.br>; Talk EPICS Tech <tech-talk at aps.anl.gov>
Subject: RE: Multiple sequencer instances undesirably sharing information
Hi Marco,
I put the +r flag in the SNL program itself like this:
/* This program must be compiled with the recursive option so that multiple copies
* can run at once */
option +r;
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Marco A. Barra Montevechi Filho via Tech-talk
Sent: Wednesday, February 8, 2023 4:00 PM
To: Jemian, Pete R. <jemian at anl.gov>; tech-talk at aps.anl.gov
Cc: SWC <swc at lnls.br>
Subject: Re: Multiple sequencer instances undesirably sharing information
Yes, but im wondering if im using it right.
I tried first in SoftSwitchApp/src/Makefile to add SoftSwitch_SNCFLAGS += +r.
However, SoftSwitch is the whole IOC application name as it was created with
makeBaseApp.pl -t ioc SoftSwitch
Comparing with makefiles from otehr programs i saw that the +r option is put with the sequencer program name, so now i tried:
SwitchesStates_SNCFLAGS += +r
In my makefile because my .stt file start with:
program SwitchesStates
It still didnt help. Is the macro supposed to be defined with the stt program name?
Thanks,
Marco
Are you using the `+r` option?
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
Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente
antes de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente.
Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before
copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately.
|