NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add some steps before the Use Auto Scheduled Resource within Auto Schedule

Solved!
Go to solution

I hope I can describe my question clearly for you.

My sequence is something like the following:

 

AutoScheduleResource.PNG

 

It's a simple sequence.

Test 2 is faster than Test 1 so that it usually leads to test 1 is occupied by one testsocket and awaited by the other testsocket.

However the step of Ready(10 seconds) is independent of the resource, and it is too long.

My question is ... can I do the step of Ready(10 seconds) while the Test 1 is occupied by other testsocket?

 

0 Kudos
Message 1 of 7
(5,001 Views)

Why don't you move the Ready(10) to occur before the Auto Scheduler?  Since it is not resource dependent and all sockets have to do it then just do it before.  They will be running in parallel and it won't affect your test time.

 

Regards,

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

Hi, jiggawax,

 

The reason is that it relates the control of the test 1, something like initialization before action 1.

For example, there are two patterns to be played in the DUTs, each pattern is captured by a specific recording module.

I have to send a command to the DUT 1 to play the pattern 1(wait for 10 seconds for stabilization), and then record pattern 1 by recording module 1.

At the same time, I have to send a command to the DUT 2 to play the pattern 2(wait for 1 second for stabilization), and then record pattern 2 by recording module 2.

Since DUT 2 under test 2 is finished earlier, so DUT 2 will be standby and follow the DUT 1 under test 1.

If I can send the command to DUT 2 to play the pattern 1 previously, then it does not need to wait whole 10 seconds after the DUT 1 under test 1 finished.

As a result, I cannot put the Ready 1 before the Auto Schedule. I hope the above description is clear enough to let you understand my request 🙂

0 Kudos
Message 3 of 7
(4,986 Views)

Yeah that's pretty nutso.  I think I got it though.  I've attached a hack... i mean solution.

 

Let me know if you have any questions.

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

Hi, Jigg,

 

Thanks to your suggestion.

I tried to understand the sequence, but still have questions.

I don't understand why to insert the ResourceExpressions in front and rear of sequence.

Could you tell me the function of ResourceExpression?

I change to ParallelModel and run the sequence.

The step of 10 second wait will be done together and go to the Routine action 1 in turns.

It seemed, however, the autoschedule lose its function, it always go into the first routine and then the second one.

I had an idea like using the pre-expression of the Use Auto Schedule Resource to call other sequence, but I can't get it out.:(

0 Kudos
Message 5 of 7
(4,925 Views)
Solution
Accepted by William1225

The Use A uto Scheduled Resource step contains an array of Resource Expressions.  The idea behind it is that you might have 2 instruments on your benc that are the same.  This way the test can choose to use one or the other and still accomplish it's goal.  So what happens is that if you only have one Resource then whichever thread gets there first grabs the resource and locks it.  Other threads cannot enter that section until at least one resource is available.  So if you dynamically add resources then you can allow other threads into that section.

 

You may want to consider having a step in Routine 2 that adds a resource to Routine 1.  This way they won't all enter routine 1 before routine 2.

 

I think to get the behavior you want you are going to need to do some dynamic resource expression manipulation.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 6 of 7
(4,912 Views)

Hi, Jiggawax,


Very thanks your detailed explanation, I'll think about what you suggested:)

 

0 Kudos
Message 7 of 7
(4,661 Views)