Ian,
The documentation says that what you have should work. I practice, I
have used \x03 and \x02 instead of \003 and \002 for a similar device
and it has worked. Let me know if this fixes your problem.
Rodney Porter
Sr. Scientific Programmer
Data Aquisition & Detector Systems
Intense Pulsed Neutron Source
Argonne National Laboratory
9700 So. Cass Ave
Argonne, IL 60439 USA
Ph. (630) 252-7151
E-mail: [email protected]
IPNS website: www.pns.anl.gov
-----Original Message-----
From: Ian A Smith [mailto:[email protected]]
Sent: Friday, March 03, 2006 4:10 AM
To: [email protected]
Subject: drvAscii codes
I'm trying to get epics to talk to an (awkward) piece of equipment. It
requires: "[stx]command[etx][cr][lf]", where of course, [stx] and [etx]
are ascii 2 and 3.
I've succeeded in puting the [etx] on the end of lines but I get the
literal string "\002" instead of [stx] at the start, so I'm looking for
help!
The record which successfully puts [etx] in line termination is:
record(stringout,"scu2CCS:shutter:coms:txCmd") {
field(DESC,"string output record")
field(SCAN,"Passive")
field(PINI,"YES")
field(PHAS,"0")
field(EVNT,"0")
field(DTYP,"Ascii SIO")
field(DISV,"1")
field(SDIS,"0.000000000000000e+00")
field(DISS,"NO_ALARM")
field(PRIO,"LOW")
field(FLNK,"0.000000000000000e+00")
field(VAL,"\003\r\n")
field(DOL,"\003\r\n")
field(OMSL,"closed_loop")
field(OUT,"@/pty/shutterM <writeCmt %s>")
field(SIOL,"0.000000000000000e+00")
field(SIML,"0.000000000000000e+00")
field(SIMS,"NO_ALARM")
field(IVOA,"Continue normally")
field(IVOV,"")
}
and the record which fails to put [stx] in the command line is:
record(stringin,"scu2CCS:shutter:test") {
field(DESC,"string input record")
field(SCAN,"10 second")
field(PINI,"NO")
field(PHAS,"0")
field(EVNT,"0")
field(DTYP,"Ascii SIO")
field(DISV,"1")
field(SDIS,"0.000000000000000e+00")
field(DISS,"NO_ALARM")
field(PRIO,"LOW")
field(FLNK,"0.000000000000000e+00")
field(VAL,"string")
field(INP,"@/pty/shutterM <\002SUI><%s>")
field(SIOL,"0.000000000000000e+00")
field(SIML,"0.000000000000000e+00")
field(SIMS,"NO_ALARM")
}
TIA