Seperate variables by CAN-ID and content of ByteX

Visualization and Recording of CAN Data
Post Reply
tcarlso
Posts: 1
Joined: Mon 30. Nov 2015, 11:00

Seperate variables by CAN-ID and content of ByteX

Post by tcarlso » Fri 9. Dec 2016, 15:07

The Minidisplay supports using Scenes the possibility of different CAN-IDs. This is working fine.

[variable1]
name="speed"
canid=0x100 // ID
position=0,8 // Bit start and length

In our System, the CAN-ID is not the only way to seperate values. Unfortunately we seperate the Content by using additionally Byte1 of the CAN-Message.

Example
canid=0x123, Byte1= 11, Variable1 is on Position 16,8
canid=0x123, Byte1= 12, Variable2 is on Position 24.16

Is there any possibility to seperate the variables not only using the CAN-ID?

At the Moment we always overwrite variable1 by variable2 if the next CAN-message is received.

G.Bohlen
Hardware Development
Hardware Development
Posts: 66
Joined: Wed 22. Sep 2010, 21:38

Re: Seperate variables by CAN-ID and content of ByteX

Post by G.Bohlen » Fri 9. Dec 2016, 16:38

Hello,

it is possible to define "multiplexer" to interpret the databytes differently.
At least Firmware V1.1.5 is required.

Start with the definition of the multiplexer:
[variable1]
name="Var1_mux"
messagename="testmessage1"
position=0,8 // bitstart,bitlen
byteorder=0 // 0=intel, 1=Motorola
muxtype=1 // 0=none, 1=multiplexer, 2=multiplexed
muxval=0 // if muxtype=2, variable is updated in case current multiplexor has this value
scale=1 // scale set to 1
offset=0 //
vartype=0 // 0=unsigned, 1=signed, 2=float, 3=double(not supported)
datatype=0 // result is unsigned
timeoutval=0

Then define the "multiplexed" variables. Here two variables Var2a and Var2b are defined.
In case the multiplexer-value is "1" Var2a is updated.
In case the multiplexer-value is "2" var2b is updated.

[variable2]
name="Var2a"
messagename="testmessage1"
position=32,16 // bitstart,bitlen
byteorder=0 // 0=intel, 1=Motorola
muxtype=2 // 0=none, 1=multiplexor, 2=multiplexed
muxval=1 // if muxtype=2, variable is updated in case current multiplexor has this value
scale=1 // scale set to 1
offset=0 //
vartype=0 // 0=unsigned, 1=signed, 2=float, 3=double(not supported)
datatype=0 // result is unsigned

[variable3]
name="Var2b"
messagename="testmessage1"
position=32,16 // bitstart,bitlen
byteorder=0 // 0=intel, 1=Motorola
muxtype=2 // 0=none, 1=multiplexor, 2=multiplexed
muxval=2 // if muxtype=2, variable is updated in case current multiplexor has this value
scale=1 // scale set to 1
offset=0 //
vartype=0 // 0=unsigned, 1=signed, 2=float, 3=double(not supported)
datatype=0 // result is unsigned

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

Re: Seperate variables by CAN-ID and content of ByteX

Post by PEAK-Support » Fri 9. Dec 2016, 16:48

The latest Package incl. the Firmware could be download from here
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

Post Reply