![]() |
![]() ![]()
Experimental Physics and
| ||||||||||||||
|
Hi Mark, 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? -Yes I tried with pasynUser->auxStatus = asynError; But still <EPICS PV>.SEVR is NO_ALARM . I would like to have INVALID Thanks Vikram On Thursday, October 17, 2013 1:13 AM, Mark Rivers <[email protected]> wrote: >> 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 Hi Mark,
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
case temperature:
retval = readCOMPort("0" , &val);
if (retval)
return asynError;
if (val < 10)
{
pasynUser->auxStatus = INVALID;
}
*value = val;
return asynSuccess;
Thanks & Regards
Vikram
On Wednesday, October 16, 2013 2:28 PM, Mark Rivers <[email protected]> wrote:
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
| ||||||||||||||
ANJ, 20 Apr 2015 |
![]() · Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |