LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

bitwise operation fragment

Solved!
Go to solution
for an input AA30D203175835240509 for the Byte_Input and 0800 for the CRC_REG, which is always the same I should get 0460 as output, but ...
0 Kudos
Message 11 of 23
(1,621 Views)

So based on that information you expect people can help you? You have an input value and you know what output you want, there's many options to achieve that...

For your initial question, some hints in the screenshot.

 

CRC_REG.png

0 Kudos
Message 12 of 23
(1,615 Views)

Hi,

 

Check the help message for "Number to Boolean array" and you'll see that the output array has the same number of elements as there are bits in the input integer. To see what type a wire is, turn context help on, then hover the mouse on the wire.

 

BTW, You almost certainly won't need to convert your CRC to a bool array to do bit arithmetic. Remember that the AND, OR, etc functions are not just for booleans. If you use integers for inputs to the logical functions, you get a bitwise operation.

 

 

Rod.

 

 

0 Kudos
Message 13 of 23
(1,610 Views)
Solution
Accepted by topic author igurov

Hi igurov,

 

has nobody told you LV functions are mostly polymorph? And there is some "auto-indexing"? See attachment Smiley Wink

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 14 of 23
(1,606 Views)
lol 🙂 thx a lot, it looks much better than mine, but still does not return the correct result
0 Kudos
Message 15 of 23
(1,603 Views)

Hi igurov,

 

"still does not return the correct result " 

Well, it's your code-fragment transflated to LabVIEW to my best knowledge Smiley Wink

 

And you didn't state if your example string is in hex display or plain ASCII and does it contain that checksum at the end or not (not that any combination will result in the expected result...)

Message Edited by GerdW on 08-20-2009 11:37 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 23
(1,599 Views)
I will check it again. Thanks a lot anyway!
0 Kudos
Message 17 of 23
(1,594 Views)
And btw, can I convert the unsigned 16 bit word to two 8 bit bytes, in other words just to split it.
0 Kudos
Message 18 of 23
(1,590 Views)
0 Kudos
Message 19 of 23
(1,585 Views)

Dear wireworkers,

 

what a big screen do you use ?? 

 

As often as I can - I first try to find a solution in I - net ( if a problem seems not easy to solve for me ..... )

 

Find attached a   succesfully re-used CRC - Program.  This is the unchanged version I found.

 

Try to use it.

 

Regards

wha

 

 

 

0 Kudos
Message 20 of 23
(1,580 Views)