LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Communication slows down after some time

Please find the attached code for serial communication of packets with an inter packet delay of 100ms.The time required for receiving 2 packets is 300ms initailly which increases to 500 ms after an hr 0r so.Also the CPU usage increases from 10% to 60%.

 

Could you please go through the code and let me know where I am going wrong.

 

Please can anyone reply asap , its urgent

0 Kudos
Message 1 of 5
(2,448 Views)

Where do we begin?  What is your top level VI?

 

My guess is that somewhere you have an array growing without bounds, and the memory shuffling is slowing down your code.

0 Kudos
Message 2 of 5
(2,446 Views)

Serial comm.vi is the main VI

0 Kudos
Message 3 of 5
(2,444 Views)

The string array that acts as part of a queued state machine near the top of the code.  Put an indicator on that along with an indicator for array size.  See if that is growing as your program progresses.

0 Kudos
Message 4 of 5
(2,441 Views)

Thanks for the reply....

I deleted the array bytes3 in serialcomm_engine.vi , the performance has improved but still if i open some other application it momentarily goes high to 500 ms.Any solution for this.

0 Kudos
Message 5 of 5
(2,430 Views)