Differences
This shows you the differences between two versions of the page.
en:software:qview:qview_6:qcl_library:vc10cr32init [2017/03/24 15:32] – created qem103 | en:software:qview:qview_6:qcl_library:vc10cr32init [2019/08/29 17:01] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== VC10Cr32Init ====== | ||
+ | |||
+ | **V = **// | ||
+ | |||
+ | **C = **// | ||
+ | |||
+ | The VC10Cr32Init function __is part of a collection of functions to calculate the CRC of a sequence of data__. The VC10Cr32Init function need to initialize data and data structures are involved in the calculation. Other functions that are part of the collection are: | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | ===== IMPLEMENTATIONS ===== | ||
+ | |||
+ | **VC10Cr32Init ( crc32arTab, crc32Value )** | ||
+ | |||
+ | Initializes the array of at least 256 elements that contains the parameters for the calculation of the CRC and the CRC value. | ||
+ | |||
+ | ^IN/ | ||
+ | | OUT | ARRGBL | ||
+ | | OUT | GLOBAL | ||
+ | |||
+ | **VC10Cr32Beg** **( crc32arTab, crc32Value )** | ||
+ | |||
+ | Assign the initial value of the CRC | ||
+ | |||
+ | ^IN/ | ||
+ | | IN | ARRGBL | ||
+ | | OUT | GLOBAL | ||
+ | |||
+ | **VC10Cr32Udt** **( crc32arTab, crc32Value, crc32DataIn )** | ||
+ | |||
+ | Updates the value of the CRC for any new acquired datas. | ||
+ | |||
+ | ^IN/ | ||
+ | | IN | ARRGBL | ||
+ | | OUT | GLOBAL | ||
+ | | IN | GLOBAL | ||
+ | |||
+ | **VC10Cr32Calc** **( crc32arTab, crc32Value, crc32DataIn )** | ||
+ | |||
+ | CRC calculation concludes once gone are the data. | ||
+ | |||
+ | ^IN/ | ||
+ | | IN | ARRGBL | ||
+ | | OUT | GLOBAL | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | <code QCL> | ||
+ | VC10Cr32Init( ImedCrcTab, LImedCrcC ) | ||
+ | |||
+ | MAIN: | ||
+ | |||
+ | IF Start_Calc EQ 1 | ||
+ | | ||
+ | |||
+ | FOR (Index = 1, Index LE DIM_ARRAY, 1) | ||
+ | ;Adds a new data to calculate the CRC taking it from an array | ||
+ | TmpLong = ArrayLong[Index] | ||
+ | VC10Cr32Upt( ImedCrcTab, LImedCrcC, TmpLong) | ||
+ | NEXT | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | ENDIF | ||
+ | WAIT 1 | ||
+ | JUMP MAIN | ||
+ | |||
+ | END | ||
+ | </ | ||