LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with lag in program

Incredible! I have never used the "Invoke Nodes" before but I will now. That worked great with getting the default values set.

 

Sorry this seems to be never ending but I am learning so much. I have a couple more questions as usual:

 

1) I have played with the wave chart and the property nodes so the chart x-axi can be manipulated. I really only want to change the range. I have taken off the "AutoScale X" and used property nodes,

     XScale>Range>Start

     XScale>Range>Maximum

 

with no luck. It seems like the plot is trying to revert to something else. It seems so simple but I can not do anything in the properties to make it work either.

 

 

2) Is there a limit to the queue as to how muh data/time can pass before it runs out of buffer? Anything else I should be concerned with when using these loops and aquiring data?

 

Thanks,

~Chris

0 Kudos
Message 11 of 15
(456 Views)

Yes, that does look a lot better!

 

There are several ways of stopping multiple loops. See this link for one way of doing it.

=====================
LabVIEW 2012


0 Kudos
Message 12 of 15
(448 Views)

1) I have played with the wave chart and the property nodes so the chart x-axi can be manipulated. I really only want to change the range. I have taken off the "AutoScale X" and used property nodes,

     XScale>Range>Start

     XScale>Range>Maximum

 

with no luck.


I'm not surprised.  This is a chart not a graph every time you update the data it is displaying it updates the scale range to display the latest xNumber of values (Default=1024).  You can TRY to fight this expected behavior but, I don't recomend it.Smiley Wink  Adjust the Chart History Length property instead. 


 


2) Is there a limit to the queue as to how muh data/time can pass before it runs out of buffer? Yup! depending on how much memory the OS can access. 

 

Set the max queue length equal to the chart history length and the queue will never hold more points than the chart can display under the worst bug you could write.  The consumer loop should be able to keep up if its correctly written- in fact thats why we used a P-C archietecture.Smiley Wink


"Should be" isn't "Is" -Jay
Message 13 of 15
(441 Views)

I am revisiting the program and could use some help. To refresh, I am aquiring 12 channels of 0-10 volt signals and sending them to a file. Now I would like to continue sending the "raw data" to a file, and also manipulate the data and save to another file but at a much lower frequency. The original data is being aquired at 1kHz and the data for manipulation would only be needed to sample around 20Hz. Any suggestions on how to accomplish this or where in my program I should create this code?

 

Attached is my VI. Any other advice to help clean it up would be appreciated.

 

Thank you,

~Chris

 

0 Kudos
Message 14 of 15
(419 Views)

Chris,

 

I briefly looked at your attached VI. The way I understand what you are asking is as follows. You are sampling at 1 kHz, but for this new operation you only want every 50th data point (20 Hz), is this correct?

 

If that is the case, you could probably add this to your consumer loop. I would add an operation to check to see if the loop iteration is a multiple of 50 and if it is, perform your operation on the data and send it to another file.

 

There is also a VI called "decimate (continuous)" which allows you to do this. There is an example in the LabVIEW Example Finder called "Continuous Decimating" that shows how to implement this VI.

 

Let me know if this is the kind of idea you are looking for.

 

-Nick-

Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments
0 Kudos
Message 15 of 15
(404 Views)