Hello, EPICS mates,
to access controller Eurothermm 3508.
It's ok mostly, but I can't set the P/I/D values.
And there are two errors showed repeatedly:
2024/11/07 09:07:35.155 drvModbusAsyn::readPoller port Eurotherm_E3K01_1_1_Rd_PID invalid memory request 3, max=3
2024/11/07 09:07:35.852 drvModbusAsyn::readPoller port Eurotherm_E3K01_1_1_Rd_PV invalid memory request 4, max=3
In "
E3K01_1_1"
"E3K01" is the port name,
the following "1" is the Modbus address,
then "1" is the loop number.
I found that in the file eurothermModbus.c of the module, it calls drvMosbusAsynConfigure:
/* Create modbus channels for the PV, target setpoint and manual output */
mkname(str, strmaxlen, asynPortName, modbusAddress, loopNumber, 0, "PV");
asynRet = drvModbusAsynConfigure(str, asynPortName, modbusAddress,
MODBUS_READW, loopStart+PV_OFFSET, 3+2,
0, EUROTHERM_POLL_MS, "");
if (asynRet != asynSuccess) {
LOG_ERROR("drvModbusAsynConfigure failed with error %d", asynRet);
free(str);
return -EIO;
}
/* Create modbus channels for the PID parameters */
mkname(str, strmaxlen, asynPortName, modbusAddress, loopNumber, 0, "PID");
asynRet = drvModbusAsynConfigure(str, asynPortName, modbusAddress,
MODBUS_READW, loopStart+PID_OFFSET, 3+1,
0, EUROTHERM_POLL_MS, "");
if (asynRet != asynSuccess) {
LOG_ERROR("drvModbusAsynConfigure failed with error %d", asynRet);
free(str);
return -EIO;
}
And in the file eurothermModbusLoop.template, the records uses the ports created above:
# PV: address 1
# % gdatag,pv,ro,$(gda_name=),PVRBV
# % archiver 1 Monitor
record(ai, "$(P)$(Q):PV:RBV") {
field(DESC, "Temperature Readback")
field(DTYP, "asynInt32")
field(INP, "@asyn(Eurotherm_$(PORT)_$(ADDR)_$(LOOP=1)_Rd_PV,0,1000)MODBUS_DATA")
field(EGU, "$(EGUT=C)")
field(SCAN, "I/O Intr")
}
# % gdatag,pv,ro,$(gda_name=),SPRBV
# % archiver 10 Monitor
record(ai, "$(P)$(Q):SP:RBV") {
field(DESC, "Setpoint Readback")
field(DTYP, "asynInt32")
field(INP, "@asyn(Eurotherm_$(PORT)_$(ADDR)_$(LOOP=1)_Rd_PV,1,1000)MODBUS_DATA")
field(EGU, "$(EGUT=C)")
field(SCAN, "I/O Intr")
field(ASLO, "0.1")
}
# % gdatag,pv,ro,$(gda_name=),ORBV
# % archiver 1 Monitor
record(ai, "$(P)$(Q):O:RBV") {
field(DESC, "Output Readback")
field(DTYP, "asynInt32")
field(INP, "@asyn(Eurotherm_$(PORT)_$(ADDR)_$(LOOP=1)_Rd_PV,2,1000)MODBUS_DATA")
field(EGU, "%")
field(SCAN, "I/O Intr")
field(ASLO, "0.1")
field(PREC, "1")
}
Would you please provide some suggestions?