0

How do I assign a CHAR ARRAY (8 Bytes) into a SIGNAL (64 Bits) in CAPL script ?

1 Answers1

0

Convert array to 64-bit variable minding the endianness.

Here's an example code:

qword value;
value = 0;
for(i = 0; i < 8; i++)
{
    value = value | (qword)array[i] << (8* (7 - i));
}

Due to the fact the signals longer than 52 bits in CAPL may cause some data loss in order to assign the converted value by using raw64 property.

Juhas
  • 178
  • 2
  • 13