I’m using a PMU24 to send out a canbus message to a custom gauge cluster. The gauge is driven by a big endian signed 16bit value, with a scaling of 0.1.
This post is hoping for the following:
Future support of Canbus Export of 16bit signed Big Endian and Little Endian values
Future support for a Magnitude number operation which returns the magnitude of a signed number.
Advice on a workaround so I can still export a functional value. This is what I’m going to try:
Filter incoming signed value, add number n_ValueMagnitude which calculates magnitude of value via max(n_value,n_value*-1)
add function for f_IfValueNegative,
and if f_IfValueNegative function is true, add 8,388,608 (decimal) to the n_ValueMagnitude which is sent out as an unsigned 16bit big endian value.
If anyone has ideas on a better way I could accomplish this, would love your input.
This is already available. You can select a 16-bit channel in either big-endian or little-endian order. The custom 16-bit values are always signed.
As you noticed, it can be done with a couple of functions/numbers, so it’s not a high priority right now.
I think you got confused.
You are calculating the absolute value and then converting it back into a signed value. You performed one operation and then reversed it directly, which means nothing happened.
You can send the 16-bit signed value directly via the CAN bus export without any additional operations. I don’t understand where the issue is. You might need to provide more details, like your project file, which value you want to send, and to which gauge.