Hi can you help please,
Trying to compute some simple math in the ewon but I’m not getting anywhere with it. Have looked through reference manual, but cannot find a math example.
“Running_Hours%” is a Dword, “ComAp_Running_Hours_MSB%” is an INT “ComAp_Running_Hours_LSB%” is an INT
I cannot get any values from the calc into the “Running_Hours” tag, even if I use Running_Hours% =1
The % needs to be added at the end of the Tag as per the manual for an INT – doesn’t cover a DWord so % is probably wrong, have tries without also.
Code in basic IDE:
All I want to do is put two 16bit values into a 32bit word.
Cheers
Trying to compute some simple math in the ewon but I’m not getting anywhere with it. Have looked through reference manual, but cannot find a math example.
“Running_Hours%” is a Dword, “ComAp_Running_Hours_MSB%” is an INT “ComAp_Running_Hours_LSB%” is an INT
I cannot get any values from the calc into the “Running_Hours” tag, even if I use Running_Hours% =1
The % needs to be added at the end of the Tag as per the manual for an INT – doesn’t cover a DWord so % is probably wrong, have tries without also.
Code in basic IDE:
Code:
$Running_Hours% = (65536 * $F_Running_Hours_MSB%) + $F_Running_Hours_LSB%
All I want to do is put two 16bit values into a 32bit word.
Cheers