g+
g+ Communities
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  <20122013  2014  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
<== Date ==> <== Thread ==>

Subject: RE: device support for CPCI
From: <michael.abbott@diamond.ac.uk>
To: <smzhaq@gmail.com>, <tech-talk@aps.anl.gov>
Date: Wed, 30 May 2012 06:32:49 +0000

The best reference seems to be base/src/dbStatic/dbStaticLib.c and link.h (looks like link strings are parsed by dbPutString and formatted by dbGetString, both in dbStaticLib.c).  There is something of a surfeit of choices, but in the end all your options end up packed into the same union presented as struct link (link.h).

 

All the instrument types have an unparsed string part, so one option you could have if the card really is a VME card would be to use VME_IO and write your input fields as “#Ca Sb @c” where you’ll have to use atoi(link→value.vmeio.parm) to get at c.  If the card really is VME hardware this would be the most honest way to go.

 

A second option is to use INST_IO and write INP = “@a b c” and do your own parsing, and a third option I guess would be to find one of the other formats that matches ... but actually your options there look poor, the best fit I can see is BBGPIP_IO “#La Bb Gc” but you’re restricted to numbers in the range 0..255 and it’s pretty dishonest (ie, confusing to the next person looking at the code).

 

Personally if the card isn’t really VME hardware I’d go with INST_IO and parse the free format string link→value.instio.string.

 

From: tech-talk-bounces@aps.anl.gov [mailto:tech-talk-bounces@aps.anl.gov] On Behalf Of Qazi Zia-ul-Haque
Sent: 30 May 2012 06:53
To: tech-talk
Subject: device support for CPCI

 

Hi

I am willing to write the device support for cPCI 7432 card for EPICS in an industrial PC running windows XP. I have the API functions, header file and dll. I am confused only about choosing the second field for this line

device(bi,VME_IO,devAiCPCI,"cpci")

as using VME_IO will need to define the INP field as #Ca Sb (Only Card and Signal Numbers) whereas in the API I will need three fields i.e. card number, port number and line (signal) number.

This is my first time to write a device support so I need the advice from experienced for answers to this question that...... What should I choose the signal type here in second field of that line and how is it mapped to API functions from INP field.

I tried a lot to search answer to this question but it was my weakness that I could not find or understand from available material on web.

With Best Regards

--
Zia


Replies:
RE: device support for CPCI mark.heron
References:
device support for CPCI Qazi Zia-ul-Haque

Navigate by Date:
Prev: device support for CPCI Qazi Zia-ul-Haque
Next: [StreamDevice] parsing rapid inputs Pavel Masloff
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
Navigate by Thread:
Prev: device support for CPCI Qazi Zia-ul-Haque
Next: RE: device support for CPCI mark.heron
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·