I can not successfully read data from an ENA(B or C) to a VB.Net program using the VISA IO libraries and binary transfer mode. ASCII transfer works fine, but is slower than I need.
E5071B FW 6.51 (GPIB or ENET)
E5071B FW 8.01 (GPIB or ENET)
E5071C FW 8.10 (GPIB or ENET or USB)
VB.Net 2005 (.NET 2.0)
Agilent IO Libraries (14.2.8931.1)
Agilent VISA (installed as secondary, operating as primary)
National Instruments MAX (22.214.171.12401)
National Instruments VISA (4.0)
National Instruments PCI GPIB interface card
Agilent 82357A USB to GPIB interface
Agilent IVI-COM Driver for Agilent Network Analyzers (126.96.36.199)
Intel Core 2 Duo 1.86 GHz, 4 GB RAM, using Physical Address Extension
Windows XP SP2
I am including a test program written to illustrate this point.
When ASCII mode is used, data is as expected.
When REAL or REAL32 mode is used, first few items are okay, then stream seems corrupted.
To use this test program, you need installed on PC:
1.)Visual Basic 2005
2.)Agilent IO Libraries (w/Agilent VISA) Vers.>=14.2.8931.1
3.)Agilent IVI-COM Driver for Agilent Network Analyzers Vers.>=188.8.131.52
4.)ENA E5071(A/B/C) Network Analyzer (visible to IO Libs, GPIB or ENET or USB)
IVI-COM driver uses ASCII mode only so no xfer problems there.
I also have IntuiLink installed (which uses binary XFer mode) and no problems there.
With the VISA mode, you can choose between the three transfer methods and this is where the problem arises. When Real or Real32 mode is used, data is corrupt and the analyzer reports a "Query Interrupted", which I assume is because the buffer is not being fully read. This seems to be a problem at the .NET level. Anyone else see this?
[edit: I have removed the original code to prevent confusion. Download the code in my post below or from this link: Discussion Forums ]