EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: the command formats in RS232
From: Allan Honey <[email protected]>
To: [email protected], [email protected]
Cc: [email protected]
Date: Thu, 10 Jul 2003 08:15:32 -1000 (HST)
> From: "Lifang Zheng" <[email protected]>
> 
> Hi everyone,
> 
> We are developing 100MeV LINAC vacuum control system through RS232 serial. The 
hardware has a VIPC616 carrier and an IP-Octal-232. The software includes 
drvSerial,drvAscii,drvIpac,drvVipc616, tyGSOctal and devAscii. The first test 
was successfully with the help of Allan Honey and Steven Hartman a few month 
ago.
> 
> But we have one problem. Some of the commands use the format d.ddde-dd, but 
the OUT field of AO have to be specified as %e instead of %9.3e or %.3e. So the 
value of AO will be sent as d.ddd000e-dd which doesn't meet our requirement.
> Does somebody meet the same problem? Is there any solution?
> 
> Any suggestion is welcome,
> 
> Lifang
>

Aloha

Hopefully, the following will help. 

The following excerpt is from the modification history in the header of 
devAscii.c (there is an example of a simple checksum protocol at the bottom of 
drvAscii.c)

 *    4. User-specified framing routines can be specified.
 *     With this release one can create their own input and output
 *     framing routines and have them override the default getFrame()
 *     and putFrame() routines. This allows one to do more sophisticated
 *     packet framing (e.g. a simple checksum could be added/checked).
 *
 *     To specify special framing routines one must download the library,
 *     they created, containing those routines, then register the 
 *     functions with drvAsciiSetTxFunc() and drvAsciiSetRxFunc(), all
 *     prior to iocInit. Note that a different set of framing routines 
 *     can be registered for each serial link. Also note that there are
 *     special requirements imposed on the framing routines. An example
 *     exists within drvAscii.c
 *     
 
Of course the output routine would be called after the incorrect real format is 
embedded in the command string (for Lifang's case) so it will be a bit messy to 
undo that.


Alternatively, you could hack processFormat() in drvAscii.c 
Look for 
    while ( isdigit( *spec ) ) {

This needs to be modified to accept '.' 
In the current state this '%ne' is valid but '%n.me' is not.


I will work towards modifying drvAscii so that it accepts numeric format specs
(i.e. '%n.me' rather than just '%e' - not this week though). When the new 
release is available you should only need to modify your startup script to 
remove the use of your own format routines, assuming you go that route.

AH

 
 


Navigate by Date:
Prev: RE: the command formats in RS232 Geng, Xiaosong
Next: Specifications for the JLab archiver machine Matt Bickley
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  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: the command formats in RS232 Geng, Xiaosong
Next: EPICS 3.14.2 Under Windows Cox, G (Graham)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·