Question:
How to access CAN signals when the signal name exists more than one time?
Answer:
In the DBC file a CAN signal exists more than one time with different CAN message IDs. To access this signal via a script/function you have to use the message and the signal name.
Syntax for working with CAN devices:
value = <Device_ID>.'$<Message_Name>$<Signal_Name>'.mbuffer[0];
Example:
In this example, the Device ID is "Vin". Both CAN messages "VIN1" and "VIN3" include the CAN signal "Kanal1".
var value, value2;
value = Vin.'$VIN1$Kanal1'.mbuffer[0];
value2 = Vin.'$VIN3$Kanal1'.mbuffer[0];
Syntax for working with MDF files:
<File_ID>[[.<Channel_Number>].<Message_Name>]].<Signal_Name>
Example:
In this example, the name of the file is "FILE1". The message name is "VIN1", and the channel number is "1".
value = FILE1.Kanal1;
value = FILE1.VIN1.Kanal1;
value = FILE1.1.VIN1.Kanal1;
Please note, that Channel Number and Message Name are additional and optional.