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  2014  2015  <20162017  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  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Array of strings with asyn?
From: "Vasquez Stanescu, Jesus A" <[email protected]>
To: Rod Nussbaumer <[email protected]>, "[email protected]" <[email protected]>
Date: Wed, 9 Mar 2016 00:52:12 +0000
Hi Ryan,

I just wanted to mention out of topic that the Raspberry Pi has a 1-wire interface so, if you want, you can access the DS18B20 directly without using the Arduino. 

Jesus
________________________________________
From: [email protected] <[email protected]> on behalf of Rod Nussbaumer <[email protected]>
Sent: Tuesday, March 8, 2016 10:26 AM
To: [email protected]
Subject: Re: Array of strings with asyn?

Using streamDevice and an appropriate field separator ('Separator' in
the protocol file), you can read the long string into a waveform record,
converting each element to an appropriate numeric data type. Then, using
subarray records, pick individual elements out of the waveform record
into discrete scalars for display, archiving, alarming, etc.

Rod Nussbaumer,
TRIUMF


On 03/08/2016 07:14 AM, Mark Rivers wrote:
> I just thought of another option.  It is a hack, but it might work.  You could use an waveform of type double.  Those are 64-bits.  Your IOC could put the addresses in such an array with no numeric conversion.  If CSS can display a waveform of type double in hexadecimal notation then it should work.
>
> Certainly CSS can display a waveform of CHAR as a string, not just as a numeric array if you chose that option.
>
> Mark
>
> ________________________________
> From: Ryan Pierce [[email protected]]
> Sent: Tuesday, March 08, 2016 8:53 AM
> To: Mark Rivers; [email protected]
> Subject: RE: Array of strings with asyn?
>
> Sorry about the terminology confusion. What I meant to say is that I'm trying to pass this data via StreamDevice.
>
> It sounds like waveform can support an array of strings, but it's questionable whether that can get transmitted over StreamDevice? And it's questionable if CSS BOY could make use of a waveform of strings?
>
> Is it fair to assume a waveform of characters can go over StreamDevice and can be displayed in CSS BOY?
>
> Thanks,
> Ryan
>
>
> On March 8, 2016 7:42:07 AM CST, Mark Rivers<[email protected]>  wrote:
>
>   I have a number of DS18B20 temperature sensors on a OneWire serial bus
>   controlled by an Arduino Mega. A Raspberry Pi runs an IOC and communicates with the Arduino via asyn
>
> I think you may be confusing how the IOC (running on Raspberry Pi) makes the data available to EPICS clients, versus how the IOC gets the data from the Arduino, which you say is "via asyn".  I assume that when you say "via asyn" you mean that you are using one of the standard asyn drivers (drvAsynIPPort, drvAsynSerialPort, etc.).  If so, then there is no limitation on the format of that data, only that you need to define a protocol that both the Pi and the Arduino conform to.
>
>   I'm just not sure how to get that info
>    back
> to the IOC.
>   Ideally, I'd like it to be returned as an array of type stringin. But I don't know if such a thing exists in EPICS, or if it does, how to pass it through asyn.
>
> Getting that information from the Arduino to the Pi is not a problem, you can define whatever protocol works well for you.  There is no limitation of EPICS record types at that level.  You can use binary or ASCII hex, whatever is best for your application.
>
> Once the data is in the IOC then you do have to decide how to make it available to EPICS.  One way to do it is to use a number of stringin records, each using a different asyn ADDR field, which will be an index into the array of values you got from the Arduino.  That is easy for EPICS clients to handle, they just have a number of stringin records.  Another way would be to us a single waveform record, and encode all of the values as a single long string separated by commas or spaces.  That requires more work on the
>   EPICS
> client end, since they need to parse the string.  Whether or not that is a problem depends on what clients you use and what you need them to do.
>
> Mark
>
> ________________________________
>
> From: [email protected] [[email protected]] on behalf of Ryan Pierce [[email protected]]
> Sent: Monday, March 07, 2016 10:25 PM
> To: [email protected]
> Subject: Array of strings with asyn?
>
> I'm wondering how best to model the following situation....
>
> I have a number of DS18B20 temperature sensors on a OneWire serial bus
> controlled by an Arduino Mega. A Raspberry Pi runs an IOC and
> communicates with the Arduino via asyn. In other words, I'm implementing
> a smaller version of the solution I suggested back in January to measure
> a large number of temperatures.
>
> Each of these sensors has the equivalent of a unique MAC address that is
> 8 bytes long, and the sensors can be hot swapped on the bus. I'd like anoperator to be able to retrieve these. I can easily have the Arduino
> scan the bus and create a list of addresses. I'm just not sure how to
> get that info back to the IOC.
>
> I know I can create individual stringin records for the 1st, 2nd, 3rd.
> etc. address that was scanned, up to a defined maximum limit of
> temperature sensors, and have the Arduino return these as hex formatted
> strings. But I'm wondering if there's a better way.
>
> Ideally, I'd like it to be returned as an array of type stringin. But I
> don't know if such a thing exists in EPICS, or if it does, how to pass
> it through asyn.
>
> I can't return it as a single space or comma delineated string either,
> since I exceed the 40 character limit with 3 devices.
>
> I considered trying to pass these in binary form and convert it as hex
> for operator display, but I don't know if a 64 bit datatype exists.
>
> Is this something that a waveform r
>   ecord
> could do? If so, could CSS Boy
> display this as some kind of box or list of strings?
>
> Thanks,
> Ryan
>
> P.S. Latest EPICS controlled beer brewing update: As I mentioned last
> September, I had been stalled waiting for a CNC mill at a hackerspace to
> be repaired so that I could easily do precision drilling for the 60+
> holes I need to mount jacks on a control box. The mill still doesn't
> work, but I found a better solution: a friend with a waterjet cutter. It
> made short work of cutting all those holes, as well as a panel insert
> for more DIN rails. So things are progressing.... Update here:
> http://www.mackenziegems.com/2016/02/21/cnc-beer-part-3-fusion-360-and-waterjet-overkill/
>



References:
Array of strings with asyn? Ryan Pierce
RE: Array of strings with asyn? Mark Rivers
RE: Array of strings with asyn? Ryan Pierce
RE: Array of strings with asyn? Mark Rivers
Re: Array of strings with asyn? Rod Nussbaumer

Navigate by Date:
Prev: RE: Kohzu motors poll rate issue?? Mark Rivers
Next: RE: mrfioc2 error at uTCA platform 김지화(빔라인장치팀)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Array of strings with asyn? Rod Nussbaumer
Next: Q: Are any tools using gui_group() properties? Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·