EPICS Controls 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  2012  <20132014  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  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Record Parameters in Asyn Port Driver
From: "Igor H. Soares Nunes" <[email protected]>
To: Mark Rivers <[email protected]>, "[email protected]" <[email protected]>
Date: Tue, 6 Aug 2013 11:12:47 -0300
Hi Mark,

I am developing an IOC to communicate with a micro-controller using TCP/IP and Serial communication. I need to send messages to this devices according to some parameters specified in the records.
For example: 

If I had a record with this inp field:
field(INP, "@$(address).$(variableID=1).$(nbytes=4)") 
I could use the following code in device support to get this values (not using asyn):

static long init_record_mbbo(mbboRecord *record){

 	int address,variable,numbytes;
 	if(sscanf(record->inp.value.instio.string, "%d.%d.%d", &address,&variable,&numbytes)!=3)
		return S_db_errArg;


The meaning of these fields are:
Send a message to a device whose address is "address", read (or write) a variable whose id is 1, and whose size is 4 bytes.

And also, if I wanted to use the "number of bits" field in mbbi/mbbo records I could just simply use the code:

number_of_bits = record->nobt;

This is what I wanted my device and driver to do. Do I make myself clear about it?

 
Igor H. Soares Nunes
Centro Nacional de Pesquisa em Energia e Materiais (Cnpem)
Laboratório Nacional de Luz Síncrotron (Lnls)
Grupo de Diagnóstico de Feixes (Dig)
________________________________________
From: Mark Rivers [[email protected]]
Sent: Monday, August 05, 2013 2:28 PM
To: Igor H. Soares Nunes; [email protected]
Subject: RE: Record Parameters in Asyn Port Driver

Hi Igor,

The idea of asyn port drivers is that they don't know anything about the EPICS records.  They only know about the standard asyn interfaces (asynInt32, asynUInt32Digital, asynOctet, etc.).  The device-independent device support in asyn/devEpics is the only code that knows about the record fields.

Can you please explain what you want your driver to do, and I can probably tell you how to do it without your asyn port driver needing to know anything about the record fields.

Mark

________________________________________
From: [email protected] [[email protected]] on behalf of Igor H. Soares Nunes [[email protected]]
Sent: Sunday, August 04, 2013 2:27 PM
To: [email protected]
Subject: Record Parameters in Asyn Port Driver

Hello everyone,

I'm developing an IOC using Asyn Port Driver, and I couldn't find out how to get some record parameters in the device support code (cpp file).

I need to get the INP and OUT parameters (port,addres,mask,timeout,...) and also NOBT for mbbi and mbbo records. As well as parameters for ai and ao records (EGUF, EGUL, etc).

Can anyone help me?


Igor H. Soares Nunes
Centro Nacional de Pesquisa em Energia e Materiais (Cnpem)
Laboratório Nacional de Luz Síncrotron (Lnls)
Grupo de Diagnóstico de Feixes (Dig)


Replies:
RE: Record Parameters in Asyn Port Driver Mark Rivers
References:
Record Parameters in Asyn Port Driver Igor H. Soares Nunes
RE: Record Parameters in Asyn Port Driver Mark Rivers

Navigate by Date:
Prev: RE: Modbus Mark Rivers
Next: RE: Record Parameters in Asyn Port Driver Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Record Parameters in Asyn Port Driver Mark Rivers
Next: RE: Record Parameters in Asyn Port Driver Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·