LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing color of a Waveform Chart trace during real time DAQ

I am modifing a vi that acquires data real time (multiple channels) and one of the channels is a marker used to signify an event has occured. Currently, the vi's marker feature is written to start at 0 and when the marker button is pressed go to 100.  Then we have a verticle blue line in our recorded data that is now at 100. The trace stays there until the marker button is pressed again and then a verticle blue line is again across the recorded traces but now at 0.  For reviewing purposes, this is not optimal for our application. What would be nice is to change the color of the marker trace when an event occurs. This way an event can be assigned a certain color and for reviewing purposes it would make sifting through hours of recorded data simpler. So far, I have not been able to find anywhere in all of my research a way to change the color of a trace in a waveform chart on the fly.
 
CJL
0 Kudos
Message 1 of 4
(3,461 Views)

You can do this with the property-node of the chart. Right click on the terminal and choose create property node

First select the activ plot, than you can change the plot properties (color, interpolation, fill, width,....) of that plot

If you want one plot with different colors: create two plots, and fill the parts that should be invisible with NAN. (Might be also better in your solution insteat of the zero)

search the forum to find examples for this. 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 4
(3,452 Views)
Thank you Henrik,
I did just what you stated and I understand what I have to do.  I've added a property node for the active plot and assigned it the number of the marker trace.  Then I added a plot.color attribute to the property node and assigned it a color.  However, I am getting an error that states the property node as an unwired or bad terminal.  I've read the context help numerous times and can't figure out why this error occurs.  The refnum explanation is vague.  The vi that I have added the property node is called from the main vi that has the waveform chart. Could this be the problem?  Is the vi wanting an exact ID waveform to know what waveform color to change? 
0 Kudos
Message 3 of 4
(3,435 Views)
here is a quick sample
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


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