Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid buffer mask call when flushing VISA

I am trying to call the flush VISA I/O function.  I am specifying a valid VISA reference, and a valid mask (I read the knowledge base article).  I also updated my VISA driver to the latest one (3.4.1).
The problem is every time I call the VISA Flush I/O Buffer vi, I get the following error: Invalid buffer mask specified (0xBFFF003D). I've tried with the following specific inputs:
  * nothing (should default to 16)
  * 16
  * 32
  * 48
  * 1
  * 2

I tried on another machine w/ LabVIEW, and got the same error.  Can someone either a) tell me what the proper mask values are or b) email me a working example w/ flush implemented?

Thanks

Mark
-----------------------------------------------------------------------

Mark HarySensing Systems LLC
mark.hary@sensingsystems.com 2755 Campus Drive, Suite 230
T 650.341.5550 x104 San Mateo, CA 94403
F 650.341.5556 http://www.SensingSystems.com
0 Kudos
Message 1 of 4
(5,611 Views)
Try this VI. It was created with LabVIEW 7.1. You also didn't mention what your VISA resource was, but I am assuming you are using a serial port or some thing like that. If you have a serial port (COM 1), try it with that first.

-Josh
0 Kudos
Message 2 of 4
(5,604 Views)
Sorry .. I should have been more specific.  I am getting the error when I access a GPIB device.  The sample code provided works fine for COM1 and LPT1, but any device attached to my PCI-GPIB controller gives me the error (-1073807299, or 0xBFFF003D). 

I am using the latest GPIB driver (2.42).

I tried on a different machine and got the same result.  (It's also the same type of controller, a PCI-GPIB). 

I spoke w/ a NI application engineer and he was not able to reproduce the problem.  It worked fine for him.  I then went through and completely removed all LabVIEW, VISA, and GPIB software and reinstalled.  I still had the same result.  I can see the error with NI Spy:

> 1.  VISA Flush I/O Buffer ("GPIB0::10::INSTR", 16)
> Process ID: 0x00000A04         Thread ID: 0x00000B2C
> Start Time: 12:50:42.022       Call Duration: 00:00:00.016
> Status: 0xBFFF003D (VI_ERROR_INV_MASK)

Ideas?
-----------------------------------------------------------------------

Mark HarySensing Systems LLC
mark.hary@sensingsystems.com 2755 Campus Drive, Suite 230
T 650.341.5550 x104 San Mateo, CA 94403
F 650.341.5556 http://www.SensingSystems.com
0 Kudos
Message 3 of 4
(5,594 Views)
I spoke w/ NI support.  It turns out that this VISA function (Flush I/O Buffer) is not valid for GPIB communications.
-----------------------------------------------------------------------

Mark HarySensing Systems LLC
mark.hary@sensingsystems.com 2755 Campus Drive, Suite 230
T 650.341.5550 x104 San Mateo, CA 94403
F 650.341.5556 http://www.SensingSystems.com
0 Kudos
Message 4 of 4
(5,541 Views)