From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-10-2012 09:25 PM
basically i have a 13-bit-hex digit, now i want to find the 8th bit of the digit and output. how can i achieve it. I have definitley tried but none of them worked.
thank you very much
Solved! Go to Solution.
07-10-2012 09:47 PM
I am not sure what you mean by a "13-bit-hex digit" but the boolean functions work on integers. Create a constant with only the 8th bit equal to 1 and all others 0. Then AND it with your data word. The result will be zero if the 8th bit is zero and >0 otherwise.
Lynn
07-10-2012 10:03 PM
thank you very much indeed. I use RFID reader to detect the tag. the ID of the tag is a 13-bit-hexdecimal digit. say, 29A030AC1DA1A, how can i take out the 8th bit of this data? i can understand your AND logic. but that only give me 0 or non-0. i need an exact number which is C in this case.
thank u again.
07-10-2012 10:07 PM
It appears that you want the 8th digit, not the 8th bit. Make your mask 0000000F00000. That should select the digit you want. You may need to do some additional manipulation to get just C and not 0000000C00000.
Lynn
07-10-2012 10:40 PM
07-11-2012 01:53 AM
Hello,
The attached VI might help you to resolve your proble.
A simple number to array conversion is used.
Just Check it
Prabhakant
07-11-2012 07:37 AM
@Prabhakant Patil wrote:
Hello,
The attached VI might help you to resolve your proble.
A simple number to array conversion is used.
Just Check it
Prabhakant
As already stated, the user is looking for the 8th digit, and not the 8th bit.
Also, using a Number to Boolean Array and then an Index Array is unnecessary. Why create an array when you don't need to? The most straightforward way of doing this is as Lynn indicated: use a single AND function, followed optionally by an Equal to Zero if you need a Boolean output.
07-11-2012 07:44 AM
I think using the words "Character" or "Hexit" would have avoided some of the confusion.
Ben
07-13-2012 04:07 AM
thank you very much for the VI.
the data i am dealing with is a 13-bit long data. this program can only deal with 4-bit long hexadecimal maximum. thank you anyway.
07-13-2012 04:08 AM
yes. right. thanks. me coming from China. not good at manipulating English yet..
thank you very much indeed for the correction.