LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.

Solved!
Go to solution

If communicating with raw/binary/hex commands, you need to know the data protocol.  A good protocol will have start byte(s), message ID and/or byte count, data, and a checksum.  This way you can know you got the entire message.  Is there anything like that mentioned in the manual?


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 11 of 19
(2,834 Views)

Hi guys 

 

i have the same problem - not solved until now.

 

I work with the NI Elvis III and try to measure CO2. I have the C02-Sensor "MH-Z19C" which is connected with Ni-Elvis III via UART.

 

i attached a picture of the problem and datasheet from sensor.

 

i have no idea what is wrong, i work on this for 2 weeks without any results.

 

maybe someone has an idea.front.pngfront_with_error.png

0 Kudos
Message 12 of 19
(2,440 Views)

Your device uses a binary protocol without termination but with fixed size data frames of 9 bytes. So disable the termination character at the Initialize serial port and change the numbers of bytes to read from 1000 to 9.

Rolf Kalbermatter
My Blog
0 Kudos
Message 13 of 19
(2,402 Views)

Hello Rolf,

 

thx for your help

 

 i changed numbers of bytes to read from 1000 to 9! that was a first very good clue 🙂

 

Then i tryed to changed the thing with the termination character at the initialize serial port", but here i dont know if i did it as u meant it.

 

i attached a picture - how i understood what i meant.

 

For the case i understood it correctly - i still got the same Error Code

changed.png

0 Kudos
Message 14 of 19
(2,391 Views)

i also tried this but also not working 😞

0 Kudos
Message 15 of 19
(2,382 Views)

@Ristrafil wrote:

i also tried this but also not working 😞


This is how it should be to disable termination character handling.And for the rest the commands seem to be ok. Also the baudrate and data bits etc. seem to be ok. This leaves the question about how you have connected the sensor.

The manual explicitly states that the digital lines need to be 5V TTL for this sensor. You seem to use the Elvis hardware which I can't find much information about, but what I can find says nothing about serial port functionality.

 

So are you sure that this is all correctly connected?

Rolf Kalbermatter
My Blog
0 Kudos
Message 16 of 19
(2,374 Views)

So regarding to connection i attached 3 pictures:

 

in the picture Sensor u see the 4 pins: GND, VDD, TX and RX : these are all pins i use

 

in the picture UART-Connectins: i oppened the "UART-SUB-VI" to show, where the TX/RX ports are on the NI Elivs

 

in the picture NI_Elvis : here u can see how i connect everything.

 

So Sensor TX goes to ni-Evlis port "DIO17"

Sensor RX goes to ni elvis port "DIO16"

Sensor GND goes to Ni-Evlis ground

Sensor VDD goes to Ni-Evlis 5V

 

i think there is not the problem, but maybe i miss something

Download All
0 Kudos
Message 17 of 19
(2,356 Views)

so 

i found the problem: i connected TX with TX and RX with RX  🙂 everyone starts small i guess xD

so know i have another problem

 

i measure exactly 1 value and then i must wait 20 sec before i can measure the next value - i receive the following error

"

Warnung 1073676294 bei VISA Read in MHZ-912C.vi

Mögliche Ursachen:

VISA: (Hex 0x3FFF0006) The number of bytes transferred is equal to the requested input count. More data might be available."

fehler.png

have someone an idea ?

 

0 Kudos
Message 18 of 19
(2,342 Views)

That’s not an error but a warning. If you use a protocol that uses a termination character, this warning indicates the you have most likely specified a to small number of bytes to read and there is probably still data left in the buffer. But you have a binary protocol with fixed size data frames and here it is expected that you read the number of characters you specified. And as it is a warning only it won’t prevent any code downstream from executing.

Rolf Kalbermatter
My Blog
0 Kudos
Message 19 of 19
(2,331 Views)