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  2015  2016  2017  2018  <20192020  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  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: asynError in write on Power PMAC IOC
From: "giles.knap--- via Tech-talk" <[email protected]>
To: Chanaka <[email protected]>, "[email protected]" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Wed, 2 Jan 2019 10:08:14 +0000
Hi Chanaka,


It appears that you are sharing the connection port with a stream device (in order to determine if PLC 15 is running)? I would not recommend this. Instead you can add a dynamic parameter to one of the poll loops so that the driver will monitor it for you and efficiently manage communications with the power pmac.

In this case you could use
record(longin, "$(P){$(DEV)}TrajInitPlc-Read")
{
    field(DTYP, "asynInt32")
    field(INP, "@asyn(PMAC_CONTROLLER,0)PMAC_VIM_Plc[15].Running")
    field(SCAN, "I/O Intr")
}

This will update on the medium scan loop every 2 seconds. The slow loop is 5 seconds and the fast loop has two rates, idle and moving, which are specified as parameters to pmacController constructor.

You should replace all of you protocol functions with a similar pattern.

I do not think the documentation covers dynamic parameters as yet, but the comments under pmacController::drvUserCreate give the following details:

// Accepted parameter formats
//
// For reading variables
// PMAC_VxF_...  => PMAC Variable Fast Loop
// PMAC_VxM_...  => PMAC Variable Medium Loop
// PMAC_VxS_...  => PMAC Variable Slow Loop
//
// x is I for int, H for hex, D for double or S for string
//
// There must be no j or = in a variable, these items will simply be polled for their current status
//
// For Writing only
// PMAC_WI_... => Write Integer Value
// PMAC_WD_... => Write Double Value
// PMAC_WS_... => Write String Value
//
// Writing to these parameters will result in immediate writes to the PMAC

( One of the main goals of the pmac driver is to efficiently manage communications with the hardware. We have a message broker that batches up all requests to poll for values into the 3 poll loops, the responses are distributed to any objects that have registered interest. There is only one instance of the message broker and it is the only object that communicates with the hardware. Thus requests through drvAsynPowerPMACPort are on a single thread. If you share the drvAsynPowerPMACPort with a stream device then it will be being called on more than one thread. It should be using locking and should work but has not been tested in this fashion. )

Regards,
giles.



________________________________
From: [email protected] <[email protected]> on behalf of Chanaka via Tech-talk <[email protected]>
Sent: 31 December 2018 16:03:40
To: [email protected]
Subject: asynError in write on Power PMAC IOC

Dear All,

I am running into a hanging issue while performing scans using higher level software due to a WRITE INVALID caused by lower-level EPICS PVs. The occurrence is intermittent. From what I can find on line this *could* be due to how SCAN filed is setup in this database for the relevant PVs. I am not entirely sure if that could be the case. Any help would be appreciated.

--The specific error I see in the IOC shell is the following. This is for one of the PVs.

2018/12/28 17:46:07.974527 SSH1 XF:07BMA-OP{MC:03}TrajInitPlc-Read: asynError in write: 10.7.130.93 write error

--And camonitor returned the following.

XF:07BMA-OP{MC:03}TrajInitPlc-Read 2018-12-28 17:46:07.974595 0 WRITE INVALID

--The PV is defined as follows.

record(ai, "$(P){$(DEV)}TrajInitPlc-Read")
{
    field(DTYP, "stream")
    field(INP,     "@ppmac_stream.proto getVarInt(Plc[15].Running) $(SSH)")
    field(SCAN, "0.5 second")
}

-- getVarInt is defined as follows

getVarInt{
    out "\$1";
    in "\n\$1=%d";
}

-- Port configuration is as follows

drvAsynPowerPMACPortConfigure("SSH1", "10.7.130.93", "root", "deltatau", "0", "0", "0")

Thank you,

Chanaka De Silva
NSLSII

-- 
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom


Replies:
Re: asynError in write on Power PMAC IOC Wayne Lewis via Tech-talk

Navigate by Date:
Prev: Error while building basic IOC application Deep Patel via Tech-talk
Next: Re: asynError in write on Power PMAC IOC Wayne Lewis via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Error while building basic IOC application Deep Patel via Tech-talk
Next: Re: asynError in write on Power PMAC IOC Wayne Lewis via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
ANJ, 02 Jan 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·