LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to find VI in Labview to calculate CRC-CCITT (1021) (X.25) (XModem)

Solved!
Go to solution

I've written functions in C to calculate CRC-CCITT but not in Labview. Does anyone have a VI to do this that they would like to share?

 

Using CRC-CCITT (XModem) (1021) the CRC for example for 0x12 would be 0x3273, and for 0x13 it would be 0x2252.

 

Thanks for any help.

0 Kudos
Message 1 of 7
(6,146 Views)
Have you tried a search?
0 Kudos
Message 2 of 7
(6,138 Views)

I've tried searching with no luck for the particular CRC that I'm lookng for. I'm trying to figure out how to call a C function from Labview now.

 

Thank you

0 Kudos
Message 3 of 7
(6,134 Views)
Smercurio's search link led me to this message in less than a minute.  The results it gives matches the two examples you posted.  It would be easier to use that VI rather than messing with C function calls.
Message 4 of 7
(6,123 Views)

I found the  message that you're talking about previously but I dont get the same results.

 

WTW_CRC16_Calculator[1] gives me         11 -> 10D6     and  12-> 20B5

 

CRC-16 gives me                                       11 -> F4D5     and  12 ->F 595

 

CRC16_Calculator gives me                        11 -> 10D6    and   12 -> 20B5

 

Results should be                                        11 -> 0210    and    12-> 3273

 

 

0 Kudos
Message 5 of 7
(6,099 Views)
Solution
Accepted by topic author chuck72352

chuck72352 wrote:

I found the  message that you're talking about previously but I dont get the same results.

 

WTW_CRC16_Calculator[1] gives me         11 -> 10D6     and  12-> 20B5

 

CRC-16 gives me                                       11 -> F4D5     and  12 ->F 595

 

CRC16_Calculator gives me                        11 -> 10D6    and   12 -> 20B5

 

Results should be                                        11 -> 0210    and    12-> 3273

 


When I tried CRC16_Calculator with 0x11 and 0x12 I got 0x0210 and 0x3273, respectively, which is what you were looking for. All Boolean controls were set to False. Did you change the "String in" control's display format to Hex?

 

Also, be aware that there is no "correct result". Only a result based on certain conditions.

Message Edited by smercurio_fc on 12-02-2009 09:11 AM
Message 6 of 7
(6,091 Views)
What I didn't do was to change the format to HEX. Thanks for your help!
0 Kudos
Message 7 of 7
(6,084 Views)