11-19-2012 10:09 AM
Hi :
I would like to setup a condition for a rendez-vous time out so that the rendez-vous time out of 20s is true only if two conditions are met. This is to ensure that a process is not continuously waiting if there is some kind of failure beforehand. How do I implement this condition from the Rendez-vous dialog box?
Regards,
Tejas
11-19-2012 11:40 PM
Tejas,
Not aware of this option in Rendevous.
But you can try the following :
if conditions met
rendevous with 20s time out
else
rendevous with 0s time out.
Hope this helps...
11-20-2012 10:04 AM
Hey kerugoya,
I'm wondering if you could get the functionality you're looking for by setting the value of the TimeoutExpr to a Local Variable, and then have the value of the Local Variable depend on the result of the condition you execute before the Rendezvous. You could then set it up such that the value of the TimeoutExpr is either 0 or 20 depending on what you write to it before executing the Rendezvous step.
Hope this helps!
11-23-2012 05:46 PM
Thank you Timothy and other forum member for your reply. Here is a short replica of the code I am going with ;
1. Create a Rendezvous by selecting "Create a Rendezvous step" from the Rendezvous step
2. Write to a database
3. Rendezvous step with Rendezvous setting clicked
4. Read from database
I have multiple executions running, each being used to test a separate device. I want to synchronize the database write functions before performing the database read. Does the synchronization occur at step 1 and step 4 or just at step 4?
The "Write to a database" function runs, but Teststand times out at Step 3 in two execution steps. My objective is to ensure that the database write steps happen before the read step. Is a rendez vous the right method for this purpose?
Please advise. I would greatly appreciate your support.
11-25-2012 11:40 PM
When you use rendezvous it makes all the execution to synchronize at a point.Details given below :
Synchronisation happens at step 3.
Once a thread execution reaches step 3 it waits for other executions to reach the same point.
When all executions have reached step 3 then only all are allowed to proceed with the execution.
Time out is optional.If you feel your database sometimes may not respond then you can go for timeout.Maybe you can increase the time out.
12-10-2012 03:18 PM
Thank you for your feedback. The rendez-vous step works beautifully. The catch is that the rendez-vous name has to begin with "*". A NI engineer told me about this fact.
However, the problem with a rendez-vous is that I don't want to create a thread for an execution that has failed. If I do this, the rendez-vous may never finish. So, the following solution was implemented prior to the Rendez-vous creation step :
1. Assign a reference for the running execution to a StationGlobal array variable.
2. Get the run state of each execution using Execution.GetStates method.
3. If the execution state is found to be running, increment a StationGlobal variable.
4. Utilize the StationGlobal variable to generate number of threads equivalent to the number of executions in the rendez-vous creation step.
As each running execution will have a copy of steps 1-3, the goal was have to each running execution increment the StationGlobal variable. However, it was realized that if a running execution executes a step 3 too early than the other running steps, it could proceed
to creating a rendez-vous that does not capture all of the running executions.
To get around this step, NI apps engineer suggested the use of a Batch Specification. Supposedly, the batch specification keeps track of the number of threads, so you do not have to worry about the number of executions that are running. However, I can't get a hold of the NI apps engineer as he is busy, so I am requesting the assistance of the community to continue my debugging. Is the batch specification an appropriate resolution for the problem I am facing? If yes, are there any examples of how a Batch Specification can be used?
12-11-2012
05:43 PM
- last edited on
10-25-2024
03:06 PM
by
Content Cleaner
The batch specification step allows you to create a group of threads. Each of these threads will run an instance of the client sequence file. If you're concerned with the ability to change how many threads for an execution you are creating, the Batch Specification step will give you the ability to change how many are created.
A perfect example of how Batch Specification is used is the Batch Process Model itself. Here is a place to find more information,
https://www.ni.com/docs/en-US/bundle/teststand/page/batch-process-model.html
12-14-2012 01:10 AM
For steps 1 to 3 why dont you use one more rendevous step.
Create rendevous for all threads
step 1 executes
step 2 executes
step 3 executes
New step -- Rendevous --- all threads waits here after executing...( step 3 is run by all)
Step 4 -- Create new rendevous with the required no of threads....
Hope this helps.