LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Chart History Length in Loop

Solved!
Go to solution
Solution
Accepted by topic author Wuffi

1. Right-click on your chart and choose Visible Items->Digital Display.  There will be an indicator attached to the graph which will show the latest value.  Now you can delete the "Numeric" indicator from your VI.  That will make your diagram slightly simpler and eliminate a possible issue.

 

2. I am very concerned that you do not have a delay in your loop.  You might want to add something like a 50ms delay.

 

3. Your VI does not have the X-axis being autoscaled.  Be sure to turn that on.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 25
(907 Views)
Solution
Accepted by topic author Wuffi

@RavensFan wrote:

I don't see any reason why your chart wouldn't show more points once you have set the X-axis to autoscale.

 

What I do see is that your VI will execute the For Loop 5 times, and that will be as fast as the DAQ Assistant can return a data point.  If you keep hitting the run button, you'll see more data points in groups of 5.


I Owe RF a beer.

 

I think you are tricking yourself.  Change the plot line style to something that shows points Like this

Capture.png

You can verify that the history length is increasing with a simple bit of additional code like this:

Capture1.png

 @ Tim, the MyDAQ DMM will pace the loop just fine.  I had to simulate one to test the code but... that is how Data Acquisition works... you can't get values faster than the reading are converted in hardware (Its Monday- and you need more coffee)


"Should be" isn't "Is" -Jay
0 Kudos
Message 12 of 25
(905 Views)

@Wuffi wrote:

Excuse me. Please find attached the VI.

I started to use LabVIEW only recently.

Therefore, I am not an expert.


I don't have DAQmx installed, so I cannot see how the DAQ assistant is configured.

How many channels and points is it putting out per call?

(Sorry, dynamic data is so opaque as to make troubleshooting impossible)

 

Since we don't have your hardware, it is typically better to substitute a similarly configured "simulate signal" express VI before attaching as long as it still demonstrates your problem.

 

Also be aware that your history data does not reset between runs.  It is often more useful to reset the history programmatically before the loop.

 

 

0 Kudos
Message 13 of 25
(895 Views)

@JÞB wrote:

 

 @ Tim, the MyDAQ DMM will pace the loop just fine.  I had to simulate one to test the code but... that is how Data Acquisition works... you can't get values faster than the reading are converted in hardware (Its Monday- and you need more coffee)


I also simulated for testing.  I know the DMM can only run so fast.  But a lack of a wait is still concerning considering we are dealing with 1 point at a time and you likely want a sample rate that is slower than as fast as the DMM can go.  Does the myDAQ do waveform acquisition with the DMM?  That would be even better if you actually want a steady sample rate.

 

And I don't drink coffee.  I am hyperactive enough without it.  But I will happily accept the "Monday" excuse for anything stupid I did this morning.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 14 of 25
(893 Views)

@altenbach wrote:

@Wuffi wrote:

Excuse me. Please find attached the VI.

I started to use LabVIEW only recently.

Therefore, I am not an expert.


I don't have DAQmx installed, so I cannot see how the DAQ assistant is configured.

How many channels and points is it putting out per call?

(Sorry, dynamic data is so opaque as to make troubleshooting impossible)

 

Since we don't have your hardware, it is typically better to substitute a similarly configured "simulate signal" express VI before attaching as long as it still demonstrates your problem.

 

Also be aware that your history data does not reset between runs.  It is often more useful to reset the history programmatically before the loop.

 

 


I have looked at it (You should install DAQmx Simulated Devices are wonderful)  Its a single channel 1 Sample on demand configured for Resistance on the MyDAQ DMM.

 

CTRL+I showed that "Clear Indicators when Called" is not set (And that is the easier way to clear the chart although less visible)

 

@crossrulz Nope, the MyDAQ has no configurable clock nor any real buffer to speak of 1ch1sample on demand is the only option. (unless you WANT a DAQmx Error)


"Should be" isn't "Is" -Jay
0 Kudos
Message 15 of 25
(892 Views)

@JÞB wrote:
(You should install DAQmx) 

Thanks. I have, but not on this rig. This computer is purely for computation and I rather do other things than spend hours installing stuff I don't need 😄

Message 16 of 25
(887 Views)

@altenbach wrote:

@JÞB wrote:
(You should install DAQmx) 

Thanks. I have, but not on this rig. This computer is purely for computation and I rather do other things than spend hours installing stuff I don't need 😄


Well heck then, You are merely boosting YOUR post count?  When I'm around for DAQmx?  LOL


"Should be" isn't "Is" -Jay
Message 17 of 25
(885 Views)

@JÞB wrote:

@altenbach wrote:

@JÞB wrote:
(You should install DAQmx) 

Thanks. I have, but not on this rig. This computer is purely for computation and I rather do other things than spend hours installing stuff I don't need 😄


Well heck then, You are merely boosting YOUR post count?  When I'm around for DAQmx?  LOL


...b..b..b..but it's a chart/loop question, not a DAQmx question. 😄

Message 18 of 25
(878 Views)

@altenbach wrote:

@JÞB wrote:

@altenbach wrote:

@JÞB wrote:
(You should install DAQmx) 

Thanks. I have, but not on this rig. This computer is purely for computation and I rather do other things than spend hours installing stuff I don't need 😄


Well heck then, You are merely boosting YOUR post count?  When I'm around for DAQmx?  LOL


...b..b..b..but it's a chart/loop question, not a DAQmx question. 😄


Without DAQmx you can't see what type of data is being charted:D


"Should be" isn't "Is" -Jay
0 Kudos
Message 19 of 25
(874 Views)

Thank you all for your help and your answers so far.

I'll already learned quite a bit.

It was a good hint to reset the vi after a run - I thought this would be done automatically.

0 Kudos
Message 20 of 25
(849 Views)