Hi
How is the intended use of the IEC Objects for IO-mapping?
I am using a CC100. When referencing the OnboardIO in the program I get a System.NullReferenceException when building.
Writing to the variables and calling the FB cyclically gives the same error message.
OnboardIO.X5_DO := 1;
OnboardIO(
X12_DI=> ,
X13_PT1_X13_PT1_=> ,
X13_PT2_X13_PT2_=> ,
X14_AI1=> ,
X14_AI2=> ,
X5_DO:= ,
X6_AO1:= ,
X6_AO2:= );
------ Build started: Application: Device.InnovationRoomCC100 -------
Typify code...
[ERROR] Internal error:System.NullReferenceException: Object reference not set to an instance of an object. at _3S.CoDeSys.LanguageModelManager.DirectVariableWrapper..ctor(IDirectVariable dirvar, IVariable2 var) at _3S.CoDeSys.LanguageModelManager.DirVarLocationTable.TryGetLocationInfo(IDirectVariable dirvar, IVariable2 var, _IDirectLocationInfo& dirlocinfo) at _3S.CoDeSys.Compiler35190.Phase3_Location.Locator.(_ICompileContext , IMessage& , Boolean& , ISourcePosition , IDirectVariable , IVariable2 a) at _3S.CoDeSys.LanguageModelManager.CompileContext.LocateAddress(Boolean& bError, IDirectVariable dirvar) at _3S.CoDeSys.DeviceObject.TaskMapList.Add(Int32 iTaskNbr, VariableCrossRef cref, ICompileContext comcon, VariableDeclaration vd, Int32 nParamBitOffset, Int32 nAddrBitOffset, Int32 nBitSize, String stBaseType, DoubleAddressTaskChecker checker, IDataElement dataElement) at _3S.CoDeSys.DeviceObject.LanguageModelHelper.GetTaskMappings(Int32 iTaskNbr, AddrToChannelMap map, TaskMapList taskmaplist, DoubleAddressTaskChecker checker, LList`1 directVarCRefList, VariableCrossRef[] variableCRefList, FixedTaskUpdate[] fixedTaskUpdates, ICompileContext comcon, Hashtable htStartAddresses, Boolean bAlwaysMapToNew, Boolean bShowAsError) at _3S.CoDeSys.DeviceObject.DeviceObject.AddLateLanguageModel(Int32 nProjectHandle, AddLanguageModelEventArgs e) at _3S.CoDeSys.DeviceObject.DeviceObjectHelper.OnLanguageModelMgr_AddLateLanguageModel(Object sender, AddLanguageModelEventArgs e) at _3S.CoDeSys.Core.LanguageModel.AddLanguageModelEventHandler.Invoke(Object sender, AddLanguageModelEventArgs e) at _3S.CoDeSys.Core.LanguageModel.AddLanguageModelEventHandler.Invoke(Object sender, AddLanguageModelEventArgs e) at _3S.CoDeSys.LanguageModelManager.LanguageModelManagerConsolidated.OnAddLateLanguageModel(AddLanguageModelEventArgs e) at _3S.CoDeSys.Compiler35190.CompilerPhases.CompilerPhase3_Locator.() at ..() at ..()
Build complete -- 1 errors, 2 warnings : No download possible