NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically creating a Rendezvous : missing variable in Result container

Solved!
Go to solution

Hi everybody,

 

For my tests purpose, I need to programmatically create a sequence. In this sequence, I need to insert Rendezvous steps.

Everything works fine when creating them, but when I execute the sequence / steps created this error always show up for rendezvous step : 

  • Unknown variable 'TimeoutOccured' ; Error accessing item 'Result.TimeoutOccured'

According to the TS help, this variable should be created when I configure the step for the rendezvous operation. Drag and dropping the step from the TS insertion palette works fine, and the variable is created when chosing the operation 'rendezvous'. But when doing the same thing through programmation, the variable is not created.

 

Here are the steps executed to create the RDV step :

  1. I create a new step using method Engine.NewStep
  2. I set the step name using Step.Name
  3. I set the rendezvous properties using a statement (Parameters.BranchesRendezVous.RDVStep is the variable holding the the step reference) :
  • Parameters.BranchesRendezVous.RDVStep.AsStep.Operation = 1, //A value that specifies the operation for the step to perform. The valid values are 0 = Create, 1 = Rendezvous, and 2 = Get Status
  • Parameters.BranchesRendezVous.RDVStep.AsStep.NameOrRefExpr = Parameters.BranchesRendezVous.RefName, //Contains the Rendezvous Name expression for the Create operation and the Rendezvous Name or Reference expression for all other Rendezvous operations
  • Parameters.BranchesRendezVous.RDVStep.AsStep.TimeoutEnabled = False, //The Timeout Enabled setting for the Rendezvous operation
  • Parameters.BranchesRendezVous.RDVStep.AsStep.ErrorOnTimeout = True, //The Timeout Causes Run-Time Error setting for the Rendezvous operation
  • Parameters.BranchesRendezVous.RDVStep.AsStep.RendezvousCountExpr = Parameters.NbBranches, //The Number of Threads Per Rendezvous expression for the Create operation
  • Parameters.BranchesRendezVous.RDVStep.AsStep.Lifetime = 3, //A value that specifies the Lifetime setting to use for the Create operation. The valid values are 0 = Same as Sequence, 1 = Same as Thread, 2 = Use Object Reference, and 3 = Same as Execution

 

  1. 4. Then I insert the step in my current sequence using method Sequence.InsertStep

Everything works fine, the rendezvous step is perfectly created and all properties are set finely. However, the variable TimeouOccured is missing in the Step.Result container (TS help says that this propoerty exists when the step is configured as a rendezvous operation (cf. Operation = 1)).

 

Am I doing something wrong somewhere ? Why is this variable missing ?

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 1 of 5
(3,841 Views)
Solution
Accepted by topic author CyGa

You probably need to create the property programmatically using NewSubProperty().

 

-Doug

Message 2 of 5
(3,812 Views)

Hi Doug,

 

TS help says that this property exists when the step is configured as a rendezvous operation (cf. Operation = 1)... So shouldn't it be created when I create / insert the step ?

I find it very weired to add a subproperty to a StepType, in the Result container...

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 3 of 5
(3,804 Views)

Hi,

 

In testing this, the Step.Result.TimeoutOccurred property only gets created if you change the Operation using the Step settings.  The property is not created if you set the Step.Operation property manually.  As Doug mentioned, you will need to create this property yourself in the case that you are configuring the step programmatically.

Al B.
Staff Software Engineer - TestStand
CTA/CLD
Message 4 of 5
(3,800 Views)

Hi, 

 

Thank you for your advice.

I modified my scripter to add this subproperty in the Step.Result container.  And it works fine !!

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 5 of 5
(3,789 Views)