From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA slows down

Hello everyone,

 

Right now I am trying to use a VISA that before seemed to work fine, but as I increased the cycles in my main program, it seems to slow down sometimes, giving an error. Basically it controls a motor. I first send data to tell how much to move the motor with the X-move.vi and then I keep checking the position with the VI GetPosition.vi until it reaches the expected value.

But sometimes the first VI takes longer and gives an error, that makes the following VI to say it is in the position "0".

I believe it might be a problem about memory, but I don't know anymore what to try.

 

Could you please give me some help?

Thank you!

Download All
0 Kudos
Message 1 of 3
(2,759 Views)

These look like they would be subVI's be used in another VI that would have a loop around them.  Is that true?

 

If so, why are you opening the com port and configuring it on each call of these subVI's.

 

Com ports should be configured once before a loop starts, and closed after a loop ends.  In between, it should be just VISA reads and writes.

0 Kudos
Message 2 of 3
(2,746 Views)

I actually found it was some conflict of parallel loops that used these VI unnecessarily "simultaneously". But I also want to solve that situation of opening and configuring all the time, as in the beginning I didn't understand so well about these so it got badly programmed. Thank you for the answer 🙂

0 Kudos
Message 3 of 3
(2,658 Views)