LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus I/O server timing

I have established a Modbus I/O server and bound shared variables to device registers to communicate over Ethernet.  I have developed two code routines to either poll the data via the shared variable, or a value change notification/event case vi.
 
I have installed WIRESHARK (network traffic analyzer) to assist with network traffic analysis of the modbus/TCP traffic timing and statistices.  Being at an associate level for programing in LV, I don't know an efficient manner to monitor network traffic performance, thus WIRESHARK.
 
The problem that I am having is clearly defining the Request(Server)/Responce(Client) polling rate.  If I let the LV code execute under default settings with the SVs in a while loop; then I recieve read errors due to over requesting the end device registry and buffering capabilities.  This case has no real meaning to me, because the polling rate is so much faster then the end device design capability.
 
I have since independantly manipulated both the I/O server "Refresh Rate; defined as the rate at which the end device is refreshed." (What ever that means?), and inserted a loop timing delay at a rate that would confine the data comms to a rate close to the system design requirement.  I have then independantly increased the server rate and l loop delay to up to 10 seconds, which is greatly higher that the communication requirement.  All the while, I have capture data in WIRESHARK that I have analyzed and have a consist network frame transmision rate timing.  This has been observed for server rates from 0.01-10 seconds and loop delays of 0.003-10 secconds. 
 
The second approach was to establish a time stamp upon execution of a value change notification.  By observation, the time stamp updates at about three times a second, which is supported by the WIRESHARK data captures.
 
Utilizing the Variable Monitor also supports the observed update rate.
 
The questions I can not answer are the following:
1.  Utilizing the I/O server,SVs, and while loop timing; why can I not manipulate the data trasmission rate captured by the nework analyzer?  Is the poll rate not directly influenced by the code?
 
2.  When utilizing the value change notification, how often does the system poll the device?  This is modbus and if I understand correctly, the sequence of events is request(server)/respond(client).  The code executes at approximately three times a second, but how often does the system ask the end device if the "value changed" before executing the event code?
 
I need some feed back to bridge the gap between the LabVIEW environment and what data is actually being transmitted across the network.  Specifically, what mechanism is driving the data communication request/responce rate in this evironment.
 
The hardware configuation is LV machine connected to layer 2 swich (100mbs link) to modbus device.
 
I tried to provide enough information with out being to long winded, so I you have additional l questions or need clarification, please let me know.
0 Kudos
Message 1 of 6
(5,269 Views)

When I did modbus tcp with labview 7.0 and the DSC module, I used the I/O scanner option in the plc. I setup Kepware opc server in mailbox mode. This way the plc transmitted data continuously to the computer. No polling was required. You can also multihome the ethernet card in the computer. This gives each plc a unique ip address to write data into. I also used an 8 port switch, not a hub.

Are you using a single crossover cable between the device and labview, a switch/hub in the middle??

I don't have anything higher than 7.0 available to test.

0 Kudos
Message 2 of 6
(5,258 Views)
The physical connection from LV to the switch is (I believe) copper crossover to fiber converter into a switch.  Then, fiber from the switch to the end device (relay).  The relay has all of the typical modbus registries and has been verified by inducing signals in to the system and measured/polled in LabVIEW and observed Variable Monitor.  I am working with LV 8.2 and 8.5. 
 
An OPC server would only add an additional translation of addressing within the configuration.  The only real draw back would be the network overhead required to do this processing and not being representative of the end design configuration.
 
I will reiterated my question in another way:
 
I must answer the question to management that relates to data collection, test results and analysis; how often are you polling the client in relation to the outcomes measured?  At this time I can not point at any configuration in the set up and execution that directs the data framing rate.  I only measure the traffic and work with results.  This needs to be clearly identified based on the relay modbus/tcp design capability of supporting an fixed number of client requests per second. 
 
For testing purposes, I would like to be able to stress the system to failure and have prove capabilities with measured data.  The present problem is that I have no basis to establish varying polling rates that effect the measured data transmission. 
 
This raises another question.  What handles the Variable Monitor data requests and how is this rate determined?
 
Thanks for your interest in my efforts.
Steve
0 Kudos
Message 3 of 6
(5,256 Views)
Is this device tied into your corporate LAN network, or a dedicated controls network??
0 Kudos
Message 4 of 6
(5,250 Views)
independant control network
0 Kudos
Message 5 of 6
(5,248 Views)

A new thought has occurred to me.  I am using an imbedded Windows XP NI processor.  Would this be a function of the Windows scheduler and the non-deterministic OS?  Does anyone have any thoughts or background?

Steve

0 Kudos
Message 6 of 6
(5,185 Views)