LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI 2013 communication using Agilent IO and E5810A Lan to GPIB Gateway issues

Hi all NI CVI Wizards

I am using Agilent IO as my coms interface for GPIB and Lan communication.  I am trying to communicate w/ an RF source, addressed at GPIB0::19:INSTR.  I copied this example (idn.c) directly from the Agilent IO connection expert.  See below at bottom.

 

I ran it in Visual Sutdio 2010 and it worked fine.  I then ran it in NICVI 2013 and it fails intermittantly.  When stepping through it, gets through the viOpenDefaultRM( (&defaultRM); line but defaultRM is empty.  It then crashes on the viOpen(....) sometimes returning a dialog box with :

FATAL RUN-TIME ERROR

Unknown source position, thread id 0x000021AC

 

A non-debuggable thread caused a 'Unknown' fault at address

0x77C2000C

No source line information is available

 

 

Other times it passes and vi contains the address of the RF Source

GPIB0::19::INSTR.

 

Any ideas on why there is an intermitent behavior using CVI?  See program belw.

 

 

/*idn.c
  This example program queries a GPIB device for an identification string
  and prints the results. Note that you must change the address. */

#include <visa.h>
#include <stdio.h>

void main () {

  ViSession defaultRM, vi;
  char buf [256] = {0};
 

  /* Open session to GPIB device at address 19 */
  viOpenDefaultRM (&defaultRM);
  viOpen (defaultRM, "GPIB0::19::INSTR", VI_NULL,VI_NULL, &vi);

  /* Initialize device */
  viPrintf (vi, "*RST\n");

  /* Send an *IDN? string to the device */
  viPrintf (vi, "*IDN?\n");
 
  /* Read results */
  viScanf (vi, "%t", &buf);

  /* Print results */
  printf ("Instrument identification string: %s\n", buf);

  /* Close session */
  viClose (vi);
  viClose (defaultRM);
}

 

 

 

 

0 Kudos
Message 1 of 2
(4,245 Views)

Hi PS1,

Would you mind answering a few questions regarding this behavior in CVI?

1. If you copy the source code into another file and run it in CVI, do you still experience the same behavior?

2. Are you able to replicate this on another machine?

3. Do you have any other versions of CVI installed on your computer?

 

4. Are you able to run any shipping examples with CVI?

5. Have you tried uninstalling and reinstalling CVI? 

The answers should help in determining the source of the issue. 

Thanks,

 

 

Rick C.
0 Kudos
Message 2 of 2
(4,207 Views)