ct1hxb

MrPLC Member
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ct1hxb

  • Rank
    Hi, I am New!

Profile Information

  • Country Portugal
  1. Checksum

    Hi, i'm doing a project that receive 3 values from MES: AutorizaçãoMES [DINT], OF_MES [DINT], and QtdExpectavel [UDINT]. I want a checksum calculation based in this 3 values. this is the code i made  ToAryByte(In:=AutorizaçãoMES, Order:=_LOW_HIGH, aryout:= arrayChecksum[0]);  ToAryByte(In:=OF_MES, Order:=_LOW_HIGH, AryOut:=arrayChecksum[4]);  ToAryByte(In:=QtdExpectavel, Order:=_LOW_HIGH, AryOut:=arrayChecksum[8]);  Checksum1 := arrayChecksum;  Checksum_PLC_MES:=WORD_TO_UINT( AryCRC16(In:=arrayChecksum[0], Size:=uint#12, OutOrder := _HIGH_LOW));  in the attach i have the code simulation with values. The CRC16 result is not the expected, Can anyone help me with that?   Thank you in advance