0:04
Good morning everyone, thanks for joining on this webinar about adding a J1939 encoder to a Horner PLC.
0:13
The presentation is roughly about 12 minutes but if you have any questions you can pop them in and we’ll get to them at the end. Hello and welcome to today’s webinar.
0:21
Today we will look at how to add a J1939 encoder to a Horner PLC. Let’s look at our agenda for today.
0:30
We will start by reviewing Horner all-in-one controllers that feature J1939 functionality.
0:37
We will then define what J1939 is and look at some sample applications for J1939.
0:44
There will be demonstrations throughout and we will finish with the Q &A session.
0:48
First, we will look at the Horner products that support J1939 communications. Horner Automation specializes in all-in-one controllers.
0:58
These all-in-one controllers are similar to a PLC, with the logic CPU and the I.O.
1:04
system of a PLC, but also have extra built-in components, such as a built-in HMI, industrial ethernet protocols, and fieldbus support in the form of CAN. Many of the models on the CAN port support J1939.
1:19
You can program a Horner all-in-one controller in the same way as a PLC using the free software There are several I.O. options available with Horner all-in-one controllers.
1:32
The Prime and Canvas series, which are the two most popular Horner product lines that support J1939 to date, have built-in I.O. options ranging from no built-in I.O. to 22 to 42 I.O.
1:45
points with plenty of digital and analog options, supporting a variety of different signal types.
1:51
Next, we will look at the specific models that support J1939.
1:56
The entry-level or least expensive units that support J1939 would be the XLT and the XLE.
2:03
These units are suitable for outdoor use as they have a good temperature range and sunlight viewable screens.
2:10
These models can be ordered with the J1939 factory option.
2:15
With the Prime series, there are two different options for J1939 functionality.
2:20
The XL4′, the XL6′ and the XLW’ will support J1939 if you order the Factory option.
2:29
The XL7′, the XL10′ and the XL15′ can support J1939 through a second CAN port built into the unit.
2:39
With the CANVA series, all models feature native J1939 support, So Horner offers plenty of options for J1939 support, regardless of what screen size or IO options you choose for your application.
2:54
Now we will look at J1939 in more detail.
2:58
J1939 is a set of standards that define how the engine control units communicate via the controller area network bus, primarily in heavy duty vehicles.
3:08
So, J1939 is applicable anywhere with an engine, whether this is an internal combustion or diesel engine.
3:16
Most vehicles today use the CAN network along with the ECU for communication and J1939 protocols are used in a variety of vehicle applications.
3:27
Most vehicles today use the CAN network along with the ECU for communication and J1939 protocols are used in a variety of vehicle applications.
3:37
It is important to note that the CAN protocol only provides a basis for this communication in most heavy-duty vehicles and not a language for conversation.
3:47
The language is the SAE J1939 standard defined by the Society of Automotive Engineers.
3:54
This provides a higher layer protocol based on the CAN network as the physical layer.
3:59
So similar to how CANopen is a higher layer protocol that’s primarily used in factory automation, J1939 is another higher layer protocol built on the same CAN chip that provides all the infrastructure for everything and allows the communications to occur on the vehicle.
4:17
J1939 is one standard across heavy duty vehicles.
4:21
In other words, J1939 offers a standard method of communication across engine control units or common language across manufacturers.
4:31
We will note that there are some OEM specific tags within this protocol.
4:35
For example, with J1939 there is a lot of standardized data and a lot of PGNs which are standardized across multiple manufacturers.
4:45
However, there is also a lot of proprietary information that’s only accessible if you know the PGN location and not all manufacturers will this data.
4:55
So there is a mixture of standardized type data accessible from standard addresses, as well as some proprietary information that not all manufacturers share.
5:05
Now let’s look at some applications for J1939.
5:09
As previously mentioned, J1939 is most commonly used in heavy duty vehicles such as trucks and buses.
5:16
However, there are also several other industries where this protocol is used, including forestry machinery, mining vehicles, military vehicles, agriculture, construction and fire and rescue.
5:30
J1939 also has other uses such as in electrical powered vehicles and power generation.
5:37
Horner offers one of the few PLCs that supports J1939 as one of our native CAN protocols which can be useful in all of these areas.
5:46
Before we look at the configuration of the Horner all-in-one controller for talking to the encoder over J1939, we will briefly look at some of the key pieces of information from the datasheet of the Wachendorf encoder we will be using in the demonstration.
6:02
We have highlighted this information as seen.
6:05
This encoder works by broadcasting position data every 50 milliseconds by default, and from a J1939 ECU address of A-hex, which is 10-decimal, and is addressed identifying with a PGN of FF00-hex, which is 65-80-decimal.
6:24
With this information, we will now look at how to configure the Horner All-in-One Controller for J1939 in C-SCAPE10. C-SCAPE10 software can be used to configure every aspect of the application.
6:37
For this demonstration, we have designed this screen for use with the XL7′ 7-inch HMI Plus PLC.
6:45
The screen shows some status information for J1939, along with three pieces of information that we are monitoring over the network.
6:54
As well as the encoder, we also have an engine control module, so we’re monitoring engine RPM and the coolant temperature here on the screen.
7:03
Then, we are also monitoring the encoder position as a double integer.
7:07
Now let’s look at how we configured our Horner controller to receive this data.
7:12
To do this, we will select Hardware Configuration from the Ribbon toolbar.
7:16
Under Device Type, we have our XL7 Prime controller selected.
7:21
Then under Network Ports, we have both of the XL7 Prime’s CAN ports listed, and we’ve configured the second CAN port for J1939.
7:30
On the overall network configuration level, we have configured the baud rate for J1939 on the controller as 500k.
7:39
We have also enabled extended PGN mode, allowing us to map up to 32 pieces of PGN data coming from various peripherals on the J1939 network.
7:50
Usually most of the data is coming from the engine control module. We also have some data coming from the encoder.
7:56
So when we enable this button here, we get a list of array variable data, such as the status information that we can use to monitor communication on the J1939 network.
8:08
There is also the start scan bit, which we will need to turn on in order to start scanning or monitoring J1939 and extract the data.
8:17
So this is the overall configuration for our J1939 encoder.
8:22
Next we have the configuration for the data we want to receive.
8:25
On our HMI screen, we have an engine temperature PGN that we’re monitoring.
8:30
This is coming from the engine controller module, and in most cases this will have a source address of 0.
8:37
We also have the amount of engine temperature data we are receiving, which is 8 bytes, and is coming into a variable we have created and assigned called PGN65262.
8:49
This is a 16-bit type arrayed variable, which takes these 8 bytes and copies them into four words from array element zero through array element three.
8:58
Our next PGM is receiving RPM data.
9:02
Once again, we have the PGM number coming from the engine control module source address zero.
9:07
The amount of data is still eight bytes, and we have assigned another variable where the data is copied into.
9:14
Under receive mode, there is an option for all of our PGMs to be in monitor mode, where the data is automatically being broadcast, and we can pick it off the network without requesting it, or request mode.
9:27
For all three of our PGNs, we have set this to monitor mode.
9:31
Our third PGN is for the encoder position, which we configured for interfacing with the encoder.
9:37
We will note that for this PGN, our source address is not 0, like our other two PGNs.
9:43
Instead, it has a source address of A-hex, or 10.
9:47
We are also receiving 5 bytes of data instead of 8.
9:50
Similar to before, we have created a different variable to pull this data into a variable array, so this encoder position data is now coming into these words as a part of this variable array.
10:02
Finally, we will display these bytes that are coming in through J1939 from that variable array into a 32-bit variable through our program variable table.
10:13
To do this, we will navigate to our program variable table, and we will scroll down to the end of the global variable list and select the integer base variable where we are pulling in the 5 bytes of data.
10:25
We have done this using direct mapping.
10:27
So we have mapped the forwards coming into a fixed register variable of R1001 through R1004.
10:35
And then this double integer variable is also mapped, starting at R1001.
10:40
Because this variable is a double integer, the contents of R1001 and R1002 will also be copied into this variable, and this will equal to those first 4 bytes, which is the position data.
10:54
We will note that Horner all-in-one controllers have about 50 ,000 available registers, which normally you don’t have to worry about in regards to variable mapping, as this happens in the background.
11:06
But occasionally, if you need to send data out over Modbus, or something similar such as our mapping trick here, then we will use registers.
11:15
So now we have set up our variable to receive the data, and to display the data on our screen, we have a data object here that we have configured.
11:24
We have also mapped this variable here as the variable which is the source of the data to display on the screen.
11:30
This is 32-bit decimal data.
11:32
This is not signed decimal data because the data is coming in without a sign.
11:38
We are using all the digits and then we have assigned a legend that says encoder position.
11:43
So this is how we have configured our data object.
11:47
So this is an example of how you can use the Horner all-in-one controllers over J1939 and with a device like the Wachendorf J1939 encoder.
11:57
That concludes our webinar for today.
12:00
Thank you so much for listening and the Q &A session will begin shortly.
12:11
Okay, so that is our final one for the year before Christmas and it will be the 16th of January when we’re back on again a webinar on controlling a VFD using Modbus RTU.
12:23
The registration should be up for that if you do want to get to that back in January.
12:29
I’ve not seen any questions in on this topic, so I think we can leave it there.
12:35Thank you all for joining us. Have a good day.