LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform chart, auto scale, single input

I have a VI using waveform chart. I want to use autoscale so I can see the entire waveform. There is no problem when there are 2 or more waveforms in the array, but with only 1 waveform, the chart only displays data on the right edge of the chart and does not fill the chart view area. If I turn autoscaling off, then the chart scrolls across as normal.

Any clues as to what is happening.
0 Kudos
Message 1 of 10
(3,872 Views)
I'm not sure what could be happening. Post this display code in 6.0 format and I'll be glad to look at it for you.Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 10
(3,872 Views)
I think it maybe an array dimension issue. I can't reproduce the issue, so I cannot say for sure. Attached is a trivial example of a chart. Can you make it show the incorrect behavior?
0 Kudos
Message 3 of 10
(3,872 Views)
Pop-up on the wire feeding the chart and create an indicator.

I suspect you are passing some bogus data and the chart is scalingt from the beginning of time. This will put your real data at the far right.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 10
(3,872 Views)
I have run into this problem before. I found it to be that some
initial bad or NULL data is being passed to your chart before the real
stuff. I encountered this in a digital triggered buffered acq. My AI
READ is inside a loop, and until the trigger occurs, it would return 0
points read in an empty WDT array with a T0 of 07:00. When the real
data started coming in, T0 of 14:00, it would be bunched up on the
right side of the chart.

My solution was to not add the AI READ output to my chart until the
Scans Read output of AI READ was > 0.

Hope this helps.

Greg

galdoni wrote in message news:<5065000000080000004E7A0000-1042324653000@exchange.ni.com>...
> I have a VI using waveform chart. I want to use autoscale so I can
> see the entire waveform.
There is no problem when there are 2 or more
> waveforms in the array, but with only 1 waveform, the chart only
> displays data on the right edge of the chart and does not fill the
> chart view area. If I turn autoscaling off, then the chart scrolls
> across as normal.
>
> Any clues as to what is happening.
0 Kudos
Message 5 of 10
(3,872 Views)
Greg Cole "I found it to be that some initial bad or NULL data is being passed to your chart before the real stuff"

Ben "I suspect you are passing some bogus data and the chart is scaling from the beginning of time. This will put your real data at the far right"

I appreciate your input, after talking with NI technical support and then playing with my VI some more, I started to look for bogus data. I found it, but I don't know what to do about it now.

From a previous discussion with NI technical support, I was trying to programmatically clear my charts. There is no property node like right clicking on the chart and selecting �clear chart�. This is what I want to do automatically. So the suggestion was to put in blank data into chart to re-inital
ize it. This is the problem and the source of the �bogus data�.

Now I am off to find another way to clear my chart programmatically.

I thank everybody for your suggestions
David
0 Kudos
Message 6 of 10
(3,872 Views)
You can clear the waveform chart by setting the history data to an empty array. Create a property node for the chart and choose the property "History". Connect an array of empty waveforms to the property node and the history and there for the chart will be cleared. I created a control wired this to build array and the array to the property node.
Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 7 of 10
(3,872 Views)
Thank you for your help too,

This is what I have been working on. But how do I create an empty waveform? I can only figure out how to create a waveform with 0's. This is what originally caused my problem with auto-scaling. 0 translates to date "5:00 P.M. 12/31/1903". Auto-scaling works fine, but this date is too early to get good resolution to 2003 so the waveform is being painted on the right side of the scale. Ha Ha.

Right now, I am getting an empty waveform from my chart �VI Properties-Execution-Clear Indicators when Called�. Since my entire program is in a for loop, I am taking the History data from outside of the loop and wiring it to the loop so I can use this empty waveform to put back into the same chart whenever I need. It�s not perfec
t, but it works, but with a little more help I would like to clean up the program so that I define the empty array like your suggested.

Thanks again for everybody�s suggestions and help,
David
0 Kudos
Message 8 of 10
(3,872 Views)
Make a right click on the history property. You must select Create>>control (Create>>Constant is grayed out). This control contains an empty array of waveforms. Since the control is not needed on the front panel right click on the terminal and choose "hide control".
Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 9 of 10
(3,872 Views)
Thanks for your reply, this is easier than the way I found to get a blank waveform.
0 Kudos
Message 10 of 10
(3,872 Views)