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/
- Replies:
- Re: Array of strings with asyn? Rod Nussbaumer
- References:
- Array of strings with asyn? Ryan Pierce
- RE: Array of strings with asyn? Mark Rivers
- RE: Array of strings with asyn? Ryan Pierce
- Navigate by Date:
- Prev:
Re: Problem in running simple tutorial problems Matt Newville
- Next:
RE: EpicsQt compile problems rory.clarke
- 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: Array of strings with asyn? Ryan Pierce
- Next:
Re: Array of strings with asyn? Rod Nussbaumer
- 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
|