LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does this read_write.vi work in second run?

Solved!
Go to solution

That's the timeout error meaning the instrument didn't respond with a termination character or a 1024 bytes in the timeout period.  It is unrelated to the original VISA serial port error.  There should be no reason to have the serial configure and buffer configure in each and every subVI you have.  You should only need it once at the beginning of your program as long as you keep your VISA resource open.

 

You may want to use NI-Spy to snoop on the serial port communication.

0 Kudos
Message 21 of 25
(526 Views)

Hi,

Sorry for sking too mny questions, I am not realy a programmer, So how may I avoid time out error? should I increase the a byte number from 1024? if yes, what number?

Could you please let me know?

Thanks

 

0 Kudos
Message 22 of 25
(523 Views)

Increasing the number of bytes isn't going to help.  You have to figure out why your device isn't responding when you issued the last command.  Could it be you are overloading it with too many requests for data at once?  Does the command you were last trying to send ever work for you?

0 Kudos
Message 23 of 25
(520 Views)

Hi,

I was working for a while, and I made an exe application with my main code that these subvi was part of it, I am not sure why it stoped working, it worked for exe for a while as well, and then, it works occaionally, sometimes works some times it does not. And when it does not work it points an error to read_write.vi.

As I mentioned I am not very great in Labview programming, Wouldyou have any idea?

Thank you for any suggestion

Best 

0 Kudos
Message 24 of 25
(518 Views)
Solution
Accepted by topic author YBU

No, I don't have any more of an idea.  This isn't a LabVIEW programming problem anymore, but a problem in figuring out the communication interface with your device.

0 Kudos
Message 25 of 25
(513 Views)