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> | 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> |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Representing stateless device commands? |
From: | Mark Rivers via Tech-talk <tech-talk at aps.anl.gov> |
To: | "Feister, Scott" <scott.feister at csuci.edu>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Sat, 6 Jan 2024 20:26:20 +0000 |
Hi Scott,
Yes, this is exactly what is typically done. In fact, I was about to respond to your post from yesterday where you asked about how to set the value of the bo record back to 0. I was going to say that in that case the value of the bo record
is not important. You are not sending the value in the protocol, and you are probably not displaying the value in an OPI screen. You are using the bo record is as a “command” not a 2-value choice. In that case you don’t care what the value is. By writing
either 0 or 1 to the VAL field, or by writing 1 to the .PROC file you will force the record to process, and hence send the command to the device. There is no need to set the value back to 0 when the command is complete. Mark From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Feister, Scott via Tech-talk Hi EPICS community, I searched the tech-talk forums and documentation for this answer for a long time, because I am confident it’s in there somewhere if I could just search the correct words. However, after a long search, I decided I would stop and ask the
forum. How can I represent a command to a device (using StreamDevice) for a command that does not involve a process variable? For example, let’s say I have a device that has a single LED. It may accept two commands over RS232 such as: DecreaseBrightness IncreaseBrightness ToggleOnOff Since these commands operate on internal states to the device rather than states we as the user can access, we don’t actually have a PV state accessible directly to put into an EPICS PV. We just want to call those methods remotely from
EPICS. How can I basically send the above commands like I would in a Serial Terminal, but with EPICS? My approach right now is to call them binary outputs (bo) records, e.g. a bo record named “MYLED:IncreaseBrightness” and then just ignore the PV value itself. Then I do “caput MYLED:IncreaseBrightness 1” every time I want to increase brightness.
Is that a reasonable approach? Thanks! Scott |