Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
<== Date ==> <== Thread ==>

Subject: Re: How to ignore ACK character in response (motor-6-9, asyn-4-30)
From: Torsten Bögershausen <torsten.bogershausen@esss.se>
To: David Vine <dvine@lbl.gov>, <tech-talk@aps.anl.gov>
Date: Thu, 6 Apr 2017 07:45:17 +0200
I don't think it is possible in asyn.

(But it may be added, if someone does it ;-)

Something like this may do the trick:

diff --git a/axisApp/OmsAsynSrc/omsBaseController.cpp b/axisApp/OmsAsynSrc/omsBaseController.cpp
index 28c79289..443bb6dd 100644
--- a/axisApp/OmsAsynSrc/omsBaseController.cpp
+++ b/axisApp/OmsAsynSrc/omsBaseController.cpp
@@ -432,6 +432,10 @@ asynStatus omsBaseController::getFirmwareVersion()
         count++;
         errlogPrintf("OMS Firmware Version: %s\n", inputBuffer);
     }
+
+    if (inputBuffer[0] == '\006')
+      memmove(&inputBuffer[1], &inputBuffer[0], sizeof(inputBuffer)-1);
+
     //beta versions have a B as first letter

On 06/04/17 00:28, David Vine wrote:
Hi all,

i'm using asyn-4-30 & motor-6-9 to talk to an OMA MAXnet over ethernet.

How do I configure asyn to ignore the first character i get in the response
(which is ACK \006)? For example, the command "WY;" gets the model and serial
number:

2017/04/05 15:24:34.634 MAXnet:asyn:: nwrite=3, status=0, nawt=3
WY;
2017/04/05 15:24:34.637 MAXnet:asyn:: inlen=40, status=0, ninp=40
MAXn-A000 ver:1.49, s/n:000375, FPGA:AA
2017/04/05 15:24:34.637 MAXnet:asyn:: inlen=40, nbytesTransfered=40, ntranslate=46

Thanks in advance,
David


Relevant part of st.cmd:
# MAXnet IP
drvAsynIPPortConfigure("MAXNET","10.40.30.60:23 <http://10.40.30.60:23>",0,0,0)
# MAXnet Serial
#drvAsynSerialPortConfigure("MAXNET","/dev/ttyUSB0",0,0,0)
#asynSetOption("MAXNET",0,"baud","115200")
#asynSetOption("MAXNET",0,"bits","8")
#asynSetOption("MAXNET",0,"parity","none")
#asynSetOption("MAXNET",0,"crtscts","Y")
dbLoadRecords("$(ASYN)/db/asynRecord.db","P=MAXnet:,R=asyn:,PORT=MAXNET,ADDR=0,OMAX=0,IMAX=0")
asynSetTraceMask("MAXNET", 0, 0x23)
asynSetTraceIOMask("MAXNET", 0, 1)
#dbLoadRecords("$(TOP)/stxmApp/Db/MAXnet.db",
"PORT=MAXNET,P=MAXnet:,R=meta:,Q=io:")

asynOctetSetInputEos("MAXNET",0,"\n")
asynOctetSetOutputEos("MAXNET",0,"\n")

# omsMAXnetConfig(portName,              /* MAXnet Motor Asyn Port name */
#                 numAxes,               /* Number of axes this controller
supports */
#                  serialPortName,       /* MAXnet Serial Asyn Port name */
#                  movingPollPeriod,     /* Time to poll (msec) when an axis is
in motion */
#                  idlePollPeriod,       /* Time to poll (msec) when an axis is
idle. 0 for no polling */
#                  initString)           /* Init String sent to card */
omsMAXnetConfig("MAXNET1" , 10, "MAXNET", 100, 60000, "")



Replies:
Re: How to ignore ACK character in response (motor-6-9, asyn-4-30) David Vine
References:
How to ignore ACK character in response (motor-6-9, asyn-4-30) David Vine

Navigate by Date:
Prev: Re: Additional RELEASE file checks Konrad, Martin
Next: Python CaChannel related modules Wang Xiaoqiang (PSI)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
Navigate by Thread:
Prev: How to ignore ACK character in response (motor-6-9, asyn-4-30) David Vine
Next: Re: How to ignore ACK character in response (motor-6-9, asyn-4-30) David Vine
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
ANJ, 07 Apr 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·