NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

CustomStepType with Auto Create NewStep End

Solved!
Go to solution

Hello everybody,

 

I am looking for a solution to create my on special label called "MyCommentBegin" as a Step Type. It should be able to contain the BlockStructure function of an "If-Statement" and as well the auto creation of an "End-Statement". The BlockStructure thing is easy. But to auto create a new step after this step is hard (like the If does when inserting the step in a sequence).

 

Thanks to the following thread I was able to create an "MyEnd" custom step. But only in a new sequence as this solution of the thread describes:

https://forums.ni.com/t5/NI-TestStand/Create-a-LabVIEW-Step-dynamically/m-p/978560/highlight/true#M2...

 

See the attachments of my "failed" solution so far... It wont auto create an "MyCommentEnd".

 

Someone has an idea?

 

Thanks

CLA
0 Kudos
Message 1 of 8
(2,838 Views)

Attached is a sequence file that contains a custom step that might be what you want?

 

Let me know if you have any questions.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 8
(2,805 Views)

Unfortunately its not.

This kind of solution is not done by using the "End" Step like the "If" Step does it. But what I would like to have is a separate Custom Step which should act as an "End" Step. You used the "OnNewStepWithEndStep" out of the NIFlowControl.dll. But this will only insert the "End" Step of the Type NI_Flow_End.

 

Adrian

CLA
0 Kudos
Message 3 of 8
(2,781 Views)

I got it to work but not sure why it's not putting the name of the End step in.

 

Check it out and let me now what you think?  Maybe it will get you pointed in the right direction.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 8
(2,760 Views)

Strange... as soon as I perform the insert step on your CommentSection Step, the mouse symbol changes to "busy" and TestStand will crash 😄

 

So no solution for my I guess. Tried a lot with your solution but could not make it work. But many thanks for your try.

CLA
0 Kudos
Message 5 of 8
(2,733 Views)
Solution
Accepted by topic author AdrianBiehler

Not sure if you're still looking for a solution, but attached is a VI that we use to do just exactly what you describe.  Use it as the module of an OnNewStep substep and pass it the sequence context and the name of your end step.

 

Also attached a sample sequence file with begin/end block style custom step that uses it.

 

Best,

-Scott

Download All
Message 6 of 8
(2,710 Views)

Oh wow, that is exactly what I was looking for. Thank you ;).

 

 

CLA
0 Kudos
Message 7 of 8
(2,660 Views)

With your solution I was able to find out how to do it without LabView. All I had to do to make it work properly was to explicit name all those Custom Steps "OnNewStep" otherwise it wouldn't execute them properly. I dunno why, but it works fine now. Even adding multiple steps, renaming steps. The only downside is that all these Custom Steps are called "OnNewStep".

 

I wonder why I have to name it like that and if there are even more special namings to "script" such Substeps

 

2022-10-13 14_26_16-BEGIN_HIGHLIGHT_CODE_PIPED Properties.png

CLA
0 Kudos
Message 8 of 8
(2,647 Views)