LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding markers to data file and graph in real time

I have attachd a VI of what I am trying to do. I want to hit that button and have it put a vertical line on my waveform graph at that location in time and have it appear in the data file to indicate where in the data the event happened. How come my graph isn't updating properly and showing the lines?

0 Kudos
Message 1 of 7
(2,956 Views)

is there a better way to do this?

0 Kudos
Message 2 of 7
(2,927 Views)

I opened and ran your VI. I am seeing the waveform graph insert a cursor every time the button is pressed. However the graph is only showing the first 10 seconds of data. The cursors are still being placed after that, the graph just is not displaying them.

 

What are you seeing when you run the VI? What are you wanting to see?

Steven Gloor
Staff Customer Engineer - CTA, CLD
0 Kudos
Message 3 of 7
(2,895 Views)

I am also seeing only the first 10 seconds, but if I change the graph to a chart so it scrolls I lose the ability to place the markers.

 

What i want to do is have my signal come in, graph it, and then mark down with the button press when an event occurs both on the graph and have it write a number 1, 2, 3, etc. on the data file at that event time stamp.

0 Kudos
Message 4 of 7
(2,886 Views)

Hi,

 

A graph plots the data it is fed each iteration. Using the Append Signal express VI should help with that. Your loop rate is going to be too slow and irregular to give reliable timing. You could try using a producer/consumer architecture to get more reliable timing. An example of this can be found here:

 

https://decibel.ni.com/content/docs/DOC-2431

 

Steven Gloor
Staff Customer Engineer - CTA, CLD
0 Kudos
Message 5 of 7
(2,862 Views)

Is this the onyl way to reliably get rapid data from all 8 analog inputs on my NI USB-6212? I also wanted to attach two more to a single computer to increase my number of signals in. How can i avoid data read/write slowdowns? Right now all the grpahs are very choppy....

0 Kudos
Message 6 of 7
(2,845 Views)

Here is a link to a Knowledge Base article that describes the differences between graphs and charts in LabVIEW:

http://digital.ni.com/public.nsf/allkb/95FEE9F5B252507E862562BA00007657?OpenDocument

 

I really think the producer/consumer architecture will be best for your scenario. It is the best way to process data while taking data and you can still add cursors. 

 

You might find this article on DAQmx functions interesting as well:

 

http://www.ni.com/white-paper/2835/en/

 

Using functions instead of the DAQ Assistant will make the producer/consumer architecture easier to use.

Steven Gloor
Staff Customer Engineer - CTA, CLD
0 Kudos
Message 7 of 7
(2,798 Views)