EPICS Home

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

Subject: RE: device support for CPCI
From: <[email protected]>
To: <[email protected]>, <[email protected]>
Date: Wed, 30 May 2012 08:21:04 +0000

 

Hello Zia,

 

I would suggest you look at using the Asyn interface layer. At the last EPICS meeting Mark Rivers gave  a good tutorial on Asyn and a step-by-step guide to writing a driver.  See

 

https://slacportal.slac.stanford.edu/sites/conf_public/epics_2012_04/presentations/asynTalk.pdf

https://slacportal.slac.stanford.edu/sites/conf_public/epics_2012_04/presentations/measCompDriverTalk.pdf

https://slacportal.slac.stanford.edu/sites/conf_public/epics_2012_04/presentations/asynTraining2012.zip

 

Regards.

 

Mark

 

From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: 30 May 2012 07:33
To: [email protected]; [email protected]
Subject: RE: device support for CPCI

 

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: [email protected] [mailto:[email protected]] 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


References:
device support for CPCI Qazi Zia-ul-Haque
RE: device support for CPCI michael.abbott

Navigate by Date:
Prev: [StreamDevice] parsing rapid inputs Pavel Masloff
Next: Problem when caput to waveform record 王林
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: device support for CPCI michael.abbott
Next: Re: device support for CPCI Julio Calvo
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024