Page 1 of 1
Delta V
Posted: Mon 9. Jan 2012, 12:57
by PMJ
Hi,
I receive 72 voltages (V1,V2,.....,V72) in multiplex on ID 202h and i need calculated delta V. It is possible in PCAN explorer??
Piter
Re: Delta V
Posted: Tue 10. Jan 2012, 11:51
by M.Maidhof
Hello,
yes, thats possible. You have to write a small VBmacro to calculate a third signal out of two given signals. Here is an example:
Sub CalculatePower()
Dim voltage, current, power
Set voltage = Signals("Voltage")
Set current = Signals("Current")
Set power = Signals("Power")
If power Is Nothing Then
' Signal not found, create and initialize new one
Set power = Signals.Add("Power")
power.DataType = peDataTypeFloat
End If
While True
power.Value = voltage.Value * current.Value
Wait(10) ' Prevent 100% CPU load
Wend
End Sub
regards
Michael