LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timed loop timing

Hi All,

 

I'm trying to characterize the performance of a control system I'm running within a timed loop, but I'm having issues figuring out how fast things are running. I've set the clock at 1kHz and the period to 1ms (though it occurs to me that I might have forgotten to save current values as default, so this might not show up with my file) and yet for a ten second "wall clock" test, I only get 154 data points in the spreadsheets the loop writes to. I'd really like to calculate the response time of my control loop, but it's hard to do so when I can't figure out what measure of time the system is using.

 

There are some .vis in this file from an outside vendor that connect to my hardware that won't show up, but I don't think they're pertinent to the problem so you can just skip loading them.

 

Thanks,

Brian

0 Kudos
Message 1 of 8
(3,669 Views)
could it be that your hardware can not run this fast?
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 2 of 8
(3,662 Views)
I would hope not. I'm running a Dell Latitude D820 with a T2400 Processor @ 1.83Ghz using XP SP2 with a DAQ 6259. Should be plenty fast enough, no?
0 Kudos
Message 3 of 8
(3,658 Views)
are you trying to calculate 10 second? what are you trying to do with this vi?
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 4 of 8
(3,654 Views)

I'm trying to control an external motor based on some sensor information. I want the thing to be able to run continuously, but I'd like to understand how much time passes between samples so I can characterize the control system's performance (i.e. perturb the system with a step input and measure the settling time, etc...).

 

Thanks,

Brian

0 Kudos
Message 5 of 8
(3,649 Views)

Hi bcglaxer,

 

I do not know how long the 3rd party VIs take to execute, but moving the file IO operations outside the loop should help. Second, Microsoft Windows does not allow for LabVIEW to operate quicker that 1 ms, so you will not be able to increate loop speed beyond that. Thrid, if you are attemping to conduct PID, you should understand that Windows is not a determanistic operating system and can preempt any task. You may want to take a look at what LabVIEW Real Time and NI Real Time Hardware if you need high determanism.

 

 

Joshua B.
National Instruments
Message 6 of 8
(3,615 Views)
Thanks for the reply. If I moved the write to spreadsheet vi outside of the loop, wouldn't I just get one datapoint at the end of the test?
0 Kudos
Message 7 of 8
(3,596 Views)

You're welcome!

You can build an array, and if your data is not hugh (100's of MB) this may be the easiest solution. However, we aways suggest implementing the Producer/Consumer Architecture. Keep the PID in the Producer loop, but move the File IO to the Consumer. Also, it  appears that your instrument uses some form of serial communication, so that could cause lags in your system....

What is your application about in general, what performance are you hoping for, etc?

Joshua B.
National Instruments
0 Kudos
Message 8 of 8
(3,541 Views)