jeffserv
Greetings,
 
I have a touch screen Samkoon 4.3" EA-043 , which I am using as Modbus Master RTU over Serial cable on an existing controller.
This controller is to expensive for my product. Thus I want to move the project to a lower cost processor.
I want to replace that control with OpenPLC.
 
I have seen where a person did communicate with this touch screen to Arduino Uno... by modifying what the Modbus slave
served up to read.
  
I need 0x0, 0x1, 0x2 and so forth...  also 4x0, 4x1, 4x2 and so forth.
See picture below.
 
Is there a way for me to modify the code, so as to produce what my Modbus Master RTU is looking for?
 
See Picture below,  Thanks so much!
Modbus -01.jpg
Reply 0 0
thiagoralves
What Modbus address do you need exactly? All these addresses are natively supported on any OpenPLC platform, so you don't have to modify anything. Check https://autonomylogic.com/docs/2-5-modbus-addressing/ for more info.
Reply 0 0
thiagoralves
One more thing, perhaps your screenshot could cause some confusion because your device is using the old Modbus convention to identify the register type. The Modicon convention uses the first digit of a register reference to identify the register type. There are:
discrete coils "0x" (read-write boolean)
discrete inputs "1x" (read-only boolean)
input registers "3x" (read-only integer)
holding registers "4x" (read-write integer)
 
So, in summary, to make better sense of the OpenPLC documentation over your specific device settings, any time you see "holding register" just replace it by "4x"...
Reply 0 0
jeffserv
I have a ATMega2560... R3 on the one I am using.
 
I looked at my application.  And I believe I only need three 0x? and five 4x? 
I could use 0x00, 0x01, & 0x02 for bit Read or Write
I could use 4x00, 4x02, 4x04, 4x06, & 4x08 to Display my Timer settings and Current Sense settings on my display.
 
In OpenPLC what are the Holding Registors?  (Float?, UI16, UI8)... seems my display wants me to tell it what type data it is reading?
 
Thanks!
Reply 0 0
thiagoralves
By definition all Modbus registers are 16-bit. The type of data depends on what you declare your variable as inside your PLC program
Reply 0 0
Reply