Hello Guest it is April 18, 2024, 03:21:02 PM

Author Topic: TCP over Ethernet help  (Read 11799 times)

0 Members and 1 Guest are viewing this topic.

TCP over Ethernet help
« on: June 12, 2015, 10:22:52 AM »
Hi everyone,

I am looking for help regarding reading and writing IO between Mach 3 and a CompactLogix.  I actually am not having any issues with getting the two communicating over Modbus TCP.  That part seems to be easy enough to set up as I can read/write values in the Test dialog and have them appear on the PLC as being written.  I can also modify these same values on the PLC and read them in the test screen of the Modbus setup so I know they are communicating properly.

My issue comes when I try to use brains to read/write to the coils that the test dialog can read/write.  I can't figure out what the settings would be in the brain to correspond to the settings on the test window.  Included are images of the two screens.  I have tried multiple setups and I just can't seem to get it to work.

Thank you for any help!
Re: TCP over Ethernet help
« Reply #1 on: June 12, 2015, 10:45:24 AM »
Hi,

Have a look at this article I wrote and see if it answers your questions.

http://www.homanndesigns.com/pdfs/Using_Modbus_with_Mach3.pdf

Cheers,

Peter
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com
Re: TCP over Ethernet help
« Reply #2 on: June 12, 2015, 02:56:26 PM »
Thanks for the link, I tried doing what you listed in the paper, but it still has not worked.  I don't know if its because of an issue with brains, or there's some other issue that will prevents the brain from writing to the register the same way the test dialog does.  Any ideas on this?  I have also read the "Users Guide for Brains" in the Member Docs folder and it is still unclear what is causing the issue.
Re: TCP over Ethernet help
« Reply #3 on: June 12, 2015, 11:01:11 PM »
Oops ignore that.  :)


Cheers,

Peter
« Last Edit: June 12, 2015, 11:03:08 PM by Peter Homann »
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com
Re: TCP over Ethernet help
« Reply #4 on: June 12, 2015, 11:29:59 PM »
In the two images you've attached, the CFG configurations re different. Which one are you using?


In the image showing the brain, it is unclear what the dialog box

Your brain is writing to MOD:2-D1-T:0

This equates to writing to bit 1 or register 2 on CFG#0

Don't you want to be writing to bit 0, that is  MOD:2-D0-T:0


Cheers,

Peter
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com
Re: TCP over Ethernet help
« Reply #5 on: June 13, 2015, 10:53:30 AM »
I truthfully didn't consider the modbus settings to be relevant as they are easily changed, the focus is more on the relationship between the test screen (which CAN write to the PLC) and the Brain, which is what I'm having issues with.  If I were to say there are 8 registers in each of the configs, and the modbus address for the registers begin at 0 for cfg# 0, then Address Modbus Bar would have "0" in its field, "# of Registers" would have "8" in that field, and the brain's modbus dialog box would have the following filled in:

"Enter Modbus Address to use:" 0
"Output" Radio selected
"Bit Only" Checked
"0" Bit 0-15
Source: "TCP Modbus" Radio button, Cfg# "0"

This would display in the brain Terminator as MOD:0-D0-T:0, correct?
Re: TCP over Ethernet help
« Reply #6 on: June 13, 2015, 09:23:54 PM »
The brain does not write to the modus interface as such. Brains write to a memory buffer area only. The area is defined by the CFG# number in the Modbus plugin.

The Modbus plugin transfers the data in the CFG# continuously at the rate defined in the plugin, i.e. 25Hz

-------------------------------------------------
"Enter Modbus Address to use:" 0
"Output" Radio selected
"Bit Only" Checked
"0" Bit 0-15
Source: "TCP Modbus" Radio button, Cfg# "0"

This would display in the brain Terminator as MOD:0-D0-T:0, correct?

------------------------------------------------------

In the above, ""Enter Modbus Address to use:" 0" defines the offset into the Modbus CFG# buffer. It is not the actual modbus address.

Have a look at at the videos that Art produced when he wrote the Modbus plugin. It should give tou a good understanding.

Cheers,

Peter
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: TCP over Ethernet help
« Reply #7 on: June 16, 2015, 05:06:41 PM »
the "Bit-Of-Word" (or bit only), is broken in Briais, (in other words the Bit-packing) does not work.
for each "Bit" you want to control, you have to send the entire word for that ONE bit.

Scott
fun times