How do I assign a CHAR ARRAY (8 Bytes) into a SIGNAL (64 Bits) in CAPL script ?
Asked
Active
Viewed 524 times
0
-
How is the mapping between a char array and a 64 bit integer supposed to look like? – MSpiller Jan 27 '22 at 10:28
1 Answers
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