NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -17300 is generated when running selected step

Error -17300 is generated when running selected step (with ot without process model).

Using TestStand 2.0.1f1

See BMP file for error dialog.

I was trying out the example in the Resource Library - TestStand | Process Models | Running Selected Steps via Execution Entry Point -Test UUTs or Single Pass
(link http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E2B756A4E034080020E74861&p_node=DZ52222&p_source=external ). This example is a 1.0.1 example but the web page does say that it should work in 2.0.x
I followed the readme file to use from "Execute" menu:
I have attached the resulant SequentialModel.seq file.

The modifications to the SequentialModel.seq file appears to wo
rk, but when I tried to run 'Run Selected Steps Using' menu item. I got the error message -17300 displayed. (see ErrorScr.bmp attached). The only way to close the execution was to launch Task manager and 'End Task'.

I have attached a small demo sequencefile.

To try example:
Move the SequentialModel.seq to 'C:\TestStand\Components\User\Models\TestStandModels'.
Launch TestStand Sequence Editor and open 'Debug Example1.seq'.

This is how to generate error condition-
1. Run the sequence file from menu Item Execute | Single Pass. You should get a full run with test result, it fails but that doesn't matter.
2. Select Steps 1 and 3 in Main of MainSequence. Run Selected Steps using Single Pass. Again sequence executes correctly.
3. Now run the same selected steps using the new menu item Execute | Selected Test(s). Again the sequence executes again.
4. With Steps 1 and 3 still selected. Run Selected Steps using Single Pass (as in 2 above). This time the error -17300 will be gener
ated.

I also tried running the sequence first doing step 1 (as above), then step 3, then repeating step 1 and this was ok. So the problem appears to be in interactive only.

Any clues as to whats going on and how to resolve it.


Regards
Ray Farmer
Regards
Ray Farmer
Download All
0 Kudos
Message 1 of 16
(5,161 Views)
Hello Ray -

I've reproduced your issue with both your files and with new files, and have narrowed it down to the Cleanup step group's "Release NewSeqFileHandle" step. If I skip that one API call, then the new process model entry point seems to run fine. However then I am keeping a new file loaded in memory until TestStand exits, so it is not an ideal workaround... Certainly the custom execution entry point is well behaved in TestStand 1.0.x, but it will take me a little while longer to see what is the root of the trouble in TS 2.0.x and provide a better/ new version of the example. I will post new information as soon as possible.

Regards,

Elaine R.
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 16
(5,160 Views)
Hi Ray,

In order for this example to work, you must first clone the steps before adding them to the new sequence file. Failure to do so results in re-parenting the object and essentially removing a reference from the sequence editor. As Elaine pointed out, this feature is now in TestStand 2.0.x. You simple right-click on the entry point sequence and select Properties. On the model tab, select the option "Allow interactive execution of entry point". Now you will be able to select steps and specify run using>>name of entry point. Hope this helps!
0 Kudos
Message 3 of 16
(5,160 Views)
Hi Bob,

Yeah, it looked like something was happening to the reference of the origin sequence file. I'll give the cloning of the steps a try.

regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 4 of 16
(5,160 Views)
Hi Elaine (Bob)

From Bob's comment, I have modified the Entry Point Sequence to clone the selected steps from the selected Sequence to the new sequence.

I no longer get the error -17300 and following my initial sequence of step in my readme file. Every thing appears to work, (at least from the SeqEditor).

I did have one problem and that was when I had the Process Model sequence file loaded so I could do some debug. When I came to close the Process Model sequence file I go error -17001 ( see screen shot attached). So I have skipped the ReleaseSequenceFile step for the ProcessModelHandle. This stopped the error but is it expectable not to do this?

Regards
Ray Farmer
Regards
Ray Farmer
Download All
0 Kudos
Message 5 of 16
(5,160 Views)
Hello Ray -

I took another look at the example and it turns out that the API they are using to aquire the process model reference is SequenceFile.GetModelSequenceFile(). This is one of the few ways to get a sequence file reference that does not require anyone releasing it later (As verification scan through the help text for Engine.ReleaseSequenceFile() and note the three functions it is required for). I'm going to do a quick verification that this is also true for TestStand 1.0.x and if it is an unnecessary line of code I will make an additional correction to the example.

So in short, yes, you are correct to skip/delete that one API step. Thanks for bringing the problems with this example to our attention, the new files will be up
by the end of the week.

-Regards

Elaine R.
0 Kudos
Message 6 of 16
(5,160 Views)
Elaine,


Ok Thanks.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 7 of 16
(5,163 Views)
Hi,


TestStand 2.0.1f1

Attached is a SequentialModel.seq that will run selected steps in a new execution using the process model. (It started life based on the inital

demo example)

When either Test UUT's or Single Pass is selected a check is made to determine if there is an initial selection.
If there isn't then the normal Test UUT's or Single Pass sequence is run.
If there is then a new sequence file is created with a new MainSequence. The selected steps are cloned and inserted to the new MainSequence. Also

the Setup and Cleanup groups are also cloned. Likewise the FileGlobal Defaults are copied to the FileGlobals of the new Sequencefile and also the

Locals.
Any Sequences contained in the SequenceFile are cloned to the new sequencefile (except the MainSequence, SequenceFileLoad and SequenceFileUnLoad).

In addition, as the Steps are cloned any break point are also set in the new sequence file.

The new sequence file is executed in a new execution using the process model entry point with the break on first step controlled from the menu

option.

One thing I am assuming is that there is only one element in the RunState.InitialSelection.SelectedSequences array.

Question: Under what circumstances will there be more than one selected sequence?

I had one problem, I tried my SequentialModel.seq with the demo auto.seq. This contains the SequenceFileLoad and SequenceFileUnload.

When I run this demo with a few steps selected, it run ok but when I closed the results window the UnloadFile callback was executed.

I found an option that can be set with the Engine.ReleaseSequenceFileEx which should have stopped the UnloadFile callback from running. But it

made no difference.

I then came across SequenceFile.UnloadCallbackEnabled() and using this function it did disable the Unload callback and this worked.

Question: So, Why didn't setting the Option in the Engine.ReleaseSequenceFileEx work?

Limitation using this SequentialModel.seq,
1) Any precondition to a step's execution based on the result of an early steps are not check when cloning the selected steps. Therefore this has

to be done manually when making the selection.
2) All Sequences in the SequenceFile are cloned to the new sequencfile. (May not be a problem when SequenceFile contains only a few sequences.)
3) The selections are limited to the MainSequence. If steps are selected in a Subsequence then these would be copied to a new MainSequence and

this would be run. Providing this doesn't require any parameters passed from the original caller then this should still run. The problem will

arise if parameters are required.
4) This is not really a limitation - If a full run of the SequenceFile using Test UUT's or Single Pass is required then the user must ensure no

steps are selected.

What I whould like to happen is the ability to make a selection in SubSequence calls either one or two levels down from the MainSequence. The new

execution setup would contain those steps in the MainSequence that are required to call those selected steps in the lower levels.


Would welcome any comments on my SequentialModel.seq attached and answers to my questions.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 8 of 16
(5,163 Views)
Hello Ray -

I haven't had a chance to try out your new and improved example here yet, but I am curious about the 'ReleaseSequenceFileEx' behavior you're seeing... by any chance did you catch the return value of the API call to see if there were multiple references still open? I'll take a look on my end and see if I can offer any other ideas.

-Regards

Elaine R.
National Instruments
http://www.ni.com/ask
0 Kudos
Message 9 of 16
(5,163 Views)
Hi Elaine,

The API call was returning False.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 10 of 16
(5,163 Views)