Experimental Physics and Industrial Control System
|
>> Are using standard asyn device support?
> I am using asynDriver with my own support.
I think you mean you are using your own asynPort driver, but you are using the standard asyn device support for the ai record from asyn/devEpics/devAsynInt32.c, right?
> you mean to say in my asynRead function i can directly write
case temperature:
retval = readCOMPort("0" , &val);
if (retval)
return asynError;
if (val < 10)
{
pasynUser->auxStatus = INVALID;
}
*value = val;
return asynSuccess;
return asynSuccess;
Not quite. It should be:
pasynUser->auxStatus = asynError;
Mark
From: Vikram Bhagat [mailto:[email protected]]
Sent: Wednesday, October 16, 2013 4:10 PM
To: Mark Rivers; epics talk
Subject: Re: asynError IOC message
Are you using an asyn port driver that you wrote? ->I am using my own asyn driver wrote using asynDriver
Are using standard asyn device support? I am using asynDriver with my own support.
What record type are you using? I am using ai record type
You seem to be using standard devAsynUInt32Digital device support. But it sounds like you are reading temperature, which I would have thought would use an "ai" record. But
devAsynUInt32Digital does not support the ai record. For that one would use devAsynInt32. Why are using devAsynUInt32Digital rather than devAsynInt32 (if the device returns an integer) or devAsynFloat64 (if the device returns a floating point number).
Actually i miss print there are 2 message on IOC one is for UInt32Digital and there is asynInt32, my mistake i picked up wrong one from IOC shell in copy past. i am using
ai record.
Are you saying that in your driver you are reading 10, and you would like the record to have INVALID alarm in this case, even though the hardware support as low as -10?
Actually in front end electronics not behave ok lower then 10 and second it is not of my interest. so I want to signal in device support that reading lower than 10 is INVALID.
even though i am displaying that value.
In your driver set the pasynUser->auxStatus field to asynError in your read() function or the callback function to device support. That will set the record alarm without printing
an error message. Don't return asynError as the function return, return asynSuccess instead.
you mean to say in my asynRead function i can directly write
retval = readCOMPort("0" , &val);
pasynUser->auxStatus = INVALID;
Hi Vikram,
Please answer the following questions:
Are you using an asyn port driver that you wrote?
Are using standard asyn device support?
What record type are you using?
You seem to be using standard devAsynUInt32Digital device support. But it sounds like you are reading temperature, which I would have thought would use an "ai" record. But devAsynUInt32Digital does not support the ai record. For that one would use devAsynInt32.
Why are using devAsynUInt32Digital rather than devAsynInt32 (if the device returns an integer) or devAsynFloat64 (if the device returns a floating point number).
Are you saying that in your driver you are reading 10, and you would like the record to have INVALID alarm in this case, even though the hardware support as low as -10?
If so, I really don't think you should be putting that logic in your driver, because someone else might want to use your driver and want to allow values less than 10. That logic belongs instead in your database, where you would set the LOLO field of an ai
record to 10. That way your record will have a MAJOR alarm because the value is less than 10.
But if you really want to put the logic in your driver then you can put the record into INVALID alarm without printing an error message as follows:
In your driver set the pasynUser->auxStatus field to asynError in your read() function or the callback function to device support. That will set the record alarm without printing an error message. Don't return asynError as the function return, return asynSuccess
instead.
Mark
________________________________
From: [email protected] [[email protected]] on behalf of Vikram Bhagat [[email protected]]
Sent: Wednesday, October 16, 2013 4:51 AM
To: epics talk
Subject: asynError IOC message
Hello,
If we return asynError instead of asynSuccess , the message display like "devAsynUInt32Digital::process read error" on IOC shell. This is just indicating something wrong in record processing. Is it possible to print user define message on IOC shell instead
of this standard message?
Actually i am reading data from serial port and that is form -10 to 100 degree. The value below 10 is INVALID for me. so i want <EPICS PV>.SEVR should write INVALID. for that i am returning asynError. Which make .SEVR to invalid but parallel it indicate the
above message.
Que.
(1) Instead of standard message i want my own message ,
(2) i don't want message to be printed on the IOC, just <EPICS PV>.SEVR should be INVALID.
Thanks
Vikram
|
- Replies:
- Re: asynError IOC message Vikram Bhagat
- References:
- asynError IOC message Vikram Bhagat
- RE: asynError IOC message Mark Rivers
- Re: asynError IOC message Vikram Bhagat
- Navigate by Date:
- Prev:
RE: Rigol DS1204B scope support [SEC=UNCLASSIFIED] LYNCH, Damien
- Next:
Electronic & Control Systems Engineer Job Postings at W.M. Keck Observatory Jimmy Johnson
- 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
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: asynError IOC message Vikram Bhagat
- Next:
Re: asynError IOC message Vikram Bhagat
- 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
2019
2020
2021
2022
2023
2024
|
ANJ, 20 Apr 2015 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|