What is the benefit of using Signals vs. Variables?

This forum covers issues concerning multiple software products.
Post Reply
rrmueller
Posts: 4
Joined: Mon 10. Feb 2025, 17:58

What is the benefit of using Signals vs. Variables?

Post by rrmueller » Tue 11. Feb 2025, 19:52

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

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: What is the benefit of using Signals vs. Variables?

Post by M.Heidemann » Wed 12. Feb 2025, 07:52

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
---
Marvin Heidemann
PEAK-Support Team

rrmueller
Posts: 4
Joined: Mon 10. Feb 2025, 17:58

Re: What is the benefit of using Signals vs. Variables?

Post by rrmueller » Wed 12. Feb 2025, 14:28

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

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: What is the benefit of using Signals vs. Variables?

Post by M.Heidemann » Wed 12. Feb 2025, 14:34

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
---
Marvin Heidemann
PEAK-Support Team

Post Reply