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  <20212022  2023  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: modbus read error
From: Дмитрий Прощенко via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 29 Mar 2021 20:13:08 +0700
Hi all, Im a student and a beginner in EPICS.
 
I am currently developing an IOC to drive a power supply (PS) via Modbus RTU. Using lib modbus R3-2.
I have a problem with DO reading, DO writing is successful. I can see, PS receives message and answers (what I dont know).
I thought there was a mistake in the argument in function in st.cmd, but I tested modbus start address and slave address in Modpoll.
Also asynReport was used, and according to it: ....name=IO_ERRORS, value=49,...... (depends on run time)
 
My error:
TEST-MSC-FUN:COIL-ONOFF-GET devAsynUInt32Digital::processCallbackInput process read error.
and sometimes:
drvModbusAsyn::doModbusIO port SET writeRead status back to normal having had 1 errors, nwrite=6/6, nread=5
 
What shout I pay attention to?
 
Its my db:
record (bi,"TEST-MSC-FUN:COIL-ONOFF-GET")
{
field(DESC, "Ctrl on/off PSU")
field(DTYP, "asynUInt32Digital")
field(INP, "@asynMask(GET 1 0x1) MODBUS_DATA")
field(ONAM, "ON")
field(SCAN, "1 second")
field(ZNAM, "OFF")
}
 
record (bo,"TEST-MSC-FUN:COIL-ONOFF-SET")
{
field(DESC, "ON OFF PSU")
field(DTYP, "asynUInt32Digital")
field(ONAM, "ON")
field(OUT, "@asynMask(SET 1 0x1)")
field(ZNAM, "OFF")
}

Its my st.cmd:
callbackParallelThreads
drvAsynSerialPortConfigure("PSU0", "/dev/ttyS1", 0, 0, 0)
asynSetOption("PSU0",0,"baud","57600")
asynSetOption("PSU0",0,"parity","none")
asynSetOption("PSU0",0,"bits","8")
asynSetOption("PSU0",0,"stop","1")
modbusInterposeConfig("PSU0",1,300,4)
# Function code=1
drvModbusAsynConfigure("GET", "PSU0", 1, 1, 0, 300, 0, 500, "PSU")
# Function code=5
drvModbusAsynConfigure("SET", "PSU0", 1, 5, 0, 128, 0, 1000, "PSU")

Replies:
RE: modbus read error Mark Rivers via Tech-talk

Navigate by Date:
Prev: RE: Phoebus lock down BOB Stainer Tom via Tech-talk
Next: Re: Phoebus lock down BOB Tynan Ford 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  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: Rate of change calculation Mark Rivers via Tech-talk
Next: RE: modbus read error 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  <20212022  2023  2024 
ANJ, 29 Mar 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·