Hi,
If it is simple, you could do something in record processing like this:
record(bo, "a_binary_PV") {
field(OUT, "a_sequence_PV.SELN PP")
field(ZNAM, "no_change")
field(ONAM, "change")
}
record(seq, "a_sequence_PV") {
field(SELM, "Specified")
field(DOL1, "an_action_PV_value")
field(LNK1, "an_action_PV PP")
}
But now "a_sequence_PV" is in the same lockset as the "a_binary_PV" which may not be acceptable.
Stephanie Allison
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf
> Of Song Hu
> Sent: Thursday, March 21, 2013 8:58 AM
> To: [email protected]
> Subject: how to trigger on positive edge only with snl
>
> Hi,
>
> I would like to trigger some actions when a binary PV changes from 0 to 1. No action
> should be taken when it changes from 1 to 0. I made some code like:
>
> int bin; assign bin to "abc:bin"; monitor bin;
> evflag binFlag; sync bin binFlag;
> ss ttt
> {
> state testState
> {
> when(efTestAndClear(binFlag)&&(bin == 1))
> {
> printf("Received a trigger!!\n");
> }state testState
> }
> }
>
> When abc:bin changes from 0 to 1 and then quickly go back to 0, it is not working every
> time.
>
> What is the appropriate way to implement such positive edge only trigger?
>
> Thanks in advance for your help.
>
> Song
- References:
- how to trigger on positive edge only with snl Song Hu
- Navigate by Date:
- Prev:
Re: how to trigger on positive edge only with snl Tim Mooney
- Next:
Re: how to trigger on positive edge only with snl Eric Norum
- 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: how to trigger on positive edge only with snl Benjamin Franksen
- Next:
eclipse --launcher.openFile problem on multi-user Linux Michael Davidsaver
- 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
|