You are on page 1of 76

DEEP SEA ELECTRONICS

DSEM240 Operator Manual

Document Number: 057-270


Author: Anthony Manton

057-270 ISSUE: 2
DSEM240 Operator Manual

Deep Sea Electronics Ltd


Highfield House
Hunmanby
North Yorkshire
YO14 0PH
ENGLAND

Sales Tel: +44 (0) 1723 890099


Sales Fax: +44 (0) 1723 893303

E-mail: sales@deepseaelectronics.com
Website: www.deepseaelectronics.com

DSEM240 Operator Manual

© Deep Sea Electronics Ltd


All rights reserved. No part of this publication may be reproduced in any material form (including
photocopying or storing in any medium by electronic means or other) without the written permission of
the copyright holder except in accordance with the provisions of the Copyright, Designs and Patents
Act 1988.
Applications for the copyright holder’s written permission to reproduce any part of this publication
must be addressed to Deep Sea Electronics Ltd at the address above.

The DSE logo and the name DSEControl® are UK registered trademarks of Deep Sea Electronics Ltd.

Any reference to trademarked product names used within this publication is owned by their respective
companies.

Deep Sea Electronics Ltd reserves the right to change the contents of this document without prior
notice.

Revision History

Issue No. Comments


1 First Issue 29/10/18
1.1 Added additional information regarding Vibration and Shock tests.
2 Corrected typical connection diagram, corrected description of VREF -ve, corrected
harness and connector parts numbers. Corrections to J1939 examples. Added
Troubleshooting section.

057-270 ISSUE: 2 Page 2 of 76


DSEM240 Operator Manual

Table of Contents
Section Page
1 INTRODUCTION .................................................................................................. 6
CLARIFICATION OF NOTATION ........................................................................................ 7
GLOSSARY OF TERMS ..................................................................................................... 7
RELATED INFORMATION .................................................................................................. 9
1.3.1 TECHNICAL INFORMATION ........................................................................................ 9
SAFETY INSTRUCTIONS ................................................................................................... 9
1.4.1 GENERAL .................................................................................................................... 9
1.4.2 INSTALLATION NOTES ............................................................................................. 10
2 SPECIFICATIONS ............................................................................................. 11
DC SUPPLY ...................................................................................................................... 11
FUSING............................................................................................................................. 11
ENVIRONMENTAL ........................................................................................................... 11
INPUTS ............................................................................................................................. 12
2.4.1 PROGRAM ENABLE .................................................................................................. 12
2.4.2 INPUT TYPES ............................................................................................................ 13
2.4.3 DIGITAL INPUTS........................................................................................................ 14
2.4.3.1 DIGITAL .............................................................................................................. 14
2.4.3.2 FREQUENCY ...................................................................................................... 14
2.4.4 ANALOGUE INPUTS .................................................................................................. 14
2.4.4.1 VOLTAGE ........................................................................................................... 14
2.4.4.2 CURRENT ........................................................................................................... 14
2.4.4.3 RESISTIVE.......................................................................................................... 15
2.4.4.4 RATIOMETRIC .................................................................................................... 15
OUTPUTS ......................................................................................................................... 16
2.5.1 OVER CURRENT PROTECTION ............................................................................... 16
2.5.2 OUTPUT TYPES ........................................................................................................ 17
2.5.3 LOW SIDE (NEGATIVE SWITCHING) ........................................................................ 18
2.5.4 HIGH SIDE (POSITIVE SWITCHING) ......................................................................... 18
2.5.5 PWM / PWMI .............................................................................................................. 18
COMMUNICATIONS ......................................................................................................... 19
APPLICABLE STANDARDS ............................................................................................. 20
3 INSTALLATION ................................................................................................. 21
DIMENSIONS AND MOUNTING ....................................................................................... 21
3.1.1 DIMENSIONS............................................................................................................. 21
3.1.2 MOUNTING ................................................................................................................ 22
3.1.2.1 ORIENTATION .................................................................................................... 22
3.1.2.2 SURFACE ........................................................................................................... 22
3.1.2.3 FIXING ................................................................................................................ 22
3.1.2.4 GROUNDING ...................................................................................................... 22
FUSING............................................................................................................................. 23
TYPICAL CONNECTION DIAGRAMS ............................................................................... 24
3.3.1 DSEM240 TYPICAL CONNECTION DIAGRAM .......................................................... 24
3.3.2 MULTIPLE DSEM240 CONNECTION DIAGRAM ....................................................... 25
USER CONNECTIONS ..................................................................................................... 26
3.4.1 CONNECTOR A (DC SUPPLY AND CAN).................................................................. 27
3.4.2 CONNECTOR B (I/O) ................................................................................................. 29
3.4.3 CONNECTOR C (I/O) ................................................................................................. 30
3.4.4 ANALOGUE SENSORS ............................................................................................. 31
3.4.4.1 ACTIVE SENSORS ............................................................................................. 31
3.4.4.1.1 ACTIVE SENSORS REQUIRING EXTERNAL SUPPLY .................................................. 31
3.4.4.1.2 LOOP POWERED CURRENT SENSORS ...................................................................... 32
3.4.4.2 PASSIVE SENSORS ........................................................................................... 33
3.4.4.2.1 EARTH RETURN RESISTIVE SENSORS....................................................................... 33
3.4.4.2.2 INSULATED RETURN RESISTIVE SENSORS ............................................................... 34

Page 3 of 76 057-270 ISSUE: 2


DSEM240 Operator Manual

4 INDICATIONS .................................................................................................... 35
5 J1939 ................................................................................................................. 36
FACTORY (DEFAULT) SETTINGS ................................................................................... 36
SUMMARY OF CONFIGURATION AND OPERATION...................................................... 37
GROUPS........................................................................................................................... 37
5.3.1 INPUT GROUPS ........................................................................................................ 37
5.3.2 OUTPUT GROUPS .................................................................................................... 37
5.3.3 SUPPLY GROUPS ..................................................................................................... 38
5.3.3.1 EXAMPLE ........................................................................................................... 38
5.3.4 DSEM240 INITIALISATION ........................................................................................ 39
5.3.4.1 INIT(FUN) ............................................................................................................ 39
5.3.4.2 CONFIGURECANCOMMS(FUN) ......................................................................... 39
5.3.4.3 CONFIGURECOMMSTIMEOUT(FUN)................................................................. 40
5.3.4.4 CONFIGURATION OF THE INPUTS AND OUTPUTS ......................................... 41
5.3.4.5 SAVESETTINGS(FUN) ........................................................................................ 42
5.3.4.6 INITIALISATION EXAMPLE ................................................................................. 43
5.3.5 OPERATION .............................................................................................................. 44
5.3.5.1 KEEPALIVE(FUN) ............................................................................................... 44
5.3.5.2 SETOUTPUTBULKSTATE(FUN) ......................................................................... 44
5.3.5.3 OPERATION EXAMPLE ...................................................................................... 45
ERRORS ........................................................................................................................... 46
5.4.1 CAN COMMUNICATION FAILURE ............................................................................. 46
5.4.2 INPUTS ...................................................................................................................... 46
5.4.3 OUTPUTS .................................................................................................................. 47
5.4.4 SYSTEM .................................................................................................................... 47
6 CANOPEN ......................................................................................................... 48
FACTORY (DEFAULT) SETTINGS ................................................................................... 48
6.1.1 COMMUNICATIONS .................................................................................................. 48
6.1.2 INPUTS ...................................................................................................................... 49
6.1.3 OUTPUTS .................................................................................................................. 49
ADDING DSEM240 TO THE DEVICE TREE ..................................................................... 50
CANOPEN MANAGER SETTINGS PAGES ...................................................................... 53
6.3.1 GENERAL .................................................................................................................. 53
6.3.1.1 GENERAL ........................................................................................................... 53
6.3.1.2 GUARDING ......................................................................................................... 54
6.3.1.3 SYNC .................................................................................................................. 54
6.3.1.4 TIME ................................................................................................................... 54
DSEM240 SETTINGS PAGES .......................................................................................... 55
6.4.1 GENERAL .................................................................................................................. 55
6.4.2 PDOS AND SDOS ...................................................................................................... 58
6.4.2.1 PDOS .................................................................................................................. 58
6.4.2.1.1 RECEIVE PDOS (MASTER => SLAVE) .......................................................................... 58
6.4.2.1.1.1 INPUT / OUTPUT AND SYSTEM ERROR STATES ................................................. 60
6.4.2.1.1.2 INPUT / OUTPUT AND SYSTEM ERROR VALUES ................................................. 60
6.4.2.1.2 TRANSMIT PDOS (SLAVE => MASTER) ....................................................................... 62
6.4.2.2 SDOS .................................................................................................................. 64
6.4.2.2.1 COMMUNICATIONS SETTINGS .................................................................................... 64
6.4.2.3 INPUT SETTINGS ............................................................................................... 66
6.4.2.3.1 INPUT MODE ................................................................................................................ 66
6.4.2.3.1.1 SIGNAL CONDITIONING ........................................................................................ 67
6.4.2.3.1.2 REFERENCE MODE ............................................................................................... 67
6.4.2.3.1.3 MEASUREMENT MODE ......................................................................................... 68
6.4.2.3.2 DIGITAL INPUT THRESHOLDS ..................................................................................... 68
6.4.2.4 OUTPUT SETTINGS ........................................................................................... 69
6.4.2.4.1 OUTPUT MODE............................................................................................................. 69
6.4.2.5 SYSTEM SETTINGS ........................................................................................... 69
6.4.2.5.1 CAN TERMINATION RESISTOR.................................................................................... 69
6.4.2.5.2 SAVE SETTINGS........................................................................................................... 70
6.4.2.5.3 RESTORE SETTINGS ................................................................................................... 70
6.4.3 CANOPEN IO MAPPING ............................................................................................ 71

057-270 ISSUE: 2 Page 4 of 76


DSEM240 Operator Manual

6.4.4 STATUS ..................................................................................................................... 71


6.4.5 INFORMATION .......................................................................................................... 71
7 TROUBLESHOOTING ....................................................................................... 72
8 CABLES, CONNECTORS, HARNESSES, AND SPARE PARTS ..................... 74
DSEM240 CONNECTOR HARNESS KIT (016-175) .......................................................... 74
9 MAINTENANCE AND WARRANTY .................................................................. 75
10 DISPOSAL ...................................................................................................... 75
WEEE (WASTE ELECTRICAL AND ELECTRONIC EQUIPMENT)................................ 75

Page 5 of 76 057-270 ISSUE: 2


Introduction

1 INTRODUCTION
This document details the operation and setup requirements of the DSEM240, part of the
DSEControl® range of products.

The manual forms part of the product and should be kept for the entire life of the product. If the
product is passed or supplied to another party, ensure that this document is passed to them for
reference purposes.
This is not a controlled document. DSE do not automatically inform on updates. Any future updates of
this document are included on the DSE website at www.deepseaelectronics.com

Observe the operating instructions. Non-observance of the instructions, operation not in accordance
with use as prescribed below, wrong installation or incorrect handling seriously affects the safety of
operators and machinery.

A robust metal case designed for chassis mounting houses the module. Connections are via locking
plug and sockets.

DSEM240 is an expansion module providing additional input/output functionality to the DSE MSeries
PLCs. As such it has no standalone function.
DSEM240 communicates with the host device using CAN (J1939 / CANOpen variants are available).

057-270 ISSUE: 2 Page 6 of 76


Introduction

CLARIFICATION OF NOTATION
Clarification of notation used within this publication.

Highlights an essential element of a procedure to ensure correctness.


NOTE:

