Error When Setting/Getting Inport Or Outport Array Data Type in ASAM XIL Steps for NI TestStand

Updated Sep 13, 2023

Reported In

Software

  • VeriStand
  • TestStand
  • ASAM XIL TestStand Steps

Issue Details

I created model in VeriStand which consist of array data type for inport and outport.

TestStand is able to recognize the array data type using Framework Set/Get Variable Values step and the check expression shown no error. 

However, it shown error when I execute the TestStand sequence, which similar as below shown:
----------------------------------------
Details:

Error executing substep 'Post'.
Could not write the variable Targets/Controller/Simulation Models/Models/Model 2/Inports/Inport. Vendor Description: 
Stack Trace:
   at ASAM.XIL.Implementation.VeriStand.TestBench.MAPort.NIVSMAPort.Write(String variableName, IBaseValue value)
   at ASAM.XIL.Implementation.XILSupportLibrary.Framework.Variables.FloatVectorVariable.Write(IList`1 value)
   at NationalInstruments.AsamXilSteps.AsamXilPlugin.StepWrappers.FrameworkSetVariableValuesStepWrapper.Execute(SequenceContext sequenceContext)
   at NationalInstruments.AsamXilSteps.Core.RuntimeManager.DoExecute(StepWrapperBase stepWrapper, SequenceContext sequenceContext)
   at NationalInstruments.AsamXilSteps.Core.RuntimeManager.ExecuteStep(SequenceContext thisContext, String stepWrapperId)

Inner exception:
This DataArray does not represent a scalar double.
Stack Trace:
   at NationalInstruments.VeriStand.DataArray.ToDouble()
   at ASAM.XIL.Implementation.VeriStand.TestBench.GatewayBindingManager.SetChannelValue(String channel, IBaseValue newValue, Boolean synchronous)
   at ASAM.XIL.Implementation.VeriStand.TestBench.MAPort.NIVSMAPort.Write(String variableName, IBaseValue value)


----------------------------------------
Error Code:

0; User-defined error code.
----------------------------------------
Location:

Step 'Framework Set Variable Values' of sequence 'MainSequence' in 'Sequence File - Model 2.seq'
----------------------------------------

 

Solution

ASAM XIL Steps for NI TestStand only support inport and outport as Segment into scalar channels, it will pop out error when it set as Maintain as vector channel.

Kindly make sure Vector port specification is configure as Segment into scalar channels.

Additional Information

Model parameters is supported set as Segment into scalar channels and Maintain as vector channel.