Experimental Physics and Industrial Control System
Hello,
I'm new to EPICS and I've been trying to write some simple programs just
to get to know the software.
Let me start with the database records I'm currently using:
record(bi,"$(user):goSub0") {
field(DESC,"Start Subroutine0")
field(DTYP,"Soft Channel")
field(FLNK,"$(user):stopsub")
field(ZNAM,"Go0")
field(ONAM,"Nogo0")
}
record(bi,"$(user):goSub1") {
field(DESC,"Start Subroutine1")
field(DTYP,"Soft Channel")
field(FLNK,"$(user):stopsub")
field(ZNAM,"Go1")
field(ONAM,"Nogo1")
}
record(sub,"$(user):stopsub") {
field(DESC,"SimpleTest")
field(INAM,"SubInit")
field(SNAM,"TestPrint")
field(INPA,"$(user):goSub0.VAL")
field(INPB,"$(user):goSub1.VAL")
}
The idea is, whenever any of the goSubx changes the TestPrint function
should be called. I'm using MEDM to create a simple GUI, where a button
(Message Button) has its Control Channel set to goSubx.VAL with the press
message set to 1.
As far as I know, this changes the value of goSub whenever I press the
button.
The question is, having the TestPrint function:
long TestPrint(struct subRecord *psu) {
return 0;
}
how can I determine which button was pressed? I wanted to check both
inputs and see which goSubx.VAL == 1 but I don't know how to get to the
biRecord pointer using the subRecord pointer. Is there any way to do this?
Thanks in advance for your help.
Kind Regards,
Pawel Predki
- Replies:
- Re: Getting value of a PV from a subRecord function Andrew Johnson
- Re: Getting value of a PV from a subRecord function Ned Arnold
- Navigate by Date:
- Prev:
Re: linking to shared objects user libraries Andrew Johnson
- Next:
Re: Getting value of a PV from a subRecord function Andrew Johnson
- 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: linking to shared objects user libraries J. Lewis Muir
- Next:
Re: Getting value of a PV from a subRecord function Andrew Johnson
- 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