Jump to content

Streaming Data


nishit

Recommended Posts

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

post-1169-1102129757.jpg?width=400

, 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

Link to comment
  • 2 weeks later...

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

post-37-1103031303.jpg?width=400

Regards

Jack

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.