NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Working through TC/IP with a PPc that acts as real executor

Hi to all, there is my question.
Do i have the possibility/a way to tell to teststand to load all steps and then wait for the answers? I have to work (using TC/IP) with a PPc that acts as real executor of the requested steps.
 
 
0 Kudos
Message 1 of 6
(3,620 Views)

Dear Josè,
Actually there are many way to call subsequence in a parallel way in TS.The main technique is call a subsequence in a new thread or a new execution.

But what you're describing looks more strange to me. Seems you want to call a given number of steps, i.e 10, in a parallel manner. Is that correct ?.

Can you describe this need better ? If you call 10 steps in parallel the potential risk of race conditons would be quite high and difficult to debug.

Have a good day.

 

FiloP
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
Richard P. Feynman
0 Kudos
Message 2 of 6
(3,604 Views)
Hi Richard,
more or less as you depicted it. In fact, I have to load on the PPc machine all the sequence steps (i.e. 1 to 20) together and then, wait for its sequential execution. It means that as these steps are executed, the VxWork task on PPc side, executes it and gives sequentially back the result of each previously loaded step. Furthermore, I can't load the steps once a time due that I have steps with time constraint (3 ms as min time gap) for the execution. Therefore, the only way (I believe) to solve this problem, is that I have to load all the TS sequence steps together but it raises the problem into TS to acquire the right result.

Thanks Richard, I hope it is enough clear.
0 Kudos
Message 3 of 6
(3,592 Views)

Dear Josè,

Actually my  name is Filippo, unfortunately I'm not Richard Feynman.
That said we have to rule out if your problem is merely load the module or load and run them. §
It's a crucial point because if you have only to load the module you'll not face problems of parallel execution and the solution should be easier. Otherwise if you need to load and run each module at the same time you'll have to carefully desing your "sequence".

Preloading each module before execution starts will occupy more RAM but should speed up the execution. You can toggle loading policies of each step from Step>>Properties>>Run Options>>Load Options
Finally if you need to run more sequence in a parallel manner you can toggle the behavior of a subsequence call in Module>>Execution Options>>New Thread/New Execution depending on what you need. Probably new thread because new execution it's a bit slower.

Have a good day

 

FiloP
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
Richard P. Feynman
0 Kudos
Message 4 of 6
(3,558 Views)
Scusami tanto Filippo,

So, considering that TS can't manage the execution, I may say that the application on the PPc has to run the step module, and I (TS) just have to load (before) and wait (later) for its execution. I haven't to run in parallel sequences, just one sequence at time. The problem that I encountered is to load each step module (or its content) together on PPc application and instruct TS that has to wait  the execution result arrived through TCP/IP (e.g. step 24 Apply 28 VDC to pin12 PASSED) to switch on on the operator I/F, the correspondent step (e.g. 24) as "passed".

Thanks Filippo
0 Kudos
Message 5 of 6
(3,550 Views)

Dear Josè,
I get from you each Step in TestStand is actually sort of TCP/IP Client/Server that sends a TCP Command to a PPC ( PowerPC?) executor and eventually waits for an answer or timeout. If This is the case seems you are actually Loading and Running each step at the same time thus you'll have to deal with Parallel execution on the TS side and a considerable amount of data that potentially will flood the ethernet.

My suggestion is to carefully design the Client/Server architecture. 
I'd use a structure that will enable opening a series of connection in the setup section and closing it in the cleanup. Then I'd build up a custom step type that given the connection and the command will write it. Then it's your choice it the command take always the same time to execute and are supposed to be executed in a sequence the custom step will also wait for the answer. Otherwise you have to figure out wich is the better way to wait for the result.

Please note I may be in my suggestion wrong, I don't have enough info and I can't help you further than this.

Bottom line my final suggestion is.

Take a breath and feed yourself with the following philosophical question.

Given the Hardware Can it be run this fast ?
It has to be sequential or parallel ?
May I send more command in a row and then wait for all the ansewer toghether ?
Will the answer arrive in the same order ? or they'll be messed Up ?
What will happen if one of the anser times out ?

And so on and so on, long before writing a single line of code.

You'll eventyally get out of it with a bunch of specs and schemes that will help you design a robust test framework.

Good Work!

And have a good day



 

 

FiloP
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
Richard P. Feynman
0 Kudos
Message 6 of 6
(3,540 Views)