05-16-2012 02:25 AM - edited 05-16-2012 02:28 AM
I recently attempted to use the VISA Event functions for serial communications and got a nasty surprise.
For some reason it seems to dump a few hundred bytes of LabVIEW's memory onto the COM port!
Am I doing something hideously wrong or is there nasty bug lurking in LabVIEW here?
You'll need 2 COM ports, a null modem cable and the attached vi's in order to test this. (Null modem: as long as pins 2 & 3 are swapped and pin 5 connects through it'll do.)
1. Connect a free COM port (A) to another COM port via an RS232 NULL MODEM cable.
2. Run "Port B.vi" (set to COM port B).
3. Run "Port A.vi" (set to COM port A)
4. Click send a bunch of times randomly on "Port A.vi".
Result: If it worked correctly you should only get a single WAIT response from Port B.vi for each request sent.
If the bug appears you'll get a few hundred bytes of LabVIEW's memory dumped onto the COM port by Port B.vi.
It didn't always seem to do it, you may need to stop and start "Port B.vi" a couple of times and click quickly on the send button on "Port A.vi" when they're both running.
It happens on LabVIEW 2009SP1 and 2011SP1.
Solved! Go to Solution.
05-16-2012 05:16 PM
I realise this bug wont be the easiest thing to set up and test but it's certainly something the NI boffins should take a look at.
05-16-2012 06:58 PM
Hi TroyK,
Thanks for the information, we will give this a try.
Best regards,
02-06-2013 06:15 AM
Hi
Bug exists in LV2012 too.
/Vagn
02-06-2013 06:20 AM
Forgot to say bug does not exist in LV2010 - at least I haven't seen it.
/Vagn
09-30-2013 08:58 PM
Bug appears to be fixed in NI-VISA 5.4 which ships with LabVIEW 2013. (Haven't done extensive testing yet, just using the VIs attached in the original post.)