'How to assign a CHAR Array to a SIGNAL (64 Bits) in CAPL script (CANOE)
How do I assign a CHAR ARRAY (8 Bytes) into a SIGNAL (64 Bits) in CAPL script ?
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Juhas |
