08-03-2018
08:25 AM
- last edited on
11-04-2024
01:27 PM
by
Content Cleaner
Hello all,
I have a custom type that has a very long post expression that does different things based on what VI was selected for that step. However, I am running into issues that appear to be timing issues of sorts. Occasionally I will get an error like this:
Error executing substep 'Post'.
Too many measurements. The step contains 2 measurements but there are only 0 data elements.
-17326; Mismatched array bounds specified.
Now this error code pops up inconsistently. The same step is unlikely to have this error in multiple runs. This inconsistency leads me to believe that the variables being accessed by the post expression are not populated by the time the post expression occurs occasionally.
The data being pulled from these steps is based on which VI is being called. An example of this data is Step.TS.SData.ViCall.Parms["Transmit ID"].ArgVal (which can be accessed if you show hidden properties).
I was wondering if anyone knew a solution to this problem? I was looking for a wait statement to put into the post expression, but I couldn't find one.
This article, https://www.ni.com/docs/en-US/bundle/teststand/page/step-execution.html, makes me believe that step execution should be sequential, so I don't think that I should have a timing issue, but this really looks like one to me.
This just started recently, when I was testing the custom step type a few weeks ago, this never really happened to me. I am running TestStand 64 bit 2016. I haven't installed any updates.
Thanks,
BradyJames
08-06-2018 08:51 AM
You are correct in assuming that the actions occur sequentially. So I doubt it is a timing issue as you are thinking. It looks like your array is not being populated correctly. Or whoever places the step down isn't putting the right things in as a parameter.
If it's possible I would try to avoid calling into the ArgVal like that and just directly access whatever variable is being put into the argval. e.g. Step.TransmitID