LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Communication Timeout

Hello everyone,

 

I'm experiencing an issue with my LabVIEW code. I'm communicating via serial communication using the VISA functions. I am both writing and reading data. The problem is as follow: I run my code (continuously), I receive the expected response from the device, but I consistently encounter error 1073807339 with the Read function, indicating that the timeout expired before the operation completed. However, I'm unsure of the reason since I have already successfully read the response from my device.

Has anyone encountered a similar issue before?

 

Thank you.

0 Kudos
Message 1 of 7
(599 Views)

If responses from the device have a termination character, then set it by means of VISA Configure Serial Port and pass to VISA Read a high value for the byte count input terminal. The read will terminate with no timeout as soon as the term char is received.

Otherwise, VISA Read will try to read as many characters as specified by the byte count input, and will eventually timeout if the actual response is shorter.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 7
(591 Views)

What device are you trying to communicate with?  Do you have a manual or something detailing its messaging protocol?  Can you share your code for us to examine to find any major red flags that could point to this issue?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 7
(570 Views)

Thank you! I will try that!

0 Kudos
Message 4 of 7
(559 Views)

Actually I am not allowed to share my code and yes I do have a communication protocol. But I think the issue comes from the fact that I did not set the termination char in the VISA configure serial port. I will try once again with the appropriate termination char. Thank you 

0 Kudos
Message 5 of 7
(554 Views)

@MinHolly wrote:

Actually I am not allowed to share my code and yes I do have a communication protocol. But I think the issue comes from the fact that I did not set the termination char in the VISA configure serial port. I will try once again with the appropriate termination char. Thank you 


Judging from this response, I think you need more guidance.  Is the protocol itself proprietary?  We can't really help you if we don't know what the data looks like.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 7
(543 Views)

Well without more information on the device your are communicating with and the code you are using there's not a lot we can do.

But most serial communication issues can be solved by watching this video: VIWeek 2020/Proper way to communicate over serial

========================
=== Engineer Ambiguously ===
========================
Message 7 of 7
(487 Views)