Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to receive 'null' character' in serial communication through VISA?

Solved!
Go to solution

Hello guys.

 

I am using PCIe 8431/8 board and trying to receive data from device. Devices are sending data including null character which is 0x00 in ASCII code. In Labview, null character is successfully received, but in Visual C++, it stops and shows error message.

 

I used both viRead and viScanf, but everything was failed... Is there anyone who knows how to receive null character in serial communication?? Thank you.

0 Kudos
Message 1 of 3
(2,588 Views)

The way your message reads is that LabVIEW works correctly.  You are looking for help on Visual C++.  My advice is that this is probably not the correct forum for Visual C++ answers; you should find a Visual C++ forum and post for help there.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 2 of 3
(2,553 Views)
Solution
Accepted by topic author choice119

Hi,

 

Yes this is the proper forum for a VISA question.

 

I'm not sure what your problem is since you haven't posted any code.

but try setting some of the properties

 

NationalInstruments.Visa.SerialSession serialSession;

serialSession = new SerialSession("COM1");

//try this

serialSession.DiscardNull = false;

               

//or try setting the termination char to something else
               

serialSession.TerminationCharacter = 13;               

serialSession.TerminationCharacterEnabled = true;

 

Curt

 

Message 3 of 3
(2,548 Views)