NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically insert a WAIT step into a sequence file using LV

How can I programmatically insert a WAIT step or other flow control steps into a sequence file  - using LV 8.0 / TS 3.5

(
for creating action steps i use the following method , can i use them for creatin a wait step too?


engine.newstep    
║   
   - adapterKeyNameVal                
║    - stepTypeName                        
╚═


regards
timo

Message Edited by TimoSchott on 02-13-2006 03:13 PM

---
Message 1 of 3
(3,507 Views)
Hi Timo,
 
Yes, you can programmatically generate a step of any type using engine.newstep method that you mentioned.  However, the help does only give you the necessary strings for the most commonly used steps.  For any synchronization step, or any other step besides the Action step or any of the tests, you will want to use the Default adapter, so simply pass an empty string "" into the adapterKeyNameVal.  So, the stepTypeName parameter is all that is necessary to create our step.  Using LV 7.1 calling into the TestStand 3.1 API (I know these are different version, but it should work the exact same), I created a VI that takes a sequence file of your choice and give you the step type name of each step in the main sequence's main step group.  I just threw this together, so I'm not guaranteeing that there isn't a better way to implement things, but it gets the job done.  For instance, for the wait step, use "NI_Wait".  I got this from the VI and tested everything to make sure that it works.  You can use the attached VI to give you any other step names you may need.  Let me know if for some reason this doesn't work for you or if you have any additional questions.  Thanks and have a great day.
Message 2 of 3
(3,488 Views)
Hi Adam,

thanks for your reply.
After writing the posting the question i had the same idea and wrote a VI - similar to yours - to figure out the step names.

unfortunately, there is no information about this in the help file (or on the "tiny" TS API card)

but for now i ve got all informations to translate an external test step file into a TS sequence


regards
Timo

I know, I know! Nobody expects the Spanish Inquisition. In fact, those who do expect
---
Message 3 of 3
(3,477 Views)