Page 1 of 1
What is the benefit of using Signals vs. Variables?
Posted: Tue 11. Feb 2025, 19:52
by rrmueller
Hello,
I am curious on what is preferred when creating symbol files for my PCAN Explorer projects. What are the reasons for having two different methods? In my current usage, I prefer variables, as I believe it keeps the symbol file cleaner, however the help docs do not describe a preference or differences between the two.
Thank you,
rrmueller
Re: What is the benefit of using Signals vs. Variables?
Posted: Wed 12. Feb 2025, 07:52
by M.Heidemann
Hello,
Check the help under "Automating tasks with PCAN-Explorer" -> Objects.
Signals and variables are different in purpose:
A variable is ALWAYS bound to a real CAN-message,
Signals CAN be but also can be unassigned.
Also they do have differing parameters.
BR
Marvin
Re: What is the benefit of using Signals vs. Variables?
Posted: Wed 12. Feb 2025, 14:28
by rrmueller
Hi Marvin,
Thank you for the response. Would I be correct in saying that if you use a variable with the same name, it produces copies unique to the CAN message it's assigned to? And along the same line, assigning a signal in multiple CAN messages would only reference a signal instance/value?
It sounds like variables have more flexibility. Such as if you have a lot of CAN messages of the same type - for example, input/output pin diagnostics.
rrmueller
Re: What is the benefit of using Signals vs. Variables?
Posted: Wed 12. Feb 2025, 14:34
by M.Heidemann
Hello,
That's pretty mch how they work yes, Signals are "global" and can exist in multiple different Symbols (Messages), Variables are not. They only exist in the scope of one message.
BR
Marvin