EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: genSub
From: Tim Mooney <[email protected]>
To: "Szalata, Zenon M." <[email protected]>
Cc: EPICS tech-talk <[email protected]>
Date: Sun, 14 Oct 2007 19:49:58 -0500


Szalata, Zenon M. wrote:

I have successfully put together a soft IOC which consists of a number "Soft Channel" type of records. These are mostly longin, one ot two bo and mbbo, and one genSub. In the edm companion for this IOC, I have a number of text controls to put new values into all the records with the exception of the genSub record. There is a Message Button in the edm program which is used to trigger processing of the genSub record, When genSub is processed it takes the values from all the other records, performs some calculations, creates a string of numeric values and prints the results. All works fine.
Next step in the evolution of this learning exercise is to output the calculated result to a GPIB CAMAC crate controller (in this case KS3988). I do not know how to do that.
I am using asyn.
1. genSub is not part of EPICS nor asyn. There is no DSET_xx type of definition
for it that I can find. 2. In my case I do not need a gpibCmd for it, but it seems to me that I need to
have the device( genSub, GPIB_IO, devyyxxxx, "XXXXX") statement, so that I can
specify that the output is GPIB_IO...
What do I need to do to accomplish that?
I have tried a few combinations and either the IOC generates a linking error or crashes with segmentation fault when the IOC is initialized. I guess, I need an example showing how to do that. I see in "myExample" (chapter 2 in EPICS IOC Application Developer's Guide) how to add a use defined "Soft Channel" type record.

You can't use device support with the genSub record. The record simply lacks
the code required to use device support. You'll have to get the genSub record to write to a record that can have device support, such as an ao record.


Once I overcome the previous difficulty, I think I will have another problem to solve.  This is what I am worried about.
1. When I send a certain combination of numberic values to KS3988, it should be
   ready to return some data.  That is, sending it some sequence of numbers
   prepares the crate controller to return some numeric results.
2. I am thinking to have a forward link in the genSub record to a waveform record
   which would be setup to read from the GPIB controller.  Is it guaranteed that
   the waveform record is processed after the genSub record has sent the command
   bytes to the controller?  If not, what should I do to assure properly timed
   execution of the two records?

Yes, If you have an output record that writes to a device and forward links to an input record, the input record will not process until the output record has
sent its data.


In view of previous comment, of course, you would in actual practice have the
genSub record write (using a PP link) to an ao record (for example), and have
the ao record forward link to the waveform record.

Many thanks in advance,
Zen


--
Tim Mooney ([email protected]) (630)252-5417
Beamline Controls & Data Acquisition Group
Advanced Photon Source, Argonne National Lab.

Replies:
RE: genSub Szalata, Zenon M.
References:
genSub Szalata, Zenon M.

Navigate by Date:
Prev: genSub Szalata, Zenon M.
Next: RE: genSub Szalata, Zenon M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: genSub Szalata, Zenon M.
Next: RE: genSub Szalata, Zenon M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·