04-20-2009 12:38 PM - edited 04-20-2009 12:39 PM
HI i'm very new to labview, coming from a sequential command oriented programming background, so im on a relatively steap learning curve.
I have what you people call a "stacked sequence structure" which programs an oven for me. 1, 2, 3, 4, all send commands sequentially to the oven. What i would like to do is monitor the 'status byte' of the last step for bit 4 so i know when it has completed. [Bit 4 of the status byte tells me when the setpoint has been reached.]
I need to know when bit 4 goes high, to exit my loop. What i wanted to do is send this info to a local variable, and check that periodically in my loop. However i'm not sure how to:
A - monitor a specific bit of a byte
B - write to a local variable
Please help
Thanks
04-20-2009 01:12 PM
04-20-2009 01:18 PM - edited 04-20-2009 01:18 PM
Try using the Number to Boolean Array.vi and Index Array.vi
04-20-2009 01:22 PM
great! thank you for the reply. meanwhile i came up with this:
will this also work?
04-20-2009 01:47 PM - edited 04-20-2009 01:49 PM
There are several methods to accomplish this. The difference will be how efficient the code is. Yours will work but has an extra step in it. You could also do it this way.
04-20-2009 02:20 PM - edited 04-20-2009 02:23 PM
SImply mask with "bitwise AND" and see if the result is not zero. (of course for a fixed personality, you would replace the lower part with a diagram constant, even simpler).
(Wayne, using an inverted mask and bitwise OR seems a bit convoluted ;))
04-20-2009 03:11 PM
altenbach,
My gate array and FPGA past are showing again. It's not convoluted at all if its being implemented in physical gates and you don't want to use any flip-flops.