Indicates a procedure or practice, which, if not strictly observed, could


CAUTION! result in damage or destruction of equipment.

Indicates a procedure or practice, which could result in injury to


WARNING! personnel or loss of life if not followed correctly.

GLOSSARY OF TERMS
Term Description
16# CODESYS uses 16# to denote that the following number is hexadecimal.
For example: 16#10 is Hexadecimal 10 (Decimal 16).
COB CANopen Common Object
COB-ID CANopen Common Object Identifier
CODESYS Integrated Development Environment for programming controller
(Previously stylised applications according to the international industrial standard IEC 61131-3.
as CoDeSys)
IEC61131-3 International Standard IEC 61131 Part 3 is the standard for Programmable
Logic Controllers governing Software Architecture and Programming
Languages. CODESYS is IEC 61131-3 compliant.
J1939 US Society of Automotive Engineers standard for CAN.
Referred to as SAE J1939.
Master See NMT Master
NMT CANopen Network Management
NMT Master CANopen Network Management Master. The device controlling the
CANopen Network. Often referred to as Master or CANopen Master.
DSE products that can be NMT Master devices include DSEM840,
DSEM870, DSEM640 and DSEM643.
NMT Slaves CANopen Network Management Slave. The slave devices of the CANopen
NMT Master. Often referred to as Slave or CANopen Slave.
The DSEM240 CANopen variant is an NMT Slave.
Off-Highway An industrial vehicle used primarily “off road”. For example, construction
and farm machinery. A wider interpretation includes on road access
platforms, emergency vehicles and other industrial machinery, used either
on the road, or off road.
Operational CANopen normal operating state. In this state PDOs are transmitted.
PDO CANopen Process Data Object. Transmitted cyclically or periodically when
the CANopen network is operating normally.
Pin A male or female pin connection in a housing (plug or socket).
PLC Programmable Logic Controller. Industrial computer used primarily for the
automation of electromechanical machinery.
PreOperational The CANopen initialisation state. In this state SDOs are transmitted. After
initialisation of Slaves is complete and all Slaves are OK, the Operational
state is entered.
Pull-Up or Pull-Down A resistor used to bias a signal line towards a positive (Pull-Up) or negative
(Pull-Down) supply.

Page 7 of 76 057-270 ISSUE: 2


Introduction

Term Description
PWM A digital signal is used to represent an analogue value by using Pulse
PWMi Width Modulation. The mark-space ratio of a square wave changes to
represent the value.
Used for many control applications including proportional valves.
PWM = Voltage control.
PWMi = Current control.
Qxyyy An Output, where x is the connector and yyy is the output number. For
example, QB022 means Output 22 on Connector B.
SDO CANopen Service Data Object. Transmitted once at start-up, usually as
part of the initialisation phase of the CANopen network.
Slave See NMT Slave.

057-270 ISSUE: 2 Page 8 of 76


Introduction

RELATED INFORMATION
This document refers to, and is referred by the following DSE publications which are obtained from
the DSE website: www.deepseaelectronics.com or by contacting DSE technical support:
support@deepseaelectronics.com.

1.3.1 TECHNICAL INFORMATION

DSE Part Description


055-220 DSEM240 Datasheet
053-228 DSEM240 Installation Instructions
055-198 DSEM640 Datasheet
055-236 DSEM643 Datasheet
053-186 DSEM640 & DSEM643 Installation Instructions
055-222 DSEM840 Datasheet
053-188 DSEM840 Installation Instructions
057-248 DSEM840 Operator Manual
055-199 DSEM870 Datasheet
053-187 DSEM870 Installation Instructions
057-246 DSEM870 Operator Manual

SAFETY INSTRUCTIONS

1.4.1 GENERAL

• These instructions are for authorised persons according to the EMC and low-voltage directives.
The device must be installed, connected, and put into operation by a qualified electrician.

• It is not permissible to open the controller or to modify or repair the controller. Modification or
repairs to the wiring could result in dangerous malfunctions. Repairs to the controller must be
performed by DSE. Contact your original equipment supplier in the case of malfunction.

• When the device is unpowered, ensure that no connection pins are connected to a voltage
source. Thus, when the supply is switched off, the supply for the electronics, the power outputs
and the external sensor supply must be switched off together.

• The controller will heat up beyond normal ambient temperature during operation. To avoid danger
caused by elevated temperatures, protect against contact.

• The customer is responsible for performing risk analysis of the mobile working machine and
determining the possible safety related functions. The user is responsible for the safe function of
the application programs created. If necessary, they must additionally carry out an approval test
by corresponding supervisory and test organisations according to the national regulations.

• All connectors must be unplugged from the electronics during electrical welding and painting
operations.

Page 9 of 76 057-270 ISSUE: 2


Introduction

1.4.2 INSTALLATION NOTES

• Follow the instructions of the connector manufacturer, specifically with respect to preventing
water from entering the device. See Section entitled Cables, Connectors, Harnesses and Spare
Parts for details of DSE Part Numbers.

• To maintain IP67 rating where connectors have unused pins, ensure the use of a suitable
Blanking Insert. In the case of a completely unused connector, the plug must be inserted, fully
populated with Pin Blanking Inserts. See Section entitled Cables, Connectors, Harnesses and
Spare Parts for details.

• The case must be wired to vehicle ground to comply with EMC guidelines. Metallic screws must
be used to create an electrical connection to vehicle / machine ground.

057-270 ISSUE: 2 Page 10 of 76


Specifications

2 SPECIFICATIONS
DC SUPPLY
Description Specification
Operating Voltage (Connector A, Pin 4) 8 V to 32 V
Maximum Current (no external loads) <300 mA at 24 V

FUSING

NOTE: Maximum total current of the device is 36 A. This includes the device current
consumption plus the current supplied to the outputs.
Each Output supply pin is rated Max 16 A.

Description Specification
DC Supply (Connector A, Pin 4) 3A
High Current Outputs supply 16 A Max for each Output Supply
Fuse as required by connected loads (Connector A, Pins 1, Pin.
8, 16, 23)

ENVIRONMENTAL
Description Specification
Operating Temperature -40 ºC to +85 ºC
(-40 ºF to 185 ºF)
Storage Temperature -40 ºC to +85 ºC
(-40 ºF to 185 ºF)
Degrees of Protection Provided by Enclosure IP67
(with all mating connectors fitted) (NEMA 6)

Page 11 of 76 057-270 ISSUE: 2


Specifications

INPUTS

2.4.1 PROGRAM ENABLE

CAUTION: Ensure Connector B and Connector C are DISCONNECTED before applying


Program Enable pin. This ensures external devices are not energised by the outputs during
the update process.

NOTE: Program Enable pin is used exclusively for firmware update of the DSEM240 and
must otherwise be left open circuit or connected to ECU negative supply to ensure it is not
mistakenly activated.

NOTE: Ensure to remove the Program Enable Pin after update of the device. Powering up
with Program Enable active results in the device entering Bootloader mode, awaiting firmware
update by CAN.

Description Specification
Program Enable Connector A, Pin 6
Program Enable pin pull-down resistance >30 kΩ
Minimum voltage for active (Program Enable) 6V
Maximum voltage for inactive 2V

057-270 ISSUE: 2 Page 12 of 76


Specifications

2.4.2 INPUT TYPES

Inputs have different capabilities, categorised as one of four Input Types, detailed below.

NOTE: In the table below, Ix refers to an input on Connector B (IB) or Connector C (IC). i.e., the capability of input IBxxx is the same as the
capability of ICxxx.

Input Input Pin X to 20 mA Resistive 0V to 5 V 0V to 10 V 0 V to 32 V Frequency Digital Pull Up Pull Down Float
Type (B)
1 Ix001 7 ✓ ✓ ✓ ✓ ✓ ✓ ✓
Ix002 8 ✓ ✓ ✓ ✓ ✓ ✓ ✓
2 Ix003 17 ✓ ✓ ✓ ✓ ✓ ✓ ✓
Ix004 18 ✓ ✓ ✓ ✓ ✓ ✓ ✓
Ix005 29 ✓ ✓ ✓ ✓ ✓ ✓ ✓
3 Ix006 6 ✓ ✓ ✓ ✓
Ix007 28 ✓ ✓ ✓ ✓
4 Ix008 14 ✓ ✓ ✓
Ix009 22 ✓ ✓ ✓
Ix010 31 ✓ ✓ ✓

Page 13 of 76 057-270 ISSUE: 2


Specifications

2.4.3 DIGITAL INPUTS

2.4.3.1 DIGITAL

Description Specification
Applicable Inputs (Connector B and C) Pins 6, 14, 22, 28, 31
Minimum voltage for High Level 66 % (±1%) of ECU Supply
Maximum voltage for Low Level 33 % (±1%) of ECU Supply
Internal Pull Up Resistance (when configured) 4.3 kΩ to ECU Supply
Internal Pull Down Resistance (when configured) 4.3 kΩ to internal 0 V reference

2.4.3.2 FREQUENCY

Description Specification
Applicable Inputs (Connector B and C) 6, 28
Frequency Range Selectable between:
5 Hz to 1 kHz
160 Hz to 30 kHz
Resolution 100 Hz at Maximum Frequency
Accuracy 400 Hz at Maximum Frequency
Minimum voltage for High Level (Mark) 2.1 V
Maximum voltage for Low Level (Space) 1.1 V
Duty Cycle Measurement Range 20 % to 80 %
Duty Cycle Accuracy ±1 % at Max Frequency and 10 V
peak to peak amplitude.

2.4.4 ANALOGUE INPUTS

2.4.4.1 VOLTAGE

Description Specification
Applicable Inputs (Connector B and C) Pins 7, 8, 17, 18, 29
Configurable Ranges 0 V to 5 V
Not all inputs support all ranges. 0 V to 10 V
0 V to 32 V
Input Resistance >10 kΩ
Sampling Rate 1 kHz
Resolution 12 bits

2.4.4.2 CURRENT

Description Specification
Applicable Inputs (Connector B and C) Pins 17, 18, 29
Configurable Ranges 0 mA to 20 mA
4 mA to 20 mA
Input Type Current sink only
Input Sink Resistance 150 Ω
Sampling Rate 1 kHz
Resolution 12 bits
Accuracy (± 1 % Full Scale Deflection) 0.2 mA

057-270 ISSUE: 2 Page 14 of 76


Specifications

2.4.4.3 RESISTIVE

Description Specification
Applicable Inputs (Connector B and C) Pins 7, 8
Measurement Range 0 Ω to 3400 Ω
Measurement source voltage 12 V
Measurement source current 1 mA
Sampling Rate 1 kHz
Resolution 12 bits
Accuracy (± 1 % Full Scale Deflection) 32 Ω

2.4.4.4 RATIOMETRIC

Description Specification
Applicable Inputs (Connector B and C) Pins 7, 8, 17, 18, 29
Measurement voltage reference Supply (Pin 4)
Measurement Ratio of input Pin to Supply (Pin 4)
Accuracy (± 1 % Full Scale Deflection) 0.32 V (based upon maximum
supply voltage of 32 V)

Page 15 of 76 057-270 ISSUE: 2


Specifications

OUTPUTS

NOTE: Maximum total current of the device is 36 A. This includes the device current
consumption plus the current supplied to the outputs. Each Output supply pin is rated at Max
16 A.

2.5.1 OVER CURRENT PROTECTION

NOTE: For PWM Outputs, DSE recommend that Over Current Delay does not exceed 3
seconds for inrush to loads exceeding 10 A. Loads with greater than 10 A inrush for more than
3 seconds may require external relays and alternative power sources to be used.

