EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  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  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Defining enums to express state?
From: Dirk Zimoch <[email protected]>
To: <[email protected]>
Date: Mon, 24 Nov 2014 10:12:19 +0100
Hello Ryan,

With StreamDevice, you can format and parse strings (including enums) for devices connected via asyn.

You can write a "protocol file" with commands like this:

fill {
  out "Fill the mash tun with %.1f gallons of water";
}

set_state {
  out "%{Close|Open}";
}

get_state {
  out "state?";
  in "%{Closed|Opening|Open|Closing|Partially Open}";
# be careful with the order of sub strings: "Open" after "Opening" !
}

http://epics.web.psi.ch/software/streamdevice/

Dirk


On 20.11.2014 20:58, Ryan Pierce wrote:
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


Replies:
Re: Defining enums to express state? Ryan Pierce
References:
Defining enums to express state? Ryan Pierce

Navigate by Date:
Prev: RE: Small bug in caget michael.abbott
Next: RE: Beckhoff EtherCAT Motion Control [SEC=UNCLASSIFIED] graham.cox
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Defining enums to express state? Mark Rivers
Next: Re: Defining enums to express state? Ryan Pierce
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·