NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand and .NET Events

Hi,

 

I'm trying to do the following in TestStand :

 

 

I'm trying to do a new thread withing a sequence that will catch .net events from a code module. This new thread will indicate or stop the execution of the main thread. Anyone has any idea how we can achieve this or any example using the TestStand API or something else ?

 

Thanks,

Message Edited by Crusader on 04-06-2009 01:24 PM
0 Kudos
Message 1 of 7
(3,535 Views)

Hi Crusader,

 

To communicate between two instances of .NET code modules, you can use a process called .NET Remoting.  This is explained at this DevZone document here: http://zone.ni.com/devzone/cda/epd/p/id/6064 .  This document has an example of communicating between TestStand and LabVIEW using .NET, but the same principles can be applied for communicating between two instances of your .NET code in your TestStand sequence.

Eric B.
National Instruments
0 Kudos
Message 2 of 7
(3,499 Views)

Hi Eric,

 

I don't think that .NET remoting could help in this case. If it can, how will I be able to catch the events coming from the remote object within TestStand ?

 

Thanks,

0 Kudos
Message 3 of 7
(3,496 Views)

Here is a good example of someone creating an event in one program and handling it in another program: http://www.codeproject.com/KB/IP/remotingandevents.aspx

 

The author of this page has a few different approaches, but the first seems the most straightforward.  You can download the code and check it out to see exactly how he does it.

Eric B.
National Instruments
0 Kudos
Message 4 of 7
(3,482 Views)
What do you mean by "stop" the main sequence? Could you just pass the Execution to the monitoring thread and then call Execution.Terminate or Execution.Abort as needed?
0 Kudos
Message 5 of 7
(3,479 Views)

Hi,

 

yeah I would like to terminate the execution of the main sequence when I received an Events from .NET.

 

One part of this project would be to stop the execution of the main sequence in the monitoring thread.

Do you have any example of this, I've try passing the Execution has a parameter to my monitoring sequence, but it didn' t seem to work.

 

Thanks,

0 Kudos
Message 6 of 7
(3,463 Views)
If you can post a simple example of what you are trying to get working and point to problem you are hitting, I bet someone can help you fix it.
0 Kudos
Message 7 of 7
(3,451 Views)