LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete old/stale/unused controllers programmatically

My google-fu is weak… How does one go about deleting old and unused cRIOs programmatically?

I know how to do it manually...

Frozen_0-1583947296397.png

Frozen_1-1583947325620.png

 

I have searched through the ni examples, googled several variation of “delete cRIO”, searched the forums… and found nothing useful.
Any ideas?

Thanks

 

---------------------------------------------
Certified LabVIEW Developer (CLD)
0 Kudos
Message 1 of 8
(5,632 Views)

It's not totally programmatic but you can right-click on Remote Systems and remove all disconnected systems which at least saves you from having to delete each one individually.

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 8
(5,593 Views)

That does not bode well if a NI empolee cannot answer the question 😲

 

Finding the disconnected systems is relatively easy and slow as molasses.

 

Frozen_0-1583966116344.png

 

I can't be the only one that will be having multiple cRIOs cycle through a PC and then shipped off to a customer.

---------------------------------------------
Certified LabVIEW Developer (CLD)
0 Kudos
Message 3 of 8
(5,578 Views)

Looking at the full Help for Find Systems, it looks like if you set "Detect Online Systems" to False it will only return previously discovered systems. That sounds like it'll be pretty quick.

 

You might be able to programmatically create a MAX report then parse the XML file for cRIO targets.

 

(Unfortunately I don't have a cRIO to test with and can't add a simulated/disconnected one, so this is all guesswork.)

0 Kudos
Message 4 of 8
(5,574 Views)

@Frozen wrote:

That does not bode well if a NI employee cannot answer the question 😲

 

Finding the disconnected systems is relatively easy and slow as molasses.

 

Frozen_0-1583966116344.png

 

I can't be the only one that will be having multiple cRIOs cycle through a PC and then shipped off to a customer.


It doesn't mean there isn't an answer, just that the NI employee gave you an answer that might be better than you are doing now.

 

Why do you need to programmatically remove old controllers programmatically?

How many do you need to remove?

How often do you need to do it?

 

I would think even manually right clicking on each one and removing would be easy enough if you are only talking a dozen or so to remove.

Even taking 34 seconds doesn't seem that bad (though if for only 2 and it multiplies by the number of systems then perhaps it does take a long time).

But if you have to do this pretty infrequently, then who cares if it takes minutes to do?

I'd rather have a PC take 10 minutes to do something programmatically if it only takes me a few seconds to click a button, then have me take a 2 minutes to do it completely manually.

 

0 Kudos
Message 5 of 8
(5,570 Views)

All good points RavensFan. Of course there is no real need to do it programmatically. I just thought it would be nice to automate it. Right now, the production staff are manually loading the cRIOs and I am working on automating that. After the loading of the controller are automated, they will lose visibility of how many stale controllers are in the system.... which is not really a problem either, unless there is some performance issue I am not aware of. So I turn the same question back to you... "How often do you need to do it?" Is hundred too many? Thousands? For now, I will have to set it up as a monthly maintenance job, maybe weekly at busy times, for all the PCs involved.

Still can't believe I am breaking new ground here. There must be other people dealing with the same issue. Maybe they are not aware of it or just fell back to doing manually.

 

---------------------------------------------
Certified LabVIEW Developer (CLD)
0 Kudos
Message 6 of 8
(5,531 Views)

@BertMcMahn, there is also a Delete Resourse available in the System Config -> Utilities pallet, however, I am unable to get the magic filter options correct for this function to work.

---------------------------------------------
Certified LabVIEW Developer (CLD)
0 Kudos
Message 7 of 8
(5,529 Views)

After consulting with NI support, we have determined there is no good way of programmatically deleting disconnected remote systems. The only proposed work-around from NI involved using the MAX database reset utility
Unfortunately, that options has some serious side effects:
1) Removes all DAQmx tasks, custom scales, and DAQmx Global Virtual Channels
2) requires elevated privileges to run
3) requires a PC reboot

 

If you are looking for a better way to clear the MAX cache, please consider voting for this idea.

 

---------------------------------------------
Certified LabVIEW Developer (CLD)
0 Kudos
Message 8 of 8
(5,452 Views)