Hi Marco,
This is an ao record and one of the links is P.ASLO. This means that depending on whether the link is broken the actual integer value being written to the device could change, since ASLO affects that.
According to page 48 of the Modbus reference document
https://epics-modbus.readthedocs.io/en/latest/_downloads/c210fb586108fe21da5a09d202ab86d1/Modbus_Application_Protocol_V1_1b.pdf
Modbus exception 3 is “ILLEGAL DATA VALUE”. This means:
A value contained in the query data field is not an allowable value for server (or slave). This indicates a fault in the structure of the remainder of a complex request, such as that the implied length is incorrect.
It specifically does NOT mean that a data item submitted for storage in a register has a value outside the expectation of the application program, since the MODBUS protocol is unaware of the significance of any particular value of any particular register.
So according to the specification exception 3 should only be returned when the command syntax is wrong, not if the data value is outside the allowed range. However, it is always possible that Eurotherm has not following the spec, and it
is returning exception 3 for a data value outside the allowed range.
Please send the complete error message when you get the exception.
It may also be helpful to put the following 2 commands in your startup script:
asynSetTraceIOMask Eurotherm_EMODBUS_1_1_Wr_P -1 HEX
asynSetTraceMask Eurotherm_EMODBUS_1_1_Wr_P -1 ERROR|DRIVER
That will show the Modbus messages sent to and received from the device.
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Marco A. Barra Montevechi Filho via Tech-talk
Sent: Tuesday, April 19, 2022 11:01 AM
To: tech-talk at aps.anl.gov
Cc: Junior Cintra Mauricio <junior.mauricio at lnls.br>; João Pedro Burle Ishida <joao.ishida at lnls.br>
Subject: drvModbusAsynConfigure exception 3 when ASLO and PREC fields of PV are changed
Hello all and good evening.
We are working with a modbus IOC, the one i asked about compiling errors here previously and Mark answered about removing modbus.dbd and leaving only modbusSupport.dbd to make it work.
The IOC has several modbus functions defined in its st.cmd file like:
drvModbusAsynConfigure("Eurotherm_EMODBUS_1_1_Wr_P", "EMODBUS", ${MBUS_SL_ADDR}, ${MBUS_WRITE}, 6, 3, 0, ${MBUS_POLL}, "");
where MBUS_SL_ADDR=1, MBUS_WRITE=6 and MODBUS_POLL=1000.
EMODBUS was defined in drvAsynIPPortConfigure("EMODBUS",{EUROTHERM_IP},0,0,1)
The above modbus function is used by a PV:
record(ao, "${BL}:EU2408:P:SOMETHING") {
field(OUT, "@asyn(Eurotherm_EMODBUS_1_1_Wr_P,0,1000)MODBUS_DATA")
and it works fine if the PV name doesnt end stop in ":P". If the PV name is only "${BL}:EU2408:P", then we get modbus exception 3 when initializing the IOC and the PV doesnt work.
I suppose this happens because some other PV has a link to it and the link breaks when the name is changed. I dont know if there could be any cause to this behaviour.
The only PVs we found refering to "${BL}:EU2408:P:SOMETHING" PV are:
record(dfanout, "${BL}:EU2408:SETASLO") {
field(OMSL, "closed_loop")
field(DOL, "${BL}:EU2408:CALCASLO PP")
field(OUTA, "${BL}:EU2408:SP.ASLO")
field(OUTB, "${BL}:EU2408:SP:RBV.ASLO")
field(OUTC, "${BL}:EU2408:RR.ASLO")
field(OUTD, "${BL}:EU2408:RR:RBV.ASLO")
field(OUTE, "${BL}:EU2408:PV:RBV.ASLO")
field(OUTF, "${BL}:EU2408:P.ASLO") #HERE
field(OUTG, "${BL}:EU2408:P:RBV.ASLO")
field(FLNK, "${BL}:EU2408:SETPREC")
}
and
record(dfanout, "${BL}:EU2408:SETPREC") {
field(OMSL, "closed_loop")
field(DOL, "${BL}:EU2408:PREC.RVAL")
field(OUTA, "${BL}:EU2408:SP.PREC PP")
field(OUTB, "${BL}:EU2408:SP:RBV.PREC PP")
field(OUTC, "${BL}:EU2408:RR.PREC PP")
field(OUTD, "${BL}:EU2408:RR:RBV.PREC PP")
field(OUTE, "${BL}:EU2408:PV:RBV.PREC PP")
field(OUTF, "${BL}:EU2408:P.PREC PP") ######HERE
field(OUTG, "${BL}:EU2408:P:RBV.PREC PP")
}
so i suppose altering PVs PREC and ASLO alters the correct modbus function needed to access the parameter, but this makes no sense to me since the parameter stored in the equipment should still be the same.
Does someone know what am i missing?
Thanks in advance 🙂
Marco
Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente antes
de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente.
Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before
copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately.