Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

c# NI488.2 Finding Address Error

Hi All,

 

I try to use C# (express edition) to communicate with GPIB-USB-HS. My C# code is look like below:

 

Board NICardSetting = new Board();

 AddressCollection addr=new AddressCollection();

addr = NICardSetting.FindListeners();

 

which exactly the same withe previous post, but when I try to execute the  C#, it just pop me an exception error: which indicate:

 

Method requires GPIB interface to be CIC,

 

 

I don know the reason why it can't out this error, and is it CIC is stand for Controller in Charge?

 

 

Please help

 

Thanks

 

William Lee

 

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

Hi William,

 

CIC does indeed mean that the GPIB card you're trying to use is not the Controller In Charge, there are a few options for solving this error listed in the following Help extract:

 

"ECIC (1)
Error Condition: Function requires the GPIB board to be the Controller-In-Charge (CIC).
Description: Certain functions require your GPIB board to be the CIC - these functions are noted in the NI-488.2 Function Reference Manual (see the Related Link, below). By default, your GPIB board will be the System Controller, but this is not the same as being the Controller-In-Charge. The System Controller has the ability to become the CIC at any time (there can be one System Controller on a given General Purpose Interface Bus).
Possible Cause: Often ECIC errors are caused when you do not send an interface clear at the start of your program to make sure that your GPIB board is the CIC.
Solutions:

  • If your GPIB board is supposed to be the System Controller, then use ibrsc 1 to make sure your GPIB board is configured as the System Controller.
  • If your GPIB board is the System Controller, then use the ibsic function (or SendIFC function) to send an interface clear. This will make your GPIB board the CIC (it also resets GPIB communications on the bus).
  • If your GPIB board is one of several controllers on the bus, then always check for the CIC bit of the status word, ibsta, before attempting any function calls that require your GPIB board to have CIC status. If it does not appear, then you can call the ibwait function (set the wait mask for the CIC bit) to delay further processing until control is passed to your GPIB board."


When set as the controller in charge this error should disappear and allow you to use your c# code to talk to your GPIB devices.

 

All the best,

 

Applications Engineer
0 Kudos
Message 2 of 2
(4,192 Views)