LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lag CANOpen controller and DAQ filters-CPU spikes

I am writing this one here because my basic LabVIEW skills are entirely exhausted,

 

This VI's main job:

 

-Aquire two analog signals, apply same filters(single USB-6009)

-Timely send a CANOpen message populated from the different controls(PCI-8531)

 

Problem:

 

-Non periodic CPU spikes on the 32bit dual core remote PC running the executable(no labview, only up to date .NET, XP USB Hotfix, DAQMx and NI-VISA ) we have built here (on a 32-bit dual core), when the CPU spikes, the gauges freeze, Toggle switch LED slaves dont light until the 3-8 second lag is over, happens every 10-40 seconds,

 

Kindly (I stress kindly, I read what you guys do to the other noobs) let me in on where I went wrong,

 

Regards,

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

Hi mtamim,

 

start with the most prominent problem: there are a lot of loops in your code that run at unlimited speed - grabbing all the CPU power they can get.

 

Use some decent waits in those loops!

 

When you have done that:

- using a statemachine approach might be applicable to the big sequence structure!

- using TimedWhileLoops is probably overkill when you just call the DAQAssistent in there...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,077 Views)