Reaching out for some help.
We have a project which requires us to obtain data from some Emerson Flow Computers. Unfortunately, these use Enron Modbus as their protocol.
I have looked for ways of getting this data intto Codesys running on EPIC PR1, but there is no Codesys driver!
No driver in Ignition nor Node-Red that I can find either.
Anyone got an idea on how to achieve this using either Ethernet or RS485?
Yes, that’s the beast!
I have used all sorts of Node-Red Modbus flows to achieve this, but have hit a brick wall with them all.
The nearest I got was using node-red-contrib-modbustcp, but it seems to use its 2nd byte as a message counter.
As an example, if I want to read a single float (32-bit in a single register) at register 7003, slave ID 100, using FC3 the transmit should be:
00 00 00 00 00 06 64 03 1B 5B 00 01
but this flow transmits:
00 01 00 00 00 06 64 03 1B 5B 00 01,
Next time:
00 02 00 00 00 06 64 03 1B 5B 00 01,
etc.
So close, yet so far!
If you are desperate, I have written a partial Modbus RTU serial 485 in CodeSys. I believe someone else’s fully tested and more functional solution would be a better choice. But if your stuck let me know. I could send you the code.
Using the SysComOpen, SysComSetSettings, SysComRead, SysComWrite functions.
Read only - coils, discrete inputs, holding regs, input regs. Supporting types bool, int16, uint16, int32, float.
It is written pretty generically.
Dave
If you can get it going in Codesys, that would be good since that is where you want the data. If you want to try it in Node-Red, here is some test logic I have that makes an OptoMMP request for inspiration. (I don’t parse the response in this sample though). The same thing could be done to make a modbus request (it is a fairly simple protocol).
Since it is poll response, I just feed to the TCP node. The response will then need parsed to get the data you need. The Buffer has read classes for this as well.
Hi @SDUK I am new to Opto 22 and Codesys. I have same issue, we have pressure transducer that is using Enron Modbus, trying to find solution. Did the issue got resolved ? do you have any solution for this?