Jump to content


Photo
- - - - -

CRC32


  • Please log in to reply
8 replies to this topic

#1 Wouter

Wouter

    Very Active

  • Members
  • PipPipPip
  • 103 posts
  • Version:LabVIEW 2011
  • Since:2006

Posted 27 December 2011 - 09:52 PM

VI Name:
CRC32

Total VIs:
3

Description:
I was suprised LabVIEW didn't had the CRC32. So I made it, http://en.wikipedia....edundancy_check, http://www.ietf.org/rfc/rfc1952.txt. It can take a array of U32, one element of U32 or a string. When needed I can create more CRC checks, CRC8, CRC16, etc... but CRC32 is the most used one I readed.

Note:
-

Blockdiagram:
Posted Image

What are you thoughts on this VI?
  • Would you like to see such a function in OpenG?
  • Can you optimize the code?
  • In which package should it be included?
  • Should it be rejected?

Attached Files



#2 jgcode

jgcode

    LabVIEW Renegade

  • OpenG
  • PipPipPipPipPipPip
  • 2,397 posts
  • Location:Australia
  • Version:LabVIEW 2009
  • Since:2005

Posted 28 December 2011 - 05:04 AM

Yer, these could be nice to have in OpenG.
*I think* this is the CRC16 I have used in the past.

#3 Ton Plomp

Ton Plomp

    How many lines per hour? Zero!

  • Premium Member
  • 1,973 posts
  • Location:Netherlands
  • Version:LabVIEW 2012
  • Since:2000

Posted 28 December 2011 - 09:03 AM

Hi Wouter,

that looks nice, I think we should include it in the MD5 package (together with the SHA hashes I've created).
However I would use an array of U8 instead of U32.

Ton

#4 Wouter

Wouter

    Very Active

  • Members
  • PipPipPip
  • 103 posts
  • Version:LabVIEW 2011
  • Since:2006

Posted 28 December 2011 - 12:46 PM

@Ton, in the rfc1952 they even use unsigned long. So I would earlier change it to u64 then u8 ;)

#5 Wouter

Wouter

    Very Active

  • Members
  • PipPipPip
  • 103 posts
  • Version:LabVIEW 2011
  • Since:2006

Posted 28 December 2011 - 02:34 PM

crc16 CCITT

Attached Files



#6 crelf

crelf

    I'm a LAVA, not a fighter.

  • V I Engineering, Inc.
  • 5,742 posts
  • Version:LabVIEW 2012
  • Since:1993

Posted 28 December 2011 - 06:53 PM

Here's an existing colleciton of CRC functions: http://forums.ni.com...tion/td-p/86249

post-181-1170858537.png


#7 Wouter

Wouter

    Very Active

  • Members
  • PipPipPip
  • 103 posts
  • Version:LabVIEW 2011
  • Since:2006

Posted 28 December 2011 - 06:55 PM

crc16-IBM

CRC-16-IBM x16 + x15 + x2 + 1 (Bisync, Modbus, USB, ANSI X3.28, many others; also known as CRC-16 and CRC-16-ANSI)

Attached Files



#8 Wouter

Wouter

    Very Active

  • Members
  • PipPipPip
  • 103 posts
  • Version:LabVIEW 2011
  • Since:2006

Posted 29 December 2011 - 06:49 PM

Poly VI with CRC8, CRC16-CCITT (0x000, 0x1D0F, 0xFFFF), CRC-IBM, CRC32

Some reading material:
http://en.wikipedia....edundancy_check
http://www.pvlteam.c...c/crc/algos.htm
http://www.miscel.dk...lculations.html
http://web.archive.o...icles/ccitt.htm

Attached Files

  • Attached File  crc.zip   128.41K   129 downloads


#9 crossrulz

crossrulz

    Extremely Active

  • Members
  • PipPipPipPip
  • 253 posts
  • Location:Cincinnati, OH
  • Version:LabVIEW 2011
  • Since:2004

Posted 05 October 2012 - 05:58 PM

Here's a few generic CRC VIs I made sometime over the years. They do not use the lookup tables, so they may be a little slower. But they can be set to any CRC configuration.

Included are an 8-bit, 16-bit, and 32-bit versions.

Attached Files

  • Attached File  CRC.llb   84.03K   66 downloads