Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VI_ERROR_NCIC error with PCMCIA-GPIB

I am running VISA 3.2 and trying to get a PCMCIA-GPIB card up and running. MAX sees the interface and Visa Interactive Control will open a session to the instrument I am trying to control. The problem is when I run the instrument soft front panel I get VI_ERROR_NCIC from the viOpen function. The soft front panel gets the resource descripter from the viFindRsrc function. How can I get around this problem?
0 Kudos
Message 1 of 3
(6,058 Views)
Dear HockyHubby!
Thank you for choosing National Instruments Support!

With regard to your issue, have you installed the NI-488.2 driver? Installing the driver must take care of this issue. If you already have the driver installed, please make sure that it is the latest version. You can find our versions here.

Hope this helps! Please let us know if you the problem persists.

Thanks and Regards
ShekharS
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(6,058 Views)

Hi,

 

     I am also getting this error when I am trying to access HP 8696E Electrical Spectrum Analyzer (ESA). I don't have any problem accessing other devices in the GPIB ENET 100. Once I connect ESA to the system I start getting this problem. I am also attaching my python code along with this. Is it that I am not stopping the GPIB session properly?

 

     Please let me know if it is possible to solve this issue. I am sitting on this problem for a long time now!!

 

 

Thank you,

Aravind [EE10D037, IIT Madras , India].

 

 

Python Code:

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

import visa
from xlwt import *
from visa import *

print "started ESA acquiring!!"
esa=instrument("GPIB::18")


esa.write("TDF P;")

esa.write("FA 0HZ;")
start_freq=0
print "Start Frequency = ",start_freq,"Hz"
esa.write("FB 1000000000HZ;")
stop_freq=1000000000
print "Stop Frequency= ",stop_freq, "Hz"

esa.write("SNGLS;")
esa.write("TS;")
esa.write("TRA?;")
power = esa.read()
print power

w=Workbook()
ws=w.add_sheet("ESA Power readings")
ws.col(0).width=5000
ws.col(2).width=5000

powerList = power.split(',')
pow = ','.join(powerList)
power = [float(i) for i in pow.split(',')]      #convert CSV to array to enable storing

freq_len = start_freq
freq_len1 = float(freq_len)
start_freq1=float(start_freq)
stop_freq1=float(stop_freq)
#power1 =float(power)
ws.write(0,0,"Frequency (Hz)")
ws.write(0,2,"Power (dBm)")
for i in range(1,len(power)+1):
   ws.write(i,2,power[i-1])
   ws.write(i,0,freq_len1)
   freq_len1=freq_len1+((stop_freq1-start_freq1)/len(power))
esa.write("RB?;")
RBW = esa.read();
print RBW
esa.write("VB?;")
VBW = esa.read();
esa.write("RL?;")
RL = esa.read();
esa.write("ST?;")
ST = esa.read()

ws.write(0,3,"Sweep time (ms)")
ws.write(1,3,ST)
ws.write(0,4,"RBW (Hz)")
ws.write(1,4,RBW)
ws.write(0,5,"VBW (Hz)")
ws.write(1,5,VBW)
ws.write(0,6,"RL (dBm)")
ws.write(1,6,RL)

w.save("TLSLWM1.xls")

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Error after line :                     esa = instrument("GPIB::18");

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    esa = instrument("GPIB::18")
  File "C:\Python26\lib\site-packages\pyvisa\visa.py", line 290, in instrument
    return GpibInstrument(resource_name, **keyw)
  File "C:\Python26\lib\site-packages\pyvisa\visa.py", line 594, in __init__
    Instrument.__init__(self, resource_name, **keyw)
  File "C:\Python26\lib\site-packages\pyvisa\visa.py", line 358, in __init__
    "lock")))
  File "C:\Python26\lib\site-packages\pyvisa\visa.py", line 132, in __init__
    keyw.get("lock", VI_NO_LOCK))
  File "C:\Python26\lib\site-packages\pyvisa\vpp43.py", line 753, in open
    byref(vi))
  File "C:\Python26\lib\site-packages\pyvisa\vpp43.py", line 398, in check_status
    raise visa_exceptions.VisaIOError, status
VisaIOError: VI_ERROR_NCIC: The interface associated with this session is not currently the controller in charge.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

0 Kudos
Message 3 of 3
(5,300 Views)