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

Subject: RE: Asyn record proccessing( read functions) during PINI=YES
From: Patel Jignesh <[email protected]>
To: Mark Rivers <[email protected]>, "[email protected]" <[email protected]>
Date: Tue, 17 Mar 2015 08:46:51 +0000
Dear Mark,

Thanks for your reply and explanation.
Now I understand the process, so the best and easy option is to keep the drvInfo field different.

Thanks and best regards,
Jignesh

Jignesh PATEL
Control Systems Integration Technician
CODAC Section

ITER Organization, Building 72/4115, CHD, Control System Division
Route de Vinon-sur-Verdon - CS 90 046 - 13067 St Paul Lez Durance Cedex - France
Phone: +33 4 42 17 84 72
Get the latest ITER news on http://www.iter.org/whatsnew
-----Original Message-----
From: Mark Rivers [mailto:[email protected]] 
Sent: 16 March 2015 17:47
To: Patel Jignesh; [email protected]
Subject: RE: Asyn record proccessing( read functions) during PINI=YES

> I have tried other thing, as you have mentioned "bumpless reboot 
> process", I have checked interruptAccept flag in read function during its value "0" (before iocInit complete), I assume that whatever records are processed during this time mush have PINI=YES.
> And if only output records have PINI=YES, than I can identify them now.

This is not correct.  The fact that your "read" function is being called for output records is independent of the value of PINI for those records.  Your read function will ALWAYS be called for output records even if they have PINI=NO.  This is to support bumpless reboots, and it does not matter what the value of PINI is.

Mark



From: Patel Jignesh [mailto:[email protected]]
Sent: Monday, March 16, 2015 11:32 AM
To: Mark Rivers; [email protected]
Subject: RE: Asyn record proccessing( read functions) during PINI=YES

Dear Mark,

Thanks for your reply and info.

I am also using PINI filed for output records only. By keeping the drvInfo field different for same type of input and output records i.e. IN_INT8 and OUT_INT8 for INT8 I can distinguish the record types.

I have tried other thing, as you have mentioned "bumpless reboot process", I have checked interruptAccept flag in read function during its value "0" (before iocInit complete), I assume that whatever records are processed during this time mush have PINI=YES. And if only output records have PINI=YES, than I can identify them now.

So please give your comments for this method.

Thanks and best regards,
Jignesh



 
Jignesh PATEL
Control Systems Integration Technician
CODAC Section
 
ITER Organization, Building 72/4115, CHD, Control System Division Route de Vinon-sur-Verdon - CS 90 046 - 13067 St Paul Lez Durance Cedex - France
Phone: +33 4 42 17 84 72
Get the latest ITER news on http://www.iter.org/whatsnew
From: Mark Rivers [mailto:[email protected]]
Sent: 16 March 2015 16:48
To: Patel Jignesh; [email protected]
Subject: RE: Asyn record proccessing( read functions) during PINI=YES

Hi Jignesh,

Generally I don't use PINI=YES on input records, I set them to SCAN=I/O Intr and then as long as your driver does callbacks on them in the constructor they will process at least once when the IOC boots.

If an output record is processing because of PINI=YES then it will NOT call the read function in your driver, it will call the write function.  However, it will call the read function in your driver prior to the PINI=YES phase of iocInit when it attempts to read back the value from the driver to support "bumpless reboots".  I think you can probably distinguish whether the read is being called for an input record or an output record by querying EPICS base to find out what phase of iocInit is being executed.  

However, I think that is more complex than necessary, and I suggest that if you need to distinguish between output and input records then the simplest way is to use a different drvInfo field in the record and a different parameter for input and output.  Like the following:

record(bo, "$(P)$(R)SetGate")
{
   field(PINI, "YES")
   field(DTYP, "asynInt32")
   field(OUT,  "@asyn($(PORT),$(ADDR),$(TIMEOUT))GATE_OUT")
}

record(bi, "$(P)$(R)GetGate")
{
   field(PINI, "YES")
   field(DTYP, "asynInt32")
   field(INP,  "@asyn($(PORT),$(ADDR),$(TIMEOUT))GATE_IN")
}

Mark



From: [email protected] [mailto:[email protected]] On Behalf Of Patel Jignesh
Sent: Monday, March 16, 2015 3:28 AM
To: [email protected]
Subject: Asyn record proccessing( read functions) during PINI=YES

Hi,

In Asyn driver, for any record processing read function, during PINI=YES processing, can we distinguish between input and output records ?

I want to put some checks for address limits (i.e. typical db offset for PLC communication) which may be different for input and output records.
So during PINI processing, I want to check these limits for output records.

Can we use asynUser details, which may be different but not sure ? as its void pointer so difficult to use.

Thanks and best regards,
Jignesh



 
Jignesh PATEL
Control Systems Integration Technician
CODAC Section
 
ITER Organization, Building 72/4115, CHD, Control System Division Route de Vinon-sur-Verdon - CS 90 046 - 13067 St Paul Lez Durance Cedex - France
Phone: +33 4 42 17 84 72
Get the latest ITER news on http://www.iter.org/whatsnew


References:
Asyn record proccessing( read functions) during PINI=YES Patel Jignesh
RE: Asyn record proccessing( read functions) during PINI=YES Mark Rivers
RE: Asyn record proccessing( read functions) during PINI=YES Patel Jignesh
RE: Asyn record proccessing( read functions) during PINI=YES Mark Rivers

Navigate by Date:
Prev: RE: Making EPICS IOC admin tasks easier for end-users? tom.cobb
Next: RE: Problem with HDF5 plugin for areaDetector Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Asyn record proccessing( read functions) during PINI=YES Mark Rivers
Next: Questions about EPICSv4 (Ricardo Herrero) Ricardo Herrero
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·