Beijer - FreeCAN Built-In
Beijer - FreeCAN Built-In
Introduction
This manual describes how to configure and set up the FreeCAN driver and the tag addresses in
the panel and how to connect the CAN network. This driver is for X2 Extreme panels only.
FreeCAN built-in The FreeCAN driver reads and collects CAN telegrams in a receive list and writes CAN telegrams
to the CAN bus on demand.
Introduction
Please ensure that you always have the latest operating system image in use on the panel.
Release Notes
Disclaimer Additional to normal address commands the FreeCAN driver can be used with an import module,
Limitations which imports tags from an Excel sheet and transfers them to the designer tag list. Using the
Firmware Update Excel sheet has the advantage of a single source which contains all variables and that every bit
[+] Connecting To The Can Network of a tag can be assigned to a bit of the CAN bus data. By importing this list, a “taglist.lst” file is
created, which is downloaded automatically to the panel on project download.
[+] Settings
[+] Addressing The panel hardware supports CAN Specification Version 2.0B. The physical layer supports the
[+] Import Module standard ISO11898-2:2016 and SAE J2284-1 to SAE J2284-5 (High Speed CAN).
Efficient Communication
[+] Troubleshooting The FreeCAN driver supports:
- CAN (11 and 29 bit header)
[+] Additional Information
- J1939
Bus State - NMEA 2000
Bus Load - CANopen slaves
Baudrate State
Firmware Version
Firmware Status
Receive List Count
Read Variable
Read Variable With Timeo…
Read J1939 Pgn
Read DM1 Message
Write Full Telegram
Write Telegram Cyclic
Detect J1939 Station
Examples
J1939 Example
NMEA2000 Example
Extending The Can Receive …
Start And Stop Of Cyclic Wr…
Rtr Telegrams Send And Re…
For information about the connected CAN devices we refer to the manual for that devices.
Release Notes
Version Release Description
Help files updated for X2 pro panels.
5.04.00 April 2019
Firmware V1.0.0.6 included.
Support for more PROT14 tags and improved import for this tags.
5.03.00 February 2019
Firmware V1.0.0.6 included.
Help files updated for X2 pro panel support.
5.02.00 October 2018
Firmware V1.0.0.5 included.
First version for release.
5.01.00 February 2018
Firmware V1.0.0.5 included.
Disclaimer
Please note that changes in the controller protocol or hardware, which may interfere with the
functionality of this driver, may have occurred since this documentation was created. Therefore,
always test and verify the functionality of the application. To accommodate developments in the
controller protocol and hardware, drivers are continuously updated. Accordingly, always ensure
that the latest driver is used in the application.
Limitations
1 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
• The maximal hold of the receive list is 3500 entries, so 3500 different CAN IDs can be hold.
• The maximum Excel length is 5000 tags.
• No LEDs available at the CAN interfaces.
• The 10 kBaud rate is not available. Lowest supported baudrate is 20 kBaud.
• The 800 kBaud rate is not available. Instead 750 kBaud are available.
• It is recommended to not use 1 MBaud on X2 Pro panels.
FreeCAN built-in • When this FreeCAN Built-in driver is in use then no other CAN Built-in driver
(like CANopen Built-in) can be used at the same time.
Introduction • This panels have no internal CAN support and CAN Built-in drivers cannot be used:
Release Notes X2 base, X2 pro 4 - B2, X2 pro 7 - B2, X2 marine 7 - B2
Disclaimer • The maximum number of supported PROT14 tags is 100 (using firmware V1.0.0.5 and older)
Limitations or 150 (using firmware V1.0.0.6 and newer).
Firmware Update
[+] Connecting To The Can Network
[+] Settings
[+] Addressing Firmware Update
[+] Import Module
Efficient Communication The FreeCAN driver uses a firmware which is, if necessary, updated automatically by the driver
[+] Troubleshooting during boot of the HMI project.
[+] Additional Information
If it is necessary to prevent the driver to update the module firmware this can be done by
Bus State copying a file named "nofirmwareload.txt" to the sub folder "project files" in the main project
Bus Load folder.
Baudrate State
Firmware Version Note:
Firmware Status It is always recommended to let the driver update the firmware.
Receive List Count Note:
Read Variable If you get communication errors after a firmware update, please reset your panel by power
Read Variable With Timeo… disconnect.
Read J1939 Pgn
Read DM1 Message
Write Full Telegram
Write Telegram Cyclic
Detect J1939 Station
Connecting To The Can Network
Examples The CAN connection is of the type Point-to-Net (bus). The demands of CAN bus connections must
J1939 Example be fulfilled. Terminate the CAN bus on each end with 120 Ohm.
NMEA2000 Example
Extending The Can Receive … On X2 Extreme panels two CAN channels (1, 2) are available. Each CAN channel can be connected
to a different CAN bus.
Start And Stop Of Cyclic Wr…
Rtr Telegrams Send And Re…
Termination
On a CAN bus a termination of 120 Ohm is needed at each end of the bus. That means if this
panel is at one of this ends a termination is needed.
Galvanic isolation
X2 Extreme panels have this hardware configuration:
CAN cable
A typical CAN cable uses CAN_H, CAN_L and CAN_SHLD. For best results the data lines CAN_L and
CAN_H must be twisted. The shield CAN_SHLD must be connected to all CAN devices (CDs).
The CAN cable should be as short as possible. The ends of the cable must be terminated (T) with
120 Ohm. This can be a simple resistor at the end of the cable or it can be included in one of the
CDs (here CD1).
In addition the CAN cable plugs can be connected to earth directly.
2 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
FreeCAN built-in
Introduction
Release Notes
Disclaimer
Limitations
Firmware Update In some CANopen configurations other signals provided on the CAN connector (like CAN_GND) are
[+] Connecting To The Can Network used.
[+] Settings
[+] Addressing Note: Do not connect more than 32 nodes to one CAN cable without repeater.
[+] Import Module
Efficient Communication CAN cable length
[+] Troubleshooting
[+] Additional Information The maximum length of a CAN bus cable (without repeater) depends on the baudrate.
Bus State
Bus Load Baudrate [kBaud} Maximum length [m]
Baudrate State 1000 25
Firmware Version 750 50
Firmware Status 100, 125, 250, 500 100
Receive List Count 20 1000
Read Variable
Read Variable With Timeo…
Read J1939 Pgn Communication Ports
Read DM1 Message
Write Full Telegram The following communication ports are available. Splitter cables can be used to connect multiple
Write Telegram Cyclic serial interfaces simultaneously, please see chapter Cables.
Detect J1939 Station
Examples X2 pro 7 - B2 - 2eth
J1939 Example X2 pro 10 - B2
NMEA2000 Example X2 pro 12 - B2
Extending The Can Receive … X2 pro 15 - B2
Start And Stop Of Cyclic Wr… X2 marine 7 - B2 HB
Rtr Telegrams Send And Re…
X2 marine 7 - B2 SC
X2 marine 15 - B2
X2 control 4 - B2
X2 control 7 - B2
BoX2 pro
BoX2 pro SC
X2 pro 21 - B2
X2 marine 7 - B2 HB SC
X2 marine 15 - B2 HB
X2 marine 15 - B2 SC
X2 marine 15 - B2 HB SC
X2 control 10 - B2
X2 control 12 - B2
X2 control 15 - B2
3 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
2 RS232 RX - -
Introduction
3 RS232 TX - -
Release Notes
RS485 TX+/RX+,
Disclaimer 4 - RS422 RX+
CAN2-H
Limitations
Firmware Update 5 GND GND GND
[+] Connecting To The Can Network RS422 TX-, RS485 TX-/RX-,
6 - -
[+] Settings CAN1-L
[+] Addressing 7 RS232 RTS - -
[+] Import Module 8 RS232 CTS - -
Efficient Communication RS485 TX-/RX-,
9 - RS422 RX-
[+] Troubleshooting CAN2-L
[+] Additional Information
Bus State
X2 Extreme
Bus Load
Baudrate State
Female DB-9 COM1
Firmware Version Pin COM2 signal COM3 signal
COM A signal
Firmware Status
RS422 TX+, RS485 TX+/RX+,
Receive List Count 1 - -
CAN1-H
Read Variable
2 RS232 RX - -
Read Variable With Timeo…
Read J1939 Pgn 3 RS232 TX - -
Read DM1 Message RS485 TX+/RX+,
4 - RS422 RX+
Write Full Telegram CAN2-H
Write Telegram Cyclic 5 GND GND GND
Detect J1939 Station RS422 TX-, RS485 TX-/RX-,
6 - -
Examples CAN1-L
J1939 Example 7 RS232 RTS - -
NMEA2000 Example 8 RS232 CTS - -
Extending The Can Receive …
RS485 TX-/RX-,
Start And Stop Of Cyclic Wr… 9 - RS422 RX-
CAN2-L
Rtr Telegrams Send And Re…
X2 Extreme HP
X2 Extreme SL HP
4 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
CAB150
5 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
FreeCAN built-in
Introduction
Release Notes
Disclaimer
Limitations
Firmware Update
[+] Connecting To The Can Network
[+] Settings
[+] Addressing
[+] Import Module
Efficient Communication
[+] Troubleshooting
[+] Additional Information
Bus State
Bus Load
Baudrate State
Firmware Version
Firmware Status
Receive List Count
Read Variable
Read Variable With Timeo…
Read J1939 Pgn
Read DM1 Message
Write Full Telegram
Write Telegram Cyclic
Detect J1939 Station
Examples
J1939 Example
NMEA2000 Example
Extending The Can Receive …
Start And Stop Of Cyclic Wr…
Rtr Telegrams Send And Re…
Settings
Parameter Description
Selects the baudrate to use for each CAN channel [kBaud]:
1000, 750, 500, 250, 125, 100, 20.
Default: 125 kBaud
Baudrate CAN x
Note:
It is recommended to not use 1 MBaud on X2 Pro panels.
If 1 MBaud is needed please use an X2 Extreme panel.
The CAN node number of the HMI panel. Range 1..127. Used for the
CAN station
protocols J1939, NMEA 2000 and CANopen.
address
Default: 1
Selects the CAN channels for free baudrate setting.
1=CAN1, 2=CAN2.
Free baudrate
Add the numbers to activate free baudrate setting for both channels e.g.
channels 1+2
3 selects CAN1 and CAN2.
Default: 0 (free baudrate is off, pre-set baudrates are used)
6 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
Note:
Please check your settings after every update.
Addressing
There are 3 types of addresses:
Basic Signals
These commands are used to show basic CAN bus information like the CAN bus state. The
corresponding command must be connected to a tag in the designer. Therefore the command
must be written to the column of the FreeCAN controller in the Tags folder.
Bus state
Bus load
Baudrate state
Firmware version
7 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
Module status
FreeCAN built-in
Non-Taglist Addresses
Introduction
This commands include all necessary CAN specific information like CAN ID and channel. So they
Release Notes can be used without having a taglist loaded to the CAN module. The corresponding command
Disclaimer must be connected to a tag in the designer. Therefore the command must be written to the
Limitations column of the FreeCAN controller in the Tags folder.
Firmware Update
Read variable
[+] Connecting To The Can Network
[+] Settings Read variable with timeout
[+] Addressing
[+] Import Module Read J1939 PGN
Efficient Communication
Read DM1 Message
[+] Troubleshooting
[+] Additional Information Write full telegram
Bus State
Write telegram cyclic
Bus Load
Baudrate State Detect J1939 station
Firmware Version
Firmware Status
Receive List Count
Read Variable
Read Variable With Timeo…
Excel List Addresses
Read J1939 Pgn
Read DM1 Message It is possible to define all variables for reading and writing of CAN bus variables in an Excel
Write Full Telegram sheet. Using the Excel sheet gives you a perfect overview on your tags and helps you avoiding
Write Telegram Cyclic transfer errors. The FreeCAN import function allows to easily import these tags automatically to
Detect J1939 Station your project (please use your "/Project Files" folder). So this method is preferable to manually
addressing.
Examples
This chapter gives a short overview. More detailed information can be found in the chapter
J1939 Example Import module.
NMEA2000 Example
Extending The Can Receive … This picture shows the structure of the sheet. It is an example for the variable CAN1 which is
Start And Stop Of Cyclic Wr… represented by the first byte of the 8 CAN data bytes. In addition the CAN Identifier and the CAN
Rtr Telegrams Send And Re… channel are defined.
At the import all selected variables are translated automatically to an ILmn address and stored in
a taglist. The m specifies one of the types X, B, W and D, the n (range 0..65535) is a counter that
differs between the tags:
Example:
The imported tag from the Excel sheet (see example above) looks like this.
8 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
It was assigned automatically to ILD0. The Data Type is INT16 because byte variables are not
supported.
FreeCAN built-in
Introduction
Release Notes
Disclaimer
Limitations
Firmware Update
[+] Connecting To The Can Network
[+] Settings
Import Module
[+] Addressing
The FreeCAN driver supports the import of tags from an Excel sheet to the designer. The Excel
[+] Import Module sheet must have a defined format. Use the standard import mask in the designer and select the
Efficient Communication corresponding Excel sheet.
[+] Troubleshooting
[+] Additional Information
Bus State Excel Sheet Creation
Bus Load
It is recommended to start with an existing FreeCAN Excel sheet and adapt it to your needs.
Baudrate State If you want to build your own Excel sheet, you have to do this:
Firmware Version 1) Create a new Excel file (*.xls) in the folder "/Project files" of your project
Firmware Status 2) Fill row 1 with at least this data:
Receive List Count A: Tag Name (eg: mytag)
Read Variable C: CAN header ID (eg: 0x181)
E: CAN Channel (eg: 1)
Read Variable With Timeo…
O..BZ: active bits (eg: O=8,P=7,Q=6,R=5,S=4,T=3,U=2,V=1)
Read J1939 Pgn 3) Use a new row for every new tag and fill the columns as needed to get correct tag
Read DM1 Message functionality
Write Full Telegram 4) Save file (*.xls)
Write Telegram Cyclic 5) Save file as *.csv (MS-DOS format)
Detect J1939 Station Now the exported csv file can be imported by the drivers import module.
Examples
Restrictions:
J1939 Example
- Do not use returns (enter) or carriage return (CR) or linefeed (LF) in the datafields.
NMEA2000 Example - Do not use special characters (use characters from English character set only).
Extending The Can Receive … - Tag names must be unique and not longer than 80 characters. Do not use spaces.
Start And Stop Of Cyclic Wr…
Rtr Telegrams Send And Re…
9 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
• Note: the *.VALID tag is created for every tag with Timeout defined. The return value is
always true when a packet with the CAN ID of the tag was received within timeout. This
could have happened because another tag with same CAN ID has changed.
In detail this means that the *.VALID tag is showing the timeout of received CAN IDs. If
several tags use the same CAN ID it is not needed to use more than one *.VALID tag.
The second effect to notice is that this *.VALID tag does not show the change of tag values
it shows only that data was received independent on the content.
• Do not insert columns in the Excel Sheet else the import will not detect the predefined
columns.
If you want to add columns, do this starting from column CM. This columns are ignored at
the import.
• Remember not to use special characters or line feed.
• For a basic functionality this columns must be filled with values:
A (Tag Name), C (CAN Identifier), E (CAN Channel) and O-BZ (Data Mask).
All other columns are optional. If they are not specified then default values are used.
• The cyclic write starts after a value is written to it, then it runs cyclic. For an automatic
start in the project write a "script.init" function and write a value to the tag by e.g.
"Globals.Tags.MyTag.setAnalog(startvalue)"
• Adding a tag type (e.g. ".WORD") to the Tag Name (column A) will set the imported tag
type.
Valid types are:
".Bool" will set the tag type BOOL (1 bit)
".Byte" will set the tag type INT16 (signed 16 bits)
".Word" will set the tag type INT16 (signed 16 bits)
".UWord" will set the tag type UINT16 (unsigned 16 bits)
".DWord" will set the tag type INT32 (signed 32 bits)
".UDWord" will set the tag type UINT32 (unsigned 32 bits)
".Real" or ".Float" will set the tag type Float (unsigned 32 bits)
".String" will set the tag type String<4> (4 characters)
"" (empty string) will load the default type UINT32 (unsigned 32 bits)
10 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
FreeCAN built-in
Introduction
Release Notes
Disclaimer Column Name Description
Limitations O - BZ Byte0 Bit7 - Byte7 Bit0
Firmware Update
[+] Connecting To The Can Network
[+] Settings Here you can define the mapping of tag value bits to the CAN data bits.
[+] Addressing The 64 data bits of a CAN telegram can be freely mixed to bit, byte, word and double word
variables.
[+] Import Module
The bits in the Excel sheet are defined from left (MSB,Byte0,Bit7) to right (LSB Byte 7, Bit0). This
Efficient Communication is gathered in a mask, which is given to the driver as tag value.
[+] Troubleshooting Define the position of a bit tag by a 1 in one of the Data Mask columns. Define the position of a
[+] Additional Information byte tag by the numbers 1..8 in eight of the Data Mask columns. Define the position of a word
Bus State tag by the numbers 1..16 in sixteen of the Data Mask columns. Define the position of a double
Bus Load word tag by the numbers 1..32 in thirty two of the Data Mask columns. The number 1 is always
the least significant bit (LSB) in the tag.
Baudrate State
The zero (0) or an empty string makes the position unused, the data is not copied.
Firmware Version
Firmware Status On a write the unused data bit information is taken from the last received CAN telegram.
Receive List Count
Read Variable Beside this direct definition of the bit positions it is possible to force bits to be written as 0 or 1.
Read Variable With Timeo… This is done by writing 100 to force a bit to "0" and by 101 to force a bit to "1". (The values 0 and
Read J1939 Pgn 1 are already reserved as unused bit and first bit of a variable.) With this preset bits a
predefined write telegram can be built.
Read DM1 Message
The forced bits will not be shown in the tags on a read. To see them in the tag read, use
Write Full Telegram "PROT17" in column H (Protocol).
Write Telegram Cyclic
Detect J1939 Station In the following examples the data bytes are always shown in hexadecimal notation.
Examples
J1939 Example Examples
NMEA2000 Example
J1939 example
Extending The Can Receive …
Start And Stop Of Cyclic Wr… NMEA2000 example
Rtr Telegrams Send And Re…
Hint: Extending the CAN receive filter
Taglist Usage
The import of the Excel sheet into the designer creates the file taglist.lst. This taglist is a driver
specific reference file, connecting the driver tag names to the CAN bus data. At the download of
a project this list is automatically stored on the panel.
Make sure, that your Excel/CSV file is in the subdirectory "/Project Files" of your project and
that you have validated your project before the download. The new created file taglist.lst is
stored in the "/Project file" folder too!
Efficient Communication
The tags in the CAN controller should be consecutive. This means e.g. when 4 ILD tags are used
that they have the numbers ILD12, ILD13, ILD14 and ILD15. An example of tags that will cause
poor performance is ILD3, ILD12, ILD20 and ILD65.
Another possibility for optimization is the use of consecutive tags in the same screen of an
project. This is useful because tags are updated dependant on the screens.
Troubleshooting
11 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
Error Messages
The table shows some error messages from the controller which are created by the driver.
• Did you use any CR/LF (carriage return = new line) in the list?
This will destroy the CSV information. Delete all CR/LF.
• Check your CSV file after saving. The second line must be a legal tag!
• Did you use special characters like äöü? Delete them.
• Is your taglist.lst file marked as read-only?
Remove the read-only property.
• Did you use space " " in the name (column A)? A space will end the name input, do not use
it in a tag name.
For some kind of trouble it is useful to know the CAN telegrams on the CAN bus. The CAN
firmware allows to log the CAN telegrams. This feature can be used in cooperation with our
support team. Another possibility is the use of a third party CAN analyzer.
Additional Information
12 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
Bus State
Firmware Version
Firmware version - HV
Returns the firmware version as a 32 bit value.
Every byte corresponds to a part of the version number.
Firmware Status
Firmware status - YS
Gives back a list of important CAN firmware state information in an ASCII string. This can be used
for debugging. Please do not use it in fast projects, as the read takes time resources.
The read can be shorted by adding 2 numbers: YSm,n.
m is start number, n is end number.
13 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
The CID (CAN telegram ID) has a maximum of 29 bits for extended telegrams (default) and a
maximum of 11 bit for standard telegrams. In every case 32 bit values have to be written in
hexadecimal notation.
To force a standard 11 bit telegram, the value must be smaller than 800 (hex) and you must set
the highest bit of the 32 bit value.
Examples:
- 00001234 is CAN ID header 00001234 (hex) extended
- 80000234 is CAN ID header 00000234 (hex) standard
Examples:
K0 (or nothing) is channel 1, Motorola format and 8 bytes to read or write.
K3A is CAN channel 2, Intel format and 3 bytes to read or write.
M describes the position (m) and length (n) of the data mask (in hex notation).
m is the position of the mask in the 64 data bits. 0 is the most left bit, 3F is the most right bit.
n is the length in the mask 1-20 (hex), so it is 1 to 32 bits (double word).
Examples:
M0:8 is the most left data byte: FF,xx,xx,xx,xx,xx,xx,xx
M8:1 is the second data byte, highest bit: xx,8x,xx,xx,xx,xx,xx,xx
M3F:1 is the most right byte, lowest bit: xx,xx,xx,xx,xx,xx,xx,x1
Write:
Data will be shifted most right in the mask.
As values in the designer can only be double words (32 bit), the maximum data length is 32 (=20
14 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
hex) bits.
So writing “1” to M0:20 will set data: 00,00,00,01,xx,xx,xx,xx.
All other data in the telegram (shown as xx) are left unchanged.
M describes the position (m) and length (n) of the data mask (in hex notation)
m is the position of the mask in the 64 data bits. 0 is the most left bit, 3F is the most right bit.
n is the length in the mask 1-20 (hex), so it is 1 to 32 bits (double word).
Syntax: DM1[n]Kc
The range of n is 0..22 (decimal). For details see the table below.
The K parameter is optional. It specifies the channel. c has the range 1..2. If the K parameter is
missing then channel 1 used.
15 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
Example:
DM1[0] The number of valid bytes of the DM1 message received on interface CAN 1.
DM1[14]K1 Least significant 16 bits of the SPN of DTC 7 received on interface CAN 1.
DM1[22]K2 The source address of the DM1 message received on interface CAN 2.
FreeCAN built-in
Note:
Introduction This implementation can read DM1 messages with up to 10 DTCs included. Longer DM1 messages
Release Notes are ignored.
Disclaimer
Note:
Limitations Messages with more than 8 data bytes: only broadcast messages with PDU (Protocol Data Unit)
Firmware Update specific field set to global destination address (0xFF) are accepted.
[+] Connecting To The Can Network
[+] Settings Note:
[+] Addressing It is needed to include all parts DM1[0] to DM1[22] into the iX project.
This can be done by putting them all to the same page or by selecting "Always Active" in the tag
[+] Import Module
editor. The command DM1[0] should always be used to detect the correct number of valid bytes.
Efficient Communication The scripting can be used to extract parts of interest from a DM1 message and to put it to
[+] Troubleshooting another tag (e.g. DTC1_SPN or DTC1_FMI).
[+] Additional Information
Bus State
Bus Load
Baudrate State DM1 - Diagnostic Message 1
Firmware Version
Firmware Status Command Function Format
Receive List Count Number of valid data bytes in the DM1 message.
Read Variable Every of the following entries returns two data bytes.
Read Variable With Timeo… Example:
DM1[0] UINT16
If the number of valid bytes is 10 then the data can be read from the
Read J1939 Pgn
elements DM1[1] to DM1[5].
Read DM1 Message All following bytes are invalid.
Write Full Telegram
Lamp status
Write Telegram Cyclic Bit 1,0: Protect Lamp Status
Detect J1939 Station Bit 3,2: Amber Warning Lamp Status
Examples Bit 5,4: Red Stop Lamp Status
J1939 Example DM1[1] Bit 7,6: Malfunction Indicator Lamp UINT16
NMEA2000 Example Bit 9,8: Flash Protect Lamp
Bit 11,10: Flash Amber Warning Lamp
Extending The Can Receive …
Bit 13,12: Flash Red Stop Lamp
Start And Stop Of Cyclic Wr… Bit 15,14: Flash Malfunction Indicator Lamp
Rtr Telegrams Send And Re…
1st DTC
DM1[2] UINT16
Bit 15..0: Least significant 16 bits of the SPN
1st DTC
Bit 4..0: FMI
DM1[3] Bit 7..5: Most significant 3 bits of the SPN UINT16
Bit 14..8: Occurrence Count
Bit 15: SPN Conversion Method
2nd DTC
DM1[4] UINT16
Bit 15..0: Least significant 16 bits of the SPN
2nd DTC
Bit 4..0: FMI
DM1[5] Bit 7..5: Most significant 3 bits of the SPN UINT16
Bit 14..8: Occurrence Count
Bit 15: SPN Conversion Method
3rd DTC
DM1[6] UINT16
Bit 15..0: Least significant 16 bits of the SPN
3rd DTC
Bit 4..0: FMI
DM1[7] Bit 7..5: Most significant 3 bits of the SPN UINT16
Bit 14..8: Occurrence Count
Bit 15: SPN Conversion Method
4th DTC
DM1[8] UINT16
Bit 15..0: Least significant 16 bits of the SPN
4th DTC
Bit 4..0: FMI
DM1[9] Bit 7..5: Most significant 3 bits of the SPN UINT16
Bit 14..8: Occurrence Count
Bit 15: SPN Conversion Method
5th DTC
DM1[10] UINT16
Bit 15..0: Least significant 16 bits of the SPN
5th DTC
Bit 4..0: FMI
DM1[11] Bit 7..5: Most significant 3 bits of the SPN UINT16
Bit 14..8: Occurrence Count
Bit 15: SPN Conversion Method
16 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
6th DTC
DM1[12] UINT16
Bit 15..0: Least significant 16 bits of the SPN
6th DTC
Bit 4..0: FMI
DM1[13] Bit 7..5: Most significant 3 bits of the SPN UINT16
Bit 14..8: Occurrence Count
Bit 15: SPN Conversion Method
FreeCAN built-in
7th DTC
DM1[14] UINT16
Introduction Bit 15..0: Least significant 16 bits of the SPN
Release Notes 7th DTC
Disclaimer Bit 4..0: FMI
DM1[15] Bit 7..5: Most significant 3 bits of the SPN UINT16
Limitations
Bit 14..8: Occurrence Count
Firmware Update Bit 15: SPN Conversion Method
[+] Connecting To The Can Network
8th DTC
[+] Settings DM1[16] UINT16
Bit 15..0: Least significant 16 bits of the SPN
[+] Addressing
8th DTC
[+] Import Module Bit 4..0: FMI
Efficient Communication DM1[17] Bit 7..5: Most significant 3 bits of the SPN UINT16
[+] Troubleshooting Bit 14..8: Occurrence Count
[+] Additional Information Bit 15: SPN Conversion Method
Bus State 9th DTC
DM1[18] UINT16
Bus Load Bit 15..0: Least significant 16 bits of the SPN
Baudrate State 9th DTC
Firmware Version Bit 4..0: FMI
Firmware Status DM1[19] Bit 7..5: Most significant 3 bits of the SPN UINT16
Receive List Count Bit 14..8: Occurrence Count
Bit 15: SPN Conversion Method
Read Variable
Read Variable With Timeo… 10th DTC
DM1[20] UINT16
Bit 15..0: Least significant 16 bits of the SPN
Read J1939 Pgn
Read DM1 Message 10th DTC
Bit 4..0: FMI
Write Full Telegram
DM1[21] Bit 7..5: Most significant 3 bits of the SPN UINT16
Write Telegram Cyclic Bit 14..8: Occurrence Count
Detect J1939 Station Bit 15: SPN Conversion Method
Examples Source Address
J1939 Example DM1[22] This is the address of the sender of the DM1 message. UINT16
NMEA2000 Example This information can be used to ignore messages from certain sources.
Extending The Can Receive …
Start And Stop Of Cyclic Wr…
Rtr Telegrams Send And Re…
Write Full Telegram
x is A or B.
The CID (CAN telegram ID) has a maximum of 29 bits for extended telegrams (default) and a
maximum of 11 bit for standard telegrams. In every case 32 bit values have to be written in
hexadecimal notation.
To force a standard 11 bit telegram, the value must be smaller than 800 (hex) and you must set
the highest bit of the 32 bit value.
Example:
HRA18FEE000K1=11223344 and
HRB18FEE000K1=55667788
sends telegram on CAN1, ID 18FEE000 (hex): 1122334455667788 (hex)
Hint:
Force standard header (11 bit) by setting highest CAN ID bit.
CAN ID: Highest bit=0 -> extended header is send, e.g. 12345678 (hex)
CAN ID: Highest bit=1 -> standard header is send, e.g. 80000723 (hex)
Hint:
Send less than 8 data bytes: adding datacount to channel high nipple
HRB18FEE000K1 send 8 databytes
17 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
In J1939 telegrams the transmitting station is kept in the low 8 bits of the CAN ID header.
So HLI searches all received telegrams for this station number and returns if it was received
within the last n seconds. If n=0, then the total receive from this station is quoted that means it
returns 1 if a telegram with this station address was ever received.
Examples
"Tag1", Data definition: Byte 0, Bit 7, other bits unused.
CAN telegram data = 80,00,00,00,00,00,00,00 -> tag value = 1
CAN telegram data = 00,00,00,00,00,00,00,00 -> tag value = 0
"Tag2", Data definition: Byte 0, Bit 1; Byte 0, Bit 0, other bits unused.
CAN telegram data = 0F,00,00,00,00,00,00,00 -> tag value = 3
CAN telegram data = 0E,00,00,00,00,00,00,00 -> tag value = 2
CAN telegram data = F1,00,00,00,00,00,00,00 -> tag value = 1
CAN telegram data = FC,00,00,00,00,00,00,00 -> tag value = 0
18 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
J1939 Example
FreeCAN built-in Example for J1939, PGN F004 (hex), SPN 190 engine speed:
Introduction
Release Notes
Disclaimer
Limitations
Firmware Update
[+] Connecting To The Can Network
[+] Settings
[+] Addressing
[+] Import Module
CAN telegram data = FF,FF,FF,23,45,FF,FF,FF -> Value = 4523 (hex)
Efficient Communication This value should be multiplied by 0.125 in column K (gain) to get the correct speed in rpm.
[+] Troubleshooting The resulting value is 2212.375 rpm.
[+] Additional Information
Bus State
Bus Load
Baudrate State
Firmware Version
NMEA2000 Example
Firmware Status Example for NMEA2000, PGN F20E (hex), switch control for Bit 0, 1 of Byte 1:
Receive List Count
Read Variable Script for a write command on a Button1_Click() in the designer:
Read Variable With Timeo…
void Button1_Click(System.Object sender, System.EventArgs e)
Read J1939 Pgn
{
Read DM1 Message Globals.Tags.data_byte1_bit01.SetAnalog(0x01);
Write Full Telegram }
Write Telegram Cyclic
Detect J1939 Station
Examples
J1939 Example
On a write caused by Button1_Click() the bits at position 1 and 2 are written, all leading bits will
NMEA2000 Example be = 0, all other bits will be taken from the last telegram (or = 0 at start). Button1_Click will
Extending The Can Receive … write 00,01,XX,XX,XX,XX,XX,XX on CAN ID 0x19F20E00.
Start And Stop Of Cyclic Wr…
Rtr Telegrams Send And Re…
19 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
The definition of the CAN telegrams in the Excel sheet will lead to different tags in the designer.
The received data is passed to the correct tags.
FreeCAN built-in
Introduction
Release Notes Start And Stop Of Cyclic Writing
Disclaimer
Limitations The cyclic writing starts if a telegram with the specified CAN ID is written to a cyclic tag once. If
Firmware Update this value changes then the value which is written cyclic changes too.
A cyclic writing from the start of a project can be realized by including a write command into
[+] Connecting To The Can Network
the script of the start screen. This command can be called automatically or manually (see next
[+] Settings example).
[+] Addressing To stop cyclic writing a value followed by its inverted value must be written (for UINT16 tags).
[+] Import Module For the Data Types UINT32 and BYTE a similar formula must be used, see following example.
Efficient Communication
[+] Troubleshooting Example with 3 buttons on the start screen:
[+] Additional Information On the project start a value of 100 is written to the tag Can1 (Data Type UINT16) and the CAN
telegram is send frequently (as defined in the Excel sheet).
Bus State
Button1 stops the telegram sending.
Bus Load Button2 starts the telegram sending again.
Baudrate State
Firmware Version public partial class Screen1
Firmware Status {
Receive List Count static bool bFirstTime=true;
int val;
Read Variable
Read Variable With Timeo… void Screen1_Opened(System.Object sender, System.EventArgs e)
Read J1939 Pgn {
Read DM1 Message if (bFirstTime == true)
Write Full Telegram {
Write Telegram Cyclic //Send a telegram
Detect J1939 Station Globals.Tags.Can1.ResetTag();
Globals.Tags.Can1.SetAnalog(100); //set start Value
Examples
bFirstTime = false;
J1939 Example }
NMEA2000 Example }
Extending The Can Receive …
Start And Stop Of Cyclic Wr… //Can1 OFF
Rtr Telegrams Send And Re… void Button1_Click(System.Object sender, System.EventArgs e)
{
val=Globals.Tags.Can1.Value;
Globals.Tags.Can1.SetAnalog(val);
Globals.Tags.Can1.SetAnalog(val^0xFFFF); // 16 bit tag
//Globals.Tags.Can32_1.SetAnalog((val2&0xFFFF0000) | (0xFFFF&(val2^0xFFFF))); // 32 bit
tag
//Globals.Tags.Can8_1.SetAnalog(0xFF00 | (val3^0xFF)); // 8 bit tag
}
//Can1 ON
void Button2_Click(System.Object sender, System.EventArgs e)
{
Globals.Tags.Can1.SetAnalog(val);
Globals.Tags.Can1.SetAnalog(val);
}
}
If RTR calls from another device should be answered, use "PROT19" in the protocol column "H".
At first a return value must be set in the designer project. After a write to the tag in the project
the RTR call is answered.
The ".valid" tag information is not valid in that case. The returned data byte count is depending
on the demand.
20 / 21 7.10.2022 21:44
FreeCAN bu�lt-�n f�le:///C:/Users/orhan/AppData/Roam�ng/Be�jer%20Electron�cs%20...
Example:
RTR_300 will produce a RTR call telegramm with CAN ID=777 (hex) every 300 ms
FreeCAN built-in RTR_notime produces a RTR call telegramm with CAN ID=888 (hex) every 500 ms if the project
screen is shown.
Introduction RTR_respond answers the RTR requests on CAN ID=999 (hex).
Release Notes
Disclaimer
Limitations
Firmware Update
[+] Connecting To The Can Network
[+] Settings
[+] Addressing
[+] Import Module
Efficient Communication
[+] Troubleshooting
[+] Additional Information
Bus State
Bus Load
Baudrate State
Firmware Version
Firmware Status
Receive List Count
Read Variable
Read Variable With Timeo…
Read J1939 Pgn
Read DM1 Message
Write Full Telegram
Write Telegram Cyclic
Detect J1939 Station
Examples
J1939 Example
NMEA2000 Example
Extending The Can Receive …
Start And Stop Of Cyclic Wr…
Rtr Telegrams Send And Re…
21 / 21 7.10.2022 21:44