Df Monitoring Modbus Coms


ccdubs

Recommended Posts

I would like to know if I can use DF installed on one PC to monitor MODBUS coms controlled by another instance of DF installed on a second PC.

The architecture consists of a DF Modbus RTU master polling slave devices over a radio network. I would like to connect a second license of DF to the radio network on a seperate PC at a different location which can monitor the MODBUS responses and update on screen information. This would give me redundancy and not have to worry about syncronising communications over the network.

Is this doable?

Link to comment
Share on other sites

DAQFactory can do it, but I doubt your hardware can handle two connections at the same time. If it can (and usually only Ethernet devices can), no problem, but otherwise you are probably going to get frame collisions once the data gets to the Modbus device. Normally this won't happen on serial networks because there can only be one master on a serial network, but the radio network might allow it. However, there is nothing keeping one DAQFactory from querying the device when the device is already busy responding to another query.

Really if you want dual redundancy, you have to have one DAQFactory looking at the other one and taking over when it sees it die. How you do that is a significant architectural challenge for a number of reasons.

Link to comment
Share on other sites

I’m not sure if I have explained this correctly. The sequence of communications is that the DF Master sends a read holding request to a slave device in the field, the slave then replies as in any normal network. All of this communication is done over a radio network and the data (whether request or reply) is broadcast to every device. Therefore the second DF machine will see the Master read request on its com port (but it will be ignored) and will also see the read response from the slave device. What I want to do is to be able to intercept the read response, pull out the data in the holding registers and apply the information to update the local onscreen graphics. In this way the second DF machine will always have the same info as the master. No synchronisation is necessary as there is still only one master on the network.

Link to comment
Share on other sites

Well, from a DAQFactory point of view, you basically want to treat it as a streaming protocol. There are a number of posts here on how to do that. Basically you loop forever, doing device.myDevice.read() to read from the serial port until you get what you need, then parse it based on the Modbus spec. The hard part is determining the start of frame, and that's an algorithmic thing, not a DAQFactory thing, and will depend a bit on what else is on the serial line.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.