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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Defining enums to express state? |
From: | Mark Rivers <[email protected]> |
To: | "'Ryan Pierce'" <[email protected]>, "[email protected]" <[email protected]> |
Date: | Thu, 20 Nov 2014 22:09:46 +0000 |
Hi Ryan, For your valves you would use mbbo and mbbi records. The enums for these have 2 items for each choice: a string and an integer value. If you use the asynInt32 interface
then the integer value is what is sent to the driver by the mbbo records. The integer values could just be the index (0, 1, 2, …) or they could be values that have a specific meaning to the driver if that corresponds to some specific value your valve controller
wants for each state. If you look at asyn/testAsynPortDriverApp/src and /Db you will see examples of using mbbo and mbbi records with asyn. If you have an mbbo or mbbi record BOY will just automatically populate the menu for you if you use the proper widget type. I am not a BOY expert so if you have specific
questions about that you can ask again. Mark From: [email protected] [mailto:[email protected]]
On Behalf Of Ryan Pierce This is probably a really basic question.... The computer controlled brewing project I mentioned on this list a few months back is coming along quite well. Much of the keg welding and plumbing is done, and I've made a lot of progress with the control box that holds the power supplies,
relays, Raspberry Pi, Arduino Mega, status lights, etc. I'm still a long way from actually brewing with it, as I haven't welded the frame or built out the propane system, but I'd like to try some integration testing with what I have. I've been experimenting with async, cmd_response on the Arduino / Raspberry Pi and have CSS BOY on my laptop. I think I understand how to use ao records to output temperature, flow rate, fluid levels, etc. The next task is to model my solenoid valves and motor controlled ball valves. I'd like to express states, e.g. Open, Closed, Opening, Closing, Partially Open, etc. and be able to send commands, e.g. Open, Close, Nudge Open, Nudge Closed.
I also need to send commands with an argument, e.g. "Fill the mash tun with 4.8 gallons of water" and monitor the progress. Right now I'd like to display and control this manually in BOY, and eventually I'd like to learn SNL to set up scripts to automate frequently used actions. Does anyone have any suggestions on resources to learn about defining enums in the db, how they are represented over async, and how to define command buttons and state indicators in BOY? Thanks, Ryan |