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  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Sequencer: are variables shared?
From: Damiano Bortolato <[email protected]>
To: [email protected]
Date: Wed, 05 Nov 2014 01:04:09 +0100
On 11/04/2014 07:17 PM, Andrew Johnson wrote:
> Hi Damiano,
>
> If you want to be able to run multiple independent instances of a
> sequence program, you have to flag it as re-entrant, by adding a line
> "option +r;" after the program statement for example (you can also do it
> with a command-line flag, but the option statement is simpler).
>
> - Andrew
>
>
> On 11/04/2014 12:11 PM, Damiano Bortolato wrote:
>> Hi,
>>
>> I' trying to spawn a set of instances of a sequencer program from ioc
>> shell, the program is like this:
>>
>>
>> program myProgram
>>
>> int myVar;
>> assign myVar to "myPv{n}";
>> monitor myVar;
>>
>>
>> ss mySs {
>> ...
>> }
>>
>> Different input pvs are assigned to different program instances:
>>
>> epics> seq myProgram "n=_1"
>> epics> seq myProgram "n=_2"
>> ...
>> epics> seq myProgram "n=_n"
>>
>>
>> The problem is that the several instances seem to interfere each other,
>> I tried to print the address of the input variable (myVar) and I noticed
>> that they share the same myVar!!!
>> I've tried to move the myVar's definition inside the state set but the
>> problem persists.
>>
>> Is there a way to work around this problem, or must I run my sequencers
>> as stand-alone applications?
>>
>> Thanks in advance
>>
>> Damiano
>>
Hi Andrew,

Yes, now it works, thank you.

- Damiano

References:
Sequencer: are variables shared? Damiano Bortolato
Re: Sequencer: are variables shared? Andrew Johnson

Navigate by Date:
Prev: Re: read waveform data using ca_create_subscription Bruce Hill
Next: Re: Re: read waveform data using ca_create_subscription 吴煊
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Sequencer: are variables shared? Andrew Johnson
Next: MinGW PRODDIR_LDFLAGS Lang, Keenan C.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·