LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Reconnecting and even disconnect, wait for connect.

we made some board, and this board uart disconnect during some situation,

i would like to know how to keep my visa.... even if short disconnect.. now, if there is dis connect, error will be comming and stop visa and stop loop.

is any body can help me about this?

 

1 more thing.... im keep wait for get respons of visa.. and few read data is not same byte... how can i wait and get any deffrent byte,,

 

>>> visa open >>> wait >>> few time later, 5byte... >>> few moment later , 20byte...>>> few moment later >>>10byte.. >>

 

now i try to learn, and tcp visa revieving problem always make me hard to do so ^^;;

 

 

0 Kudos
Message 1 of 2
(104 Views)

Hi junseok,

 


@junseok323 wrote:

we made some board, and this board uart disconnect during some situation,

i would like to know how to keep my visa.... even if short disconnect.. now, if there is dis connect, error will be comming and stop visa and stop loop.

is any body can help me about this?


Implement some error handling and close/re-open the VISA port when your "disconnect"-event occurs…

 


@junseok323 wrote:

1 more thing.... im keep wait for get respons of visa.. and few read data is not same byte... how can i wait and get any deffrent byte,,

 

>>> visa open >>> wait >>> few time later, 5byte... >>> few moment later , 20byte...>>> few moment later >>>10byte.. >>


Implement the messaging protocol of your device correctly, so you don't need to worry about varying byte counts! (Bad suggestion: Read one byte after the other with a small timeout value. When a timeout error pops up you know the message is complete.)

 

Watch this video to learn all you need to know about serial communication with LabVIEW!

Best regards,
GerdW


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