I'm writing a very siple VBScript that given the value of a CAN signal copies this value into another signal.
Normally, whit two signals with different names I do as follows:
Code: Select all
Sub Example()
dim sig1, sig2
set sig1=Signals("VAR1")
set sig2=Signals("VAR2")
While true
sig1.Value = sig2.Value
wait 10
Wend
End Sub
Now I'm facing the problem that the 2 variables have the same name, what differs is the multiplexer. Below there is an example of the symbol file:
Code: Select all
FormatVersion=5.0 // Do not edit this line!
Title="EXAMPLE"
{SENDRECEIVE}
[MESSAGE]
ID=001h
DLC=8
Mux=MUL1 0,2 1
Var=Var1 unsigned 8,8
[MESSAGE]
DLC=8
Mux=MUL2 0,2 2
Var=Var1 unsigned 8,8
Code: Select all
set sig1=Multiplexer("MUL1").Signals("VAR1")
Can someone gime me a hint on how to solve this?
Thanks.