NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel tasks

Hi,

 

After searching, I'm a bit lost about my project.

I need to continuously monitor signal coming from a PLC during test (eg Emergency stops, Doors...).

Communication with PLC is done by ModbusTCP (this is working).

What I want to achieve is stopping the current test/sequence if some signal change their state (interrupting the test).

I already tried with Sequence Call/New Thread and then check status in PostStep callback but no luck because somehow I'm not able to share data between "Monitor" thread and main sequence (even with station globals).

I can not use Labview due to project constraints so I cannot use examples I saw with RunAsyncVI and so on, but I can use DotNet if needed.

For sure I can devellop about my architecture if needed.

 

(Sorry for my poor english but it's not my native language as I'm french)

 

Thanks

 

Noar

 

 

0 Kudos
Message 1 of 3
(3,543 Views)

Hi,

 

I've been able to do the Sequence Call/New Thread and then check status in PostStep callback operation many times. If you can solve the sharing data problem that is a good way to go. I'm sorry I can't help with that, except I would try a very simple prototype that does nothing but share data between main and the thread. Have you tried passing a parameter by reference to the thread subsequence so the subsequence can write to the parameter and it gets copied to Main?

cc

0 Kudos
Message 2 of 3
(3,533 Views)

Hi,

 

Thanks for your reply, I will try again with simple data sharing...


I'll let you know about results

 

Noar

0 Kudos
Message 3 of 3
(3,502 Views)