LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Add Real-time Markers to a Waveform Chart

Is there a way to add markers to a real-time waveform chart? Ideally that would be a vertical line with a text attached to the line, and it can be insterted by pressing a keyboard key. The markers should be detected later if the data are saved.

0 Kudos
Message 1 of 4
(3,552 Views)

Hi wprice,

 

I'm assuming by "real-time" you mean while the program is running and not when using a Real Time OS with LabVIEW RT. If so then what you are talking about can definitely be done. Below I linked an example from our community page that I believe is what you are looking for, I would suggest downloading and tweaking that example to fit your application.

 

Create Visual Markers On a Chart at Runtime

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

 

Regards,

Peter W.

0 Kudos
Message 2 of 4
(3,532 Views)

Peter,

 

Your assumption is correct. The example you showed should work, my only challenge is how to associate a certain even with a specific text; for example, by pressing the 1 key the logged data should indicate "start", pressing the 2 key should indicate "init" etc.

 

Any ideas?

Message 3 of 4
(3,520 Views)

Hi wprice,

 

Here's another example that uses the keyboard to generate events and then writes out the key that was pressed (as a numeric value). You could use this and then a case structure with a case for each letter, where instead of outputting what was pressed to the "NewVal" indicator have that select the case you want to execute. The the event still triggers on the value change, but you can change what that event causes depending on what key was pressed. I played around with the example a bit and 1-9 are the corresponding numbers, then 10-35 are the letters alphabetically and the other keys fill in after that.

 

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

 

Regards,

Peter W.

0 Kudos
Message 4 of 4
(3,498 Views)