Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

strange corruption when using U8903 instrument driver

Hallo, this screenshot shows some strange corruption, when debugging some testcode with CVI2013SP1 on Windows 7, which is using the Agikent U8903 instrument driver:

corrupt_init.PNG

 

As you can see, AGU8903ni_Initialize just returned without error ( status is zero) . But the instrument handle it returns has the value "TCPIP0::192.168.2.12::inst0::INSTR" ( which is the VISA ressource of that device and not an instrument handle). 

Is this a bug in the debugger or is this more likely some corruption in VISA ( version 14.0) ?

Debugging into the instrument driver shows that the handle is returned by the viOpen() call.

 

0 Kudos
Message 1 of 2
(3,976 Views)

Hi,

 

please have a look at our example "RdWrtSrl_CVI" or search for VISA in example finder. This example works with the serial interface. Please have a look at the viOpen function, especially the &instr handle. THere is always stored the original visa name of the ressource and not the alias name. Via alias name or original visa ressource name, you can open the connection via the second parameter of viOpen.

 

  status = viOpen (defaultRM, "COM1", VI_NULL, VI_NULL, &instr); instr is the unique parameter returned by the function. So for your application, you do not have to care about, if the alias name or the original visa ressource name belongs to your function. THis is the job of the driver (ASRL1::INSTR== Orig visa ressource name; "COM1" == Alias name)

 

Best Regards, Fabian

 

 

0 Kudos
Message 2 of 2
(3,922 Views)