11-05-2020 06:22 AM
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?
11-27-2021 10:10 AM
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.
11-28-2021 07:47 AM
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.
11-28-2021 02:14 PM
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
11-28-2021 02:59 PM
i also tried this but also not working 😞
11-28-2021 03:25 PM - edited 11-28-2021 03:26 PM
@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?
11-29-2021 06:37 AM
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
11-29-2021 02:07 PM
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."
have someone an idea ?
11-29-2021 06:25 PM
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.