Experimental Physics and
| |||||||||||||||
|
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")
| ||||||||||||||
ANJ, 29 Mar 2021 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |