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
<2014>
2015
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
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|