Experimental Physics and
| |||||||||||||||||
|
Hi, Still i don't understand how i can implement this concept in my application. As i am using Asyn Driver, i have used 2 different reason in asynInt32 and for 2 record. asyn reason (1) delay -> i put one loop which read system time and compare with there time specified by value field of the PV by -> caput <PV name> <value time> if the system time is
greater than <value time> loop break and record processing complete with return value asynSuccess. asyn reason (2) currenttime -> read current time of the system -> it is simple scanning record with SCAN field of 1 second. If in project i
define only one PV with any one case of above, it works fine.... But if i use 2 PV and using both function same time, when i put delay value with $ caput <PV name> <value time> and monitor second PV on other terminal with camonitor <PV name (PV reading current valu)> the second PV read out hanged till completion of first PV complete it's delay time. Means reason (1) delay is keep execution in loop and
prevent execution of other PVs record processing. So i think i have to run loop in separate thread and kill that thread after completion of delay time and return asynSuccess. I am using asynDriver and it is necessory to return with asynSuccess. Or is there any other way to do this? from https://pubweb.bnl.gov/~mdavidsaver/epics-doc/epics-devsup.html#_asynchronous_example example i am not able to get how to do multi threading. With regards Vikram From: Michael Davidsaver <[email protected]> To: Vikram Bhagat <[email protected]> Cc: "[email protected]" <[email protected]> Sent: Monday, August 26, 2013 4:22 PM Subject: Re: epicsThread One mechanism for accomplishing what
you ask is a delayed callback based on a timer. When coupled with
asynchronous records (what the asyn module is based on) this gives
a way to have long delays in record processing without locking
everything up.
For an example see https://pubweb.bnl.gov/~mdavidsaver/epics-doc/epics-devsup.html#_asynchronous_example Michael On 08/26/2013 04:18 AM, Vikram Bhagat wrote:
| ||||||||||||||||
ANJ, 20 Apr 2015 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |