M580 Polling Modbus Devices

toddr

Member
Join Date
Mar 2009
Location
texas
Posts
1
I am setting up a system where M580 is Modbus Master data concentrator.

I have the Read_Var polling setup, my question is how do you guys handle Write_Var routines?

Do you just continuously write to the devices or do you have it set to just write when there is a command change? I can set it up to continuous write poll same as the read, however seems like there could be a chance of sending bad values??

Just reaching out to see how you handle this and possibly working examples.

I cannot use IO Scanning because that only supports Holding registers and I have 3x, 4x, 1x and 0x data that I am reading and writing and these devices have no logic.

Thanks
 
M580 Communications

I've done a lot of M340 and I'm on my first M580 job now.

The GEST array element for the timeout needs to be set nonzero before you hit the communication or else you can have an infinite timeout situation and you may have to put in extra code or cycle the processor to recover from an unanswered query.

Writes on data change are great for performance but lousy if they are missed. I like writing on change with a periodic extra write just in case something missed.

Check into how many comms can be going on at the same time in that CPU and how if affects your available socket count. You may have to put in some sequencing logic to keep from having too much going on at once. I don't know the total counts for what you are trying to do.

As always, try to use less exchanges of longer blocks rather than more exchanges of shorter blocks.

Try corsairhmi.com and download the PLC class. It's anonymous and free. It's mostly brand independent. Recommended short sections are Application 5 on Peer communications around page 172 and Theory 8 on Data Coherance around page 248.

Don't get caught on the usual Modbus confusion of address versus packet offset where you end up being off by one address ...
 
More

Modicon's comms functions seem to want to work continuously as long as you hold the input on. You have to single-scan the input to get them to do a single read or write.

If you have to sequence the comms a simple step counter thing is easy to write and for others to understand. There's some detail on how to do it in the outline.
 

Similar Topics

Hello all, I am wanting to update the system clock via NTP in the M580/M340. I'm aware that we are able to connect to a NTP in the controller...
Replies
4
Views
134
Hi everyone, I'm trying to simulate any program in control expert and see a register in Modscan32 or any software to do that (Like ModbusPoll). I...
Replies
0
Views
95
I'm trying to read modbus data from modbus slave using Read_VAR function. I'm getting an error that my device is not linked to a module. I have a...
Replies
1
Views
151
Looking for some advice on a project. The controller is a BMEP584040. There is a RIO ring with several drops with Quantum I/O. On this ring...
Replies
12
Views
994
Our system utilises INPUT_BYTE to capture NMEA0183 ASCII stream which sends data to the NOM multiple times a second. The NOM module can either be...
Replies
0
Views
387
Back
Top Bottom