Outputs are protected against overcurrent while providing an Over Current Delay to allow for inrush
into connected loads.
Over Current Delay begins when load current exceeds 110 % of the output current limit (2.2 A or 4.4
A depending upon output type and/or configuration).
Should the output current exceed this level for longer than the duration of the Over Current Delay, an
alarm is raised and the output de-energised.
Excess current draw results in the output self-protecting. This includes short circuit. The exact level at
which this occurs varies with temperature.

057-270 ISSUE: 2 Page 16 of 76


Specifications

2.5.2 OUTPUT TYPES

Outputs have different capabilities, categorised as one of four Output Types, detailed below.

NOTE: Output operation is slightly delayed when Output Diagnostics is enabled. Output diagnostics is performed at the change of state of the
output from Off to On or from On to Off and is not checked during steady state.

NOTE: In the table below, Qx refers to an output on Connector B (QB) or Connector C (QC). i.e., the capability of output QBxxx is the same as
the capability of QCxxx.

NOTE: Output Type 1 reports both Overcurrent and Short to -ve as Over Value.

Output Type Output Pin PWM(i) High Side Low Side Diags Short to +ve Short to -ve Open circuit / Return
1 Qx001 2 4A 4A ✓
Qx002 3 4A 4A ✓
Qx003 34 4A 4A ✓
Qx004 35 4A 4A ✓
2 Qx005 5 2A ✓ ✓
Qx006 11 2A ✓ ✓
Qx007 26 2A ✓ ✓
Qx008 32 2A ✓ ✓
3 Qx009 13 4A 4A ✓ ✓ ✓ ✓
Qx010 1 2A 4A ✓ ✓ ✓ ✓
4 Qx011 12 4A 4A ✓ ✓ ✓ ✓
Qx012 23 2A 4A ✓ ✓ ✓ ✓

Page 17 of 76 057-270 ISSUE: 2


Specifications

2.5.3 LOW SIDE (NEGATIVE SWITCHING)

Description Specification
4 A Switching Current Outputs (Connector B and C) Pins 1, 12, 13, 23
Maximum Internal Voltage Drop for Output ON <2 V
Maximum Leakage Current for Output OFF 10 mA at 24 V output supply

2.5.4 HIGH SIDE (POSITIVE SWITCHING)

Description Specification
2 A Switching Current Outputs (Connector B and C) Pins 1, 5, 11, 23, 26, 32
4 A Switching Current Outputs (Connector B and C) Pins 2, 3, 12, 13, 34, 35
Maximum Internal Voltage Drop for Output ON Output supply -2 V
Maximum Leakage Current for Output OFF 10 mA at 24 V output supply

2.5.5 PWM / PWMI

Description Specification
Applicable Inputs (Connector B and C) Pins 2, 3, 34, 35
Frequency Range 20 Hz to 2 kHz
Frequency Resolution 1 Hz
Duty Cycle Range 5 % to 95 %
Pulse Ratio Range 0 % to 100 %
Pulse Ratio Resolution 1%
Minimum Load Impedance 3 Ω at 12 V
(When Output is Configured to be Digital High Side) 6 Ω at 24 V
PWMi Current Resolution 2 mA

057-270 ISSUE: 2 Page 18 of 76


Specifications

COMMUNICATIONS

2.6.1 CAN

NOTE: A complete CAN network must have 120 Ω terminators at each end of the network.
DSEM240 has a configurable internal termination resistor (Off by Factory (default) Settings).
Ensure that only one DSEM240 (at the end of the CAN link) has the termination resistor
enabled.

Description Specification
Number of CAN interfaces 1
Supported Protocols J1939
CAN open
(Variant dependant)
Supported Baud Rates 50 kbit/s, 125 kbit/s, 250 kbit/s, 500 kbit/s, 800 kbit/s, 1 Mbit/s

Page 19 of 76 057-270 ISSUE: 2


Specifications

APPLICABLE STANDARDS
Category and Description
Standards
CE Marking Electromagnetic compatibility (EMC) noise immunity
Electromagnetic compatibility (EMC) emission standard
EN 61000-6-2
EN 61000-6-4
Electrical Tests Pulse 1, severity level: III; function state C
Pulse 1, severity level: IV; function state C
ISO 7637-2 (2004 E) Pulse 2a, severity level: III; function state A
Pulse 2a, severity level: IV; function state A
Pulse 2b, severity level: III; function state C
Pulse 2b, severity level: IV; function state C
Pulse 3a, severity level: III; function state A
Pulse 3b, severity level: III; function state A
Pulse 3b, severity level: IV; function state A
Pulse 4, severity level: III; function state A
Pulse 4, severity level: IV; function state A
Pulse 5a, severity level: III; function state A
Pulse 5a, severity level: IV; function state A
Electrical Tests Clause 4.3.2 Overvoltage; function state A
Clause 4.4 Super Imposed Alternating Voltage, Severity Level: II
ISO 16750-2 (2012 E) Clause 4.5 Slow Decrease and Increase
Clause 4.6.1 Momentary Drop in Supply Voltage
Clause 4.6.2 Reset Behaviour at Voltage Drop
Clause 4.6.3 Starting Profile (Cold Cranking), Severity Level: II
Climatic Tests Cold Test
Dry Heat
EN 60068-2-1 Temp. & Humidity Cyclic Test
EN 60068-2-2 Damp Heat
EN 60068-2-30 Temperature Cyclic Test
EN 60068-2-38
EN 60068-2-78
Mechanical Tests 50 g

Shock Test

BS EN 60068-2-27
Resonance Search Vibration Type: Sinusoidal, Frequency Range: 10 Hz to 2000 Hz,
Amplitude: 5 g
BS EN 60068-2-6
Resonance Dwell Test Vibration Type: Sinusoidal Dwell
Frequencies: At any resonant frequencies identified in the Resonance
BS EN 60068-2-6 Search, Amplitude: 5 g, Duration: 5 minutes per identified resonance
Random Vibration Test Vibration Type: Broadband Random, Frequency Range: 10 Hz to 350 Hz

BS EN 60068-2-64

057-270 ISSUE: 2 Page 20 of 76


Installation

3 INSTALLATION
DIMENSIONS AND MOUNTING

3.1.1 DIMENSIONS

Description Specification
Overall Dimensions (Height X Width X Depth) 240 mm X 190 mm X 49 mm
(9.45 " X 7.48 " X 1.46 “)
Mounting Holes Suitable for M6 bolts
(¼“ holes)
Mounting Hole Centres 218 mm X 169 mm
(8.58 “ X 6.65 “)
Mounting Bolt Material Recommendation Steel or Stainless Steel
Mounting Bolt Tightening Torque 8 Nm ±2 Nm
Overall Weight 1.58 kg

Page 21 of 76 057-270 ISSUE: 2


Installation

3.1.2 MOUNTING

3.1.2.1 ORIENTATION

Install the controller in such a way to allow any condensation that may form to flow out.

3.1.2.2 SURFACE

The controller must be mounted on a flat surface.


Use compensating elements if there is no flat mounting surface available.
For steel surfaces, ensure that it is protected against corrosion.

3.1.2.3 FIXING

4 x M6 Screws (one in each corner of the controller)


Screw material: steel or stainless steel
Tightening torque: 8 Nm ±2 Nm

3.1.2.4 GROUNDING

To ensure the protection of the device against electrical interference and the safe function of the
device, the housing must be connected to the ground of the vehicle / machine.

057-270 ISSUE: 2 Page 22 of 76


Installation

FUSING
The individual electric circuits must be protected to protect the entire system. Select appropriate fuses
to protect the outputs being supplied.

NOTE: Output Supply pin must be connected (even if the outputs are not used in the
project) to ensure Output Supply Under Voltage alarms are not raised by the device.

NOTE: Maximum total current of the device is 36 A. This includes the device current
consumption plus the current supplied to the outputs. Each Output Supply pin is rated at Max
16 A.

Pin Description Comments Recommended


Fuse Size
A1, A8, Output Supply Output Supply +VE pins are internally 16 A Max per
A16, A23 connected. Output Supply
To allow for the maximum rated current of all Pin.
outputs to be supplied, ensure all Output
Supply pins are connected and fused as
specified.

Page 23 of 76 057-270 ISSUE: 2


Installation

TYPICAL CONNECTION DIAGRAMS

3.3.1 DSEM240 TYPICAL CONNECTION DIAGRAM

057-270 ISSUE: 2 Page 24 of 76


Installation

3.3.2 MULTIPLE DSEM240 CONNECTION DIAGRAM

NOTE: 120 Ω termination resistor is required at each end of the CAN link. DSEM240 has a configurable internal termination resistor. Ensure
that only one DSEM240 (at the end of the CAN link) has the termination resistor enabled.

The following diagram shows how to connect multiple DSEM240 devices to one host controller. ‘CAN DEVICE’ is either CANopen or J1939 as dictated by the
variant of DSEM240 in use.

Page 25 of 76 057-270 ISSUE: 2


Installation

USER CONNECTIONS

NOTE: If using a prewired connection cable, remove the cores with unused signal inputs
and outputs. Unused cores, in particular core loops, lead to interference coupling that can
influence the connected controller.

Connector A (DC
Supply and CAN)

Connector B (I/O)

Connector C (I/O)

057-270 ISSUE: 2 Page 26 of 76


Installation

3.4.1 CONNECTOR A (DC SUPPLY AND CAN)

NOTE: For details of fuse requirements, refer to section entitled Fusing elsewhere in this
document.

NOTE: Maximum total current of the device is 36 A. This includes the device current
consumption plus the current supplied to the outputs. Each Output supply pin is rated at Max
16 A. This means that multiple output supplies may need to be connected to meet the current
requirement of the application.

NOTE: Screened 120  impedance cable specified for use with CAN must be used for the
CAN links.
DSE stock and supply Belden cable 9841 which is a high quality 120  impedance cable
suitable for CAN use (DSE part number 016-030).

NOTE: A complete CAN network must have 120 Ω terminators at each end of the network.
DSEM240 has a configurable internal termination resistor (enabled by factory settings) that
may require disabling depending upon the topology of the CAN network.

NOTE: VREF Supply Output is provided to allow external devices and sensors to be
powered. See section entitled Analogue Sensor Connection Recommendations for further
details.

Connections listed overleaf.

Page 27 of 76 057-270 ISSUE: 2


Installation

Connector A Pin Description Comments


1 Output Supply +ve Internally connected to all
other Output Supply +ve pins
2 Not Connected
3 Not Connected
4 DSEM240 Supply +ve DC Supply for the device ECU
5 DSEM240 Supply -ve DC Supply for the device ECU
6 Program Enable Connect to +ve to enable
7 Output Supply -ve
8 Output Supply +ve Internally connected to all
other Output Supply +ve pins
9 Output Supply -ve Internally connected to all
other Output Supply -ve pins
10 CAN1 H
Internally connected
11 CAN1 H
12 CAN1 L
Internally connected
13 CAN1 L
14 Output Supply -ve Internally connected to all
15 Output Supply -ve other Output Supply -ve pins
16 Output Supply +ve Internally connected to all
other Output Supply +ve pins
17 Output Supply -ve Internally connected to all
18 Output Supply -ve other Output Supply -ve pins
19 VREF -ve / AGND VREF Supply Output negative
terminal and ground return for
Analogue Inputs
(5 V / 10 V configurable)
20 Output Supply -ve Internally connected to all
other Output Supply -ve pins
21 Not Connected
22 Not Connected
23 Output Supply +ve Internally connected to all
other Output Supply +ve pins

057-270 ISSUE: 2 Page 28 of 76


Installation

3.4.2 CONNECTOR B (I/O)

