How to send symboles

Professional Windows® software to communicate with CAN and CAN FD busses and its add-ins: Plotter, CANdb Import, Instruments Panel, and J1939
Post Reply
scope
Posts: 18
Joined: Wed 24. Jan 2024, 15:42

How to send symboles

Post by scope » Thu 8. Feb 2024, 12:15

I don't really understand the documentationm can you help me send a symbole using a VBS Macro File

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: How to send symboles

Post by PEAK-Support » Thu 8. Feb 2024, 16:44

VBS samples are part of the online documentation. But we could send you a sample package for better understanding.
Please send a E-Mail to support[at]peak-system.com

The main important Information is to understand that a Signal could be "bind" to a VBS Variable, and so you could set and get the Signal value very easy.

Code: Select all

  ' Name of the used Symbol file we want to use (we could have many in one project)
  Set symbol = SymbolsManager("Power")
  
  ' We use the predefined CAN Signals from the Symbol File we select
  Set voltage = Signals("Voltage")
  Set current = Signals("Current")
In the Symbol File "Power" is a signal defined called "Voltage" and one called "Current"
In VBS, you could after this code access directly to the Values of the Signal

Reading

Code: Select all

Power = Voltage.Value * Current.Value 
or Writing

Code: Select all

Voltage.Value = 220
then the CAN-ID (Symbol) that stores the Signal Voltage will be automatically send to the CAN-Bus.
This is a very simple sample, but explain in basic how it works.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

scope
Posts: 18
Joined: Wed 24. Jan 2024, 15:42

Re: How to send symboles

Post by scope » Thu 8. Feb 2024, 17:11

Thank you, I sent an email

Post Reply