NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Sequence arguments to an execution using a process model

Hi,
the above question is causing me a some headache.
But first I want to explain the surroundings. I have implemented a C# console executable, which is calling the TS API and "creating" (I'm still not sure if the engine is really instanciated or if it is simple referered) the TS engine. Using the NewExecution() - and WaitForEndEx() - methods i am able to run a sequence using the process, which i need to get the desired report.
For future use it will surely necessary to parameter the sequence file, too.
And there the headache begins.
Altough a can create the PropertyObject with the needed SuProberties, the execution (or better the WaitForEndEx-Method) does not return or execute.
But if i exclude the process model the execution runs as desired, unfortunatly then there is no reportfile.
Has someone encountered something similar or can someone help me out here?
thx
Marcos V. Bischoff
0 Kudos
Message 1 of 13
(5,015 Views)

Hi Marcos !

Check out this threads

http://forums.ni.com/ni/board/message?board.id=330&message.id=17551&query.id=74484#M17551

http://forums.ni.com/ni/board/message?board.id=330&message.id=19658&query.id=74523#M19658

Also check out the example. It is a Mini User Interface with specific Model.
Take care! I have copied the SequenceFiles from here. But they had modified NI_StepTypes !
So when you open NEVER accept savings to NI_xx.ini stuff. !!

Greetings

Juergen

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 13
(5,006 Views)

Hi Marcos,

If I think I have understand you correctly,

You can run a Sequence in a NewSequence correctly but you can not run it with a Process Model Entry Point, such as "Single Pass".

Is this correct?

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 3 of 13
(5,005 Views)

@ j_dodek :

thx, for the reply. I'll check your examples.

Ray Farmer :

Not exactly. I can run the sequence with a process model. But when i try to run a sequence, which needs parameters and i try to pass the needed parameters to the myEngine.NewExecution(..) method the WaitForEndEx() method does not return properly. When i try to run the same sequnce with the same parameter passing but without a process model. The execution runs as expected. My problem is that we need the report and sequences are only reported if a process model is used.

 

thx
Marcos V. Bischoff
0 Kudos
Message 4 of 13
(4,993 Views)
Hi,
 
Are you using the Interactive arguments?
 
Regards
Ray
Regards
Ray Farmer
0 Kudos
Message 5 of 13
(4,969 Views)

No, regular arguments. But i'm not sure, because at the moment i don't know where to put interactive arguments.

But as i did not intensinally use them, i suppose i used the regular.  Those which are put in nan PropertyObject and its Paramters are put as Subprperties. I used the sixth parameter of the New Excution method sequenceArgsParam.

thx
Marcos V. Bischoff
0 Kudos
Message 6 of 13
(4,965 Views)

Hi,

Ok, so you are not using interactive, therefore if you are running a sequence in a new execution and you are using the ProcessModel, then your Sequence is "MainSequence" as this is the entry point to the client sequence file from the Process Model.

By default the MainSequence sequence does not use the Parameters, unless of course you have modified "Single Pass" or "Test UUTs" to pass parameters.

If you have not modified the Process Model, passing any arguments would be ignored but it should still run the sequence.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 7 of 13
(4,960 Views)

Hi there,

I agree. I've added a UiMessage Polling Thread and returned the TS Runtime Error.

TS ERROR: -17500; Operation Failed.|The selected sequence file does not contain a sequence named .|Step 'Check For Target Sequence' of sequence 'Single Pass' in 'PilzSingleSeqModel.seq'

I am not completly sure what this precondition means:

PropertyExists("RunState.ProcessModelClient") && !PropertyExists("RunState.ProcessModelClient.Data.Seq[\"" + Parameters.sequence + "\"]")

Isn't it set to true because ther are more Parameters than the sequence file?

 

thx
Marcos V. Bischoff
0 Kudos
Message 8 of 13
(4,928 Views)

Hi,

What it is saying is; RunState.ProcessModelClient must exist and also there must be a Sequence called MainSequence in the Client sequence file.

 

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 9 of 13
(4,908 Views)
But how can I bring my process model to pass the parameters to the called sequence?
thx
Marcos V. Bischoff
0 Kudos
Message 10 of 13
(4,897 Views)