I was hoping someone on the forums could help guide me or point me to an example configuration that shows how to set up custom CAN messaging. We would like to include TSC1 controls on a PV480, currently using PowerVision 2.7 (OEM)
This is the message parameters:
A more complete explanation of this message can be found here, page 16:
http://www.tibban.com/Parts_and_Manuals ... er11-3.pdf
I've added it to the library, referencing the built in PGN 61444 for some of the parameter values.
My question from here is, now that this is present in the library how do I go about setting up a script to call these messages.
I see the SendCANMessage function and how to use the CANMessageBuffer/CANMessageInfo objects in the function reference but it's not very clear how to link what's in the library to the script.
Thanks,
Broadcasting CAN messaging
- cconner_aie
- Posts: 93
- Joined: Thu Jun 11, 2015 10:12 am
Broadcasting CAN messaging
Coleby Conner
Controls Engineer, Anderson Industrial Engines
Controls Engineer, Anderson Industrial Engines
- stalley
- Enovation Controls Development
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: Broadcasting CAN messaging
Hello cconner_aie,
There are two ways to transmit messages from a display, on the Connections tab you will see a Transmit Device under each of the CANPorts. The other way is to use a Free Form Numeric Message.
The Transmit Device is easy to set up since you have put the definition of the PGN in the Parameter Library. Now you just need to add the parameters you need to the J1939 Mapped Variables to the Transmit Device. The TSC1 message will always be transmitted at the rate you have specified in the Library when you set it up. You need to remove the Fast Packet checkbox, though, it isn't needed since the PGN has only eight bytes of data and the TSC1 is not an NMEA message.
The Free Form Numeric Message requires that you define the parameters on the Variable Packing panel that is shown when you add the Numeric Message. After you have the message data defined here, you will then use the J1939-> Tx Ext Free Form action or the SendCANMessage function to transmit the message.
Either way you choose to transmit the message, you will need to calculate the values to be transmitted.
There are two ways to transmit messages from a display, on the Connections tab you will see a Transmit Device under each of the CANPorts. The other way is to use a Free Form Numeric Message.
The Transmit Device is easy to set up since you have put the definition of the PGN in the Parameter Library. Now you just need to add the parameters you need to the J1939 Mapped Variables to the Transmit Device. The TSC1 message will always be transmitted at the rate you have specified in the Library when you set it up. You need to remove the Fast Packet checkbox, though, it isn't needed since the PGN has only eight bytes of data and the TSC1 is not an NMEA message.
The Free Form Numeric Message requires that you define the parameters on the Variable Packing panel that is shown when you add the Numeric Message. After you have the message data defined here, you will then use the J1939-> Tx Ext Free Form action or the SendCANMessage function to transmit the message.
Either way you choose to transmit the message, you will need to calculate the values to be transmitted.
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls
- cconner_aie
- Posts: 93
- Joined: Thu Jun 11, 2015 10:12 am
Re: Broadcasting CAN messaging
Thank you,
I've removed the fast packet check box.
So if I understand you right this is all I would need to make it available in programming?
Where then will I have access to these objects?
I looked in the J1939 Port Manager Action Builder but it appears to only look for the items set up under the DM Memory Mapping.
I'm not sure how to reference them in the Scripting side (which I would prefer), if you could provide a snippet or point me to any documentation I'd greatly appreciate it.
Thanks!
I've removed the fast packet check box.
So if I understand you right this is all I would need to make it available in programming?
Where then will I have access to these objects?
I looked in the J1939 Port Manager Action Builder but it appears to only look for the items set up under the DM Memory Mapping.
I'm not sure how to reference them in the Scripting side (which I would prefer), if you could provide a snippet or point me to any documentation I'd greatly appreciate it.
Thanks!
Coleby Conner
Controls Engineer, Anderson Industrial Engines
Controls Engineer, Anderson Industrial Engines
- stalley
- Enovation Controls Development
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: Broadcasting CAN messaging
Hello cconner_aie,
In the Programming Items, you can use the magnifying glass to search for the variables you created on the Transmit Device, if they are not in the J1939 Port Manager group.
I will address the scripting approach since you have mentioned that is what you prefer. Did you create a script with the IncreaseTSCThrottle event you show in the picture? To access variables, the object is VariableIDs.J1939_Transmit.speed_eng_req, for example. I would assume you would read, perform some calculation and then write.
If you put a recurring timer on the IncreaseTSCThrottle event, your calculation will be performed to update the transmitted value. You don't need to use the TX Ext Free Form if you are using the Transmit Device.
In the Murphy Standard PV450 and PV780 configurations included in PowerVision Configuration Studio, there are scripts you can use as general examples for accessing the database variables. In a script, you can use the Function Reference to see what objects are available.
In the Programming Items, you can use the magnifying glass to search for the variables you created on the Transmit Device, if they are not in the J1939 Port Manager group.
I will address the scripting approach since you have mentioned that is what you prefer. Did you create a script with the IncreaseTSCThrottle event you show in the picture? To access variables, the object is VariableIDs.J1939_Transmit.speed_eng_req, for example. I would assume you would read, perform some calculation and then write.
If you put a recurring timer on the IncreaseTSCThrottle event, your calculation will be performed to update the transmitted value. You don't need to use the TX Ext Free Form if you are using the Transmit Device.
In the Murphy Standard PV450 and PV780 configurations included in PowerVision Configuration Studio, there are scripts you can use as general examples for accessing the database variables. In a script, you can use the Function Reference to see what objects are available.
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls
- cconner_aie
- Posts: 93
- Joined: Thu Jun 11, 2015 10:12 am
Re: Broadcasting CAN messaging
Thank you Sarah,
This has been very helpful and is just what I needed to get this configuration started.
One last question, I've seen in the examples that they have a separate folder under programming items as shown below.
I've looked all over but can't figure out how to create a new programming item, this would be helpful in organizing items.
----------------------------------------------------------------------------------------------------------------------
Edit: I've figured it out, by creating something (a variable for example) and renaming the group it creates a new group. Figured I'd leave this here just in case any one comes across it and finds it useful.
Thanks!
This has been very helpful and is just what I needed to get this configuration started.
One last question, I've seen in the examples that they have a separate folder under programming items as shown below.
I've looked all over but can't figure out how to create a new programming item, this would be helpful in organizing items.
----------------------------------------------------------------------------------------------------------------------
Edit: I've figured it out, by creating something (a variable for example) and renaming the group it creates a new group. Figured I'd leave this here just in case any one comes across it and finds it useful.
Thanks!
Coleby Conner
Controls Engineer, Anderson Industrial Engines
Controls Engineer, Anderson Industrial Engines