To download NI software, including the products shown below, visit ni.com/downloads.
Overview
The example demonstrates how to check the network connection between a host and a target application.
Description
If you build a system that involves multiple targets that are connected with a network connection, it is imperative that you can monitor the network connection. If the status of the network connection is not monitored, it is hard to know if no message is received because there was no need for communication or if the message could just not have been received because of problems with the network connection.
The system depicted above consists of a personal computer that is used for monitoring and configuration and a CompactRIO system.
To monitor the network connection the example shows the use of Network Streams. Network Streams are a National Instruments technology that is able data with high throughput as well as with low latency when needed. Also Network Streams are lossless and have network monitoring functions included and can automatically reestablish a interrupted network connection.
Network Streams are normally used to - as you would expect - communicate over the network. But you can also use a Network Stream connection inside a target (mostly for demonstration purposes). Therefore the example uses only one VI that demonstrates both endpoints of the network connection monitoring. Of course this can be adapted to real world use cases putting one part of the algorithm on the host and the other part of the algorithm on another target, e.g. a Real-Time target like the CompactRIO platform.
Requirements
Software
Hardware
Steps to Implement or Execute Code
Additional Information or References
White Paper: Lossless Communication with Network Streams: Components, Architecture, and Performance
http://www.ni.com/white-paper/12267/en/
**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text 'NIVerified'. Read here for more information about the new Example Guidelines and Community Platform.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
BS
worked for me! thanks