Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop serial port from transmitting NULL character

When using Labview serial VISA write, it always puts a NULL character at the end. How do I eliminate it so that I can achieve the same result as using a hyperterminal, which does not transmit extra unprintable characters?

I tried turning on DISCARD NULL CHARCTERS property for the VISA but it only has effect on serial read but has no effect on Serial Write.

If I turn off ALLOW TRANSMIT property, it does eliminate the NULL character on write, but there is a long delay.
0 Kudos
Message 1 of 3
(4,455 Views)
Hi,

I am not sure what could be happening here. You might want to turn on NI-SPY and look at exactly what is being transmitted. What is the hex value of the "NULL" character that is being sent? Could this be a classic CR vs CR/LF problem?

Hope this helps out!

Best Regards,
Aaron K.
Application Engieer
National Instruments
0 Kudos
Message 2 of 3
(4,455 Views)

Attached is how I transmit text without sending extraneous characters.

I took this from the example that comes with labview on basic serial.

Download All
0 Kudos
Message 3 of 3
(4,042 Views)