There seems to be a bug in SNL 1.9 that won't keep variables in
separate tasks of the same sequence program separate.
Trying to load two instances of the following example SNL program.
pj:debug1 and pj:debug2 are flags (bo records) that turn on printing to
the VxWorks console whenever pj:ao1 or pj:ao2 (ao records),
respectively, are changed.
However, output appears when _either_ pj:debug1 or pj:debug2 are set to 1.
That is:
set pj:debug1 to 1 and pj:debug2 to 0, then change pj:ao1, you get output.
set pj:debug1 to 1 and pj:debug2 to 0, then change pj:ao2, you get output.
set pj:debug1 to 0 and pj:debug2 to 1, then change pj:ao1, you get output.
set pj:debug1 to 0 and pj:debug2 to 1, then change pj:ao2, you get output.
set pj:debug1 to 0 and pj:debug2 to 0, then change pj:ao1, no output.
set pj:debug1 to 0 and pj:debug2 to 0, then change pj:ao2, no output.
Now this code is not using any escaped C code so I shouldn't
need to reference variables as "pVar->old_v" and such.
Also, the local variable "old_v" in each task seems to be shared, as well.
Something is screwy here.
Any help?
Thanks,
Pete [email protected]
UNICAT
-----------------------------% clip here %-----------------------------
program test
/*
ld < test.o
seq &test, "name=test1, V=pj:ao1, D=pj:debug1"
seq &test, "name=test2, V=pj:ao2, D=pj:debug2"
td "test1"; td "test2"
*/
option +r;
float old_v; /* saved value to check for changes in v */
float v;
assign v to "{V}"; /* ao record */
monitor v;
short d;
assign d to "{D}"; /* bo record, flag that turns on debugging output */
monitor d;
ss quick_test {
state start {
when () {
old_v = v;
} state idle
}
state idle {
when (v != old_v) {
} state changed
}
state changed {
when () {
if (d > 0) {
printf(" from %g to %g \n", old_v, v);
}
old_v = v;
} state idle
}
} /* ss quick_test */
- Navigate by Date:
- Prev:
mv167/162 eproms Graham Waters
- Next:
Re: SNL 1.9 troubles William Lupton
- 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:
mv167/162 eproms Graham Waters
- Next:
Re: SNL 1.9 troubles William Lupton
- 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
|