Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.
GPIB kusb-488b NI driver from LabVIEW
-
- Posts: 11
- Joined: September 16th, 2011, 2:08 pm
- Country: United States
GPIB kusb-488b NI driver from LabVIEW
Hello, experienced C++ but complete newbie to Labview here just finished core 1 last week and now attempting to use labview to communicate with equipment thru VISA.
I am able to communicate with all three instrument ( Agilent 34980A, Data Precision 8200, HP 3458A ) via c++ and VISAIC
For C++ ibdev, ibclr, ibwrt, lbrd was used and everything work just fine.
For VISAIC the instrument show up as GPIB0::9::INSTR, GPIB0::20::INSTR, GPIB0::22::INSTR and default IO setting was used except the HP 3458A address 22 needs to enabled termination character.
Next attempt was using VISA Write in labview and I am getting error
Attempt 1 using quick drop to find VISA open, clear, write( ID? ), read passing GPIB0::22::INSTR as input to open
GPIB0::22::INSTR is set for the “VISA resource name” input control
Get error -1073807343 source “VISA Write in Untitled 2”
Trace from VISAIC
> 266. VISA Open ("GPIB0::22::INSTR", False, 0, 0, "GPIB0::22::INSTR")
> Process ID: 0x000023B4 Thread ID: 0x00001574
> Start Time: 10:41:26.914 Call Duration 00:00:00.002
> Status: 0xBFFF0011 (VI_ERROR_RSRC_NFOUND)
Attempt 2 bypass the visa open and use the visa write (ID?)
Get error code -1073807343 and source “VISA Write in Untitled 2”
> 268. VISA Write ("GPIB0::22::INSTR", "ID?.", 0)
> Process ID: 0x000023B4 Thread ID: 0x00001574
> Start Time: 11:00:39.285 Call Duration 00:00:00.003
> Status: 0xBFFF0011 (VI_ERROR_RSRC_NFOUND)
here's the trace from successful ID? command to/from 34980 address 9 using VISAIC
1. viWrite (GPIB0::9::INSTR (0x022981B8), "*IDN?.", 6, 6)
Process ID: 0x000002A0 Thread ID: 0x00001E8C
Start Time: 08:48:09.133 Call Duration 00:00:00.002
Status: 0 (VI_SUCCESS)
2. viRead (GPIB0::9::INSTR (0x022981B8), "Agilent Technologies,...", 1024, 59)
Process ID: 0x000002A0 Thread ID: 0x00001E8C
Start Time: 08:48:09.179 Call Duration 00:00:00.002
Status: 0 (VI_SUCCESS)
I notice viWrite and viRead was used by VISAIC but I wasn't able to fine such vi anywhere.
What am I missing?
Regards
Mark
I am able to communicate with all three instrument ( Agilent 34980A, Data Precision 8200, HP 3458A ) via c++ and VISAIC
For C++ ibdev, ibclr, ibwrt, lbrd was used and everything work just fine.
For VISAIC the instrument show up as GPIB0::9::INSTR, GPIB0::20::INSTR, GPIB0::22::INSTR and default IO setting was used except the HP 3458A address 22 needs to enabled termination character.
Next attempt was using VISA Write in labview and I am getting error
Attempt 1 using quick drop to find VISA open, clear, write( ID? ), read passing GPIB0::22::INSTR as input to open
GPIB0::22::INSTR is set for the “VISA resource name” input control
Get error -1073807343 source “VISA Write in Untitled 2”
Trace from VISAIC
> 266. VISA Open ("GPIB0::22::INSTR", False, 0, 0, "GPIB0::22::INSTR")
> Process ID: 0x000023B4 Thread ID: 0x00001574
> Start Time: 10:41:26.914 Call Duration 00:00:00.002
> Status: 0xBFFF0011 (VI_ERROR_RSRC_NFOUND)
Attempt 2 bypass the visa open and use the visa write (ID?)
Get error code -1073807343 and source “VISA Write in Untitled 2”
> 268. VISA Write ("GPIB0::22::INSTR", "ID?.", 0)
> Process ID: 0x000023B4 Thread ID: 0x00001574
> Start Time: 11:00:39.285 Call Duration 00:00:00.003
> Status: 0xBFFF0011 (VI_ERROR_RSRC_NFOUND)
here's the trace from successful ID? command to/from 34980 address 9 using VISAIC
1. viWrite (GPIB0::9::INSTR (0x022981B8), "*IDN?.", 6, 6)
Process ID: 0x000002A0 Thread ID: 0x00001E8C
Start Time: 08:48:09.133 Call Duration 00:00:00.002
Status: 0 (VI_SUCCESS)
2. viRead (GPIB0::9::INSTR (0x022981B8), "Agilent Technologies,...", 1024, 59)
Process ID: 0x000002A0 Thread ID: 0x00001E8C
Start Time: 08:48:09.179 Call Duration 00:00:00.002
Status: 0 (VI_SUCCESS)
I notice viWrite and viRead was used by VISAIC but I wasn't able to fine such vi anywhere.
What am I missing?
Regards
Mark
-
- Keithley Applications
- Posts: 1263
- Joined: October 15th, 2010, 10:35 am
- Country: United States
- Contact:
Re: GPIB kusb-488b NI driver from LabVIEW
If the VISAIC is detecting the three resources (GPIB0::9::INSTR, etc.), then is seems that the KUSB-488B driver install and configuration for use with VISA is all OK.
I would close any application (such as NI-MAX or VISAIC) that is connected to the instruments before trying LabVIEW.
In LabVIEW from the Block Diagram, right click and select the Instrument IO palette. Within that palette will be an entry for VISA from which you can select Open, Close, Write, Read, etc.
I would close any application (such as NI-MAX or VISAIC) that is connected to the instruments before trying LabVIEW.
In LabVIEW from the Block Diagram, right click and select the Instrument IO palette. Within that palette will be an entry for VISA from which you can select Open, Close, Write, Read, etc.
-
- Posts: 11
- Joined: September 16th, 2011, 2:08 pm
- Country: United States
Re: GPIB kusb-488b NI driver from LabVIEW
whether or not VISAIC is running does not make any difference. I only have VISAIC open to get the trace output I have tried it without anything else open and still getting the same thing. My suspicion is VISAIC is written in C and thus it works because the NI lib thru C++ is working just fine but labview vi is not working. I have read in other forum where people seems to have trouble in 64 bits and yet not solution posted for those questions.
-
- Posts: 11
- Joined: September 16th, 2011, 2:08 pm
- Country: United States
Re: GPIB kusb-488b NI driver from LabVIEW
Got VISA Find Resource working which confirm Labview can't see the GPIB adapter and all the instrument connect to it that VISAIC can see. it return count of 3 and the list are PXI0::MEMACC, ASRL1::INSTR, and ASRL10::INSTR. the three GPIB0 are not visible unlike VISAIC.
-
- Posts: 11
- Joined: September 16th, 2011, 2:08 pm
- Country: United States
Re: GPIB kusb-488b NI driver from LabVIEW
found a post back in March 2014 someone with similar issue I have so it look like 64 bits has not been working at least since then. Guess I will have to go get a NI GPIB adapter
Re: GPIB kusb-488b NI driver from LabVIEW
NI VISA 64 bit only supports their own GPIB cards however you can install VISA 32 bit and it should work properly.
Re: GPIB kusb-488b NI driver from LabVIEW
If you are using 64-bit VISA and or 64-bit LabVIEW, then you can use the KUSB-488B if you also install a VISA which supports this interface, e.g. Agilent or Tek VISA. No need to uninstall NI-VISA or switch GPIB interfaces. In the 64-bit world, coresiding VISAs is possible (unlike the 32-bit world). With Agilent VISA installed, for instance, you can then assign it to control the KUSB-488B for GPIB communications and this will work with 64-bit VISA and 64-bit LabVIEW.
VISA Interactive control is a 32-bit application and thus it works.
For more details, refer to release notes for the KI-488 gpib driver.
VISA Interactive control is a 32-bit application and thus it works.
For more details, refer to release notes for the KI-488 gpib driver.
Who is online
Users browsing this forum: No registered users and 5 guests