Experimental Physics and
| |||||||||||||||
|
We have a RS-232 device we wanted to control with EPICS (a Thales Optem zoom lens control stepping motor drive) that reported its status on a continuous basis. The IOC was a Linux box running 3.14 with the GpibCore driver used to talk to the serial port. Because the device didn't wait for a command but instead sent its status periodically, the serial port's input buffer would fill up and cause GpibCore to get an error and dump EPICS as soon as you tried to process any of the records going to the device's port. I thought about digging into the driver and making it more tolerant of babbling devices, but abandoned that idea in favor of an easier solution. I built a filter daemon which would open the serial port to the device and pick up the input stream, decode the status, and store it locally. The other side of the filter was through a pseudo-tty which emulated the device's command set, passing on commands to the device, but with the addition of a new command to read the local copy of the current status. This daemon ran in the background, and the GpibCore driver would talk to the pseudo-tty port instead of the serial port. The daemon was auto-started through the standard Linux init mechanisms. -- Eric Williams Advance Light Source Lawrence Berkeley Lab
| ||||||||||||||
ANJ, 10 Aug 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |