LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa serial read timeout

I'm very new to labview (like 2 days experience) but I am getting confused by serial timeout.

 

My device is a DigiX (digistump, some what like an Arduino) board.

At first I was getting a read timeout error as the default for the visa config seria vi is to use a termination character. The board I'm communicating with has no termination character. After searching the this forum and setting the Terminal Char Enable to false (Block Diagram) still getting a read timeout error (same error it seems most newbies get: Timeout expired before operation complete).

 

After looking at more posts on this forum I noticed some suggestions about putting timers between the serial write and read and some

suggestions to use Bytes at Port to input to the read. So I now have a write followed by a 50ms timer followed by a Bytes at Port and then

the read.

 

Here's the problem. I get a status code (1073676294, number of bytes transferred is equal to the input count) which is not an error but

when I run this it takes the full 10 seconds of the visa serial timer to complete. Can someone explain what is going on (in the visa config serial vi Front Panel the termination character seems to always return to LF even when I try setting to 0, is it possible putting the timer

and Byte at Port are masking an underlying problem)?

 

Thanks in advance for any help.

 

Dave

 

    

0 Kudos
Message 1 of 4
(3,505 Views)

It would be helpful to see some code.

 

Once you disable the termination character, it doesn't matter what the termination is set to (since it is being ignored).

 

The warning is common just because you are grabbing all of the data that is in the port and your instrument isn't sending more data.  It does bother me that you claim it is taking the full timeout to complete the read.  Again, show us some code so that we can help debug.


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 2 of 4
(3,485 Views)

Hello crossrulz,

 

I think I finally found a solution. After much googling I came across an NI article regarding the VISA configure serial port.

It talks about the End Mode For Reads (Serial Settings) and setting this to zero to stop using the termination character.

 

At this point the little test program runs as I think it should, speed wise. But it's curious why setting the Termination Char Enable

to false was not enough and I had to set the End Mode for Reads.

 

Thanks for the response.

Dave

0 Kudos
Message 3 of 4
(3,474 Views)

You set the Enable Termination Character to False on the VISA Configure Serial Port.

 

Just like Crossrulz said.  You didn't do anything special beyond that.

0 Kudos
Message 4 of 4
(3,465 Views)