Has anyone worked with the SGW-MB1512-T modbus gateway from automation direct? The ethernet interface protocol is modbus TCP/IP...will this work for SLC 5/05? What is the difference between TCP/IP and Ethernet/IP, this is all very confusing...
See here for a decent explanation: https://www.rtautomation.com/rtas-blog/ethernet-ip-and-tcp-ip/
Will this work with a 5/05?
Depending on the 5/05, perhaps via the RS-232 port to the gateway, and then on to your network.
I recommend setting aside that MSG instruction example code. It's a "self-retriggering" rung that has persisted in SLC-500 instruction manuals since the 1980's.
Yes, and do it right now, and reset the DN and ER bits, ain't nobody wanna see those.I just grokked what you two are talking about: done OR error? what the heck, try again! LOL.
Thank you very much this all seems good! So I can just plug in my RS-485 devices and use the tag map to copy/create the tags in my SLC 5/05? However, there is one slight issue...you see I have my SLC 5/05 already on LAN via its ethernet port. How can I use this while also keeping my SLC 5/05 on my LAN??
A better way to run MSG instructions is by triggering them with the /DN bit of a self-resetting Timer, and prevent them from re-executing on the timer if they are still Enabled from the previous execution.
If such a MSG fails immediately because the destination device replies with an error code (bad address, full buffers, etc) you will see the .ER bit and can look at the error code value.
And it won't fill up the SLC's buffers if the remote device is disconnected and the built-in Timeout has not expired by the time the next cyclic Timer pulse is sent.
Ok thank you very much! How might I set up multiple msgs for reading multiple modbus registers? They can't all be executed at the same time can they?
Are we using Ethernet or Serial for this?
Technically, the messages can't happen at the same time on either channel, but I have seen programs that fire off multiple messages on the Ethernet CH1 all at once and let the CPU take care of the details under the hood. I have not seen that done, nor would I recommend doing that with the serial channel 0.
What exact modbus addresses do you need to read?
If there are small gaps between some data points, it often makes sense to read a block of them and just ignore the stuff you don't care about. There can be limits to how many addresses can be accessed in a single message by the device on the other end, and in the SLC there is a limit (different limits depending on channel and data type).
For example, If I needed HR40001, HR40004 and HR40013, I would read them all in one message. If that last one was HR40047, I would most likely use a separate MSG instruction rather than waste 40 words of memory for stuff I don't care about.