From Panel - Decouple Signal Setting action from CAN Frame send action
Posted: Fri 4. Aug 2023, 15:06
Hello,
I am getting started with the instruments panel. I would like to use it for setting some CAN paramters on an end device, which I suppose would be the most basic application possible.
The CAN frame is made up of multiple variables(signal). ONE of these signals is set on a UI object (e.g. Slider) and the appropriate signal is linked to that object.
The problem I have, is that as soon as I adjust the widget (slider), a CAN message is sent with the new signal ... and whatever variables exist for the other 4 signals that happen to be in that message on the same CANID.
For example, if the instrumentation panel is just initialized, all 5 signals have the value '0'. Now I set one value to 150 via that Panel and automatically, a frame is sent to the end device with 150, and 4 zeros for the other signals.
...The end device explodes because zero was not a valid input.
Generally, I would like to decouple the action of setting a variable, from the action of sending a CAN frame.
I would like to ensure all variables in that CAN frame have values I want, before a CAN frame is sent.
Is there an obvious way, that I can set signals on the instrumentation panel WITHOUT sending a CAN frame?
Is there an obvious way to 'apply' new vaules to a CAN frame and send that can frame from a Panel button. (with an execution command)?
(P.S. I also don't wan to build my own frame in macro from a bunch of input numbers. The CAN frames structures are a mess and constructing CAN frames using sym files and input values is basically what I spent 1k on PCAN-Explorer for).
Thanks
I am getting started with the instruments panel. I would like to use it for setting some CAN paramters on an end device, which I suppose would be the most basic application possible.
The CAN frame is made up of multiple variables(signal). ONE of these signals is set on a UI object (e.g. Slider) and the appropriate signal is linked to that object.
The problem I have, is that as soon as I adjust the widget (slider), a CAN message is sent with the new signal ... and whatever variables exist for the other 4 signals that happen to be in that message on the same CANID.
For example, if the instrumentation panel is just initialized, all 5 signals have the value '0'. Now I set one value to 150 via that Panel and automatically, a frame is sent to the end device with 150, and 4 zeros for the other signals.
...The end device explodes because zero was not a valid input.
Generally, I would like to decouple the action of setting a variable, from the action of sending a CAN frame.
I would like to ensure all variables in that CAN frame have values I want, before a CAN frame is sent.
Is there an obvious way, that I can set signals on the instrumentation panel WITHOUT sending a CAN frame?
Is there an obvious way to 'apply' new vaules to a CAN frame and send that can frame from a Panel button. (with an execution command)?
(P.S. I also don't wan to build my own frame in macro from a bunch of input numbers. The CAN frames structures are a mess and constructing CAN frames using sym files and input values is basically what I spent 1k on PCAN-Explorer for).
Thanks