Sending J1939 messages

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

Sending J1939 messages

Post by andymartyn » Wed Jan 07, 2015 1:17 am

Regarding sending the J1939 response there is very little data in the user guides on how you do this. Creating a freeform appears more to be like defining a single global message, would this be a fair assessement and scripting is a very manual approach and the documentation on how it works is inadequate (I have used the example from the forums but wasn't exactly sure what the CANMessageInfo is actually for)

Using Canalyzer I would define a J1939 message and set up fields, create the message and set fields as needed, is there nothing similar in PowerVision?

For example I am receiving an EEC1 message on CAN2 and need to forward this onto a gauge on CAN1 and I can do this using a script but it seems to need to build up the buffer manually. There is freeform but EEC is already defined as a message in the J1939 parameter group so is this duplication the only way?

Also I need to send a message to a number of grayhill switches (3 off) to let them know how to flash and to do this I need to change the PGN to change the target for the message but the message is the same for each of the switches. I couldn't see a way to pass a parameter into a script to say which source I want to use in order to have a general function and didn't want to duplicate 3 scripts or freeform if necessary. What is the normal way to do this?

Thanks and I hope I make sense!
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Sending J1939 messages

Post by stalley » Thu Jan 08, 2015 12:29 pm

Hello andymartyn,

About your question concerning receiving a parameter on CAN2 and forwarding to a PVCAN gauge on CAN1. You can use the Transmit device on the CAN1 by adding the parameter defined on your CAN2 device as the Selected Variable.

When you click on the + to add a parameter to the Transmit Device, you will see a list of possible parameters to pick which are located in the database. Pick one that is the parameter you will transmit. Ignore the J1939.Transmit... that precedes the name in the popup list, just look for the parameter you need, Engine Speed, for example. By default it will create a variable. Unselect the Auto Create. Now you can select the (Not Mapped - Disabled) link under the Selected Variable to find the parameter received on the device on the CAN2. That's it.

About your question concerning parameter passing to change the target for a message. You can add a global variable and use it as an indicator to control which switch you want to send a message to and based on the indicator you will know what source you need to use. Somewhere, you will need to set the indicator.

Hope this helps.
Sara Talley
Software Engineer
Enovation Controls
andymartyn
Posts: 25
Joined: Wed Oct 29, 2014 4:51 am

Re: Sending J1939 messages

Post by andymartyn » Fri Jan 09, 2015 10:42 am

Thanks for the reply. I wasn't sure what the Transmit was so this is is useful information. How often are messages sent on the transmit device?
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Sending J1939 messages

Post by stalley » Thu Jan 15, 2015 9:12 am

Hi andymartyn,

I apologize, I didn't read all of your post and respond earlier to your question about the transmit rate.

The transmit rate will be the rate that you set in the database where the PGN is specified.

Thanks for an important question.
Sara Talley
Software Engineer
Enovation Controls