NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Marshalling the IEngine object

Hi
 
 
I figured out some stuff but this not working.
 
Is there a possibility to marshalling the IEngine object or serializiability that an external Process can hook it ?
 
Greetings
 
Juergen
 
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 1 of 7
(7,502 Views)
You can use the teststand synchronization COM server and/or step types to get the information to another process - TestStand synchronization objects whose names start with an '*' character are automatically global to the entire machine. That means that if you create another instance of the engine in another process and get the synchronization manager from the engine using a name that starts with an '*' and access the synchronization object that way you will be accessing the same object from both processes. The easiest what to see this is using the step types from two different instances of the sequence editor or UIs on the same machine. They will share synchronization objects whose names start with '*'. Queues and Notifications both allow the passing of data. You can pass numbers and even activeX references (if they support marhsalling or are oleautomation compatible - as is the engine) across processes. If you are passing the engine reference to another process you should be careful to release all your references to it and everything you got from it before the original process is shutdown or it might cause errors\crashes on exiting the original process. I'd recommend passing the data you need rather than the engine itself.

There are other ways to do this, but the above is what I'd recommend.

Hope this helps,
-Doug

Message 2 of 7
(7,485 Views)
Hi Doug,
 
Thanks for your response. At the monent i am reading the TS reference manual about  syncronization step types (B-3). It is amazing!
I also saw that you can share them also over different machines via the network !
But for first trail i will figure out a solution for the thread answer by using a queue.
 
greetings
 
juergen
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 3 of 7
(7,464 Views)
Just want to make sure that you are aware that all of the underlying code used by the step types is also accessible programmatically. See the online help for Engine.GetSyncManager and TestStand Synchronization Server. Also the source code for the step type substeps is located in <TestStand Directory>\Components\NI\StepTypes\SyncSteps if you want to see how it uses this API.

-Doug


Message Edited by dug9000 on 03-07-2008 09:52 AM
0 Kudos
Message 4 of 7
(7,453 Views)
Hi Daniel, Hi Doug
 
I have written a simple C# application and .seq file sharing the execution by using a queue.
That this stuff is working you need to start a execution on the .seq file. Just use F5.
The creation and inserting of the queue is done in Callback ProcessSetup
 
enjoy it !
 
Greetings
 
Juergen
 
 
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 5 of 7
(7,443 Views)

Hi,

 

I have two questions for this discussion.

 

1. How can I access to the queue in LabView?

 

2. It seems it is only possible to access from an another process a running execution, when the execution object is stored or exported. Or is it possible to get the execution object of a running sequence file without storing the execution object.

 

I have an execution which stops unexpected, so I don't know why and at which position. The executions runs without tracing and I get no error messages.

 

Thanks for information.

 

Kind regards

 

Matthias

0 Kudos
Message 6 of 7
(6,757 Views)

Hi Juergen,

I've tried your sample and it's working.

Now, I 'd like to place .net object ref into the queue.

It's working, I can queue and dequeue.

But, when I get an element from the queue, I get a com object but I don't know converting it to the .net object.

How can I do?

Thanks

Maxime

 

0 Kudos
Message 7 of 7
(4,924 Views)