Go Down

Topic: Modbus TCP Uno Wifi Rev. 2 (Read 123 times) previous topic - next topic

fhainz

Hello!

I'm trying to find a modbus tcp client library for my arduino uno wifi rev. 2 for several days. I tried a few but none really fits well.

This is an homeautomation project and i want to read/write Inputs and Outputs on my Siemens Logo 8 PLC. To do this I need a least functions 01 (read coils), 02 (read discrete input), 05 (write single coil).

- ArduinoModbus Library - Not working on Uno Rev. 2. --> My Github Issue
- Modbus TCP without Library from @Juraj - Only functions 03 and 06
- mudbus - Here I am not sure if it is the right one for my problem
- MsgModbus - This could be the right one, but i dont know how to work with this library correctly.

Can anybody help me? Maybe with MsgModbus Lib? I started to play with arduinos 4 weeks ago. So i'm still at the beginning.

Thank you!



fhainz

this sketch has Modbus TCP client without a library
https://github.com/jandrassy/IsgModbusTcpSG/blob/master/IsgModbusTcpSG/IsgModbusTcpSG.ino
This sketch is only for functions 03, 04, 06. Am i right?
Code: [Select]
const byte FNC_H_READ_REGS = 0x03;
const byte FNC_I_READ_REGS = 0x04;
const byte FNC_WRITE_SINGLE = 0x06;


I need functions 01, 02 and 05.


Juraj

This sketch is only for functions 03, 04, 06. Am i right?
Code: [Select]
const byte FNC_H_READ_REGS = 0x03;
const byte FNC_I_READ_REGS = 0x04;
const byte FNC_WRITE_SINGLE = 0x06;


I need functions 01, 02 and 05.
there is not much difference. you can modify the two functions

Go Up