FOUNDATION Fieldbus

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading viewlist objects using C# API

I am using the NIFBUS 4.1 C# API and i am trying to find a way to read the view lists of a block--e.g.

VIEW_1, VIEW_2 etc. However i am getting the following exception

 

System.NullReferenceException was caught
  Message=Object reference not set to an instance of an object.
  Source=NationalInstruments.Fieldbus
  StackTrace:
       at NationalInstruments.FieldBus.ParameterHandler.VarListParameter..ctor(nifObjTypeList_t TypeData)
       at NationalInstruments.FieldBus.ParameterHandler.Parameter.CreateInstance(nifObjTypeList_t TypeData)
       at NationalInstruments.FieldBus.Block.ReadParameterByName(String name)
       at Metran.CT.Dut.GetParameter(Block block, String paramName, Boolean Critical) in C:\MyFolder

       at ReadViewList(Block block, string paramName) 

 InnerException:

 

This exception is thrown when i do

 

block.ReadParameterByName("VIEW_1")

 

Any help will be appreciated!

0 Kudos
Message 1 of 2
(7,317 Views)

Dear,

 

I confirmed your problem with the development team. It is a bug when doing the variable list reading. I am sorry for that. You can contact with fieldbus.support@ni.com

 

We will help you to resolve it.

 

Best regards.

0 Kudos
Message 2 of 2
(7,308 Views)