LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Best option to synchronize two applications

I've been developing two CVI applications (call them App_1 and App_2, for example), and I've been looking for the best option to synchronize them. I mean that App_1 must know if App_2 is running or not, and which operation is performing in every moment.

At the beginning I thought to a network variable (created when App_2 starts and deleted when it stops), but this is not an option because if App_2 crashes the network variable is not deleted, but it exists with the last value. And so App_1 would think that App_2 is running...

 

Any suggestion on a better way?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 1 of 3
(2,638 Views)

Since you are already on the way to Network Variable, you could benefit from timestamping the variable you are already using. Refer to NVQuality example project for an example of using timestamping of a NV. This could probably address most of your problems, provided the writer continously update status variable even if no change has occurred. Alternatively, you can add a supplementary variable to use as a whatchdog, i.e. the writer continuously writes some different value and the reader checks it has changed over time.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(2,635 Views)

Thanks Roberto

what you suggested is more or less the same solution I thought to.

And since an expert like you suggests this approach I think this is definitively the best option

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 3 of 3
(2,622 Views)