LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling a Strip Chart

I am trying to control the length of data seen on a Strip Chart on the fly with a slider control.  I worked with the property node to set the x max and min range but ran into either a buffer error (inside the loop) or was only able to update once (outside the loop) and events didn't seem to work.

 

Cmuzzo_0-1588194045897.png

 

What am I missing?

 

Thanks

0 Kudos
Message 1 of 5
(3,719 Views)

Hard to say.  We only see a picture of a front panel.

 

If you had attached the actual VI, we could associate what you are saying with real code, play with it, and give an answer.

0 Kudos
Message 2 of 5
(3,671 Views)

The VI is attached, but I wasn't looking for other people to do my work for me.  I need to understand what it is that I am doing wrong.  

 

Thank you for your help,

Chris

 

0 Kudos
Message 3 of 5
(3,650 Views)

Hi Cmuzzo,

 


@Cmuzzo wrote:

I am trying to control the length of data seen on a Strip Chart on the fly with a slider control.  I worked with the property node to set the x max and min range but ran into either a buffer error (inside the loop) or was only able to update once (outside the loop) and events didn't seem to work.

 

What am I missing?


Which kind of "buffer error" did you get? Where did that error occur?

I don't see any event structure in your code, so which "events didn't seem to work"?

You miss the limited options of charts: they provide a history buffer, but that buffer is size limited. Right now your chart still uses the default buffer size, so it makes no sense to even try to set a X scale range of hours…

 

You are using DAQAssistents to handle DAQmx devices: I suggest to use plain DAQmx functions (as explained here and in all those DAQmx example VIs coming with LabVIEW). They are quite easy to use and you gain full control over your DAQ device. It doesn't make sense to read "1 sample on demand" as fast as possible in your loop…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(3,647 Views)

It took a couple of days but this section of code does what I want it to do.

Cmuzzo_0-1588345846123.png

Using the "get waveform time array" and the max value of the "get array max/min" functions the property node is always updating to the current time.  The scroll bar controls the range that is visible on the chart, extending into the past to the buffer size limit (what ever that is).  

Message 5 of 5
(3,603 Views)