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
|