Terminology Meaning
QBxxx Output. See Section Entitled Specification, Outputs for description of Output
Types
IBxxx Input. See Section Entitled Specification, Inputs for description of Input Types
OUT Output
H Output, High when active.
L Output, Low when active.
PWM Pulse Width Modulation (voltage or current)
DIN Digital Input configurable to accept signals as positive digital, negative digital.
Inputs have frequency sensing where indicated by FREQUENCY
AIN Analogue Input. May be configured to digital (DIN)
Inputs have 0 mA to 20 mA / 4 mA to 20 mA where indicated by CURRENT
Inputs have 0 V to 5 V / 0 V to 10 V / 0 V to 32 V where indicated by 5 V / 10 V /
32 V
2A 2 A output maximum
4A 4 A output maximum
2A/4A Output is user configurable between 2 A / 4 A.

Connector B Pin Description Comments Type


1 QB010 OUT H, L, (2 A / 4 A) 3
2 QB001 OUT H, PWM (4 A) 1
3 QB002 OUT H, PWM (4 A) 1
4 VREF+
5 QB005 OUT H (2 A) 2
6 IB006 DIN, FREQUENCY 3
7 IB001 AIN, RESISTIVE, 10 V, 32 V 1
8 IB002 AIN, RESISTIVE, 10 V, 32 V 1
9 Output GND
10 Output GND
11 QB006 OUT H (2 A) 2
12 QB011 OUT H, L (4 A) 4
13 QB009 OUT H, L (4 A) 4
14 IB008 DIN 4
15 Output GND
16 Output GND
17 IB003 AIN, CURRENT, 5 V, 32 V 2
18 IB004 AIN, CURRENT, 5 V, 32 V 2
19 Output GND
20 Output GND
21 VREF -ve Negative Supply for VREF (A2).
22 IB009 DIN 4
23 QB012 OUT H, L, (2 A / 4 A) 3
24 Output GND
25 Output GND
26 QB007 OUT H (2A) 2
27 Output GND
28 IB007 DIN, FREQUENCY 3
29 IB005 AIN, CURRENT, 5 V, 32 V 2
30 Output GND
31 IB010 DIN 4
32 QB008 OUT H (2A) 2
33 VREF -ve Negative Supply for VREF (A2).
34 QB003 OUT H, PWM (4 A) 1
35 QB004 OUT H, PWM (4 A) 1

Page 29 of 76 057-270 ISSUE: 2


Installation

3.4.3 CONNECTOR C (I/O)

Terminology Meaning
QBxxx Output. See Section Entitled Specification, Outputs for description of Output
Types
IBxxx Input. See Section Entitled Specification, Inputs for description of Input Types
OUT Output
H Output, High when active.
L Output, Low when active.
PWM Pulse Width Modulation (voltage or current)
DIN Digital Input configurable to accept signals as positive digital, negative digital.
Inputs have frequency sensing where indicated by FREQUENCY
AIN Analogue Input. May be configured to digital (DIN)
Inputs have 0 mA to 20 mA / 4 mA to 20 mA where indicated by CURRENT
Inputs have 0 V to 5 V / 0 V to 10 V / 0 V to 32 V where indicated by 5 V / 10 V /
32 V
2A 2 A Output Maximum
4A 4 A Output Maximum
2A/4A Output is User Configurable Between 2 A / 4 A.

Connector C Pin Description Comments Type


1 QC010 OUT H, L, (2 A / 4 A) 3
2 QC001 OUT H, PWM (4 A) 1
3 QC002 OUT H, PWM (4 A) 1
4 VREF+
5 QC005 OUT H (2 A) 2
6 IC006 DIN, FREQUENCY 3
7 IC001 AIN, RESISTIVE, 10 V, 32 V 1
8 IC002 AIN, RESISTIVE, 10 V, 32 V 1
9 Output GND
10 Output GND
11 QC006 OUT H (2 A) 2
12 QC011 OUT H, L (4 A) 4
13 QC009 OUT H, L (4 A) 4
14 IC008 DIN 4
15 Output GND
16 Output GND
17 IC003 AIN, CURRENT, 5 V, 32 V 2
18 IC004 AIN, CURRENT, 5 V, 32 V 2
19 Output GND
20 Output GND
21 VREF -ve Negative for VREF (A2).
22 IC009 DIN 4
23 QC012 OUT H, L, (2 A / 4 A) 3
24 Output GND
25 Output GND
26 QC007 OUT H (2A) 2
27 Output GND
28 IC007 DIN, FREQUENCY 3
29 IC005 AIN, CURRENT, 5 V, 32 V 2
30 Output GND
31 IC010 DIN 4
32 QC008 OUT H (2A) 2
33 VREF -ve Negative Supply for VREF (A2).
34 QC003 OUT H, PWM (4 A) 1
35 QC004 OUT H, PWM (4 A) 1

057-270 ISSUE: 2 Page 30 of 76


Installation

3.4.4 ANALOGUE SENSORS

This section details best practice and connections of Analogue Sensors.


Sensors are divided into two main categories: Active Sensors and Passive Sensors.

3.4.4.1 ACTIVE SENSORS

Active Sensors require a DC power source.

Where sensors require a 5 V or 10 V supply, and where the total current requirement of the sensors is
below 500 mA, the VREF Output is provided to supply the sensors. Should more current be required,
an external power source must be provided.

Where sensors require DC supply at the same level as the ECU positive supply, the sensor should be
supplied directly from the ECU positive supply, taking care to ensure that variations in the supply fall
within operational specifications of the sensor.

3.4.4.1.1 ACTIVE SENSORS REQUIRING EXTERNAL SUPPLY

NOTE: VREF supplies a maximum of 500 mA at either 5 V or 10 V (configurable).


Protection against excess load (including short to ground, VREF negative and ECU negative)
is provided internally though a suitably sized external fuse is recommended, placed as close
as possible to the DSEM240.

NOTE: In the diagrams below, connections to supply and other connections are omitted
for clarity.

NOTE: Where the sensor requires connection to the main ECU DC Supply, use ECU
Positive as the sensor supply.

Connection of a Single Sensor Connection of Multiple Sensors

Page 31 of 76 057-270 ISSUE: 2


Installation

3.4.4.1.2 LOOP POWERED CURRENT SENSORS

NOTE: VREF supplies a maximum of 500 mA at either 5 V or 10 V (configurable).


Protection against excess load (including short to ground, VREF negative and ECU negative)
is provided internally though a suitably sized external fuse is recommended, placed as close
as possible to the DSEM240.

NOTE: In the diagrams below, connections to supply and other connections are omitted
for clarity.

NOTE: Where the sensor requires connection to the main ECU DC Supply, use ECU
Positive as the sensor supply.

057-270 ISSUE: 2 Page 32 of 76


Installation

3.4.4.2 PASSIVE SENSORS

Passive Sensors do not require an external supply to operate.

3.4.4.2.1 EARTH RETURN RESISTIVE SENSORS

NOTE: As the DSEM240 measures the sensor relative to the VREF negative PIN, it is
important to ensure that the VREF negative is soundly connected to the sensor body. The
sensor body is electrically connected to earth by the screw thread that secures it to the vehicle
chassis.

NOTE: In the diagram below, connections to supply and other connections are omitted for
clarity.

Page 33 of 76 057-270 ISSUE: 2


Installation

3.4.4.2.2 INSULATED RETURN RESISTIVE SENSORS

NOTE: As the DSEM240 measures the sensor relative to the VREF negative PIN, it is
important to ensure that the VREF negative and Sensor signal return are soundly connected.

NOTE: In the diagram below, connections to supply and other connections are omitted for
clarity.

057-270 ISSUE: 2 Page 34 of 76


Indications

4 INDICATIONS
One Multi Colour LED is provided to give indication of the device operating status.

Status LED

Colour Operation State Description


Off N/A Powered Off N/A
Amber Static Bootloader Bootloader mode (Firmware update)

Green Steady Powered On Unit powered up


Not running
1 Hz flash Running Unit powered up
Running without errors
Red Static Fault Condition Fatal system / hardware fault
1 Hz flash Fault Condition Unit running with a fault.

Page 35 of 76 057-270 ISSUE: 2


J1939

5 J1939

NOTE: The following section details use of the DSEM240 J1939 variant. It is not possible
to use the DSEM240 CANopen variant with J1939.

DSEM240 J1939 provides configuration and usage by the DSE_J1939 Proprietary Protocol library.
This affords fully featured programmatical access to the functions of the DSEM240, intended for
advanced CODESYS users.
A CANopen variant is also available.

While the library is documented within CODESYS, the following section details the most used
functions. For additional details of structs and enums, you are referred to the CODESYS online
documentation of the library.

FACTORY (DEFAULT) SETTINGS

NOTE: Changes to Communications Setting require a PowerCycle in order for them to


take effect. As a PowerCycle reloads the last saved device settings from memory, changes to
Communications Settings MUST be saved using the Function SaveSettings as described in the
section entitled DSEM240 Initialisation | SaveSettings(FUN) elsewhere in this document.

Parameter Factory Setting


