LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

General question on RT

I am acquring data (Analog and digital) in a time critical loop at the rate of 1KHz. I have the same code running in an RT where the transducers are connected and the CPU usage on that system is around 40% but in one RT where there is no transducres are connected and the inputs are left open in that the CPU usage is around 60% Could anyone please tell me what is the dependency here or anyother thing am missing that I need to take care.

 

Thanks

-----

The best solution is the one you find it by yourself
0 Kudos
Message 1 of 7
(2,204 Views)

When comapre to windows OS, the RT OS should not take more CPU usage. This is an idle and common condition.

You can check the RT code 'which portion of code taking more CPU usage?' and 'what extra code added to RT like windows-RT communication?'

 

Also you can check the data logging if any(RT OS will not support data logging as windows OS supports!)

 

Even though, for 1kHZ sampling rate- 40% CPU usage is high, you can optimize even low.

Regards,
Yogesh Redemptor
0 Kudos
Message 2 of 7
(2,201 Views)

Thanks

 

Actually I have multiple operations like PID and other sequences so it takes this much and also I am not doing any data logging in the RT. I tried disabling the DAQ then it was around 35% but once I enable it again the usage increases.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 7
(2,199 Views)

There should not be any change in CPU usage when transducers are connected or not-connected to RT.

 

What are the 'Channel Types' (like voltage, current, thermocouple & etc.) you are using in you data acquisition? Are you gouping similar 'channel types' while creating DAQmx task?

You can note one more point, that while simulating some DAQ device along with physical device, the CPU usage will be high (LabVIEW 8.6). So we can simulate all daq device or have all physical device.

 

Regards,
Yogesh Redemptor
0 Kudos
Message 4 of 7
(2,197 Views)

I am reading only normal analog voltages and also I have created only one task for one card and also I am not using any simulated devices.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 5 of 7
(2,194 Views)

Hmmm.

 

Now, The CPU usage should not increase while the transducers are not connected!

Share your sample code.

 

Try restarting the RT?

 

Is the CPU usage is consitantly showing 60%? if not there is some problem in buffer alocation.

 

 

Regards,
Yogesh Redemptor
0 Kudos
Message 6 of 7
(2,190 Views)

I'lll speculate that you are experiencing "out of range" conditions. These may or may not flag an error (boolean in error cluster is true).

 

YOu will have to look for a "non-zero" value in the error cluster.

 

Also be forwarned that the definitions for the error codes can and will differe depending on your target platform. LV will load a different General Error Handler depending on your target platform.

 

Years ago I saw an out-of-range flag an error while single stepping code form the PC but only return an warning when running as an exe.

 

And as to why more PCU if it is an out-of-range...

 

The "source" field of the error cluster is a string and a buffer must be allocated to hold the string.

 

Just specualting,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 7
(2,170 Views)