EPICS Controls 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  2018  2019  2020  2021  <20222023  2024  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  2018  2019  2020  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Configuring serial communication with Lakeshore 331 via Moxa
From: Heinz Junkes via Tech-talk <tech-talk at aps.anl.gov>
To: "Wlodek, Jakub" <jwlodek at bnl.gov>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 2 Feb 2022 19:04:12 +0100
Hello Jakub,
You connect to the Moxa via TCP/IP, then you don't have to make these settings:

> asynSetOption("LAKE1", -1, "baud", "9600")
> asynSetOption("LAKE1", -1, "bits", "8")
> asynSetOption("LAKE1", -1, "parity", "odd")
> asynSetOption("LAKE1", -1, "stop", "1")

You have already done this on the Moxa.

Which mode (socket?, reverse terminal?) have you set on the Moxa for the port to which the lakeshore is connected to?
Gruss Heinz



> On 2. Feb 2022, at 18:30, Wlodek, Jakub via Tech-talk <tech-talk at aps.anl.gov> wrote:
> 
> Apologies, sent the first message before attaching the below examples:
> 
> First, the standard *IDN? command gets us L\\xba%,s\\x8aEj\\x9b1:i\\xbb2&\\xd3b1&\\xa3\\ as a response
> 
> [jwlodek@xf06bm-ioc2 ioclakeshore331]$ caput XF:06BM-LS331:01:serial.AOUT "*IDN?"
> Old : XF:06BM-LS331:01:serial.AOUT   *IDN?
> New : XF:06BM-LS331:01:serial.AOUT   *IDN?
> [jwlodek@xf06bm-ioc2 ioclakeshore331]$ caget XF:06BM-LS331:01:serial.TINP
> XF:06BM-LS331:01:serial.TINP   L\\xba%,s\\x8aEj\\x9b1:i\\xbb2&\\xd3b1&\\xa3\\
> [jwlodek@xf06bm-ioc2 ioclakeshore331]$ caget -S XF:06BM-LS331:01:serial.ERRS
> XF:06BM-LS331:01:serial.ERRS timeout  nread 23 SOMEIP:SOMEPORT timeout: Resource temporarily unavailable
> 
> while RANGE? gets us \\xb0C\\xf1
> 
> [jwlodek@xf06bm-ioc2 ioclakeshore331]$ caput XF:06BM-LS331:01:serial.AOUT "RANGE?"
> Old : XF:06BM-LS331:01:serial.AOUT   *IDN?
> New : XF:06BM-LS331:01:serial.AOUT   RANGE?
> [jwlodek@xf06bm-ioc2 ioclakeshore331]$ caget XF:06BM-LS331:01:serial.TINP
> XF:06BM-LS331:01:serial.TINP   \\xb0C\\xf1
> 
> From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Wlodek, Jakub via Tech-talk <tech-talk at aps.anl.gov>
> Sent: Wednesday, February 2, 2022 12:25 PM
> To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
> Subject: Configuring serial communication with Lakeshore 331 via Moxa
>  
> Hi all,
> 
> I've been working to get an IOC up and running for a lakeshore 331 TC we have here at NSLS2, using the support for it I found in the ip module on github: https://github.com/epics-modules/ip/blob/master/ipApp/Db/LakeShore331.db
> 
> To start, I have the IOC just creating the asyn port pointing at the TCP Server on the appropriate port on the moxa, and I load the asynRecord database, so I can test sending/receiving commands using the asynOctet interface. I configured the serial connection on the moxa, asyn, and the device to 9600 baud, 8 data bits, and one stop bit, and I can see that I am communicating with the device on some level, however, the responses I am seeing don't seem correct; they are full for unexpected characters, and don't match the format listed in the manual. I am guessing there is still something I missed in the configuration of the serial connection.
> 
> Current IOC startup:
> 
> [jwlodek@xf06bm-ioc2 ioclakeshore331]$ more st.cmd
> #!../../bin/linux-x86_64/lakeshore331
> 
> epicsEnvSet("SYS", "XF:06BMB-CT")
> epicsEnvSet("IOC_P", "$(SYS){IOC:LS1}")
> epicsEnvSet("PREFIX", "XF:06BM-")
> 
> < envPaths
> 
> cd ${TOP}
> 
> ## Register all support components
> dbLoadDatabase("$(TOP)/dbd/lakeshore331.dbd",0,0)
> lakeshore331_registerRecordDeviceDriver(pdbbase)
> 
> 
> drvAsynIPPortConfigure("LAKE1", "SOMEIP:SOMEPORT")
> asynOctetSetOutputEos("LAKE1", 0, "\r\n")
> #asynOctetSetInputEos("LAKE1", 0, "\r\x8a")
> 
> asynSetOption("LAKE1", -1, "baud", "9600")
> asynSetOption("LAKE1", -1, "bits", "8")
> asynSetOption("LAKE1", -1, "parity", "odd")
> asynSetOption("LAKE1", -1, "stop", "1")
> 
> dbLoadRecords("$(EPICS_BASE)/db/asynRecord.db", "P=$(PREFIX), R=LS331:01:serial, PORT=LAKE1, ADDR=0, OMAX=0, IMAX=0")
> 
> var streamDebug 2
> 
> iocInit()
>  
> 
> Also, while every command I send gets some (different) response, I seem to get a timeout error for the asynOctet interface, indicating something is not quite right:
> 
> 
> Has someone configured such a device that has run into a similar issue? Or alternatively, does anyone know what could the cause be?
> 
> Thanks for the help!
> Jakub


References:
Configuring serial communication with Lakeshore 331 via Moxa Wlodek, Jakub via Tech-talk
Re: Configuring serial communication with Lakeshore 331 via Moxa Wlodek, Jakub via Tech-talk

Navigate by Date:
Prev: RE: Configuring serial communication with Lakeshore 331 via Moxa Mark Rivers via Tech-talk
Next: RE: Questions from the Static Database Access chapter of the Application Developer's Guide Wang, Andrew via Tech-talk
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  2018  2019  2020  2021  <20222023  2024 
Navigate by Thread:
Prev: RE: Configuring serial communication with Lakeshore 331 via Moxa Pearson, Matthew via Tech-talk
Next: RE: Configuring serial communication with Lakeshore 331 via Moxa Mark Rivers via Tech-talk
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  2018  2019  2020  2021  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·