I am using LabView 2010 and serial communication with VISA vi.
When using VISA write, every sent commands start with a null character. And I cannot avoid it?
What can I do to discard this unwanted null character?
Thank you in advance for your help
Solved! Go to Solution.
Thank you for your reply.
Here is an example of what I did.
The issue is that doing this, my device receives the string with a null character before.
Hi, your problem is the VISA CLR node. Visa Clear sends a break character which your device is seeing as a null. Use Flush Buffer instead if you need to, it will not send the break.
Hope this helps,
Remove the VISA CLR. It writes a NUL charater. Go figure.
Technically it writes an empty string after changeing the end mode to "Break", which is a start bit no data, for 250mSec and a stop bit but that would be a NUL.
Are you telling me to go figure? are you tellling me i am ignorant and stupid? maybe i was not 100% accurate but im trying to help.
It is late at night and i am posting from mobile without LabVIEW open.
Michael, we cross posted. I was writing my response at the same time you arrived at the exact same correct answer. No insult intended! Heck, I didn't even know you were chiming in;)
Yeah, should have guessed. Sorry. making me laugh now
Back to the subject in hand. We can't see the rest of the program, but it is worth mentioning that it would be very bad practice to call this VI frequently. keep the port open rather than continuously reinitialising it. Close the end at the end of the execution. Clear buffers whenever you need to , but sometimes clearing buffers is just masking another problem where not all characters are being correctly sent/received from previous commands.
I hope this is helpful too