VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Stimulus profile tries to access parameter that is no longer existent

Sometimes in the course of writing sequences, we need to rename a parameter and all its references. Even after doing so and everything compiles, the profile fails in runtime because somewhere the program is still trying to access the original parameter name. The fix for this is to remove the sequence call from the profile entirely and reinsert it. Then the profile runs fine.

e.g.,

  1. Profile A calls Sequence B.
  2. In sequence B, Parm1 gets renamed to Parm2.
  3. Running the profile will fail because the stimulus profile editor says Parm1 cannot be accessed.
  4. Remove Sequence B from Profile A and reinsert Sequence B. The profile works again.
0 Kudos
Message 1 of 9
(6,814 Views)

Hi,

 

Every time you change a name of a parameter in a Real-Time sequence you need to make sure that you select this test sequence call  in your stimulus profile code and click the "Update Parameters" button. This will make sure the new parameter name is used in the stimulus profile call of the test sequence. 

Sev K.
Senior Systems R&D Engineer | Wireless | CLA
National Instruments
0 Kudos
Message 2 of 9
(6,795 Views)

Hi Sev,

I'm pretty sure I do do this. What about the case when a sequence calls a subsequence? There's no "update parameter" option in this case, or am I missing something? Thanks.

0 Kudos
Message 3 of 9
(6,792 Views)

Hi Harris,

 

Can you please try to reproduce the issue with the attached project.In the project you have a stimulus profile (Count_Test.nivsstimprof) that calls Increment_Count.nivsseq with two parameters. Inside the Increment_Count.nivsseq there is another call to Increment_Count2.nivsseq also with two parameters.If I change the name of the "Increment2" parameter (inside Increment_Count2.nivsseq) to let's say "Increment3" the sequence runs as expected, even tough the calling sequence(Increment_Count.nivsseq) still has "Increment2" name in it. Can you check if you see the same behavior?

Sev K.
Senior Systems R&D Engineer | Wireless | CLA
National Instruments
0 Kudos
Message 4 of 9
(6,771 Views)

Hi Sev,

Unfortunately when I try to open your profile in Stimulus Profile Editor, it crashes SPE. I've had issues like this before if there are recursive calls. I believe we have a forum thread about this issue .I'm assuming it's similar.

 

Description:
  Stopped working

Problem signature:
  Problem Event Name:    APPCRASH
  Application Name:    Stimulus Profile Editor.exe
  Application Version:    2011.1.0.1
  Application Timestamp:    50a2cc79
  Fault Module Name:    KERNELBASE.dll
  Fault Module Version:    6.1.7601.18015
  Fault Module Timestamp:    50b83c8a
  Exception Code:    e053534f
  Exception Offset:    0000c41f
  OS Version:    6.1.7601.2.1.0.256.4
  Locale ID:    1033

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

0 Kudos
Message 5 of 9
(6,765 Views)

Hi Harris,

 

I was using two separate RT sequences so there should be no recursion. I've recreated the project on my colleague's computer. Let me know if you can open it.

 

Sev K.
Senior Systems R&D Engineer | Wireless | CLA
National Instruments
0 Kudos
Message 6 of 9
(6,754 Views)

Hi Sev, your project/files work withuot errors. I noticed one difference, however. When the failure happens for me, it is with all By Reference parameters. I notice in this case that Increment2 is actually by value. Perhaps that's significant in this case? Thanks.

0 Kudos
Message 7 of 9
(6,752 Views)

I've tried switching the Increment2 to "By Reference" and I got the same results when I changed the name to Increment3. You need to make sure that if you are using a "By Reference" variable in a subsequence you also have a "By Reference" variable in the calling sequence..

Sev K.
Senior Systems R&D Engineer | Wireless | CLA
National Instruments
0 Kudos
Message 8 of 9
(6,736 Views)
Hi Sev, it does appear that your example works even by reference. There must have been some other order of operations or subtlety involved when the error occurred with my project. I will pay attention the next time it happens so we can recreate it on a simpler project. Thanks.
0 Kudos
Message 9 of 9
(6,729 Views)