LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Same function between C and Labview?

Hello Rolf,

thanks for your support so far!

But if i drop e.g. 050201020500DAF9 into the data string, i will receive a CRC from 9733 and a data-string with CRC from 0502010500DAF9&

Another example with following input: 050201021400 (without CRC-Bytes) produces following result string with CRC: 050201021400§× and a CRC of -10329

Any idea what kind of mistake i make??
0 Kudos
Message 11 of 13
(732 Views)
Christian wrote:
> Hello Rolf,
>
> thanks for your support so far!
>
> But if i drop e.g. 050201020500DAF9 into the data string, i will
> receive a CRC from 9733 and a data-string with CRC from
> 0502010500DAF9&
>
> Another example with following input: 050201021400 (without CRC-Bytes)
> produces following result string with CRC: 050201021400§× and a CRC of
> -10329
>
> Any idea what kind of mistake i make?

Make sure you understand the display modes of a string. LabVIEW by
default displays a string as ASCII characters with one character per
byte. Then you have the "\ display" which shows \ for those
unprintable characters sach as TAB, SPACE, CARRIAGE RETURN, LINE FEED,
etc. Last but not least you have the Hex
code display. This uses
actually two hexadecimal characters to represent one single byte.

Please understand that the display mode only changes the way LabVIEW
visualizes the bytes from which the string consists. It does absolutely
nothing to the actual data bytes contained in the string control.

The Hex Display mode is what you want to use with the strings you gave.
Since your protocol is binary the strings you show are actually in
hexadecimal format. So if you change the display mode of both strings to
Hex Display and then paste in your hex string you will get the correct
result string.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 12 of 13
(732 Views)
Oh...my mistake! I think, i´ve understood it now and it works!!

Thanks for your support and greetings from germany!

Christian
0 Kudos
Message 13 of 13
(585 Views)