EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: Multiple sequencer instances undesirably sharing information
From: "Marco A. Barra Montevechi Filho via Tech-talk" <tech-talk at aps.anl.gov>
To: "Jemian, Pete R." <jemian at anl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Cc: SWC <swc at lnls.br>
Date: Wed, 8 Feb 2023 22:01:01 +0000
I almost forgot, here is the whole makefile:

TOP=../..

include $(TOP)/configure/CONFIG
#----------------------------------------
#  ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================

#=============================
# Build the IOC application

PROD_IOC = SoftSwitch
# SoftSwitch.dbd will be created and installed
DBD += SoftSwitch.dbd

# SoftSwitch.dbd will be made up from these files:
SoftSwitch_DBD += base.dbd

# Include dbd files from all support applications:
#SoftSwitch_DBD += xxx.dbd

# Add all the support libraries needed by this IOC
#SoftSwitch_LIBS += xxx

# SoftSwitch_registerRecordDeviceDriver.cpp derives from SoftSwitch.dbd
SoftSwitch_SRCS += SoftSwitch_registerRecordDeviceDriver.cpp

# Build the main IOC entry point on workstation OSs.
SoftSwitch_SRCS_DEFAULT += SoftSwitchMain.cpp
SoftSwitch_SRCS_vxWorks += -nil-

# Add support from base/src/vxWorks if needed
#SoftSwitch_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary

SwitchesStates_SNCFLAGS += +r
SwitchesStates_SNCFLAGS += +s
SoftSwitch_DBD += Switches.dbd
SoftSwitch_SRCS += Switches.stt
SoftSwitch_LIBS += seq pv

# Finally link to the EPICS Base libraries
SoftSwitch_LIBS += $(EPICS_BASE_IOC_LIBS)

#===========================

include $(TOP)/configure/RULES
#----------------------------------------
#  ADD RULES AFTER THIS LINE

From: Marco A. Barra Montevechi Filho <marco.filho at lnls.br>
Sent: 08 February 2023 18:59
To: Jemian, Pete R. <jemian at anl.gov>; tech-talk at aps.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

From: Jemian, Pete R. <jemian at anl.gov>
Sent: 08 February 2023 18:54
To: Marco A. Barra Montevechi Filho <marco.filho at lnls.br>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Cc: SWC <swc at lnls.br>
Subject: Re: Multiple sequencer instances undesirably sharing information
 
Are you using the `+r` option?


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Marco A. Barra Montevechi Filho via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, February 8, 2023 3:35:45 PM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Cc: SWC <swc at lnls.br>
Subject: Multiple sequencer instances undesirably sharing information
 
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.


References:
Multiple sequencer instances undesirably sharing information Marco A. Barra Montevechi Filho via Tech-talk
Re: Multiple sequencer instances undesirably sharing information Jemian, Pete R. via Tech-talk
Re: Multiple sequencer instances undesirably sharing information Marco A. Barra Montevechi Filho via Tech-talk

Navigate by Date:
Prev: Re: Multiple sequencer instances undesirably sharing information Marco A. Barra Montevechi Filho via Tech-talk
Next: RE: Multiple sequencer instances undesirably sharing information Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
Navigate by Thread:
Prev: Re: Multiple sequencer instances undesirably sharing information Marco A. Barra Montevechi Filho via Tech-talk
Next: RE: Multiple sequencer instances undesirably sharing information Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
ANJ, 08 Feb 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·