07-13-2011 01:47 PM
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.
07-14-2011 11:26 AM
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.
07-15-2011 03:56 PM
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?
07-18-2011 04:24 PM
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.