LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

processor load

Hello,
 
the application I have, inquires the serial interface with Visa VIs in a while loop. The problem is, that the processor load is at 85%. Because of the large processor load, I get errors by the request. With time-loops or wait-functions I couldn´t see any positive changes. Are there other opportunities to decrease the processor load?   
 
LV 6.i
Win 2k
 
ThomasD
0 Kudos
Message 1 of 14
(3,939 Views)
I think it would help the community to help you, if you can tell us why the processor load is at 85%. Is it cause by your application or an other software? If it is an other software - what software? Tell us a little bit more about your system.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 2 of 14
(3,932 Views)

hello thomas,

can you please post some code so we can have a look?

best regards
chris

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 3 of 14
(3,931 Views)
The processor load normally is by 0 to 2%. The load increases to 85% by starting the VI, it´s independet from other software.
0 Kudos
Message 4 of 14
(3,929 Views)
Just add a "wait until"-function in the while-loops and it should be better. Now each loop tries to repeat as fast as possible.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 5 of 14
(3,924 Views)
I changed the "wait until" function in the range from 10ms to 100ms. The load is still at 80 to 85%. By 100ms I get anymore bad values.
0 Kudos
Message 6 of 14
(3,921 Views)
Could you post your modified vi? I had a closer look at your first attachment, but can't see anything which causes this load.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 7 of 14
(3,915 Views)

hello thomas

- please place the "VISA close" function outside the while loop.  only close the VISA session when you are done!
- consider to decrease the number of calls of the VISA Read function by increasing the number of bytes you read each time

(see attachment).

whats the data rate of your app? check the loop counter of your app

best regards

chris

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 8 of 14
(3,915 Views)
The data rate of the inquired device is about 2200 baud.
By decreasing the number of calls of the VISA Read function from 32 to 8, the processor load goes down from 85% to 30-40%. But the error by the bytes read still consists. In the meantime I think, the the problem of the wrong values has another cause. The VI in the attachment is a light version of the programm. At the moment there are only 8 Bytes analyzed but in the final version there have to been 32 Bytes analyzed. 4 Byte comply 1 Channel of the device, 32 Byte comply 8 channels of the device.
By reading 8 Bytes, the first 4 Bytes are read error free and the second 4 are showing wrong values.
By using the Windows Hyperterminal for example, all 32 bytes are read error free by the same configuration.  
0 Kudos
Message 9 of 14
(3,905 Views)

I just made a few modifications:

1. I enabled events - now it should wait for the length of timeout or until the set event occurs.
2. I reads only the bytes available at the port

If this works better, try to move the reading from serial port to a separate loop.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 10 of 14
(3,892 Views)