EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: A couple of drvAsyn/devGpib questions
From: Eric Norum <[email protected]>
To: "LYNCH, Damien" <[email protected]>
Cc: [email protected]
Date: Thu, 5 Jan 2006 16:07:01 -0600
What a truly bizarre command set.

I think that devGpib can handle this if you:
1) Set a really long I/O timeout value
2) Provide your own GPIBCVTIO routine to call the low level read and write routines.  This is quite simple because the GPIBCVTIO routine and low-level read and write routines operate in a single-threaded blocking environment.

You asked what sort of record would be appropriate for the final command/response example.  This depends on which of the response lines you're interested.  If you want to capture the whole thing you could use a waveform record with FTVL set to CHAR.   A gensub record or a sequence program could then distribute the values to multiples PVs.

On Jan 5, 2006, at 2:54 PM, LYNCH, Damien wrote:

Hi,

I have a serial device that I need to communicate with but I am not sure if I can use drvAsyn/devGpib to handle it. I am running EPICS v3.14.5 on Linux.

The device is a PC that runs a 3rd party program that controls a sample wheel that forms part of an ion source.

Sending a command from the IOC to the ion source PC commonly produces 4 responses.

For example say the IOC sends the following command to the ion source PC:
"LOAD06"
The IOC can expect the following 4 responses when the command is handled successfully:
"LOAD06"
"VALIDC"  # The first two responses return almost immediately.
"SAMPLE"  # We may have to wait up to 30 secs for this to come in.
"OKDONE"  # Then we have to wait up to 30 secs again for this last response to arrive.

Most of the commands we send to the ion source PC will produce responses similar to this example, except the times we can expect to wait for the responses are different. In some cases all 4 will come in within 2 seconds. Sometimes we may have to wait around 4 seconds for the responses to arrive.

If the above load command could not successfully complete we may receive 2 responses or 4 responses (depending on the problem).

Another command will produce a large amount of textual information.
For example if we send:
"INFSAM"
Then we can expect the following responses:
"VALIDC"
Then 7 lines of information (each terminated by "\r\n"):
Up to 6 chars
Up to 30 chars
Up to 20 chars
1 char
2 chars
1 char
2 chars
Then to finish off:
"OKDONE"

1. Can I use drvAsyn/devGpib to handle this device? If I write my own device support should I look to use drvAsyn underneath it?

2. What record type could I use to handle the last example command?

Thanks,
Damien


-- 

Eric Norum <[email protected]>

Advanced Photon Source

Argonne National Laboratory

(630) 252-4793




References:
A couple of drvAsyn/devGpib questions LYNCH, Damien

Navigate by Date:
Prev: A couple of drvAsyn/devGpib questions LYNCH, Damien
Next: Re: A couple of drvAsyn/devGpib questions Marty Kraimer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: A couple of drvAsyn/devGpib questions LYNCH, Damien
Next: Re: A couple of drvAsyn/devGpib questions Marty Kraimer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·