Hi Marissa,
Ø
I am using asyn records to send commands to ethernet connected power supplies.
In general I would highly recommend using streamDevice to communicate with devices, rather than using the asyn record itself. The asyn record is more meant for debugging
than for actual device support. synApps does have a number of databases that use asyn records, many of which I wrote. But those were mostly written before streamDevice existed, and today I would use streamDevice.
Mark
From: Mark Rivers
Sent: Friday, January 10, 2020 4:18 PM
To: 'Marissa Kranz' <[email protected]>
Cc: [email protected]
Subject: RE: Carriage Return in asyn record IEOS/OEOS fields
Hi Marissa,
The asyn record documentation says this:
OEOS is set to the current value for the port when the record connects to the port. If OEOS is modified after the record connects to the port, then the output EOS will be changed using asynOctet->setOutputEos. IMPORTANT:
The value of OEOS in the database file is never used, because it is modified when the record connects to the port.
IEOS is set to the current value for the port when the record connects to the port. If IEOS is modified after the record connects to the port, then the input EOS will be changed using asynOctet->setInputEos. IMPORTANT:
The value of IEOS in the database file is never used, because it is modified when the record connects to the port.
You should set the input and output terminators for the asyn port itself, rather than in the asyn record.
Add the following lines to your startup script:
asynOctetSetInputEos("port",0,"\r")
asynOctetSetOutputEos("port",0,"\r")
where "port" is the name of the port you have created.
Mark
-----Original Message-----
From: Tech-talk <[email protected]> On Behalf Of Marissa Kranz via Tech-talk
Sent: Friday, January 10, 2020 4:03 PM
To: [email protected]
Subject: Carriage Return in asyn record IEOS/OEOS fields
Hello,
I am using asyn records to send commands to ethernet connected power supplies. This particular supply requires \r for its end of string terminator. When I put \r into the IEOS or OEOS field in an asyn record and boot the IOC, the \r
isn't instantiated in those fields- they are empty. I can dbput the \r in to those fields after the IOC is running to talk to the supply, but cannot get them to load at startup. I have confirmed that the \r exists in the .db files and tried using single and
double quotes to get the \r to instantiate in the record fields with no success. These fields have worked for me in the past with terminators like \n, but I cannot get it work with \r.
The record documentation lists \r as the default value for the OEOS and IEOS fields, but leaving these fields blank to allow for the default and booting the IOC does not allow for communication with the supply. I have to explicitly dbput
\r into the fields to be able to send and receive messages.
Has anyone encountered this is the past when using asyn and have a fix for getting the IOC to boot with \r in the OEOS and IEOS fields of asyn records?
Thank you,
Marissa Kranz
--
Marissa Kranz
Research Engineer
UW Medical Cyclotron Facility
University of Washington School of Medicine
425.246.4964