Jump to content

Clone left running in background


Recommended Posts

I have a program where I launch a clone that runs in the background and updates the Top Level VI.

In normal operation the top level vi tells the clone to stop and everything seems to be fine, but every once in a while the clone stops, or maybe the top level stops and leaves the clone running.

Is there some method to monitor running clones? Maybe with the ability to stop a running clone?

This is how I launch the clones.

Thanks for your help...

817961541_CloneLaunch.PNG.d3dd21860510a54ba928ad41c95b0cf0.PNG

Link to comment
1 minute ago, ensegre said:

This one is simply great as a GUI for that. If you're looking for a programmatic way of monitoring running clones, I guess you simply have to look under the hood.

that is nice but I found it way too heavyweight to use regularly. My debugger is built into my application and can be used even in the exe

Link to comment

A typical solution for this is to regularly exchange a "heartbeat" message between your top-level VI and running clone(s). That way, if either the top-level VI or clone doesn't respond within an expected timeframe (i.e. 60 seconds), the system can react accordingly (i.e. spawn a new clone, report an error, or - in case of the clone - shut itself down).

Link to comment

I do something close to Neil.  My messaging structure uses the user events, and so in my event structure I have a long timeout of say 5000ms.  In that timeout case I check to see if the user event is valid (not a number/reference).  If it isn't valid then go clean up, I probably forgot to send a quit message or something shutdown improperly.  I made an idea on the idea exchange to generate an event, when a reference gets destroyed over here which would make this a bit more graceful.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.