I needed to "decode" or read out the bit-status of any specified bit in any given number (from U8 to U32), and as such I made a "tiny" VI to give that functionality.
Since I'm rahter fresh to this whole game, I would like to get some feedback on the code.
The VI will be used as a sub-vi in a larger project, to decode status bytes which I can then use to control indicators for various processes.
I've inlcuded just a little bit of documentation, but I have not yet made an icon as my preffered icon editor is on a different computer.
I suspect I'm not as efficient in this vi as I could have been, but I'd like some feedback whether or not I have made any big boo-boo's, say on a scale from 1 to 10 with 10 beeing perfect.
🙂One comment I can give myself is that the U8 for bit-position is converted when passed to the for-loop... but on the other hand, it feels "wrong" to use the default data-type here, since the maximum value that makes sense to pass to the vi is 31 (for an U32 data-type).
---------------------------------------------------
Project Engineer
LabVIEW 2009
Run LabVIEW on WinXP and Vista system.
Used LabVIEW since May 2005
Certifications: CLD and CPI certified
Currently employed.