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  <20192020  2021  2022  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  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: modbus Write operation
From: Vishnu Patel via Tech-talk <[email protected]>
To: "[email protected]" <[email protected]>
Date: Tue, 22 Oct 2019 09:47:25 +0000
Hi,

   I would like to write using modbusRTU EPICS Driver.

(1)I used  write function for "write multiple coils (15)" modbus function.


drvModbusAsynConfigure("DACD_AMT_EU1_WRITE_MB_0000",  "DACD_AMT_EU1", 1, 15, 0, 32,    0,  100, "EU")

The function error output below.

2019/10/22 14:58:49.789 drvModbusAsyn::doModbusIO port DACD_AMT_EU1_WRITE_MB_0000 error calling writeRead, error=, nwrite=6/6, nread=0


(2) With holding register(03) READ function is ok.

But write gives an error as below

2019/10/22 15:11:41.117 drvModbusAsyn::doModbusIO port DACD_AMT_EU1_RW_MW_11000 error calling writeRead, error=, nwrite=6/6, nread=0
iocRun: All initialization complete
epics> 2019/10/22 15:12:20.517 drvModbusAsyn::writeUInt32D port DACD_AMT_EU1_RW_MW_11000 invalid request for Modbus function 3
2019/10/22 15:12:20.517 DACD_AMT_W_FR1 devAsynUInt32Digital::processCallbackOutput process error




I am reading and write Holding Register 11000 using longin & longout record.


file "../../db/longin.template" { pattern
{P,           R,                PORT,     OFFSET,   SCAN}
{DACD_AMT_,     R_FR1,          DACD_AMT_EU1_RW_MW_11000,       0,     "I/O Intr"}
}

file "../../db/longout.template" { pattern
{P,           R,               PORT,      OFFSET}
{DACD_AMT_,     W_FR1,          DACD_AMT_EU1_RW_MW_11000,    0}




I am not able to write "multiple coils" function and "write holding register" .

Thanks
Vishnu


Replies:
Re: modbus Write operation Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: record logic tips Mooney, Tim M. via Tech-talk
Next: Re: modbus Write operation 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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: asynR4-37 available Mark Rivers via Tech-talk
Next: Re: modbus Write operation 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  <20192020  2021  2022  2023  2024 
ANJ, 22 Oct 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·