03-19-2013 11:33 AM
Hi,
I try to calculate cksum for hex string. but I can't get right result. I use MS calcuator, I got result "cksum = 51" and I use labview 8.5. I got the result " cksum = 11. Can anyone tell me what I did wrong?
Thanks,
Johnny
Solved! Go to Solution.
03-19-2013 11:40 AM - edited 03-19-2013 11:45 AM
It looks like you are using OR instead of XOR. I recommend building the bytes into an array and use a FOR loop and shift register to XOR all of the elements together.
Nevermind, just started looking at the VI instead of the picture. This is actually a Decimal vs Hex problem. Right-click on your constants and select Visible->Radix. You will see a little 'd' next to your numbers. This shows that your constants are in decimal notation. You can click on the 'd' and choose Hex. The radix will now display as a 'x'. Fix your constants to be what they really should be. Do the same thing to your output indicator to show the value in hex.
03-19-2013 11:45 AM
The math in my head suggests that you probably are entering decimal values into those constants and not hex values. Right click them all and set the display format to Hexadecimal (and show the radix!). Do the same for your indicator.
03-19-2013 11:54 AM
yeah, It works.
Thanks, Darin
Johnny
10-19-2016 01:06 AM
JIN @
HEY CAN U UPLOAD UR UPDATED VI PLEASE..!! IM FACING SAME PROBLEM
10-19-2016 01:50 AM
@crossrulz wrote:
It looks like you are using OR instead of XOR. I recommend building the bytes into an array and use a FOR loop and shift register to XOR all of the elements together.Nevermind, just started looking at the VI instead of the picture. This is actually a Decimal vs Hex problem. Right-click on your constants and select Visible->Radix. You will see a little 'd' next to your numbers. This shows that your constants are in decimal notation. You can click on the 'd' and choose Hex. The radix will now display as a 'x'. Fix your constants to be what they really should be. Do the same thing to your output indicator to show the value in hex.
I'll give you a kudo since you didn't get a solution.
10-19-2016 03:03 AM - edited 10-19-2016 03:03 AM
Hi minakshi,
there is a VI and you can read above how to change this VI to get a working solution! What else do you need?
All you need for your other thread is the XOR function as already suggested here…
And please stop SHOUTING OUT LOUD - it's considered rude behaviour in public forums!
10-19-2016 03:25 AM
thanks billko.! i will check out this.