Skip to content

Little Endian Data Conversion

Hi,

I have problem with reading of 8 bytes size structure from profinet Device.

It consists of :

{word

byte

Byte

Dword}

I am only able to receive it to the array of 8 bytes because struct is not supported here and then copy array to the struct. But unfortunately Plcnext makes some conversion byte and word swap

[ a b ] [ c d ] [ d c b a ] Little Endian

So when I'm receiving DWORD 16#F01C I finally get 16#C10F.

Could you give me some solution?

Sign In or Register to comment.