LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Enable Event dumps LabVIEW memory onto serial port

Solved!
Go to solution

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.

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
Download All
Message 1 of 6
(3,703 Views)

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.

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 2 of 6
(3,685 Views)

Hi TroyK,

 

Thanks for the information, we will give this a try.

 

Best regards,

steve.bm
AE | NI
0 Kudos
Message 3 of 6
(3,677 Views)

Hi

 

Bug exists in LV2012 too.

 

/Vagn

0 Kudos
Message 4 of 6
(3,546 Views)

Forgot to say bug does not exist in LV2010 - at least I haven't seen it.

 

/Vagn

0 Kudos
Message 5 of 6
(3,543 Views)
Solution
Accepted by topic author TroyK

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.)

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 6 of 6
(3,360 Views)