Hello Guest it is November 14, 2019, 12:48:04 AM

Author Topic: Modbus communications problew  (Read 135 times)

0 Members and 1 Guest are viewing this topic.

Modbus communications problew
« on: April 21, 2019, 07:33:57 PM »
Having an issue setting up modbus communications between Mach4 and PLC. I can write multiple holding registers from Mach to the PLC but cannot read any.
I have Mach4 installed on a computer and connected to a compactlogix PLC via Prosoft MVI69-MNET card via ethernet

PC IP address 192.168.1.40
Mach 4 modbus configured for TCP, IP address 192.168.1.48
1)   read register 50, 10 words long
2)   write register 1, 10 words long

MNET IP 192.168.1.48  - read/write to IP address 192.168.1.40
1)   writes to holding register 50, 10 words long
2)   Reads holding register 1, 10 words long
In my PLC data table I can see signals from Mach4 eg. Axis enable bits, but when I set a bit in the PLC that would jog an axis, the bit is not seen in Mach.
If I run a modbus simulator on the computer I see data from both in the correct registers.
As a side note, if I change the Mach modbus configuration to IP address of the computer with the modbus simulator running, I get 2 way communications.
What is wrong with me setup? I should not need to run a simulator.

Thanks
Re: Modbus communications problew
« Reply #1 on: April 23, 2019, 05:54:12 AM »
Hi,

Quote
In my PLC data table I can see signals from Mach4 eg. Axis enable bits, but when I set a bit in the PLC that would jog an axis, the bit is not seen in Mach.

The fact that you can read data from the PLC that was written there by Mach certainly proves communication at least from
Mach to the PLC. I would guess then that the reverse is true, that is there must be communication between the PLC back
to Mach, Ethernet comms REQUIRES a bidirectional link.

Where abouts 'in Mach' are you looking for the data supposedly transmitted by the PLC?
My understanding is that ALL data, whether it be out-going or in-coming all have registers to hold it.
Are there any registers owned by the Modbus Plugin that correspond to the incoming data packets?

Craig
« Last Edit: April 23, 2019, 05:56:08 AM by joeaverage »
My wife left with my best friend...
     and I miss him!