nishit Posted December 4, 2004 Report Share Posted December 4, 2004 Hello, I am working on a system to monitor a stream of data sent by an application to Labview (say via UDP). I am using Labview as a graphical query model to this streaming data to support "queries" like, plot pdf, cdf, sample etc. I want to create a library of VIs eg: 1. Generate Stream (which will do UDP receive) 2. And a bunch of other predefined VIs which allow different queries I am running into the following issue: The data rates of each VI can be different. Eg: in the figure , the Generate stream output needs to be sampled and only the Nth data passed on to display. In a way, each VI needs to have its own while loop. I can make the VIs communicate via sockets or local_global variables, but then I lose out on the advantage the user can have by specifying the query as a graph of VIs one provides in any order. (there will be no logical wires connecting the VIs) Any suggestions? Thank you, Nishit Quote Link to comment
JackHamilton Posted December 14, 2004 Report Share Posted December 14, 2004 Download File:post-37-1103031218.viNishit, [Pronunced 'Nis -hit' right?] You need to use messaging to propogate the UDP data to other loops. Notifiers would be best as they support one message ->many receivers. Looking at your example code - that won't work because the wire between the VI's will enforce standard LabVIEW execution rules which are: The first VI will execute till completion - then pass data (via the wire) to the next routine etc. Wire connection in LabVIEW enforces exection order. Your final code will contain many loops; one the UDP -> notifier send. Then the other loops will wait on the notifcation data or user options. You can include a User Interface loop with a LabVIEW event structure and use the notifiers to pass commands to the various display loops (for configuration purposes) Give that a try. BTY: UDP is not a 'reliable protocol' so it can lose data if network traffic gets high. Attached is a quick VI showing this messaging and a snapshot of the diagram Regards Jack Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.