LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial communication limits DAQ refresh rate - help with program structure

Hi.

 

I have made a LabView program that controls a test rig. One component of the rig is an AC motor drive which has a serial link at 19200baud which is used for speed (rpm) logging and control. On top of this a NI USB-6009 DAQ is used to monitor parameters such as torque e.t.c.

 

The problem is that the AC motor drive demands a 35ms wait between me sending the "Read command"  and actually reading it. If the time is less than 35ms the drive returns corrupt data. So the limit does not seem to be the baudrate but more of cpu capacity limit in the AC motor drive.

 

As a result, the DAQ sampling, which is run in the same while loop as the serial interface can never reach a higher rate than ~28Hz. I would like to increase the sample rate of the DAQ to around 100Hz and update the speed over the serial interface as often as possible.

 

So my question is.... how is this done in the best/simplest way?

 

Kind regards // Gustaf

0 Kudos
Message 1 of 2
(2,810 Views)

Break up the code into two seperate loops: One that runs at the maximum rate for the DAQ system. One for the slower serial system.

 

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 2
(2,789 Views)