#36 DecodedVarIntUnion does not clear the higer bytes when you use a smaller datatype

MVP basic protobufs
closed
None
2020-09-14
2020-07-04
i-campbell
No

I thought I could get away with a union, but maybe not. If you write a 64 bit timestamp for example dviTemp.Uint64 := 0x0000017F_a32ae48F;
and then
dviTemp.Uint32 := 0x0C;
Your dviTemp is now 0x0000017F_0000000C;
but it needs to be 0x00000000_0000000C;

So I think I will make a Function_Block with one internal ULINT variable and Properties to mimic the behaviour of a Union.

Discussion

  • i-campbell

    i-campbell - 2020-07-04

    Resolved in r221 by converting it to Function_Block

     
  • i-campbell

    i-campbell - 2020-07-04
    • status: open --> closed
     

Log in to post a comment.