09-29-2015 04:48 AM - edited 09-29-2015 04:49 AM
I am developing a basic counter program for an FPGA and am struggling with converting the unsigned 8-bit integer to an cluster of 8 front panel LEDs.
The aim is to depict the binary value of the counter with a set of 8 LEDs, but an integer to a cluster of 8 booleans are considered incompatable.
Any suggestions?
Solved! Go to Solution.
09-29-2015 07:36 AM - edited 09-29-2015 07:38 AM
Don't use the cluster. Instead, hit ctrl+space and type in "to boolean array"
This should convert your integer to a boolean array. Just be aware the first element in your array is the LSB.
Also, before you get too into developing this application, you should take a look at some of the basic courses for LabVIEW. I'm guessing you come from a text based background. Would it make sense for you to define struct bob and later say bob = 3? It doesn't make sense in LabVIEW either. That's why your wires are broken. If you want to convert data types, you need to do this before wiring the two wires together. Otherwise, you'll have data conflicts.
09-29-2015 07:41 AM
to Boolean array did the trick. Thanks.
09-29-2015 07:45 AM
I'm sure you noticed this now. There's also the inverse boolean array to int. You can use these to save on the transfer of booleans with the FPGA. If you're trying to do logic, make sure you remember the LSB tidbit.