Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

XNet Muxing

So I discovered recently that XNet supports signal muxing.  So I can have the first byte in a frame which tells me what the type of siganl it is, and then get the data and scale it for that signal.

 

So if I get this

ID 0x10

Payload 0x01 11 00 00 00 00 00 00

 

The first byte may mean I am getting voltage, and the second byte is the voltage

 

And if I get

ID 0x10

Payload 0x02 22 00 00 00 00 00 00

 

The first byte means I am getting current, and the second byte is the current.

 

I can set this up in the Database Editor easily by setting the first byte as the Multiplexer, and then make two signals one for voltage and one for current each on the second byte as the Multiplexed.  The problem I have is when I go to my code and select a signal, my Voltage and Current are not a selectable option.

 

What am I doing wrong?  Is there an example doing signal muxing in XNet?  Thanks.

0 Kudos
Message 1 of 13
(8,074 Views)

You have a LIN database. The LIN specification doesn't define any notion of a multiplexed message.

0 Kudos
Message 2 of 13
(8,072 Views)

Well that sucks.  I guess my suggestion is if it isn't supported, then you shouldn't be able to make muxed signals for a LIN session.

0 Kudos
Message 3 of 13
(8,070 Views)

I agree.

 

The internal schema used in the database editor (FIBEX) supports it, whereas the LIN specification (both the one from the LIN Consortium and the SAE J2602 standard) and LDF files don't.The LIN specification is currently undergoing a transition to ISO. It is possible that new work may be done to expand the functionality to support multiplexed messages.

 

You are correct, the functionality could be disabled in the editor to minimize confusion in the case of a LIN cluster. I can make no guarantees, however, if that functionality will be added.

0 Kudos
Message 4 of 13
(8,066 Views)

@GPIB_Guru wrote:

 

It is possible that new work may be done to expand the functionality to support multiplexed messages.


I don't know if there is much of a request from other customers for this functionality, but I would really like to have this functionality, so I don't need to do it myself.

0 Kudos
Message 5 of 13
(8,063 Views)

Okay I have a work around but I don't like it.  I have my normal interface for reading and writing LIN frames.  I then make a second database which is CAN based, which has my muxed signals in it defined as I mentioned before.  I then create a CAN conversion session from frames to signals.  I then convert my LIN frames I read into CAN frames just using a for loop and some bundling of data.  Now after performing LIN reads I can have my CAN database do the conversion for me.

 

There are several limitations like it looks like I may have to pipe one frame at a time to the conversion session, since it only converts the newest frame with that ID, and since all my frames will have the same ID it will basically just convert one signal.  But doing this will allow me to be able to be able to define the interface using the database editor, things like bit location, scale offset, and muxing value.  I am conserned that this will take more time to perform the scale than a manual conversion, but updating the conversion can be done using the database editor, instead of some new file format that I would have to come up with and support.

0 Kudos
Message 6 of 13
(8,058 Views)

when we are adding Multiplexed signals to XNET session, also  we need to add Multiplexer. Else XNET will gives an error.

 

Usually, I will read all Multiplexers from DBC & I will add this signals to Session. After Data conversion I will remove those indexes.

Munna
0 Kudos
Message 7 of 13
(8,054 Views)

This is somewhat on topic and off. I recently ran into a CAN bus issue where the signal was defined as a 64bit. In NI's db viewer the signal came up with a tiny "x" in the icon which indicated a problem and was not callable from LV. The other engineers claim it works just fine on their system (CANalyzer etc).

 

Any ideas on the implementation that NI uses/adhere's to?

 

I'm also looking at the possibility of having to maintain another database to support LV....sigh.

0 Kudos
Message 8 of 13
(7,665 Views)

That's interesting. Do you think you could post a few screenshots of it in Database Editor?

Daniel C.
Applications Engineer
National Instruments
0 Kudos
Message 9 of 13
(7,649 Views)

I've had to trim out pertinent details and just copied the signals & frames from the dbc file into Notepad.

 

The other engineers use CANalyzer without issues.

 

0 Kudos
Message 10 of 13
(7,632 Views)