Hello, I finally received my Logos. And it is very easy to set up a modbus connection to the Logo from HA. And it is very easy to communicate via Modbus.
- LOGO Setup
a) Setup LOGO as Modbus server in LOGO!Soft Control
- Tools -> Ethernet Connections…
- Enter IP address of your LOGO…
- Right click on Etnernet Connections -> Add server connection -> Modbus Connection
- Upload your program to LOGO (empty program works great!)
- HA Configuration Example
modbus:
name: hub1
type: tcp
host: 192.168.0.210
port: 502
switch:
- platform: modbus
scan_interval: 10
coils:
- name: Switch1
hub: hub1
slave: 1
coil: 8192
- name: Switch2
hub: hub1
slave: 1
coil: 8193
- name: Switch3
hub: hub1
slave: 1
coil: 8194
This will setup three switches to directly control first thee outputs on LOGO.
Note:
- If you want to control the output direclty from HA you can’t use the same output in your program.
- Logo has to be in RUN mode for this to work.
You can find all the Modbus Addresses in Properties (Alt+Enter), but you have to substract 1 from all the addresses. If you wan’t to control an output from program in the LOGO and HA you have to communicate via Variables and not with the Outputs directly. I have to iron out problems with the loop that is created if you use the same Varible as Network input and Network output in LOGO program.