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.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

error: timeout expired before operation completed

Solved!
Go to solution

Hola a todos buenos días 

 

Estoy trabajando con un medidor de presión el cual se comunica vía USB a micro USB, y no deja de marcarme este error (timeout expired before operation completed)

 

 

Yahe probado cambiando el timeout , el delay, la config de bytes at port y nada. Es más, ya probén todo esto:

 

http://digital.ni.com/public.nsf/allkb/874B379E24C0A0D686256FCF007A6EA0

 

 

Espero que me puedan ayudar, gracias de antemano

0 Kudos
Message 1 of 9
(6,797 Views)

Voy a tratar de usar el traductor de google para conseguir esto en español para ti Espero que funcione.

Compruebe la configuración de administración de energía Hub USB utilizando el Administrador de dispositivos de Windows. El poder del cubo se puede apagar y desconectar su dispositivo.


"Should be" isn't "Is" -Jay
Message 2 of 9
(6,780 Views)
A timeout is seldom caused by the issues in that kb, in my opinion and seldom fixed with those suggestions.

Check baud rate and other sections, check the command, check the termination character, check the type of serial cable. Try with another program such as putty.

You need to provide make and model, the manual, and your code.
Message 3 of 9
(6,775 Views)

I think that I've checked that issue (about the hub port) but I will check it again, thank you

 

Here is the programs that I madeand the serial communication

Download All
0 Kudos
Message 4 of 9
(6,767 Views)

Check your string constants!

 

Capture.PNG

Select Visable Items Display style

 

That is a litteral "\r\n" not a <CR LF> and that would cause all sorts of problems with unterminated writes.

 

Hey, how was the Google Translate quality?


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 9
(6,760 Views)

I tried putting the display style in visible items for the string constant that I was inserting with no results Smiley Sad

Also doing this and increasing the timeout period

 

Also I have tried putting it with the labview item  " End of line constant" , and again increasing the timeout, and it still the same

 

Btw the google translation was good!

0 Kudos
Message 6 of 9
(6,746 Views)
Solution
Accepted by topic author Nanto

End of line constant is platform dependant.

 

!1-1.png

pick any one of those constants as your termination string!  and seriously check all your string constants VALUES.  showing the display style only aids you in identifying which are wrong

Then: save this attachment to C:\Users\<you>\Documents\LabVIEW Data\Probes\

When you select and right click on a string wire you will have a new selection under custom probe>>StretchyString! It looks like this:

 

Capture.PNG

Believe me you really want to use that to debug communications strings and messages it will allow you to fully inspect strings with unprintable charaters and whitespace.  It resizes too as big as you could ever need it and you can change display format.


"Should be" isn't "Is" -Jay
Message 7 of 9
(6,726 Views)
Please try the other common causes of timeout errors. Debug should begin with properly written program such as putty or hyperterminal.
Message 8 of 9
(6,715 Views)

Thank you for the Stretchy String VI, it really has helped me. I was sending the commands correctly.

 

The problem seems to be the number of bytes  at the serial visa read, although I was reading exactly 12 bytes.

 

So I keep looking for a solution and found in an older post this configuration, wiring the bytes at port function to the serial visa read, and it seems to work, the timeout error hasn't appeared again 😄

 

Also I set the input buffer size according to the number of bytes of the command

timeout error solution.png

 

Really really thank you for your help and sorry for responding so late, I was busy trying to fix this VI, and now I have it working in a huge VI as subVi with others subVI's 😄

Message 9 of 9
(6,562 Views)