10-08-2018 12:00 AM
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.
Solved! Go to Solution.
10-11-2018 08:17 AM
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.
10-11-2018 11:44 AM
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