Bridging an SA between CAN networks

Discuss issues and ideas you have to configuring displays with PowerVision
andymartyn
Posts: 25
Joined: Wed Oct 29, 2014 4:51 am

Bridging an SA between CAN networks

Post by andymartyn » Tue Apr 14, 2015 5:46 am

Using a PV780

The design of the system currently is that the engine and transmission are on CAN2 and a diagnostic connector is on CAN1. Obviously the communication between the two doesn't work...

So I have been asked about forwarding all traffic from a source address across the networks. I know I can use tranmit to do this for specific variables but this is more significant (and I don't know if I know all of the possible messages). Is it something that can do done in a configuration?

Basically: All messages from Engine (0x00) or Transmission (0x03) that I receive on CAN2, send onto CAN1
All messages on CAN1 that has a destination of Engine or Transmission forward onto CAN2

Thanks
Andy
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Bridging an SA between CAN networks

Post by stalley » Tue Apr 14, 2015 8:40 am

Hello Andy,

Interesting problem to solve! You should be able to do this with your configuration. These are some aspects to consider as you develop your configuration with this feature:
  • There is a limitation in PowerVision Configuration Studio 2.7, displays can not transmit the standard DM1s. To be able to forward fault codes, you will need to use some other PGN other than the PGN 65226. This will be available in the 2.8 version of the tool.
  • If the display will receive the same parameter from different sources, you will want to be sure you are using different variables and you will need have logic in the config to decide which one to forward.
As you say, if you know all the messages/parameters, you can map the received parameters to the transmit devices.

If you don't know all of the messages/parameters, we think you can process the J1939 messages in scripting, but no one has tried it here. In theory, it should work ;)

Let us know if we can help.
Sara Talley
Software Engineer
Enovation Controls
andymartyn
Posts: 25
Joined: Wed Oct 29, 2014 4:51 am

Re: Bridging an SA between CAN networks

Post by andymartyn » Wed Apr 15, 2015 2:56 am

Thanks for the information. I have attempted to forward some of the information through the display but the shift selector and the engine are still not communicating successfully. I got a log from the engineers in the field and it appears that the transmit device in the PV780 changes the source address of everything it sends to F2 and removes the destination

This means that potentially the shift controller isn't reading the CAN messages properly.

Is this where I need to go into scripting (or freeform CAN), create the message as a copy and create a periodic timer in order to get it to be an exact match or is there an easier way?

It would be easier if it was all on the same CAN bus but that's unfortunately not how it was designed. We can't bridge the CANs to form one because then the PDMs will clash

When is the 2.8 version expected for release?

Regarding forwarding of everything from a particular SA, you say that scripting should be able to do it. Have you any information to at least point me in the right direction as to how you would do this?

Thanks,
Andy
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Bridging an SA between CAN networks

Post by stalley » Wed Apr 15, 2015 9:15 am

Hello Andy,

They have tried to keep the J1939 CAN module as close to the J1939 specification as possible, so without manipulating the 29-bit identifier to "spoof" the network, messages from the display will have the display's source address. The destination address is a little different, especially using the transmit device. I would think the PGN bytes in the transmitted message would be what you have them in the Library\J1939/NMEA Parameters. I'm guessing though.

Unfortunately the best examples we have are the demos with scripting J1939 messages. There is a topic about using the CANMessageBuffer object here viewtopic.php?f=7&t=1068&start=0 some of the information at the end of the topic might help. There are a couple of very simple example configs at that topic, but I have attached a zip here with a group of examples. None of them have exactly what you need, but you might be able to pick through to get some ideas and syntax of what needs to be done in your script.

Reviewing the J1939 specifications, J1939-71 and J1939-21 might help. I know, nobody actually reads the manuals ;)
DEMO - CANMessageTxRx.zip
(2 MiB) Downloaded 39 times
We use and have tested receive and send messages using scripts. You are trying to do something a little different, to forward received messages. In the demo config about the different message types, there is an example using a "raw" type. This is most likely what you will need to use so that you can retain all of the 29-bit identifier for the transmit.

We will be glad to help when we can.
Sara Talley
Software Engineer
Enovation Controls
andymartyn
Posts: 25
Joined: Wed Oct 29, 2014 4:51 am

Re: Bridging an SA between CAN networks

Post by andymartyn » Thu Apr 16, 2015 4:11 am

Thanks for the configurations. It has raised some more questions for me as there are techniques used in here that I haven't seen before and I don't understand so some clartification would be good.

First off there in "Receive J1939 Multipacket Message" there is a script that takes a parameter. I have never seen this before so wasn't sure if this is something unique to the free form message section? When I tried in my code to create an event based on Complete Event it didn't create similar so does this mean there is more manual work necessary to handle?

The free form data messages also seem to be catered towards specific PGNs. There is something there i see about a mask but not sure what that was for and can you set it such that every message from a particular source address is handled in one place. I still cannot see a way to do this and if I could have a way to receive all from one source then it should be straight-forward to take that buffer and just send to the other CAN channel

Or out of interest if you wanted to receive the same PGN from multiple sources or to sent the same message to different destinations is this something that these free form can support? At the moment I need to create one message per SA and just curious as to what is possible

I have looked through the J1939 standards
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Bridging an SA between CAN networks

Post by stalley » Fri Apr 17, 2015 10:24 am

Hi Andy,

The Complete Event on the Free Form Data Messages is the only one that will take a parameter. Actually there might be some Blue Tooth, but we don't care about that here :) PowerVision Configuration Studio will add the () automatically there if the Message Type is Raw Binary Message. The parameter type can only be the CANMessageBuffer, just like the example. If you do what is in the example, it should work for you.

On the Free Form Numeric Messages when you select Enable Filters, filters on the message data, not what you need.

On the Free Form Data Messages, the PGN Mask, might work. I put all zeros in the PGN Mask in the example config, "Receive J1939 Multipacket Message", I sent three different PGNs, slowly so that I could see them, and I saw data from all three, eight bytes at a time. The consequence is that your script will get overwhelmed by ALL of the messages. Maybe you can work out a filter scheme to distribute the load though.
Sara Talley
Software Engineer
Enovation Controls