10-25-2008 07:24 AM
That's some snazzy programming!
Thanks. You do what the customer needs, right?
They wanted plug-ins. Which, by itself, was easy.
But you want to check the HORSEPOWER plugin and if it needs SPEED and TORQUE, you have to make sure those are active channels.
So I made the plugins return their prerequisite names.
And you have to check that the HORSEPOWER plugin wants TORQUE in FT-Lb, not N-m.
So I made the plugins return their prerequisite units.
And you have to check that the HORSEPOWER plugin returns units of HP, so that the channel is configured for HP not kW, or degC, or PSI or something.
And you have to check that if plugin X uses plugin HORSEPOWER, you execute the HORSEPOWER before you execute X, otherwise you have stale data.
I do that by recursively following the prerequisite chain.
And you have to check that the plugins on the PXI box are the same version as the ones on the host. (I do that with a hash function and transfer the VI if necessary).
And now, of course, you have to check that the plugins on the host are compiled and current, which I now do, thanks to the disaster this week.
However, I still think either:
1... the GET EXEC STATE should have returned something besides RUNNING, or
2... The CAL BY REFERENCE NODE should have returned an error, rather than crashing the PXI box.
Anyway, it's resolved.
Blog for (mostly LabVIEW) programmers: Tips And Tricks