LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resending a serial message, if no reply is received

I have a queue state machine that I'm trying to add some functionality to.  What I would like to do is add some code that will resend a serial message up to 3x, if no reply is received.  It's probably pretty easy, but I'm relatively new to LabVIEW. Thanks.
0 Kudos
Message 1 of 7
(3,458 Views)

Try this. You write the command and if the response is not empty or the counter is greater than 2 (not 3 because it is zero based) then you stop your loop and continue on.

DOH, the VISA should be wired through the loop assuming you will be doing processing afterwards/closing your VISA (which you should will do 😉 )
Message Edited by for(imstuck) on 05-26-2010 12:23 PM
0 Kudos
Message 2 of 7
(3,451 Views)

Thanks for the prompt reply.  I've included an image of thserial read_write.JPGe code that is being used for the read/write. 

 

 

 

0 Kudos
Message 3 of 7
(3,429 Views)

This image is too small to read.  Consider posting a bigger image next time.  Does your code work like you want it to?  Do you need more assistance?  Have you implemented the suggestion by for(imstuck)?  It looks to me that you have not.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 7
(3,420 Views)
I implemented the recommended code - works like a champ - thanks.
0 Kudos
Message 5 of 7
(3,386 Views)
super-dee-dooper
0 Kudos
Message 6 of 7
(3,370 Views)

Please mark the correct solution as the Accepted Solution.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 7 of 7
(3,355 Views)