Baud Rate 250 kB/s
Rx Priority 6
Tx Priority 6
Device Address 128 (16#80)
Rx Source Address 254 (16#FE)
Echo OFF

057-270 ISSUE: 2 Page 36 of 76


J1939

SUMMARY OF CONFIGURATION AND OPERATION


DSEM240 must be configured before use in the finished application. This configuration may be
performed by a separate process and then ‘saved’ for future power-up of the device, or during the
start-up of the application.
Configuration includes setting the functions of the inputs and outputs and configuring transmission of
device and input/output status.

The following is a summary of the operations required to use the DSEM240 J1939 variant.
Subsequent subsections detail the library functions used.

• First Scan
o Initialise CAN port.
o Configure the Inputs and Outputs.
o Request the Cyclical transmission of DSEM240 measured input values
o Save Configuration of Inputs and Outputs and Cyclical transmissions to non-volatile
memory to give the option of skipping the configuration at subsequent power ups
(SaveSettings function).
• Subsequent Scans
o Get the values from the Cyclical transmission of DSEM240 measured values.
o Perform any one-off reads of DSEM240 measured values.
o Send the command to set the state of the DSEM240 outputs.
o Send KeepAlive messages to the DSEM240.

GROUPS
To minimise CAN bandwidth and collect similar information together, some information is handled in
Groups as detailed below. This allows (for example) all outputs to be controlled in one write operation
to the device, in one CAN message.

5.3.1 INPUT GROUPS

Each Input Group contains the states of up to twenty-four (24) inputs.


As the DSEM240 has a total of 20 inputs, all inputs are contained within one group.

Input Input Group Input Designation


IB001 to IB010 0 0 to 9
IC001 to IC010 0 10 to 19

5.3.2 OUTPUT GROUPS

Each Output Group contains the states of up to twenty-four (24) outputs.


As the DSEM240 has a total of 24 outputs, all outputs are contained within one group.

Input Output Group Output Designation


QB001 to QB012 0 0 to 11
QC001 to QC012 0 12 to 23

Page 37 of 76 057-270 ISSUE: 2


J1939

5.3.3 SUPPLY GROUPS

DSEM240 has two Supply Groups containing diagnostic information of the DC supplies.

Parameter Supply Group 0 Supply Group 1


eJ1939SupplyGroup Reference BATTERY_VREF_OUTPUT_1 OUTA
Supply1 Battery Supply Voltage Output Supply Current
Supply2 VREF Voltage N/A
Supply3 Output Supply Voltage N/A

5.3.3.1 EXAMPLE

First Request the information from the DSEM240. This only requires to be requested once, usually
within an initialisation function of the application.

// Request Supply Group 1 from the DSEM240 every 1000 ms


DSE_J1939.RequestSupplyGroup(
M240[0],
DSE_J1939.eJ1939SupplyGroup.BATTERY_VREF_OUTPUT1,
FALSE,
1000);

DSE_J1939.RequestSupplyGroup(no, group, single, interval


Then during the application, Get the message from the DSEM240.

DSE_J1939.GetSupplyGroup( M240[0],
DSE_J1939.eJ1939SupplyGroup.
BATTERY_VREF_OUTPUT1,
Supply[1], Supply[2], Supply[3]);

057-270 ISSUE: 2 Page 38 of 76


J1939

5.3.4 DSEM240 INITIALISATION

DSEM240 must be initialised before first use to configure (among others) the inputs and outputs,
scheduled reading of inputs and communications timeouts.

Once configured, the settings may be written to non-volatile memory to allow the device to be passed
to a third party ready set up with no requirement for further configuration. This is detailed in the
section entitled SaveSettings(FUN) elsewhere in this document.

5.3.4.1 INIT(FUN)

Each CAN port must be initialised before use. This is usually performed during the first program scan.

Name Type Description


Node stJ1939Node Structure describing the DSEM240
Bus DSE_CAN.eCANList CAN port to initialise
Speed eJ1939CANBitrate Speed of the CAN communications
Return Value eJ1939Error Status of the Init function.

5.3.4.2 CONFIGURECANCOMMS(FUN)

NOTE: This function is optional, providing a method to change CAN bitrate and
enable/disable the internal 120 Ω CAN termination resistor.

CAN networks must be terminated at each end of the CAN cable. The termination resistor is 120 Ω.
DSEM240 includes a switchable in-built termination resistor.

Name Type Description


Node stJ1939Node Structure describing the DSEM240
Bitrate eJ1939CANBitrate Speed of the CAN communications
Termination BOOL
NOTE: Ensure the inbuilt termination
resistor is only enabled in the DSEM240
where the device is located at the end of the
CAN cable. Where other devices (including
other DSEM240s) are fitted after this device,
ensure the termination resistor is disabled.

TRUE: Internal termination resistor is


enabled.
FALSE: Internal termination resistor is disabled.
Return Value eJ1939Error Status of the function.

Page 39 of 76 057-270 ISSUE: 2


J1939

5.3.4.3 CONFIGURECOMMSTIMEOUT(FUN)

This function sets the KeepAlive timeout in the DSEM240. The host device must send KeepAlive
messages to the DSEM240 (using function DSE_J1939.KeepAlive). Should the DSEM240 not receive
a KeepAlive message for longer than the period of the Timeout, outputs are set to the state specified
during configuration (the CommsLossState) and a System Error is raised.

Name Type Description


Node stJ1939Node Structure describing the DSEM240
Timeout TIME How often the KeepAlive must be sent to the
DSEM240 before a Comms Failure alarm is
raised.
Return Value eJ1939Error Status of the function.

057-270 ISSUE: 2 Page 40 of 76


J1939

5.3.4.4 CONFIGURATION OF THE INPUTS AND OUTPUTS

Inputs and Outputs must be configured before use. This is usually performed during the first program
scan.
Due to the flexibility of the DSEM240, many configuration functions exist, documented within the
CODESYS library documentation. Some examples are given in the following section.

The tables below indicate the value used to refer to the individual input/output.

Input designation

Input Designation Input Designation


IB001 0 IC001 10
IB002 1 IC002 11
IB003 2 IC003 12
IB004 3 IC004 13
IB005 4 IC005 14
IB006 5 IC006 15
IB007 6 IC007 16
IB008 7 IC008 17
IB009 8 IC009 18
IB010 9 IC010 19

Output designation

Output Designation Output Designation


QB001 0 QC001 12
QB002 1 QC002 13
QB003 2 QC003 14
QB004 3 QC004 15
QB005 4 QC005 16
QB006 5 QC006 17
QB007 6 QC007 18
QB008 7 QC008 19
QB009 8 QC009 20
QB010 9 QC010 21
QB011 10 QC011 22
QB012 11 QC012 23

Page 41 of 76 057-270 ISSUE: 2


J1939

5.3.4.5 SAVESETTINGS(FUN)

SaveSettings instructs the DSEM240 to store all the current settings (since power up) to non-volatile
memory. This means that at subsequent power up, the DSEM240 does not require additional
initialisation.
One such use for this feature is to allow an OEM to configure an DSEM240 and send it to a user. The
user needs simply to be informed what each input and output is configured to do, and how to operate
them. Initialisation was previously made and does not require repeating.

Name Type Description


Node stJ1939Node Structure describing the DSEM240
Return Value eJ1939Error Status of the function.

057-270 ISSUE: 2 Page 42 of 76


J1939

5.3.4.6 INITIALISATION EXAMPLE

Declaration

M240 : ARRAY[0..3] OF DSE_J1939.stJ1939Node; // setup 4 nodes


bRunOnce : BOOL:=TRUE;

Usage

If bRunOnce=TRUE THEN

bRunOnce:=FALSE;
// Setup the Node with the required Source Addresses etc.
DSE_J1939.Init_stJ1939Node(
M240[0],
J1939DeviceAddress,
J1939RxPriority,
J1939RxSourceAddress,
J1939TxPriority,
FALSE); // no echo
DSE_J1939.Init(
Node:=M240[0],
Bus:=DSE_CAN.eCANList.CAN1,
Speed:=DSE_J1939.eJ1939CANBitrate.BITRATE_250k);
// Optional function call to enable the CAN termination resistor
DSE_J1939.ConfigureCANComms(
Node:=M240[0],
Bitrate:=DSE_J1939.eJ1939CANBitrate.BITRATE_250k,
Termination:=TRUE);
// Option function call use to set the timeout
DSE_J1939.ConfigureCommsTimeout(
Node:=M240[0],
Timeout:=T#1S);

// Example of output configuration


DSE_J1939.ConfigureDigitalOutput(
Node:=M240[0],
Output:=1,
FeedbackRange:=DSE_J1939.eJ1939FeedbackRange.FEEDBACK_RANGE_0_
2A,
OutputMode:=DSE_J1939.eJ1939OutputMode.MODE_HIGH_SIDE,
Enable:=FALSE,
CommsLossState:=FALSE,
Diagnostics:=TRUE);
// Example of analogue input configuration
DSE_J1939.ConfigureAnalogueInputVoltage(
Node:=M240[0],
Input:=1, // input 1=IB002
Range:=DSE_J1939.eJ1939VoltageRange.VOLTAGE_RANGE_0_10V);
// Example of digital input configuration
DSE_J1939.ConfigureAnalogueInputAsDigital(
Node:=M240[0],
Input:= 2, // input 2 =IB003
LowThreshold:=2000, // < 2 V = LOW
HighThreshold:=6000, // > 6 V = HIGH
ResistorMode:=DSE_J1939.eJ1939ResistorMode.PULLUP);
END_IF

Page 43 of 76 057-270 ISSUE: 2


J1939

5.3.5 OPERATION

Writing any command to the DSEM240 resets the device’s communications timer. Should no
commands be received by the DSEM240 for the duration of the CommsTimeout setting, the alarm is
raised.

5.3.5.1 KEEPALIVE(FUN)

Used to send a regular message to the DSEM240 to reset the communications timer. Typically, the
message is sent once every program scan though it is acceptable to send the message only if no
other commands are sent to the DSEM240 during the scan.

Name Type Description


Node stJ1939Node Structure describing the DSEM240
Return Value eJ1939Error Status of the function.

5.3.5.2 SETOUTPUTBULKSTATE(FUN)

Provides a single function to control the state of the digital outputs.


This message contains the states of a complete Output Group. Best practice is to send this command
only when an output changes state, sending the shorter KeepAlive message should no other write
commands be sent regularly to the device.

Name Type Description


Node stJ1939Node Structure describing the DSEM240
OutputGroup eJ1939OutputGroup Which group of outputs to set
States stJ1939BulkState Struct containing an array of output states for the
group.
Return Value eJ1939Error Status of the function.

057-270 ISSUE: 2 Page 44 of 76


J1939

5.3.5.3 OPERATION EXAMPLE

Declaration

M240 : ARRAY[0..3] OF DSE_J1939.stJ1939Node; // setup 4 DSEM240 nodes


Outputs : ARRAY[0..3] OF DSE_J1939.stJ1939BulkState // output states for
the DSEM240s

Usage

// Set output4 of M420[0] to TRUE


Outputs[0].State[4]:=eJ1939State.STATE_TRUE;

// Write the output states


DSE_J1939.SetOutputBulkState(
Node:=M240[0],
OutputGroup:=DSE_J1939.eJ1939OutputGroup.GROUP_0, // Outputs 0 to 23
States:=Outputs[0]);

// Send the KeepAlive message to DSEM240[0]


DSE_J1939.KeepAlive(Node:=M240[0]);

// Get an analogue input value


DE_J1939.GetInputValue(
Node:=M240[0],
Input:= 1, // input 1 (IB002)
Value:=6);

Page 45 of 76 057-270 ISSUE: 2


J1939

ERRORS
DSEM240 continually monitors the following subsystems for errors:

• Configured Inputs and Outputs


• Communications Link
• Input and Output supply voltages, voltage references and output supply current.

All alarms are ‘latching’ and are cleared using one of the following commands. After all alarms are
cleared, DSEM240 resumes normal operation.

Function Description
ClearAllAlarms All alarms of the specified Node are reset, providing all alarm
conditions are no longer present.
ClearInputAlarms stJ1939BulkState is used to specify one or more inputs.
All alarms of the specified Node relating to the specified inputs are
reset, providing all such alarm conditions are no longer present.
ClearOutputAlarms stJ1939BulkState is used to specify one or more inputs.
All alarms of the specified Node relating to the specified outputs are
reset, providing all such alarm conditions are no longer present.
ClearSystemAlarms All alarms of the specified Node relating to the operation of the system
are reset, providing all such alarm conditions are no longer present.

5.4.1 CAN COMMUNICATION FAILURE

CAN Communication failure occurs when DSEM240 has not received a KeepAlive message within the
period of the CommsTimeout.
Outputs are set to the state specified during configuration (the CommsLossState)

ClearAllAlarms or ClearSystemAlarms is used to reset the error latch.

5.4.2 INPUTS

NOTE: For a Current Input (0 mA to 20 mA / 4 mA to 20 mA): If an Over Value condition


exists for more than two seconds (2 s), the error is raised, and the input is automatically
switched to Voltage mode to protect the input. A subsequent attempt to read the input results
in the value 0 mA being reported. The fault must be resolved, and the input reconfigured to
resume normal operation.

Inputs are checked for Under / Over range conditions as follows.

Mode Range Under Value Over Value


Voltage 0 V to 5 V N/A 5.15 V
0 V to 10 V N/A 10.3 V
0 V to 32 V N/A 32.96 V
Current 0 mA to 20 mA N/A 20.6 mA
4 mA to 20 mA 3.88 mA 20.6 mA
Resistance 0 Ω to 3400 Ω N/A 3502 Ω
Frequency Low (5 Hz to 1 kHz) 3 Hz 1030 Hz
High (160 Hz to 30 kHz) 155 Hz 30900 Hz
Duty Cycle 15 % 85 %
Ratiometric Battery N/A 32.96 V
VREF N/A 32.96 V

ClearAllAlarms or ClearInputAlarms is used to reset the error latch.

057-270 ISSUE: 2 Page 46 of 76


J1939

5.4.3 OUTPUTS

Output Overcurrent alarm activates should the output current exceed 110 % of the output rating, or of
the user configured output current.

Outputs are checked for errors as follows:

Outputs Error Detection


Type 1 Over Value
QB001, QB002, QB003, QB004 Under Value
QC001, QC002, QC003, QC004
Type 2 Short to Negative
QB004, QB006, QB007, QB008 Short to Positive (Reported as Open Circuit)
QC004, QC006, QC007, QC008 Open Circuit
Over Value
Under Value
Type 3 and Type 4 Short to Positive
QB009, QB010, QB011, QB012 Short to Negative
QC009, QC010, QC011, QC012 Open Circuit
Over Value
Under Value

In case of Open Circuit or Under Value alarm detection, the output remains energised and the alarm
raised.
In case of Over Value, Short to Positive and Short to Negative detection, the output in question is not
energised and the alarm is raised.

ClearAllAlarms or ClearOutputAlarms is used to reset the error latch.

5.4.4 SYSTEM

NOTE: Should the Output Supply Current be Over Value, the alarm is raised, and the
outputs no longer provide output. The fault must be removed, and the error cleared to resume
normal operation.

The following parameters are checked for under / over range.

Supply Under Value Over Value


Battery Voltage 5.82 V 32.96 V
Output Supply Voltage 7.0 V 32.96 V
Output Supply Current N/A 36.0 A
Voltage Reference (5V) 3.0 V 7.0 V
Voltage Reference (10V) 8.0 V 11.0 V
Temperature N/A 110.0 °C (230 ºF)

ClearAllAlarms or ClearSystemAlarms is used to reset the error latch.

Page 47 of 76 057-270 ISSUE: 2


CANopen

6 CANOPEN

NOTE: The following section details use of the DSEM240 CANopen variant. It is not
possible to use the DSEM240 J1939 variant with CANopen.

CANopen provides an easy to use, graphical configuration and variable mapping system.
A J1939 variant is also available.

FACTORY (DEFAULT) SETTINGS

NOTE: For descriptions of the DSEM240 CANopen settings (SDOs and PDOs) see section
entitled DSEM240 Settings Pages elsewhere in this document.

This section details the Factory (Default) Settings within DSEM240 upon shipping from the DSE
Factory. These settings may be changed as required by the system OEM such that the new settings
remain in operation after the DSEM240 is power cycled.
It is possible to reset DSEM240 back to the original Factory (Default) Settings using SDO Index
16#1011 (Restore Default Parameters).

6.1.1 COMMUNICATIONS

NOTE: Changes to Communications Settings (eg Bit Rate and NodeID) require a
PowerCycle in order for them to take effect. As a PowerCycle reloads the last saved device
settings from memory, changes to Communications Settings MUST be saved using the SDO
Save Settings as described in the section entitled System Settings | Save Settings elsewhere
in this document.

Parameter Factory Setting


Baud Rate 250 kB/s
Device ID 48

057-270 ISSUE: 2 Page 48 of 76


CANopen

6.1.2 INPUTS

NOTE: For description of the values for Input Mode, refer to section entitled Input and
Output Settings.

Inputs are factory configured to the values shown:

Index Subindex Name Access Type Type Default Value


16#2000 16#00 Number of Objects RO BYTE 20
16#01 IB001 Input Mode RWW UDINT 16#05
16#02 IB002 Input Mode RWW UDINT 16#05
16#03 IB003 Input Mode RWW UDINT 16#06
16#04 IB004 Input Mode RWW UDINT 16#05
16#05 IB005 Input Mode RWW UDINT 16#05
16#06 IB006 Input Mode RWW UDINT 16#89
16#07 IB007 Input Mode RWW UDINT 16#99
16#08 IB008 Input Mode RWW UDINT 16#81
16#09 IB009 Input Mode RWW UDINT 16#81
16#0A IB010 Input Mode RWW UDINT 16#81
16#0B IC001 Input Mode RWW UDINT 16#05
16#0C IC002 Input Mode RWW UDINT 16#05
16#0D IC003 Input Mode RWW UDINT 16#06
16#0E IC004 Input Mode RWW UDINT 16#05
16#0F IC005 Input Mode RWW UDINT 16#05
16#10 IC006 Input Mode RWW UDINT 16#49
16#11 IC007 Input Mode RWW UDINT 16#59
16#12 IC008 Input Mode RWW UDINT 16#41
16#13 IC009 Input Mode RWW UDINT 16#41
16#14 IC010 Input Mode RWW UDINT 16#41

6.1.3 OUTPUTS

NOTE: When changing Output Mode, refer to section entitled Specification | Outputs to
know the available selections for a specific output.

NOTE: For description of the values for Output Mode, refer to section entitled Input and
Output Settings.

Outputs are factory configured to the settings shown.

Index Subindex Name Access Type Default


Type Value
16#2040 16#00 Number of Objects RO BYTE 24
16#01 to 16#04 QB001 to QB004 Output Mode RWW UDINT 16#03
16#05 to 16#08 QB005 to QB008 Output Mode RWW UDINT 16#01
16#09 to 16#0A QB009 to QB010 Output Mode RWW UDINT 16#02
16#0B to 16#0C QB011 to QB012 Output Mode RWW UDINT 16#01
16#0D to 16#10 QC001 to QC004 Output Mode RWW UDINT 16#03
16#11 to 16#14 QC005 to QC008 Output Mode RWW UDINT 16#01
16#15 to 16#16 QC009 to QC010 Output Mode RWW UDINT 16#02
16#17 to 16#18 QC011 to QC012 Output Mode RWW UDINT 16#01

Page 49 of 76 057-270 ISSUE: 2


CANopen

ADDING DSEM240 TO THE DEVICE TREE

NOTE: The EDS (Electronic Data Sheet) describing the DSEM240 is contained within the
DSE_PACKAGE. This is required before the following procedure is followed. This is available
from www.deepseaelectronics.com

NOTE: Multiple DSEM240 devices may be added to the same host device. It must be noted
that as more devices are added, CAN traffic increases and hence the workload of the host
device increases, increasing the Scan Time of the application. It is recommended include no
more than four (4) DSE240 devices within the same application.

DSEM240 appears to CODESYS as a CANopen device in the device tree. To add the DSEM240 to
the device tree:

Within the
CODESYS project,
Right-Click the
CAN port that the
DSEM240 is
connected to and
select Add
Device…

Ensure Vendor is set to <All Vendors> or


3S and select CANopen_Manager.

Click Add Device.

057-270 ISSUE: 2 Page 50 of 76


CANopen

With the Add Device window


still open, left click the newly
added CANopen_Manager.

NOTE: Up to 128 DSEM240 devices can be added to the CANopen Manager. Each must
have a unique Node-ID.

Ensure Vendor is
set to Deep Sea
Electronics.

And select
DSEM240.

Click Add Device. If


you have no further
devices to add, you
may now close the
window.

Page 51 of 76 057-270 ISSUE: 2


CANopen

Double-Click the
CANopen_Manager
device or the
DSEM240 device to
access their
respective settings.

The DSEM240 is now added to the project and is ready for configuration. The following sections detail
the available parameters.

057-270 ISSUE: 2 Page 52 of 76


CANopen

CANOPEN MANAGER SETTINGS PAGES


The following screenshots are taken from a working example. Therefore, they can be used as a
reference.

6.3.1 GENERAL Click to view the


status of NodeID
and COB-ID
settings

Configure Cycle Period to be a


multiple of the CODESYS project
TaskTime. Typically, Window Length
6.3.1.1 GENERAL is half of this time.

Parameter Description
NodeID The CANopen NodeID of the NMT Master.
Autostart CANopenManager  = CANopen begins when all required Slaves are available.
 = CANopen must be started from within the application
program (programmatically).
Start Slaves  = CANopen Slaves are started automatically.
 = CANopen Slaves must be started from within the
application program (programmatically).
NMT Start All (if possible)  = If the Start Slaves option is activated, the CANopen
manager starts all slaves so long as any optional slaves are not
yet ready to be started. In this case, the CANopen manager
starts each slave individually. The “NMT StartAll” command can
be guaranteed only in a project without optional slaves.
=
Polling of Optional Slaves  = Any Optional Slave not responding during system start-up
are continuously polled (once per second) until it responds. This
may affect system operation (i.e., cycle times) during the
polling.
 = Polling of Optional slaves that fail to respond at start-up
does not take place.
NMT Error Behaviour The action taken should an error occur during monitoring
(Heartbeat or NodeGuarding).
Restart Slave: The Slave is automatically restarted.
Stop Slave: The Slave is stopped. It must be restarted from
within the application program (programmatically).

Page 53 of 76 057-270 ISSUE: 2


CANopen

6.3.1.2 GUARDING

Parameter Description
Enable Heartbeat Producing  = The Master produces Heartbeat message pulses at the rate
specified by Producer Time.
 = No Heartbeat pulses are sent.
Node ID The Node-ID of the Heartbeat producer. Must be the same as
the Master Node-ID.
Producer Time The duration between Heartbeat pulses.

6.3.1.3 SYNC

Parameter Description
Enable Sync Producing  = A Sync message is sent to all Slaves configured to be Sync
Consumers. This synchronises the read/write function of all
Inputs and Outputs configured as Synchronous. PDOs
configured as Synchronous are sent immediately after the Sync
message.
 = The Master does not send Sync messages. Any PDOs
configured as Synchronous are not read/written.
COB-ID The unique ID of the Sync message.
Cycle Period Period of the Sync messages. CODESYS gives a warning if this
time is not a multiple of the application Task Time.
Window Length Length of the time frame for synchronous PDOs.
Typically, this is half of Cycle Period to ensure all PDOs are
sent well in advance of the next Sync.
Enable Sync Consuming Enables the Master as a Sync consumer. Another device must
be responsible for producing the Sync message for
Synchronous PDOs to operate.

6.3.1.4 TIME

Parameter Description
Enable TIME Producing  = The Master sends TIME messages rate specified by
Producer Time.
 = TIME messages are not sent.
COB-ID The unique ID of the TIME message.
Producer Time Time in milliseconds between TIME messages. (Must be a
multiple of the task cycle time).

057-270 ISSUE: 2 Page 54 of 76


CANopen

DSEM240 SETTINGS PAGES

6.4.1 GENERAL

Click to view
SDO Channel
Configuration

General

Parameter Description
NodeID The CANopen NodeID of the DSEM240.
Enable Expert Settings  = Expert settings are displayed. Additionally, all following
subsections are expanded and visible.
 = Expert Settings are hidden. Additionally, all following
subsections are closed, however they remain available for
manual selection
Optional Device  = The DSEM240 is optional and is not required for starting
the CANopen network.
 = The DSEM240 is required and must be operational for the
CANopen network to begin operation.
Enable Sync Producing Available only when Sync Producing is not enabled in the
CANopen Manager.
 = Sync signals are produced by the DSEM240.
 = The device does not produce Sync signals.
No Initialising  = The Master does not initialise the DSEM240 upon start-up.
(The DSEM240 is not configured).
 = Normal Operation. The Master initialises the DSEM240
upon start-up.
Reset Node Specified parameters of the slave nodes are reset to the default
parameters before the configuration is loaded to the device or
always when the slave is configured.
Sub:001: All Settings.
Sub:002: Communications settings.
Sub:003: Application settings.

Page 55 of 76 057-270 ISSUE: 2


CANopen

Nodeguarding

Parameter Description
Enable NodeGuarding
NOTE: NodeGuarding is often considered to be inferior
to Heartbeat monitoring. This is due to the additional
bandwidth and the centralised monitoring of
Nodeguarding.

 = The Master requests a response from the Slaves at the


interval defined by Guard Time. Failure of the Slave to respond
within the Lifetime Factor results in the Master taking the action
specified by the parameter NMT Error Behaviour in the
CANopen_Manager | General settings.
 = NodeGuarding is disabled.
Guard Time The time between NodeGuarding polls.
Lifetime Factor The time allowed for the Slave to respond to a NodeGuard
request.
Enable Heartbeat Producing  = The DSEM240 sends a Heartbeat pulse at intervals
determined by Producer Time.
 = The DSEM240 does not send Heartbeat pulses.
Producer Time The time between Heartbeat pulses.

Emergency

Emergency messages are used to indicate the operating status of the Slave device in contrast to
Nodeguarding / Heartbeat protection which conveys only communications status.

Parameter Description
Enable Emergency  = Emergency messages are sent when required.
 = Emergency messages are not sent.
COB-ID The unique ID of the Emergency message.

Time

DSEM240 does not utilise the TIME functions of CANopen.

057-270 ISSUE: 2 Page 56 of 76


CANopen

Checks at Start-up

Parameter Description
Check Vendor ID  = The device Vendor ID is checked at start-up. If this does
not match the DSE Vendor ID, an alarm is raised.
 = Vendor ID is not checked.
Check Product Number  = The device Product Number is checked at start-up. If this
does not match expected number for an DSEM240, an alarm is
raised.
 = Product Number is not checked.
Check Revision Number  = The device firmware Revision Number is checked at start-
up. If this does not match the required number, an alarm is
raised.
 = Vendor ID is not checked.

Page 57 of 76 057-270 ISSUE: 2


CANopen

6.4.2 PDOS AND SDOS

6.4.2.1 PDOS

NOTE: For details how to configure specific PDOs refer to the relevant section within this
document. For example, see section entitled Input Settings for details about setting the PDOs
for inputs.

PDOs (Process Data Objects) carry the data for the Inputs and Outputs. Typically, they are configured
to be transmitted upon regular cycles or when the data to be transmitted changes.
This is known as the Operational CANopen state.

6.4.2.1.1 RECEIVE PDOS (MASTER => SLAVE)

Received PDOs are received by the DSEM240 from the Master. Typically, the PDOs carry commands
to the DSEM240 to control the outputs and to reset errors.

The system designer selects how often the PDO is received by editing the title row of the PDO.

NOTE: PDOs as shown in the image below are included in the device by default. You may
prefer to remove unneeded PDOs (for example for unused Outputs) to prevent unnecessary
network traffic.

NOTE: PDOs as shown in the image below have several objects included within them by
default. You may prefer to remove unneeded objects and/or add new ones as required by your
application.

Double-Click the
title row to
change the PDO
Properties,
including how
often the PDO is
received.

Click to enable / disable the PDO.

057-270 ISSUE: 2 Page 58 of 76


CANopen

PDO Properties

Parameter Description
COB-ID The Object ID of this PDO.
Use $NODEID to add the ID to the DSEM240’s NODE-ID.
Inhibit Time Not Used on DSEM240.
Transmission Type Determines when the PDO is transmitted.

NOTE: When selecting a Synchronous type, ensure


the CANopen Manager is set to be Sync Producing as
this is required for the PDO to be actioned.

Acyclic - synchronous: Upon change when a Sync is


received. When a change is made, the PDO is transmitted.
Cyclic - synchronous: The PDO is transmitted repeatedly
after several Syncs have been received. Configured in
Number of Syncs below.
Synchronous – RTR only: Available for transmit PDOs
only. After a synchronization message, the PDO is updated,
but not transmitted. Transmission is by explicit request only
(Remote Transmission Request).
Asynchronous – RTR only: Available for transmit PDOs
only. The PDO is updated and transmitted by explicit request
only (Remote Transmission Request).
Number of Syncs Number of Sync messages between transmissions (when
applicable).
Event Time Not Used on DSEM240.
Process by CANopen Manager This provides a method of enabling/disabling the PDO.

 = CANopen Manager handles the PDO (Normal)


 = CANopen Manager ignores the PDO (It is disabled)

Page 59 of 76 057-270 ISSUE: 2


CANopen

6.4.2.1.1.1 INPUT / OUTPUT AND SYSTEM ERROR STATES

Should it be required to know the error state of the inputs, outputs and the internal system, the
following PDOs may be added.
These are single bits that are set (1) when the object is in error state and unset (0) when the object is
operating normally.
To know the exact reason that an object is in error state, use the PDOs for Error Values as detailed in
the following sections.

Index Subindex Bits Function


16#20C0 16#00 16 Bit0 to Bit6: IB001 to IB007 Error State
Bit7 to Bit14: IC001 to IC007 Error State
16#20C1 16#00 24 Bit0 to Bit11: QB001 to QB012 Error State
Bit12 to Bit24: QC001 to QC012 Error State
16#20C2 16#00 8 Bit0: Battery Error State
Bit1: VREF Error State
Bit2: Output Supply Voltage Error State
Bit3: Output Supply Current Error State
Bit4: Temperature Error State

6.4.2.1.1.2 INPUT / OUTPUT AND SYSTEM ERROR VALUES

Should it be required to know the error value of the inputs, outputs and the internal system, the
following PDOs may be added.

Example PDO reading error values

The example below shows a single PDO with a small number of Input and Output Error Values.
Two System Error Values are also included.
More PDOs can be added if required.

Input Error Values

These are Read Only values.

Index Subindex Bits Default Function


Value
16#20E0 16#00 8 14 Number of Objects

16#01 to 8 0 IB001 to IB007 Error Values


16#07 Bit0: Over Value
Bit1: Under Value
16#08 to 8 0 IC001 to IC007 Error Values
16#0E Bit0: Over Value
Bit1: Under Value

057-270 ISSUE: 2 Page 60 of 76


CANopen

Output Error Values

These are Read Only values.

Index Subindex Bits Default Function


Value
0x20E1 16#00 8 24 Number of Objects

16#01 to 16#0C 8 0 QB001 to QB012 Error


Values
Bit0: Over Value
Bit1: Under Value
Bit2: Short to Negative
Bit3: Short to Positive
Bit4: Open Circuit
16#0D to 16#18 8 0 QC001 to QC012 Error
Values
Bit0: Over Value
Bit1: Under Value
Bit2: Short to Negative
Bit3: Short to Positive
Bit4: Open Circuit

System Error Values

These are Read Only values.

Index Subindex Bits Default Function


Value
0x20E2 16#00 8 5 Number of Objects

16#01 8 0 Battery Error Value


Bit0: Over Value
Bit1: Under Value
16#02 8 0 VREF Error Value
Bit0: Over Value
Bit1: Under Value
16#03 8 0 Output Supply Voltage Error
Value
Bit0: Over Value
Bit1: Under Value
16#04 8 0 Output Supply Current Error
Value
Bit0: Over Value
16#05 8 0 Temperature Error Value
Bit0: Over Value

Page 61 of 76 057-270 ISSUE: 2


CANopen

6.4.2.1.2 TRANSMIT PDOS (SLAVE => MASTER)

Transmit PDOs are transmitted from the DSEM240 to the Master. Typically, PDOs carry the state of
inputs, alarm conditions and DSEM240 status information.

NOTE: PDOs as shown in the image below are included in the device by default. You may
prefer to remove unneeded PDOs (for example for unused Inputs) to prevent unnecessary
network traffic.

NOTE: PDOs as shown in the image below have several objects included within them by
default. You may prefer to remove unneeded objects and/or add new ones as required by your
application.

Double-Click
the title row to
change the
PDO
Properties,
including how
often the
PDO is
received.

Click to enable / disable the PDO.

057-270 ISSUE: 2 Page 62 of 76


CANopen

PDO Properties

Parameter Description
COB-ID The Object ID of this PDO.
Use $NODEID to add the ID to the DSEM240’s NODE-ID.
RTR Not used on DSEM240.
Inhibit Time Used for Manufacturer Transmission Type. Ensures PDO
transmission does not occur more frequently than
InhibitTime in the event of a constantly changing PDO.
Transmission Type Determines when the PDO is transmitted.

Acyclic - synchronous: Upon change when a Sync is


received. When a change is made, the PDO is transmitted.
Cyclic - synchronous: The PDO is transmitted repeatedly
after several Syncs have been received. Configured in
Number of Syncs below.
Synchronous - RTR only: Available for transmit PDOs only.
After a synchronization message, the PDO is updated, but
not transmitted. Transmission is by explicit request only
(Remote Transmission Request).
asynchronous – RTR only: Available for transmit PDOs only.
The PDO is updated and transmitted by explicit request only
(Remote Transmission Request).
Manufacturer: Transmission occurs upon change of the
PDO value or after EventTime if no change takes place.
Number of Syncs Number of Sync messages between transmissions (when
applicable).
Event Time Used for Manufacturer Transmission Type. the PDO is
transmitted if the PDO does not change within the Event
Time.
Process by CANopen Manager This provides a method of enabling/disabling the PDO.

 = CANopen Manager handles the PDO (Normal)


 = CANopen Manager ignores the PDO (It is disabled)

Page 63 of 76 057-270 ISSUE: 2


CANopen

6.4.2.2 SDOS

NOTE: For details how to configure specific SDOs refer to the relevant section within this
document. For example, see section entitled Input Settings for details about setting the SDOs
for inputs.

NOTE: DSEM240 is factory set as detailed in the section entitled Factory (Default)
Settings. Additional SDOs may be added as required to change to add to these settings.

NOTE: For details of the values used within SDOs see section entitled CANopen | Factory
(Default) Settings.

SDOs (Service Data Objects) are transmitted only at system start-up (Pre-Operational) and usually
considered as configuration of the DSEM240.

When outputs are set / reset by SDOs it must be considered that this may be overridden by a PDO
when the application starts.

Example

QB001 is factory set to be PWM output. We can add a new SDO to configure QB001 as Digital, High
Side (Output Mode 1) as follows:

Select SDOs.

Select Add SDO

6.4.2.2.1 COMMUNICATIONS SETTINGS

Changes to Communications Settings (eg Bit Rate and NodeID) require a PowerCycle in order for
them to take effect. As a PowerCycle reloads the last saved device settings from memory, changes to
Communications Settings MUST be saved using the SDO Save Settings as described in the section
entitled System Settings | Save Settings elsewhere in this document.

057-270 ISSUE: 2 Page 64 of 76


CANopen

Open 16#2040 Output Mode

Select 16#01 QB001 Mode

Change Value from its


current value to 16#01
(Digital High Side)

Click OK

New SDO to configure QB001 Mode to Digital High Side (16#1)

Page 65 of 76 057-270 ISSUE: 2


CANopen

6.4.2.3 INPUT SETTINGS

When adding or editing PDOs and SDOs the Value of those objects specify the setting of the inputs.
The following sections detail these values.

6.4.2.3.1 INPUT MODE

Input Mode is used to specify the type of output in SDO Index 16#2000.
It is a bit field, made up as follows:

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0


Signal Conditioning Reference Mode Measurement Mode

When calculating the full value for Input Mode consider the following formula:

SignalConditioning<<6 + ReferenceMode<<4 + MeasurementMode

Where: <<Number means shift left by that number of bits.

For convenience, the following tables apply this ‘bit shifting’ in the column Value in Input Mode Byte.

Example

For a Digital Input with Pull-Down obtain the Value in Input Mode Byte from each of the following
tabled and add them together:

• Start with Signal Conditioning – Pull Down is 16#80


• We do not require Reference Mode (it’s applicable only to Ratiometric and Frequency inputs
so we can leave this at ‘zero’ for simplicity (add zero)
• Add the Measurement Mode – Digital is 16#1.
• The total is 16#80 + 16#1 = 16#81.
Example SDO within the project.
For details adding SDOs, see
section entitled SDOs elsewhere
in this document.

16#2000: Input Mode Index


16#06: IB006 Mode Subindex
`

16#81: Input Mode value derived


from the tables and shown in the
example provided above.

057-270 ISSUE: 2 Page 66 of 76


CANopen

6.4.2.3.1.1 SIGNAL CONDITIONING

Signal Condition is used to add an internal Pull-Up resistor or Pull-Down resistor if required. This
requirement depends upon the type of device connected to the input.

Signal Conditioning Mode Value Value in Input Mode Byte


Hexadecimal Decimal
Floating 16#0 16#0 0
Pull-Up 16#1 16#40 64
Pull-Down 16#2 16#80 128
Reserved 16#3 16#C0 192

6.4.2.3.1.2 REFERENCE MODE

Ratiometric Inputs

For Ratiometric inputs, Reference Mode allows selection of the input voltage reference.

Signal Conditioning Mode Value Value in Input Mode Byte


Hexadecimal Decimal
Ratiometric to VREF 16#0 16#0 0
Ratiometric to Supply 16#1 16#10 16
Reserved 16#2 16#20 32
Reserved 16#3 16#30 48

Frequency Inputs

For Frequency inputs, Reference Mode allows selection of the measurement frequency range.

Signal Conditioning Mode Value Value in Input Mode Byte


Hexadecimal Decimal
5 Hz to 1 kHz 16#0 16#0 0
160 Hz to 30 kHz 16#1 16#10 16
Reserved 16#2 16#20 32
Reserved 16#3 16#30 48

Page 67 of 76 057-270 ISSUE: 2


CANopen

6.4.2.3.1.3 MEASUREMENT MODE

Measurement Mode is used to specify the type of input.

Signal Conditioning Mode Value Value in Input Mode Byte


Hexadecimal Decimal
Disabled 16#0 16#0 0
Digital 16#1 16#1 1
Analogue as Digital 16#2 16#2 2
Voltage 5 V range 16#3 16#3 3
Voltage 10 V range 16#4 16#4 4
Voltage 32 V range 16#5 16#5 5
Current 0 mA to 20 mA range 16#6 16#6 6
Current 4 mA to 20 mA range 16#7 16#7 7
Resistance 3000R range 16#8 16#8 8
Frequency 16#9 16#9 9
Ratiometric 16#A 16#A 10
Reserved 16#B to16#F 16#B to16#F 11 to 15

6.4.2.3.2 DIGITAL INPUT THRESHOLDS

Thresholds for digital inputs are factory set as below and changeable using SDOs as shown in the
example.

Threshold Factory (Default) Setting SDO Index


High Threshold 6000 mV 16#2001
Low Threshold 2000 mV 16#2002

Example

To adjust the thresholds for a digital input, add the following SDOs.
In this example we change them to use above 7 V DC as input High and below 2.5 V DC as input
Low.

Example SDOs within the project. For details adding SDOs,


see section entitled SDOs elsewhere in this document.

Value parameter refers to the


Threshold in millivolts (mV)

057-270 ISSUE: 2 Page 68 of 76


CANopen

6.4.2.4 OUTPUT SETTINGS

When adding or editing PDOs and SDOs the Value of those objects specify the setting of the outputs.
The following sections detail these values.

6.4.2.4.1 OUTPUT MODE

Output Mode is used to specify the type of output in SDO Index 16#2040.

Output Mode Value Value


Hexadecimal Decimal
Disabled 16#00 0
Digital High Side 16#01 1
Digital Low Side 16#02 2
Frequency PWM High Side 16#03 3
Frequency PWM Low Side 16#04 4
Frequency PWMi High Side 16#05 5
Frequency PWMi Low Side 16#06 6
Reserved 16#07 to 16#0F 7 to 15

6.4.2.5 SYSTEM SETTINGS

6.4.2.5.1 CAN TERMINATION RESISTOR

DSEM240 has a configurable internal CAN Termination Resistor. Ensure that only one DSEM240 (at
the end of the CAN link) has the termination resistor enabled.

The internal termination resistor is factory set as below and changeable using the SDO as shown.

Parameter Factory (Default) SDO Index Value


Setting
Internal Termination 1 (Enabled) 16#2103 0: Disabled
Resistor Enable 1: Enabled

Example

To change the state of the internal CAN Termination Resistor, add the SDO as shown below.
In this example we disable it.
Example SDO within the project. For details adding
SDOs, see section entitled SDOs elsewhere in this
document.

Value 16#0 refers to Terminator Disabled.

Page 69 of 76 057-270 ISSUE: 2


CANopen

6.4.2.5.2 SAVE SETTINGS

To save the settings to non-volatile memory add the SDO 16#1010 along with the value
16#65766173.
Subindex allows selection of the items to save (All Parameters, Communication Parameters,
Application Parameters).
After this operation, should the DSEM240 be ‘power-cycled’, the settings are retained, even if the
SDOs are removed from the CANopen Manager. The Factory (Default) Settings are overwritten with
this process.

Value 16#65766173 to ‘save’.

This value (16#65766173) is ASCII code for the word ‘save’:

16#73=s
16#61=a
16#76=v
16#65=e

6.4.2.5.3 RESTORE SETTINGS

To reset the device to original Factory (Default) Settings add the SDO 16#1011 along with the value
16#64616F6C.
Subindex allows selection of the items to restore (All Parameters, Communication Parameters,
Application Parameters).
Value 16#64616F6C to ‘load’
Factory (Default) Settings.

This value (16#64616F6C) is ASCII code for the word ‘load’:

16#6C=d
16#6F=a
16#61=o
16#64=l

057-270 ISSUE: 2 Page 70 of 76


CANopen

6.4.3 CANOPEN IO MAPPING

Variables are mapped to the objects for use by the PDOs using the CODESYS variable mapping
method:

Example mapping
IB001 Analogue Input
Value to a variable.

6.4.4 STATUS

Shows the status of the CANopen link.

6.4.5 INFORMATION

Shows version information of the DSEM240 device.

Page 71 of 76 057-270 ISSUE: 2


Troubleshooting

7 TROUBLESHOOTING
The below are suggestions answering frequently questions about the device.

Symptom Suggestion
Do I have the CANopen or J1939 variant? If the serial number label is still present and
readable, check the model number:
DSEM240-01 is J1939.
DSEM240-02 is CANopen
If the serial number label is not present or not
readable, the best option is to the connect the
DSEM240 to the PC using PCAN interface or
similar PC based CAN receiver. Use
BUSMASTER, PCANView or similar PC based
CAN viewing software set to receive at 250
kbit/s.
At device power up, CAN messages are
transmitted. Depending upon the type of
message ID, we can find the device type:

CANopen: The device transmits with 11-bit ID


(e.g., 0x730). The node address is the last 7
bytes of the message ID. In this example this is
48.
J1939: The device transmits messages with 29-
bit ID (i.e., 18FF0080). The last byte of the ID is
the device source address in hexadecimal (i.e.,
16#80 in this example).
The messages are the proprietary messages
FF80 (Firmware version), FF81 (HardwareID)
and FF82 (UniqueID).
Device is not responding to commands and/or Check all connections ensuring 120 Ω
not transmitting messages impedance, twisted pair CAN rated cable and
correct use of 120 Ω termination resistors where
needed.
Remove other CAN nodes during test to
eliminate issues potentially caused by other
nodes.
Test with a shorter CAN connection cable where
possible to eliminate issues that can be caused
with longer cables.
Check the correct variant type is connected (i.e.,
CANopen or J1939)
Check you are addressing the correct source
address.
Red flashing LED present on the device After checking connections and the module
variant in use check for any errors present on
the device by reading the PDOs (CANopen
variant) or reading the error states of the device
using the DSE_J1939 library (J1939 variant).
With J1939 variant, when not sending other
commands regularly to the device, be sure to
send KeepAlive messages. It is recommended
to set the timeout at 3 x KeepAlive rate.

057-270 ISSUE: 2 Page 72 of 76


Troubleshooting

Using DSE_J1939 Proprietary library, NO_ERROR is returned when messages were


NO_REPSONSE is returned from the Get received during the task cycle. You can use this
functions. response to know that a new message has been
received and then act upon the received data.
NO_RESPONSE is returned when no
messages of the requested type were seen on
the bus. There are a number of reasons for this
in normal operation:
1) Values are sent only after a request.
There are two types of request: Single
and cyclic.
2) If the bus is checked for the message
before the value is sent by DSEM240,
or in between cyclic transmission, then
NO_RESPONSE is received from the
function call. Keep checking until the
message is seen.
A customary practice is to employ a timer,
resetting the timer when a message is seen,
and timing out, raising an alarm if no messages
are seen. A suitable value for the timer is three
(3) times the cyclic transmission rate of the
message.
Inputs configured as Digital appear to flicker on Check the configuration for the Thresholds.
and off. These are configured in millivolts. Suggested
values are:
LowThreshold: 2000 mV
HighThreshold: 6000 mV.

The suggested values give a hysteresis (dead


band) of 4 V between On and Off.
Using values too close to each other can result
in a toggling of the input if the value is hovering
around the point of switching from On to Off.

Page 73 of 76 057-270 ISSUE: 2


Cables, Connectors, Harnesses, and Spare Parts

8 CABLES, CONNECTORS, HARNESSES, AND SPARE PARTS


Description DSE Part Manufacturer Part Manufacturer
DSEM240 Connector Kit 007-1021 1 x 770680-1 TE Connectivity
(Set of 3), supplied with 100 1 x 776164-5
pins. 1 x 776164-1
100 x 770854-1
Connector Pin Crimp N/A 770854-1 TE Connectivity
DSEM240 Connector Harness 016-175 N/A DSE
Kit
(Set of 3)
Belden 9841 016-030 9841 Belden
Pin Blank Inserts (Seals unused N/A 114017 TE Connectivity
connector pins)

DSEM240 CONNECTOR HARNESS KIT (016-175)


DSE Part 007-175 consists of three cables as listed below. Connectors are fitted at one end, with
cable marking to identify the wires at the other end.

Connector A Connector B Connector C


Assembly Ident 016-175 (a) 016-175 (b) 016-175 (c)
AMP Connector 770680-1 776164-5 776164-1
No of Connections 23 35 35
Wire size 0.5 mm2 (AWG 20) 0.5 mm2 (AWG 20) 0.5 mm2 (AWG 20)
Wire Colour Black Black Black
Wire Idents 1 to 23 1 to 35 1 to 35
Pin Crimp Part No 770854-1 770854-1 770854-1
Cable Length 1200 mm (47 “) 1200 mm (47 “) 1200 mm (47 “)

057-270 ISSUE: 2 Page 74 of 76


Maintenance, Warranty and Disposal

9 MAINTENANCE AND WARRANTY


The device is Fit and Forget. As such, there are no user serviceable parts within.
In the case of malfunction, you should contact your original equipment manufacturer (OEM).

DSE Provides limited warranty to the equipment purchaser at the point of sale. For full details of any
applicable warranty, refer to the original equipment supplier (OEM).

10 DISPOSAL
WEEE (WASTE ELECTRICAL AND ELECTRONIC EQUIPMENT)
If you use electrical and electronic equipment you must store, collect, treat, recycle, and
dispose of WEEE separately from your other waste.

Page 75 of 76 057-270 ISSUE: 2


This Page is Intentionally Blank

You might also like