Manual CANIO14 (Uus)
Manual CANIO14 (Uus)
CAN I/O 14
Order No. 6962 5596
Versions
Date Content of change
26.02.2013 Initial Creation
11.03.2013 Chapter 3.2.4.x added
22.03.2013 Reference to Excel PvP
05.04.2013 Inversion, 3.2.2.5 to .9 added, HBC sup
02.05.2013 Delay for pump3, chapt. 3.2.2.2
04.07.2013 Multiplex mapping chapt. 3.2.6.2
05.07.2013 Update of chapt. 10
29.07.2013 Flow sharing added chapt. 3.2.8
13.08.2013 Flow sharing for up to three devices
11.11.2013 CAN-Bus Reading generalized, chapt.3.3.0
21.11.2013 INC-DEC key for Prog-via-Para
08.01.2014 Canopen example chapt. 4.3.6
21.02.2014 Read J1939, chapt 3.3.0
22.02.2014 Cruise Control chapt. 3.2.4.2
12.03.2014 EE_SAVE chapt. 2.3.2
CAN-Bus Filters for Telegrams chapt 4.1.7
27.03.2014 Estop chapt added 2.3.3
02.04.2014 Introduction chapter 1.1
22.04.2014 Example Excel chapter 3.6
29.04.2014 J1939 Joysticks chapter 3.3.6
Copyright
All rights reserved. No parts of this document may be reproduced in any form or by any
means - graphic, electronic, or mechanical, including photocopying, recording, taping,
or information storage and retrieval systems - without the written permission of the
publisher. Products that are referred to in this document may be either trademarks and/or
registered trademarks of the respective owners. The publisher and the author make no
claim to these trademarks.
While every precaution has been taken in the preparation of this document, the publisher
and the author assume no responsibility for errors or omissions, or for damages
resulting from the use of information contained in this document or from the use of programs
and source code that may accompany it. In no event shall the publisher and the
author be liable for any loss of profit or any other commercial damage caused or alleged
to have been caused directly or indirectly by this document.
List of Contents:
2
2.1 Wiring: ........................................................................................................................... 17
2.2 First communication ....................................................................................................... 18
2.2.1 RS232, Comport ..................................................................................................... 18
2.2.2 CAN-Bus ................................................................................................................ 19
2.3 Power supply, VCC ........................................................................................................ 21
2.3.1 Normal Mode ......................................................................................................... 22
2.3.2 Sleep-Mode, EE_SAVE-option .............................................................................. 22
3
3.3.1 General .................................................................................................................... 59
3.3.2 CAN-Bus Digital Inputs .......................................................................................... 60
3.3.3 CAN-Bus Analogue Inputs ..................................................................................... 61
3.3.4 CAN-Bus Radio Analogue Inputs: Hetronic/HBC/Hatox/Scanreco -Joystick ....... 63
3.3.5 Example with two Elobau joysticks, ID 16+17 (10h + 11h) ................................... 65
3.3.6 J1939 Joysticks ....................................................................................................... 67
3.4 Input types, 4..20mA ...................................................................................................... 69
3.5 Scaling and Control of Outputs ...................................................................................... 69
3.6 Example on using Excel for Logic of CANIO14 ........................................................... 71
3.6.0 Scope ....................................................................................................................... 71
3.6.1 Macros ..................................................................................................................... 73
3.6.2 Pinning list, names for inputs & outputs ................................................................. 73
3.6.3 Logical connections: Setpoints................................................................................ 75
3.6.4 Logical connections, Override ................................................................................ 77
3.6.5 Logical connections: Disable .................................................................................. 78
3.6.6 Logical connections: Mapping ................................................................................ 78
3.6.7 Download parameters to CANIO via VT ................................................................ 80
3.6.8 Test of Program-Parameters .................................................................................... 82
3.6.9 Additional Examples ............................................................................................... 86
4. Slave Mode, CANIO controlled via CAN-Bus, CANopen-style ......................................... 88
4.1 General CAN-Bus Topics .............................................................................................. 88
4.1.1. CAN Bus Baud Rate .............................................................................................. 88
4.1.2. CAN Bus Termination ........................................................................................... 88
4.1.3. Line Layout and Net Topology .............................................................................. 88
4.1.4 CAN-Bus Basics ..................................................................................................... 90
4.1.4.1 Telegram ............................................................................................................... 90
4.1.5 CANopen ................................................................................................................. 90
4.1.5.1 CANopen Default Identifier Distribution ............................................................ 91
4.1.5.2 Identifier Distribution of HAWE products ........................................................... 92
4.1.6 Busload of CAN-Bus .............................................................................................. 93
4.1.7 CAN-Bus Filters for Telegrams V4.55 ................................................................... 96
4.2 Configuration of CAN-Telegrams for CANIO14 .......................................................... 97
4.2.1 TPDO1 Digital Inputs ............................................................................................. 98
4.2.2 TPDO2, Analogue Inputs ...................................................................................... 100
4.2.3 RPDO1 digital Setpoints for on/off - Outputs:..................................................... 102
4.2.4. RPDO2+3 Setpoints for Proportional (PWM/IPWM) Outputs............................ 104
4.2.4.1 Setpoints via HAWE PLVC standard ................................................................ 104
4.2.4.2 Setpoints via RPDO2/3, 4 commands per Telegram .......................................... 106
4.2.4.3 Setpoints via RPDO2, CAN-PSL Mode ............................................................ 107
4.3 Additional CAN-Open Features ................................................................................... 108
4.3.1 SYNC .................................................................................................................... 108
4.3.2 Bootup Message .................................................................................................... 109
4.3.3 Reset via Telegram ................................................................................................ 109
4.3.4 Activation consumer ............................................................................................. 109
4.3.5 Activation generation ............................................................................................ 109
4.3.6 CAN-OPEN example ............................................................................................ 110
4.3.7 EDS-File, Version >=3.7 ....................................................................................... 112
5. Parameter Save and Restore ............................................................................................... 114
5.1 Parameter Save ............................................................................................................. 114
5.2 Parameter Restore/Upload to CANIO14 ...................................................................... 115
6. Download of Firmware: ..................................................................................................... 117
4
6.1 CAN-Bus Download: ................................................................................................... 117
6.2 Possible errors during download: ................................................................................. 119
6.2.1 CAN-Dongle not connected to Computer or other programs using PCAN-Dongle
not closed........................................................................................................................ 119
6.2.2 Probably Dongle and CANIO not properly connected ......................................... 119
6.2.3 More than one CANIO connected ......................................................................... 121
7. Temperature-protection ...................................................................................................... 121
8. Special parameters .............................................................................................................. 121
9. Frequency measurement ..................................................................................................... 123
10. Free programming of CANIO, Principle .......................................................................... 124
10.1 Project/Template ........................................................................................................ 125
10.2 Variable definitions for program ................................................................................ 126
10.2.1 Input Variables .................................................................................................... 126
10.2.2 Local Variables ................................................................................................... 127
10.3 Programming logic functionality ............................................................................... 128
10.3.1 OpenPCS-Style Programming............................................................................. 128
10.3.2 C-Style Programming .......................................................................................... 130
10.4 Programming of CANBUS - Communication ........................................................... 130
10.5 Compiler Errors .......................................................................................................... 131
10.6 Debugging .................................................................................................................. 131
10.6 Saving Parameters ...................................................................................................... 133
11. Free programming examples ............................................................................................ 134
12. Closed Loop ..................................................................................................................... 141
12.1 How to set a closed loop: ........................................................................................... 142
5
1.1. Introduction
6
Parameters of Program:
7
8
4. Slave Mode, CANIO controlled via CAN-Bus, CANopen-style
Next picture shows CANBUS-Master on right side, reading inputs from Slave, doing the
logics and writing outputs back to slave.
10
Screenshots of compiler: definition of Variables, Programming of Logics in as Style, similar
as Structured Text.
1.3 Liability
This description is an integral part of the device. It contains information concerning the
right handling of the CANIO-14 and must be read prior to use.
11
1.4 Installation
The following notes must be observed to guarantee safe operation of the CANIO and to
prevent shortening the product’s lifecycle through inappropriate operating conditions:
- The device should not be mounted in the vicinity of machine parts and modules
developing great heat (e.g. exhaust).
- The distance to radio-emitting installations must be sufficient.
- There must be an emergency shutdown for the voltage supply. The emergency off
switch must be mounted on the machine or vehicle that is easily accessible for the
machine or facility operator. The machine or vehicle manufacturer must guarantee
that a safe state is achieved when the emergency off switch is activated.
- The power supply must be fuse-protected, in accordance with the maximum power
consumption per device.
- Ground lines must be dimensioned in accordance with the maximum currents
used. The reference potential for all CAN bus participants connected
to one branch should vary as little as possible between the devices and
be identical with the ground connection for the power supply.
- The bus lines to be used must be suited to CAN bus networks. Preferably the lines
should be twisted and shielded. The characteristic impedance must be approx.
120 Ω.
- Terminating resistors with 120 Ω have to be provided for both two ends of the CAN
bus network.
WARNING
12
Dimensions 60X60X30mm, with Connector 60X80X30mm
Weight <400g
Temperature minus 40 .. 85 degrees, above 75 degrees reduced load (current of
Range outputs)
Protection IP67
Voltage Range 9 to 30V DC
Protection reverse polarity
current 50mA
Fuse 2*10A or less, 1*1A
** in heavy-duty applications or high ambient temperatures, 1kHz PWM not allowed, limitation
to 100Hz. Not all 4 transistors at same time
Current control of Outputs 0..3 resolves 2000mA but with Dither, precicion of current
measurement only works up to 1500mA
All outputs can also be used as Analog inputs!
All outputs are short circuit proof (for some hours)
Note: if one or more Outputs of the group IO0..3 or IO4_7 are used as input, the possibility to
savely switch off the output via removing Supply can be no longer working, if the output is
connected to a dig. Switch, supplying enough current. With analog inputs this is no risk.
13
For Details see also SK_7845-IO_14_en.pdf in
TpeGen
14
1.7 Dimensions
15
1.8 Pin description list
Customer
Clamp PLC Connection data Name Note assignment
A2 RS232 Tx TX Pin2 of SUB-D
B2 IB0_1* RS232 Rx RX Opt. dig in Pin3 of SUB-D
B3 IB0_0 dig. Input IB0_0
Supply
VCC 0..3
A1 (Outputs 0…3)
O0 / Coil 12 / 24VDC, Output or
C3 IW48/IB1_6 max. 2ADC IPWM Output IO0 ana/dig in
O1 / Coil 12 / 24VDC, Output or
C2 IW50/IB1_7 max. 2ADC IPWM Output IO1 ana/dig in
O2 / Coil 12 / 24VDC, Output or
C1 IW40/IB1_2 max. 2ADC IPWM Output IO2 ana/dig in
O3 / Coil 12 / 24VDC, Output or
B1 IW42/IB1_3 max. 2ADC IPWM Output IO3 ana/dig in
B4 CAN High Pin 7 of SUB-D
C5 CAN Low Pin 2 of SUB-D
Supply
VCC 4..7
A8 (Outputs 4…7)
O4 / Coil 12 / 24VDC, Output or
B8 IW44/IB1_4 max. 2ADC PWM - Output IO4 ana/dig in
O5 / Coil 12 / 24VDC, Output or
C8 IW46/IB1_5 max. 2ADC PWM - Output IO5 ana/dig in
O6 / Coil 12 / 24VDC, PWM - Output IO6 Output or
C7 IW36/IB1_0 max. 2ADC *** ana/dig in
O7 / Coil 12 / 24VDC, PWM - Output IO7 Output or
C6 IW38/IB1_1 max. 2ADC *** ana/dig in
B6 IW24/IB0_2 0-10 VDC, 4..20mA Analog Input 0 AI0 Also digital input
A6 IW26/IB0_3 0 -10 VDC, 4..20mA Analog Input 1 AI1 Also digital input
A5 IW28/IB0_4 0 -10 VDC, 4..20mA Analog Input 2 AI2 Also digital input
C4 IW30/IB0_5 0 -10 VDC, 4..20mA Analog Input 3 AI3 Also digital input
A4 IW32/IB0_6 0 -10 VDC, 4..20mA Analog Input 4 AI4 Also digital input
A3 IW34/IB0_7 0 -10 VDC, 4..20mA Analog Input 5 AI5 Also digital input
5V out with intern. opt. mech.
5V / 200mA
A7 IW52/IB2_1 Feedback Switch to12V
opt. digital Starts Device if
B5 IB2_0**** Controller supply** input**** A1/A8 supplied
PGND, AGND,
B7 PGND GND RS232_GND
.in no ee_safe
C
16
2. First steps
Introduction:
The CAN-IO 14 is a very compact and competitive controller for a variety of applications. It
can be used as a CAN-Bus-Device for example in combination with a HAWE-PLVC or
CAN-PSL or stand-alone as a freely configurable digital amplifier for hydraulic valves.
Additional possibility of free programming makes it a full PLC.
The standard firmware provides all parameters for scaling of inputs and all valve
configurations for proportional currents.
Via the Windows Software “Visual Tool VT” provided by HAWE, all inputs of CAN-IO 14
can be commissioned, configured and scaled. Also ramps and filters are available for the
analogue inputs. Settings like minimum and maximum currents of outputs are made there as
well.
All parameters can be saved to file and copied to another CANIO.
There are three main-modes of use:
a) Amplifier mode
b) CAN-Slave mode
c) Free programmable mode.
2.1 Wiring:
In order to do settings of parameters and to see, if the CANIO is alive, a connection via
RS232 has to be established.
To connect to CANIO via Visual Tool or Terminal program, at least the following Pins of
CANIO have to be wired:
B7 to GND, B5 to Power, A1 or A8 to Power (10V to 30V),
A2 to Pin2 of female SUB-D connector (black on picture), coming from CANIO
B2 to Pin3 of female SUB-D connector (white on picture), coming from Computer
Pin5 of female SUB-D connector to GND (brown on picture)
1. line: baud-rate,
2. line: Firmware type and -version
7. +8. line: temperature, time since reboot, state of dig. input IB0,
9. line ff: CAN-Bus diagnostics.
18
For later use of the Visual Tool Software, you must LOGOUT and close the Terminal
Program.
2.2.2 CAN-Bus
20
If device sends Bootup message, but is not accessible via RS232, reason might be that device
has no firmware installed or has been stopped by bootloader because of too many severe
internal errors. Then firmware has to be (re-)downloaded, see for details here: 6. Download of
Firmware:
Possible Error – Reasons can be seen in data-byte 5 (zero in above example):
STATUS_OK : 0 OK, but still incomplete program may be loaded
STATUS_STOP_PROG 3 Program-restart blocked by command
STATUS_STOP_PROG 2 Program start blocked because of too many resets
STATUS_NO_PROG 4 No program loaded
NOTE: Do not use CANIO14 in applications with different CAN-GNDs! Otherwise use isolated
repeater/bridge between CAN-systems with different GNDs!
21
2.3.1 Normal Mode
Connection of A1/8 or B5 to supply voltage
Removal of A1/8 and B5 from supply voltage
In this mode B5 can also be used as additional digital input IB2_0 with switching level
ON: 5,5V
OFF <2,5 V
User Parameter 13 must not be set to 1 in this case.
Start of CANIO via cyclic CAN-Bus telegram (>2Hz) or via High-Level of Input B5>9V
Stop of CANIO (sleep mode < 0,25mA consumption)
2.3.3 Estop
2.4 GND B7
CANIO14 has only one GND pin, which means, that there is no special AGND (analog
ground) available. To avoid problems for analogue signals, care has to be taken to avoid
currents, and especially changing currents on the wire to/from B7.
This schematic shows, how it should not be done, as the returning current of the coil shares
some part of the wire with the Sensor GND. So if coil is active, the sensor GND will rise by
some mV, causing wrong measurements.
22
Therefore the returning signal of coils has to be wired close to supply, not sharing cable with
AGND, to avoid problems on AGND.
Another non recommended wiring with a switched inductive motor:
23
3. Amplifier Mode
CANIO is delivered with standard Firmware, which can make it work like an amplifier card,
with up to 8 inputs. Via CAN-Bus, additional inputs can be added. These inputs can be
logically connected to up to 8 outputs.
A typical application could be for example four Joysticks driving four twin-coils.
Note: only four of the eight outputs (0..3) have capability for a high precision current
control. The other four are non-linear and can be +.30mA from desired current! (See
data sheet).
To make the device react in the way needed, three settings have to be done via the Program
“HAWE PLVC- VT” connected to CANIO via RS232.
- Scaling of inputs (Joystick, Potentiometer…)
- Setting of logic connections, see chapter 3.2
- Setting of Outputs (I-Min, I-max, single/twin coil)
CANIO Installation comes with the configuration-file CAN_SLAVE.HWV which starts the
HAWE Visual Tool VT in an optimized way for configuring amplifier mode. Assuming you
are properly connected to a CANIO via RS232 the following screen will appear at startup:
If the button in the upper right corner, named Connected, becomes green, this indicates a
successful connection.
In lower part you can then see Firmware-Version and used Comport.
If no connection starts, the button remains grey and you should check wiring and Comport
number via Menu \tools\options\Set
24
Select “Set”
Select your own comport number here.3.1 Scaling of Inputs
When expanding the Tree-Item “Analog Inputs” and selecting one of them, the following
screen will appear:
Six analogue inputs AI0 .. AI5 are available, which can be configured to return either scaled
values from -1000 to +1000 (Joystick) or from 0..1000 (Potentiometer/Switch).
Also independent ramps are available both for up and down (see 1.1.2).
Note: As current VT was made for PLVC and not for CANIO, the field “Info” on right
upper side is not valid and should be ignored. The field “Remark” left of it should be
considered instead.
25
The Raw-data [mV] of the input is shown in lower part of screen. Below it, the Computed
value, which is a value calculated from raw-data and the eleven parameters above, is shown.
Via the Raw-Values-parameters Error bottom, max_neg, min_neg, min_pos, max_pos and
Error top several ranges are defined in [mV]. See also the graphic showing the curve.
These ranges define where the joystick
- is invalid i.e. returns zero: below Error Bottom and above Error Top (used to detect
broken wire or short circuit of this input).
- is in middle position (between min_neg and min_pos) and therefore returns zero,
- should return 1..1000 (100%), i.e. between min_pos and max_pos
should return -1..-1000 (-100%), i.e. between min_neg and max_neg
- Also the values for scaling might be modified, for example you can reverse the
polarity of a joystick by swapping max pos Scale and max neg Scale.
The red point in fig. 3 shows the current computed value within its parameter range.
This picture shows a typical joystick, supplied from 5VRef, Pin A7 of CANIO14, with dead
band between 2.750V and 3.250V and error-detection below 0.5V and above 6.65V.
Note: As joystick is supplied from 5VRef, Type must be Joystick (ratiometric signal),
otherwise 0..10V!
26
This next example shows parameters for a potentiometer or switch, giving scaled values of
0..1000 between 1 and 10V:
If an output should be controlled via a digital switch (connected to analogue input), the
scaling of this input must be modified with max_neg, min_neg and min_pos set to zero,
max_pos set to 4000(switching level 4V), Error_top set to 12000(deactivation).
Parameter Filter Time enables a digital exponential filter of the analogue signal, which can
be used to smooth a noisy signal or to delay a fast change of a signal. The value of 100 means
1 second, i.e. a 1Hz signal would be reduced to 70% of amplitude.
27
3.1.2 Ramp Settings
Via Ramps, the jump from of 0..1000 at a jumping Raw-value can be delayed, both for rising
and falling, thus reducing acceleration and deceleration of setpoint.
In example above,
A-Side of joystick, positive value, has a ramp of 2 sec. (time from 0..1000) .
B-Side of joystick, negative value, has a ramp of 3 sec. (time from 0..-1000) .
A and B-Side of Joystick have a ramp of 0.5 sec. (time from 1000 .. 0/ from -1000 to 0) .
Note: Parameter Dist and second Parameter Set are not implemented in CANIO.
Note: Ramps for Outputs are not implemented in CANIO, only for (analogue) Input!
28
3.2 Setting of logical connections (Programming via Parameters):
The “computed values” of analogue inputs (see 1.1) can be forwarded as setpoint to the
outputs without programming. It can be done just via modification of User Parameters.
The “programming via Parameters” is always seen from point of view of the 8 outputs.
There are several sets of parameters for different functionalities, which are interpreted one
after another, so the features are logically “ANDed”.
I.e.
for output 0, parameters 20,30,40 and 50 are relevant,
for output 1, parameters 21,31,41 and 51 are relevant (if twin-coil 20,30,40..)
for output 2, parameters 22,32,41 and 52 are relevant etc.
If an output is configured as twin-coil (Output channels 0/1, 2/3 etc. belonging together) only
the even parameter has to be set.
If an output is twin-coil but activated by two separate inputs, it has to be configured as two
single coils.
If an output should be used, at least the corresponding parameters for Setpointhave to be set .
If not used, parameters 30 to 37 and 40 to 47 have to be set to -1 (default value, “invalid”).
Note: as also the result of an un-used odd output can be used as input of even output
with twin-coil set, the numbers of logical connections can be increased from 3 to 6!
29
3.2.0 Help via Excel sheet
For the settings described in the following sections, an EXCEL – sheet is available, which
makes it easier. Nevertheless it makes sense to read this chapter. A reference via screenshots
of Excel is made.
Sheet opens like this:
So the green fields should be filled with the name of the functions used.
Then the sheet of “Prog_via_Para” should be opened, which already shows the names filled in
pinning-sheet: The yellow text-box gives some explanations.
Note: only variables filled in list will appear in drop-down menu to select inputs.
30
3.2.1 Inputs:
Programming via parameters is done by “connecting” outputs to inputs via parameters, where
the value of the parameter defines the channel x of the analogue input AIx
AIx with x going from 0..9, X stands for the local analog inputs.
If digital Inputs IB0_0 or IB0_1 are used, “virtual” analog inputs AI8/9 are used. If dig. input
is set, AI8/9 are set to1000, else zero. There is no possibility to scale these inputs, as they are
digital.
Also outputs are internally read back as analog raw-values and interpreted as digital inputs
IB1_0 to IB1_7. Also these inputs can be used for logical connections.
For firmware Version > 3.1 all digital Inputs IB0_0 to IB2_1 can be selected as input either
generating 0 or 1000 for setting x to
(*for firmware >3.1)
- 400 to 407 for first 8 digital local inputs IB0_x
- 410 to 417 for 8 digital local inputs IB1_x
- 420 to 421 for 2 digital local inputs IB2_x
Note: for external inputs coming via CAN-Bus see chapter 3.3.2 CAN-Bus Digital Inputs
and 3.3.3 CAN-Bus Analogue Inputs
With excel, you can select the inputs via drag-down menu.
3.2.2 Setpoints:
The outputs 0 to 7 are logically “connected” to the inputs described above via User-
Parameters 20 to 27, where the value of the parameter defines the number of the analog input
AIx .
31
Parameter 20 set to 1 means: Output 0 follows AI1
Etc.
32
In screenshot above inputs 0, 1, 2 and 3 are mapped to outputs 0,2,4 and 6 by setting
parameters 20 to 0, 22 to 1, 24 to 2 and 26 to 3 with parameters 1,3,5,7 remaining -1 (not
used).
Assuming the inputs are scaled to return +-1000 (see description of scaling of analogue inputs
section 1.1), and the outputs are configured as twin-coils, CANIO now works as amplifier for
4 twin coils, with positive values of input going to A-side (even number) and negative values
driving B-side (odd number of output). Typical Joystick parameters:
33
3.2.2.1 Permanent Setpoints:
If parameter is set to 99, setpoint is 1000 and parameter will always enable output, unless
disabled via parameter 30 or 40(see chapter 1.2.3).
34
3.2.2.2 Additional-Setpoints/Break release Setpoints:
To enable Pump or Estop valve or Break-release – Valve, this feature is very useful.
If parameter of a free single coil output is set to 98, setpoint will become 1000, if any other
output, selected via parameters 20..27 is not zero, and if this non-zero output is selected via
1000+x
Example: Two twincoils at OUT0, and OUT2 driven by AI0 and AI1, both need pump-
setpoint at output 4
Outputs Param 20 Param 22 Param24(out 4) Params Out4
0/2/4 1000 1001 98 No current
control
i-max>1000
Note: only one output can have the feature of parameter 98!
Since Version > 3.1 up to 3 “pump”-outputs can be defined, selected and activated by values
of parameter 20 of 98, 95, 94
The corresponding outputs are selected by adding 1000, 2000 or 4000, or combination of the
three values. i.e. by setting it to 7000, all 3 outputs can be set.
There can also be groups of outputs setting one pump and another group setting another
pump.
Since Version > 11.03.13 different additional valves are possible for A and B-side of twin-
coil. If parameter for B-side, which is normally left at -1, is set to same input, and 2000 is
added instead of 1000, A-side will enable output selected by 98, and B-side will enable output
selected by 95.
Since Version > May 2013 third pump (selected by 94) will not become 1000 or 0 but
maximum value of any enabling prop. Outputs selected by 4000+x.
Moreover a fixed delay for the outputs vs. pump-outputs can be selected via Parameter
38, i.e. first pump3 will start for a fixed time, then prop-valves will be enabled.
Also a switch-off delay for the pump-outputs vs. Prop-valve can be selected via
Parameter 39, i.e. pump3 will remain for a fixed time, after all prop-valves have been
disabled. If new prop-command comes within this time, it will work immediately!
The unit for parameters 38 and 39 is sec/100 i.e. 100 means 1 sec.
How to select an Output to generate this additional setpoint: check the Pump1:
35
3.2.2.5 Analog/Prop Error Setpoints:
To realize behaviour of error output like EV 1(D)
If parameter is set to 82, setpoint will be set to 1000, if analog input zero or prop. Output 0
has a detected error, else zero
Same with 83 for input 1 and output 1
Same with 84 for input 2 and output 2
Same with 85 for input 3 and output 3 etc
So a CANIO14 could replace up to 4 EV 1(D) with 4 prop signals following 4 analog signals
and 4 alarm outputs.
36
3.2.2.8 Inversion of Setpoint (>Vers 3.5)
If 10000 is added to parameters, the value of the selected input is multiplied with -1.
See *(-1)invert – Button in Output 1. A negative setpoint for a single coil will result in zero.
This makes it possible to drive a twin coil with a joystick, giving +-1000, but still configure it
as two single coils, thus using different logics for A-side and B-side.
(Normally only the even channels are configured for twin coils.)
Example Joystick AI0 defines Output 0/1, different features for override possible.
Output Param 20, 21 Input 20/21 Twin/single
scaling coil
0 0 -1000...1000 Single
1 10000+0 Single
If PSL-CAN is loaded with firmware-type HAWE Plug+Play (Node-ID 32, 34, 36…)
setpoints can be forwarded to these devices also via Parameters 20 to 27:
To activate the feature, a value of 20000 (with firmware <3.0 it was 2000) has to be added to
the number of the analog input, written to parameters 20..27.
As this feature makes it impossible to also use the parameters for local outputs, the odd
numbers, which are free for twin coils are recommended to be used.
As parameter 20 works for NODE-ID 32, 21 for ID 34 etc. the Node-Ids must be 34, 38, 42,
46 if parameters 21, 23, 25, 27 are used.
With this combination 4 local twin coils and 4 PSL-CAN sections can be used.
37
Example: Parameter 21 set to 20000: PSL-CAN with Node-ID 34 (22h), which sends on
CAN-ID 1A2h, will get cyclic commands from CANIO at ID 222h
Make sure, the PSL-CAN sends a boot-up telegram with ID 720h, 722h… as this causes
CANIO to send a startup message.
38
In Excel check the PSL-CAN-Button.
3.2.3 Override/Enable
39
The second input can be used for a (speed-) potentiometer, scaled for example to give values
from 200 to 1000 (20 to 100%), thus slowing down the full range of a joystick
40
-
- a momentary switch; switch on, switch off
- a sensor input, defining ranges, where movement is allowed: here between 0.51V and
4.2V max. speed is possible, beyond 4V and before 1V, no movement allowed, and
speed ramp in between
Here some examples, where x defines the number of the input channel AIx
41
Joystick AI0 defines Output 0/1
Output Param 20, 21 Input 20 scaling Param 30,31 Input 30 scaling Twin/single
coil
0 0 -1000...1000 -1 Twin
1 -1 -1 Twin
Joystick AI0 and switch AI1 defines Output 0/1, switch must be set to enable
Output Param 20, 21 Input 20 scaling Param 30,31 Input 30 scaling Twin/single
coil
0 0 -1000...1000 1 0 .. 1000 Twin
1 -1 1 Twin
Joystick with two signals 0..5V at AI0/1 and switches AI2,3 define Output 0/1
Output Param 20, 21 Input 20 scaling Param 30,31 Input 30 scaling Twin/single
coil
0 0 0...1000 2 0 .. 1000 Single
1 1 0...1000 3 0 .. 1000 Single
42
3.2.4 Momentary Switch Functionality (push/lock, push/unlock)
If the value of Parameter 30 to 38 is not set to 0..8 to select inputs 0..8, but 1000 to 1008
instead (1000 added), the selected enable-input is interpreted as a momentary switch with
push/lock, push/unlock functionality:
i.e. first time rising edge of this input (going to 1000!) sets override/enable of this output to
1000 (enable), second time rising edge (going to 1000!) resets the enable back to zero. After
Reset of device, output is always disabled. To avoid bouncing of input, a small ramp might be
applied to analog input, where switch is connected to.
MOM Switch AI1 defines Output 0
Output Param 20, 21 Input 20 Param 30,31 Input 30 scaling Twin/single
scaling coil
0 99(always on) No input sel. 1001 (AI1) 0 .. 1000 Single
Example
Potentiometer AI0 and switch AI1 define Output 0/1 , Potentiometer works on A-side
normally, but on b-side if AI1 is set.
Output Param 20+x Param 30+x AI1 scaling Twin/single coil
Setpoint Override
43
0 0 2001 1000 .. -1000 Twin
1 -1 -1 Twin
If the value of Parameter 30 to 37 is not 0..8 for AI0 to AI8 but 4000 to 4007 instead, the
high-value of selected input will be added to input at each rising edge. The value is limited
between 0..1000 for single coil and between -1000 and 1000 for twin-coils.
So Input defined by parameter 20 is for decrement.
If there is a rising edge at input defined by parameter 20 (setpoint), low-value of override will
be added (should be configured to give negative value for Decrement-key).
Value will be limited between 0..1000 for single coil and between -1000 and 1000 for twin-
coils.
This feature can be used to define a PLUS and a MINUS-Key to modify value by steps.
If Input for override is defined like next picture, the values will be modified by +-100 with
each rising edge.
44
Value is 100 if input set, else -100
45
If also Parameters 40f for Disable are set, the selected input is interpreted as setpoint in
normal operation.
When one of the two buttons pushed, the current value will be latched and kept as
speed. Device is in cruise control.
Actual speed of cruise control can be adjusted by Plus-Minus key, if Input defined by
Parameter 40 is zero.
If Speed of input from Parameter 40f is higher than cruise control speed, the higher
value will be taken as new Cruise setpoint.
If Speed of input from Parameter 40f has other sign than cruise control speed (one
positive, one negative), cruise control will be stopped.
If the value of Parameter 30 to 37 is not 0..8 for AI0 to AI8 but 10000 to 10007 instead, the
selected input is interpreted as second setpoint. Absolute value of both setpoints are compared
and the bigger one is selected as output.
Example
Joystic AI0 and Joystick AI1 define Output 0/1 .
Output Param 20+x Param 30+x Twin/single coil
Setpoint Override
0 0 12001 Twin
1 -1 -1 Twin
12001 because of chaper3.2.4.1
46
Twin-coils are driven by joysticks, with positive values going to A-side and negative ones to
B-side of twin-coil. To enable this feature only even parameters have to be set, i.e. 20 and 30
for outputs 0/1 and parameters 21 and 31 will be left at -1.
If the odd parameters are set as well, additional Input can be selected and will also be
evaluated for B-side, i.e. both sides can be set to 100% in this special case.
Example
Joystic AI0 define Output 0/1 . Dig input 1 sets both sides to 100%
Output Param 20+x Param 30+x Scaling of Twin/single coil
Setpoint Override Ain1
0 0 12001 0..1000 Twin
1 0 12001 Twin
If the value of Parameter 30 to 37 is not 0..8 for AI0 to AI8 but 20000 to 20007 instead, the
selected input is interpreted as second setpoint. If one of the inputs is zero, the other one will
be selected as input. If both are zero or none is zero, zero will be selected
Example
Joystic AI0 and Joystick AI1 define Output 0/1, but never at same time
Output Param 20+x Param 30+x Twin/single coil
Setpoint Override
0 0 22001 Twin
1 -1 -1 Twin
22001 because of chaper3.2.4.1
47
3.2.5 Disable/NOT-Enable
3.2.5.1 Disable
The third input is meant for inverted digital inputs. -> NOT input. This means, that if enabled
(not -1), the calculated value of the selected input must be zero to enable the setpoints
defined by Parameters 20 and/or 30.
The feature is activated via Parameter 40 to 47, which selects the input number 0..27.
Example: Driving control of a forklift on outputs 0/1, controlled by two digital inputs
FORWARD at AI0 and BACKWARD at AI1 and a SPEED-Potentiometer at AI2
If Forward and Backward are active at same time, outputs must be off.
Solution:
Output Param Input 20 Param Input 30 Param 40+x Twin/single
20/21 scaling 30+x scaling coil
0 forw. 2 (AI2) 10...1000 0 (AI0) 0 .. 1000 1 (not AI1) Single
1 back 2 (AI2) 10..1000 1 (AI1) 0 .. 1000 0 (not AI0) Single
48
If input defined by Param. 40 is scaled 1000 .. 0 instead of 0..1000, i.e. returning zero when
activated, the functionality becomes an ENABLE-Pin.
Joystick AI0 and Pot. AI1 define Output 0/1 , Enabled by AI2
Output Param 20 Param 30+x Param 40+x AI2 scaling Twin/single coil
Setpoint Override Enable
0 0(AI0) 1 (AI1) 2 (AI2) 1000 .. 0 Twin
1 -1(none) 1 (AI1) 2 (AI2) Twin
An override is a factor to the setpoint. A value of 500 (50%) means, that the setpoint from a
joystick returns 500 instead of 1000 and 250 instead of 500, i.e. the full stroke is reduced.
If the value of Parameter 40 to 47 is not 0..8 for AI0 to AI8 but 1000 to 1007 instead, the
selected enable/disable input is interpreted as enable only for Override (input selected by
Parameter 30..37), i.e. if enabled, override-value of input is used, otherwise an override of
1000 is assumed, i.e. setpoint selected by parameter 20 is used only.
Joystick AI0 and Pot. AI1 define Output 0/1 , Potentiometer enabled by AI2
Output Param 20+x Param 30+x Param 40+x AI2 scaling Twin/single coil
Setpoint Override Enable
0 0 1 1002 1000 .. 0 Twin
1 -1 1 1002 Twin
49
In Excel, just check the Pos_neg of 3rd pard of setting.
Mapping is only allowed for values >=0, i.e. negative values are interpreted as error.
The analog inputs 0..7 , where parameters are used from are selected by values 1..8.
Mapping of Setpoint is selected by 1..8 f or parameter 70f
Mapping of Override is selected by 10..80 for parameter 70f
Mapping of NOT-ENABLE selected by 100..800 for parameter 70f
Parameter 70 is set to 301: i.e. Setpoint is mapped to AI0, Override is not mapped,
NOT_ENABLE is mapped to AI2
Note: one AIx used for mapping of one channel must not be used for another channel as well.
Note: if AIx is mapped to AIy, raw values of AIx are used.
Example:
50
Digital Input of Radio, Byte zero, Bit zero should be used for second – speed – selection
(100%/20%) for joystick of AI0, going to output 2/3. Input AI7 is not used in this
application.
Output Param 20+x Param 30+x Param 50+x AI7 scaling Twin/single
Setpoint Override Mapping coil
2 0 180 (chapt. 1.30) 70 (map 1000 .. 200 Twin
override to 7)
3 -1 -1 -1 Twin
51
3.2.6.2 Mapping local Analog input to other local analog input to double
ramping and scaling capabilities, and selecting via override input
(Firmware>3.83)
If local analog input is mapped to other free analog input (example: AI0 to AI6), raw value of
AI0 is used for AI6, so scaling and ramping can be “doubled”, i.e. two different ramps and
speeds are possible for same input.
Selection is done by Override input, with Parameter XOR and OR set (30000 added to value).
If result of Override is zero, AI0 is selected, else AI6.
52
3.2.6.3 Multiplex of Inputs as source of output via input (Firmware>3.89)
If there are two possible inputs for one output (for example radio and local Joystick), first
input can be set as Setpoint, second input as Disable, and selector to select second input as
Override, with 30000 added (XOR and OR selected).
If a position sensor is available, the function AUTO_MOVE returns the right speed to move
to a special position/destination, depending on your actual position, the
distance to destinations and parameters defining, where to start speed reduction, hysteresis.
Take care that the machine goes to positive direction (POS_ACT increases), if return
value is positive.
53
DESTIN
AUTO_MOVE
SETP
HYST_RG
T
1200
VEL_LFT
800
400
VEL_MIN_LFT
0
0 100 200 300 400 500 600 700 800 900 1000
-400
VEL_RGT
-800
-1200
POS_ACT
SLW_LFT SLW_RGT
Here at typical curve for setpoints, depending on actual position, assuming destination to be
500.
Parametes
VEL_LFT 0..1000, max. speed left of
VEL_RGT target
POS_ACT 0..1000, max. speed right of
DESTIN target
VEL_MIN_LFT Act. Position
SLW_LFT Target Position
HYST_LFT Min. speed left
HYST_RGT start position to slow down
SLW_RGT left
VEL_MIN_RGT Hysteresis left
Hysteresis right
Start position to slow down
right
Min. speed right
Outputs 0 and 2 (configured as twin coils) provide this functionality, configurable via
parameters 70 to 79 (firmware < 3.2 par.50..59).
Note: Parameters 70/71 are evaluated with higher priority than 20/22 to 40/42, so
parameters 70 and 71 must be -1 to use amplifier mode for outputs 0/2.
54
Example above is for one axis of auto-levelling on outputs 0/1
And one axis of steering on outputs 2/3,
Position sensors connected to AI0 and AI1 (Parameters 70,71).
Destination going to zero (-1=zero ) for auto-levelling (Param. 72)
Destination following AI2, coming from steering wheel (Param 73).
Min.Speed is 5% for both (parameters 74, 75), Hysteresis of 2.5% (parameters 76, 77)
Slow down starts at a distance of 300 to destination. (parameters 78, 79)
Note: Also for the Auto levelling parameter 19 has to be set to 1919 to enable this feature.
Note: Auto levelling can be enabled/disabled via Parameters 30 and 32, see section 1.2.2
With flow sharing activated, you can easily limit the prop outputs to make the desired
amount of oil fit with the available amount.
Furthermore you can avoid undersupply of single functions.
55
For each outputs 0..7 you can specify how many liters/gallons of oil are needed at
maximum setpoint of the valve. If value is <=0, this output does not participate in reduction.
Is the sum of the needed liters/gallons is greater than Flow of Pump, all consumers are
reduced linearly to reach the max. flow rate.
Available flow can be defined in two ways. Constant value by parameter 88, or by (analog)
Input defined by Parameter 89. If both are used, the sum of both values is taken.
Here an example.
Twin-coil Prop 0/1 follows AI0 and twin-coil Prop2/3 follows AI1 (defined by parameters 20
and 22, not shown in screenshot).
Flow is max. 1000 (Param. 88)
Prop0 needs 1000 with 100%, Prop1 needs 800 (params 80,81)
Prop2 needs 1000 with 100%, Prop3 needs 800 (params 82,83)
Here joystick 0 gives 100% and prop0 follows.
As soon as joy1 gives additional signal, the sum of both outputs would be >1000, so both are
reduced with same factor to make the sum being 1000 again.
56
3.2.8.1 Flow Sharing with Priorization
This example has higher priority on prop2/3 (10000 added to value of flow).
As prop3 is driven at 100% (B-side), 800liters are already spent. So prop0 only gets the
remaining 200 at 100% as it is lower priority.
Value can also be reduced to zero.
3.2.8.2 Flow Sharing for several distributed CANIOs (Version >= Aug. 13)
If more than 4 sections in a system have to participate in flow sharing, these outputs have to
be driven by more than 1 CANIO. To make flow-sharing code read needed flows and
available flows from one other CANIOs, and consider these values in the local calculations,
10.000 has to be added to value of Parameter 88.
For second external CANIO14, 20.000 has to be added (also in other CANIOs).
For transfer of relevant variables/values, transfer of Analog input, with second telegram for
inputs 4..7 as described in chapter 3.3.3 CAN-Bus Analogue Inputs is used. This means that
parameters have to be set to send and read analogue inputs from neighbor device(s), and
second PDO (ID282h +x) is used to transfer local variables:
a) flow needed low priority
b) flow needed high priority
c) reserved
d) available flow
Internal calculations then use the sum of all needed and available flows.
So for flow sharing with 3 devices Parameters 6/7/8/9/88 could be set to:
Device 0: 0/2/2/4/30000+const-flow
Device 1: 2/2/0/4/30000
Device 2: 4/2/0/2/30000
Telegrams 282h/284h/286h will then not send Analog inputs, but flows needed/available
57
3.3 Inputs from CAN-Bus
3.3.0 Version 4.1 and higher: General CAN-Bus Reading
With Firmware version 4.x and higher since November 2013 reading values from CANBUS
has been generalized.
There can be configured 8 Telegrams, being scanned via Timeout, where 11-bit ID is defined
by 4 Parameters:
58
3.3.1 General
Some applications not only need one CANIO “stand-alone” but several CANIOs, which are
combined via CAN-Bus with other CANIOs or PLVCs and/or a radio remote control. So the
relevant inputs for a local CANIO might be connected to another device or joystick-signals
might come via Radio, or CAN-Bus Joysticks.
This chapter 3.3 can be ignored, if your application is “stand-alone” and does not use radio!
Inputs used for logical connections described in previous chapter, can also come via CAN-
Bus, i.e. other CANIOs, or other canbus devices.
It is possible to map from CAN-Bus:
So the parameters for the channel of analogue inputs of chapters 1.2.1 to 1.2.5 then not only
have the range from -1 to 8, but also
- 10 to 41 for analogue inputs of up to 8 external device sending Integer values
59
- 100 to 179 for up to 64 digital inputs of first external device
- 180 to 259 for up to 64 digital inputs of second external device
Etc.
- 640 to 647 for first 8 digital local inputs IB0
- Etc.
To make the values sent on CAN-Bus by other devices arrive and be accessible in local
CANIO, some parameters have to be set. (concerning parameters to make a CANIO transmit
its input-values to CAN-Bus see also Chapter 2.2)
These values are checked for timeout (not CAN-Bus telegram of specified ID arriving for a
certain time), so they are set to zero, if no telegram is received for more than 500ms.
Normally digital inputs are transmitted via PDO1, i.e. via CAN-Id 181h to 1ffh.
The mapping is done via Parameters 0, 1 (and 2 for transmitting).
If Parameter 2 of first Slave is zero and of second Slave 2, and local device has value at 1, the
following three telegrams will be seen on the bus (see also chapter 2.1 for details): 181h from
first slave, 182h from local device (Parameter 2 = 1), and 183h from second slave.
60
With the configuration of the master shown above,
via Parameter 0 the four bytes of telegram 181h will become digital inputs 100 to 137 .
First byte 100 to 107, second one 110 to 117 etc.
Note: Most digital inputs of CANIO are also analogue. So if the information needed from this
input is Boolean, it makes sense to use the digital version of transmission (see previous
chapter), as it reduces CAN-Bus traffic.
Normally analogue inputs are transmitted via PDO2, i.e. via CAN-Id 281h to 2ffh.
The mapping is done via Parameters 8, 9 (and 6 for transmitting).
If Parameter 6 of first Slave is zero and of second Slave 4, and local device has value at 2, six
telegrams will be seen on the bus (see also chapter 2.2 for details):
281h and 282h from first slave, 283h and 284h from local device (Parameter 6 = 2), and 285h
and 286h from second slave. Each telegram containing 4 analogue input values.
This picture shows the relevant parameters 6, 7, 4, 8, 9 for transmission and reception of
CAN-Bus-telegrams with analogue signals.
61
With the configuration of the master shown above,
via Parameter 8
the four analogue inputs of telegram 281h will become analogue inputs 26 to 29 and
the four analogue inputs of telegram 282h will become analogue inputs 30 to 33.
via Parameter 9
the four analogue inputs of telegram 285h will become analogue inputs 34 to 37 and
the four analogue inputs of telegram 286h will become analogue inputs 38 to 42.
62
3.3.4 CAN-Bus Radio Analogue Inputs: Hetronic/HBC/Hatox/Scanreco -
Joystick
Inputs can also come from CAN-Bus-Radio, i.e. Hetronic/HBC/Hatox/Scanreco, sending on
default ID 100.
ID 1E4h for up to eight analogue inputs (coded as bytes, 7Fh in Center) and
ID 2E4h for up to 4*8=32 digital inputs in the first four bytes.
As the analogue inputs of telegram 1E4h are not yet scaled and ramped, the raw-values from
CAN-Bus of analogue inputs can be mapped into the range of physical analogue inputs 0..7,
which are no longer usable then. See 3.2.6 Mapping (Firmware > 3.2)
User Parameter 5 defines the NodeID of Radio, (default 100 for Hatox/Hetronic)
Next picture shows typical values for Hatox Radio, with raw value of 512 in middle position.
63
See 3.2.6 Mapping (Firmware > 3.2)
Example: use first Joystick of Radio for Output 1, with parameters of input 3
Parameter 21 (Outp.1) set to 30 (radio-channel), Parameter 51 (mapping) set to 3
(Ain3-Parameters used)
With Firmware >= 3.5 of April 2013 :
If Parameter 5 is > 128, the Parameter is interpreted as Telegram-ID to be scanned
for, reading 8 bytes of analog input (not 1E4h assumed as ID). So also Other IDs and
also HBC-radio can be selected. With HBC 10000 has to be added to Parameter 5.
64
3.3.5 Example with two Elobau joysticks, ID 16+17 (10h + 11h)
Here device 11h is sending on 191, bytes 0,1,2 with Analog value, bytes 5,6 with digital
commands, where byte 6 contains dead-man in bit 3 (value 8)
We assume no other CANIO sending Analog inputs, so we can use Parameter 7 to read both
devices 10h and 11h.
First we fill list in Excel sheet:
65
As Parameter 7 normally reads PDO2, it cannot be used for PDO1, unless you fill in the
Telegramm-ID itself: 190h ->400dez.
For Joystick right we now have to select CAN_AN_I8_0, which is on same place as
CAN_DIG7_0.0, i.e. byte 0 of Telegramm 7, interpreted as signed byte.
66
Override should be derived from Dead-man- switch which is at address 723
With firmware version >= 4.5 of March 2014 also J1939 Telegrams can be read.
These telegrams consist of 29bits, compared to 11bits of normal telegrams.
These 29bits do not fit into one integer value.
67
Since Firmware > 4.63 reading a byte as unsigned byte with 29bit ID and ID between FD23
and FDDB, the 8bit value multiplied by 4 and increased with the 2 highest bits of the byte
before the data byte. Depending on bits of negative direction status, value is multiplied with
minus 1, and then 1024 added.
This enables to read 10bit-values of Danfoss joysticks or any other Joystick with PGN FDD6
to FDDA, which are standard in J1939
To detect errors signaled by raw value 1022 and higher, joystick parameters of mapped input
must be configured like this for error bottom/top. Range between min_neg and min_pos might
be also larger but centerred around 1024, which is middle position.
68
3.4 Input types, 4..20mA
The six analogue inputs AI0 to AI5 can be individually programmed either to 4..20mA mode
or to Pull-Up mode (10kΩs for digital switches, switching to GND).
Via Parameter 28, each single input can be programmed to 4..20mA – Mode., otherwise the
inputs are 0..10V-Type. Valid Values: 100 .. 163
Via Parameter 29, each single input can be programmed to Pull-Up – Mode., otherwise the
inputs are 0..10V-Type. Valid Values: 100 .. 163
101: AI0
102: AI1
104: AI2
108: AI3
116: AI4
132: AI5
If set to 4..20mA mode, the raw-value for 4mA is about 1000 and for 20mA about 5000.
24mA will go to 6000 and should be detected as error.
Configuration as below picture is for 400bar sensor (showing 10th of bar), including detection
of broken wire and over-current.
The CANIO14 will detect also if Input is connected to Voltage directly. Error will be shown,
and raw-value will become -2, and calculated value zero.
Input will then return to Voltage mode to protect the 220Ω Resistor.
Additionally Setpoint- and Measured Current can be checked, and I-Min, I-max and dither-
parameters can be set here.
Override shows the PWM-Ratio.
In case of a detected short circuit of the Transistor Output to GND, Override shows -2, and
output can only be re-activated via a setpoint of zero or a reboot of the device.
If override is at 980 and still current < 50mA, an OPEN-Error is detected.
69
Current control can also be switched off, so also on/off outputs or lamps can be
controlled.
70
or big setpoints for ratio, the amplitude is limited by 100% and 0%, i.e. at a ratio of
10%, the amplitude can not be bigger than 10%.
- Normal Dither generates more internal heat, if activated. So not recommended for
heavy duty application and for 12V systems
- I-max if set to >=1000 and i-min = 1000 and current-control deactivated, output is
used as on/off output (for firmware < 3.1, PWM of 97% will result)
-Setpoint Current is the Current, which should flow through the connected coil
-Measured Current is the current measured at output. It should be same as Setpoint current,
if a coil is connected. If “Measured Current” is close to zero, and Override is close to 1000,
the coil is probably not connected properly (broken wire).
-Setpoint Current is the PWM-Ratio calculated from Setpoint, I-min and I-max.
-Measured Current is the current measured at output. It is normally not the same as Setpoint
current.
Note: Ramps for PWM-Outputs are not implemented in CANIO, only for (analogue)
Input!
“Programming via Parameters” is made for doing logical connections between outputs of
CANIO and one or several inputs of CANIO or of CANBus.
This enables to solve many problems for hydraulic application.
However, it cannot be used, or only to small degree, for state-machines having more than two
states, i.e. automated processes one step following the next. Also delays and timer-
functionalities are only available to a limited degree.
Result of work with Excel is a file, containing communication parameters, information on
twin-single-coil, names of I/O for Visual Tool, and the logic parameters.
71
Possible functionalities (examples, also combinations possible):
And-gating:
- 4 twin-coil-outputs follow 4 joysticks
- 8 outputs follow 8 Potentiometers (for example pressure control valve)
- all above combinations combined with dis-able input (limit switch etc.).
- all above combinations combined with speed reduction input
- all above combinations, with output values sent to PSL-CAN
Multiplexing:
-output following either one input or other input depending on switch
-output following either one input or same input with other ramp depending on switch
MOM
- momentary-switch (push to lock) with speed potentiometer/joystick for one output (push on,
push off)
Cruise control
-INC+DEC keys to increase / decrease output in steps like 10%
-Joystick value latched via INC-key, then INC+DEC keys to increase / decrease output in
steps like 10%, Stop by reversing direction of Joystick, or by DEC-key.
-Joystick - Axis for two outputs (twin-coil) to drive forward and backward, second axis for
making difference between two output to get steering control.
Flow sharing, also with up to 3 CANIOs combined, see 3.2.8 Flow Sharing, Anti-Saturation
-defining available flow and needed flow for every output. Reduction of speed to make values
match, if necessary
More inputs
-as output-results of not-used outputs like b-side can be used as input, also more complex
logics can be done.
72
3.6.1 Macros
The functionality of the Excel sheet is based on Macros. To be able to use them, they must be
enabled.
If disabled, this pop-up screen does not appear, when opening the sheet:
This message Box explains in short words how the sheet should be used:
73
Here we assume to have two twincoils Boom1/2 and a Pilot-valve, 2 Joysticks, a speed-
reduction Potentiometer, an Enable and a limit-input.
If there are also Inputs from CAN-Bus, next step, is to fill the sheet “ALL_CAN”.
In this example, we have a radio, sending 2 bytes of analog joystick signals joy_radio0 and
joy_radio1, and some digital inputs in one telegram, on ID 333
After having defined all inputs and outputs, next step is to select the sheet „Prog_via_Para“.
74
3.6.3 Logical connections: Setpoints
Here the upper row of the 8 columns is already filled with the names of the outputs.
The selected output, is dark yellow, the other ones are bright yellow.
the inputs from CAN-Bus, where bytes are shown both as unsigned and signed and as bit
75
Internal error states of CANIO, which might be used to indicate errors via an output
If joystick1 should drive Boom1_A select this input from drop-down menu.
So if twin-coil is selected, the input is for A and B side (negative values), else only for A-side.
The line for setpoints also includes other options, with explanation via Comment:
As Estop-Valve has to be activated with every movement, Pump1 is selected as well.
76
Inversion of variable is just shown as example. It is useful for B-side of twin-coils being
activated as two single coils for programming reasons.
A second input can be selected to influence output now from the drop-down menu two lines
below the one for the setpoint.
Available inputs in drop-down menu marked yellow are the same as for the Setpoints.
For example the Speed-potentiomenter can reduce speed, generated by joystick1, by selecting
speed_pot in drop-down menu of Override.
Also in this line, additional options can be selected, to modify functionality: OR/XOR to or-
gate / xor-gate the input with input of setpoint, usually combined with pos_neg to have signed
value and not absolute value.
MOM to enable Setpoint with first rising edge, and disabling again with falling edge.
INC_DEC for Cruise-control.
77
3.6.5 Logical connections: Disable
A third input can be selected to influence output now. Same variables available in drop-down
menu as for 3.6.3 Setpoints.
For example the Limit-switch could cause a stop to this movement:
The input defined by third parameter, not only has functionality of “Disable” but can also be
second Override, if “Pos_neg” is set.
And it can be speed input for Cruise-control and in case of selecting between two inputs
(setpoint+disable) by parameter override.
If one or several analog inputs are not used, or only used as digital inputs, any result of any
other digital or analog input coming via CANBus can be mapped into these analog inputs,
using the ramping, filtering and scaling capabilities of this analogue channel.
Digital inputs from CANBus are read as 0 or 1000 (if set).
Mapping is only allowed for values >=0, i.e. negative values are interpreted as error.
In example, above, there is byte zero of Telegram ID 333 of sheet ALL_CAN, named
“joy_radio0”
78
This byte can either be signed, with values
from -128 to 127 or unsigned with values
from 0..255.
In drop-down-menu both versions are
shown. Assume it is unsigned:
But for the outputs we need signals of +-1000. Therefore the best solution is, to map this
input of Setpoint through (un-used) analog input (AI7 for example) and scale the values to +-
1000 there.
Selection of Mapping to AI7
512 (128*4) in center for unsigned byte (deadband already done in radio).
The following picture shows boom2 being driven either by (mapped) Radio, if selector is set,
or by joystick2 if not set. Mapping is marked red, Multiplexing in black.
3.6.7 Download parameters to CANIO via VT
80
Select file para.csv which is in same folder as excel sheet, and must have date of generation.
Also the names of Excel sheet are imported into VT, so the VT-project should be safed then.
81
3.6.8 Test of Program-Parameters
82
Also inputs from CANBUS Mapped through analog inputs can be seen there.
If CANBUS telegram is not arriving, Raw Value will show as -2, causing Error and
Computed Value of zero.
Inputs from CANBus can also be seen in Watch-window on right side, at PLC-Parameters.
Extern 0..3 for first telegram, 4..7 for second etc.
If values are zero, either telegram only includes zeroes or telegram is not sent on bus.
If all inputs arrive and behave as expected, the corresponding outputs can be checked.
Best way is to use Watch-window on right side.
If “Show All” is checked, a tree opens, showing all variables. The relevant ones then should
be selected
Now it can be verified, that Boom1_A has a setpoint of 50%, which is caused by
joystick1=100% and speedpot=50% and limit=0.
83
If limit becomes >0, Boom1A must become zero.
If joystick1 goes to 500, Setpoint will become 25%.
Zero will cause 0% also for Estopvalve, unless second function is active:
If valves are already connected, and in order to prepare parameters for valves valve
parameters can be checked in respective menu:
84
Here no valve connected, therefore „Open Error“.
To be sure, supply for transistors is there, you can also check measured voltage at output pin,
in menu for digital input:
85
Analog Value > 1000 means, that CANIO is driving the output high. If there is no current,
coil must be missing.
86
Parameters of Program:
87
4. Slave Mode, CANIO controlled via CAN-Bus, CANopen-
style
CANIO can be used with standard Firmware, as CAN-Bus-Slave, transmitting the value of its
inputs and reading commands for outputs, sent via CAN-Bus from a PLVC or other CAN-
devices (i.e. CAN-Bus-Master).
The CAN bus (controller area network) is an asynchronous, serial bus system that
requires only two wires for the data transmission. According to their signal levels they
are denoted by CAN_HIGH and CAN_LOW.
Twisted-pair cables with a characteristic impedance of 108 to 132 Ω are recommended
as bus line (according to ISO 11898-2 “high speed medium access unit”).
The protocols CAN 2.0 A & B and J1939, based either on 11 or 29 bit address data,
are commonly used for data transmission formats (OSI layers 1 to 2). Both variants are
supported by the CANIO14 modules on the hardware side. The 11-bit mode is preferred.
The reference potential for the CAN bus is internally connected to the 0V signal of the
power supply.
Each bus system must be assigned to all participants identical transfer rates. A compromise
between the required transmission rate (or fault tolerance) and geometric length
of the bus has to be found.
The transfer rate depends on the length of the bus line. In next table values can be found.
Note the relationship between transmission rate (baud rate) and maximum allowed cable
lengths. Also consider the topoloyg (linear vs. star) of the bus system.
88
Star topology and too long tap lines lead to communication disorder.
The attempt to realize a linear network topology and to avoid tap lines should
generally be made.
If this is not possible, the maximum length of the tap lines should follow the specifications
in table above, in accordance with the respective transfer rate.
An exemplary diagram of a CAN network is illustrated here:
89
4.1.4 CAN-Bus Basics
Independent of the protocol used, the physics of CAN-Bus defined in the ISO 11898
are the reason the similarities of all protocol implementations.
The following subsections provide a brief overview of these essential characteristics.
4.1.4.1 Telegram
CAN messages consist of so-called telegrams, which are data packages with some bytes of
user data.
Telegrams consist of 11 or 29-bit ID (column 1), a length DLC, and 0..8bytes of
data(column3). In this example the telegrams are cyclically repeated.
Fields with a length of 1, 2, 4 or 8 byte are commonly used for the transfer of data
values. The little endian data format is common for the values that are made up of
multiple bytes, which means that the byte with the highest value is transmitted last.
Negative values are transmitted as one’s complement.
4.1.5 CANopen
90
A more simplified form of integrating CANopen participants in various developer
environments or diagnosis systems (PC tools for commissioning) consists of inserting a
detailed device specification into corresponding programs through an EDS file.
Unfortunately the material given by the CiA is only partly useable to provide a quick
start for newcomers to CAN technology.
Aim of this chapter is to offer a basic introduction into the philosophy of CANopen and to
explain the different elements of the standard.
The CANopen standard [3] distinguishes between the following data objects (telegram
types):
- PDO (Process data object)
- SDO (Service data object)
- NMT (Network management)
- EMCY (Emergency object)
- SYNC (Synchronization)
Process data objects (PDOs) are telegrams that are cyclically sent and apply to the
actual function of the particular CAN participant. PDOs are responsible for the major
part of the busload in a CANopen network. They serve the original purpose of the CAN
participants: transferring data to or from a slave.
In addition to the PDOs and SDOs there are also commands for network management
(NMT) as well as prioritized identifiers to communicate errors, so-called emergency
objects
RXPDOs, TXPDOs
Process data objects (PDOs) are telegrams that are frequently transmitted, e.g. actual
values and setpoints.
Due to the 11-bit addressing the address space of CANopen includes 2exp11 = 2048
possible COB-IDs. The number of 128 potential participants enables dividing the
entire address space into 16 partitions with the length 128, which can have various
functions assigned.
91
This Table shows this distribution.
Please note the direction information as listed in table above. I
CANIO14 supports
a) TxPDO1 for transmission of digital inputs.
b) TxPDO2+3 for transmission of analog inputs.
c) RxPDO1 for transmission of digital setpoints to CANIO14
d) RxPDO2+3 for transmission of proportional setpoints to CANIO14
see chapter 4.2.1 TPDO1 Digital Inputs and following for details.
Some IDs are reserved for historic reasons. Not necessarily all IDs are used, but they could
be.
CanOpen Hex Dez set by Used for
NMT 0 0 \param\sub4\canmaster Startup command from master
7 7 terminal via canbus
64 100 NBB Radio
80 length 0, SYNC Telegram
81 81h + NODE-ID Emergency PSL-CAN
AA 170 \para\sub7\cannode Slio sync, obsolete, length 2
TPDO1 181 385 \para\sub4\a) PLVC dig Input
182 386 \para\sub4\a) PLVC dig Input
183 387 \para\sub4\a) PLVC dig Input
184 388 HMI length 7
1a0 416 Feedback psl-can 1A0, 1A2,.. – 1BE
1BE Feedback psl-can 1A0, 1A2,.. – 1BE
1E4 484 Analog values Radio
1E5 485 Analog values Radio
1E6 486 Analog values Radio
1f4 500 radio Gross-funk
1f5 501 radio Gross-funk
1f6 502 radio Gross-funk
RPDO1 201 \para\sub4\k)l) dig. Setpoints PLVC/CANIO slave
92
203 \para\sub4\k)l) dig. Setpoints PLVC/CANIO slave
204 .. \para\sub7\b) Textes for HBC radio and HMI
20B \para\sub7\b) Textes for HBC radio and HMI
220..23F 544 CAN_VALVE setpoints psl-can 220 – 23F
TPDO2 281..290 \para\sub4\d)=0+ sub6! Analog Transmit addr.=0 => 281h – 290h
295..2A4 \para\sub4\d)=1+ sub6! Analog Transmit addr.=1 => 295h – 2a4h
2A9..2B8 \para\sub4\d)=2+ sub6! Analog Transmit addr.=2 => 2a9h – 2b8h
2BD..2CC 701 \para\sub4\d)=3+ sub6! Analog Transmit addr.=3 =>
2E4 740 Radio
RPDO2 301 \para\sub4\h)i)=0 prop. Setpoints PLVC/CANIO slave
302 \para\sub4\h)i)=1 prop. Setpoints PLVC/CANIO slave
303 \para\sub4\h)i)=2 prop. Setpoints PLVC/CANIO slave
364 radio display texts
TPDO3 381 381+NodeID CANIO Analog input PDO3
3A0..3BE Parameter 271 Debug-Texts PSL-CAN
3c0 960 radio hbc new
3E8 1000 \para\sub4\n)=1000 Display
RPDO3 401 401+NodeID RPDO3
444.. 44F 1092 Terminal via CANBUS
RPDO4 481 481+NodeID
4A0 .. 4BE Can-node Tool Tx
TPDO4 501 501+NodeID
520 .. 53E Can-node Tool Rx
TxSDO 581 501+NodeID Sdo from Slave
5A0 .. 5BE PSL-CAN SDO Respond
RxSDO 601 601+NodeID Sdo from Master
620 .. 63E PSL-CAN SDO Request
NMT 701 701+Node-ID Boot telegram
707 1799 \para\sub4\m)=1799 Graphic display respond
7E4 can-node Tool broad-cast
7E5 can-node Tool broad-cast
7FC .. 7FF 2044 radio hbc classic
Moreover, for CANIO a very high bus load also reduces speed of software.
Workaround: see 4.1.7 CAN-Bus Filters for Telegrams V4.55
To detect too high bus loads, you can check \diagnosis\submenu4 of PLVC, the value after
“real”:
93
Alternatively, via PCAN-View, you can select \tools\status-display\Bitrate to find the bus-
load, i.e. RcvBits/s divided by 250.000 or 125.000 depending on Baudrate.
If bus load is too high several topics might have to be checked and modified depending on
reason(s):
94
Parameter d) >=0 can generate many telegrams per 20ms, depending on how many telegrams
are enabled in submenu 6:
Disable as many as possible here!
95
Submenu 6 of \Parameter
The telegrams enabled here are transmitted every 20ms. Via parameter p) in submenu 4, this
rate can be set to 40ms via 2, to 60ms via 3 etc.
If PSL-CAN is used:
a) You can lower the bus load, if you send fewer set points to the valves.
You might have to increase the setpoint timeout value at Parameter 119
(PAR_ERR_SP_TIMEOUT) accordingly.
b) Increase the value for repetition-time of Transmit PDOs from the CAN-Valves with
Parameter 118 (PAR_CAN_STATUS_TIME) from 20 to 100 via CanNode-Tool.
And you can lower the Transmit PDOs from the CAN-Valves with Parameter 118
(PAR_CAN_STATUS_TIME).
96
4.2 Configuration of CAN-Telegrams for CANIO14
Behaviour of CANIO14 as Slave is defined via user parameters, which can easily be modified
via Visual Tool VT. The relevant parameters can all be found within the first 17 Parameters,
which can be seen here:
97
4.2.1 TPDO1 Digital Inputs
Digital inputs are sent via Transmit-PDO1, i.e. ID181h +x
User Parameter 2 defines x, which is also called COP-ID or Node-ID,
i.e. 0 -> Telegram 181h, 1-> 182h, etc. -1->off
User Parameter 3 defines telegram length: 0..8,
If parameter 2 is set to zero, and Parameter 3 is set to 4, the following telegram results:
Byte0 for IB0.0 to IB0.7 // dig. inputs and 6 analogue inputs read as dig. input
Byte1 for IB1.0 to IB1.7 // outputs read as input
Byte2 for IB2.0 to IB2.7 inverted of Byte 0
Byte3 for IB3.0 to IB3.7 // Controller supply, 5V ref. New since V2.99
If Parameter 3 (for length of telegram) is 8, also the first 3 analogue inputs AI0,1,2 are
transmitted via this PDO, following two bytes of dig. inputs, (without inverted values of dig.
inputs).
If Parameter 4 equates to 1, the scaled inputs are transmitted, otherwise the raw-values [mV].
In next example Parameter 3 is at 8, and Parameter 4 at 1, so 2*8 input bits, and 3*1000
(03E8h) as calculated analogue input values are sent.
98
For Firmware Version >= 3.73 :
If Parameter 3 (for length of telegram) is at 4 telegrams are sent at rate of 60ms and if there is
a change in last 20ms. This can reduce bus-load, but still has information sent fast if there is a
change.
If Parameter 3 (for length of telegram) is 5 or higher, but smaller 8, telegram is at 20ms
again and contains:
B0: dig. inputs,
B1: dig. inputs
B2: inverted output-errors(short circuit or open-error) 0..7
B3: inverted Ain-Errors 0..7.
B4: inverted byte of output short circuit - error. (not visible in PLVC!)
B5: inverted byte of hi-error or lo-error: hi-error: Voltage on output without setpoint, low-
error: no Voltage at output, although setpoint
B6: Bit-field of 8 bits, indicating if output 0..7 is set (having setpoint>0)
This CANIO sends output errors on outputs 0 and 2 (FAh), input error on Ai3 (F7H), and
short circuit on Output 0 (FEh). -> Output 2 has OPEN error.
99
Hint for PLVC-Users:
If combined with a PLVC, inputs can be directly read from IB8.0 to IB9.7 if Parameter b) is
set to 1 for reading ID 182h. (see screenshot of PLVC\parameter\sbu4 below)
If more than 3 analogue values are needed, one or two telegrams of Transmit-PDO2 have to
be enabled:
User Parameter 6 defines COP-ID, i.e. 0 -> Telegram 281h, 1-> 282h, etc., -1->off
User Parameter 7 defines how many telegrams (of 4 analogue inputs each )will be sent:
0->off, 1->1 Telegram, 2 -> two telegrams.
100
Hint for PLVC-Users:
If used together with a PLVC, telegrams 281h ff will be read into analogue inputs, submenus
7,8,A,B
101
Where they can be read into OpenPCS via GET_ANA, Channel 64ff (see left side colomn of
table) Validity of data is returned in GET_ANA.OK. IDs are shown on right side column.
The telegrams are checked for a timeout of 200ms.
CANIO has 8 outputs, which can be used either proportionally (PWM or IPWM) or as digital
outputs (on/off).
For use as digital outputs Receive-PDO1 is used i.e. Telegram with ID 201h+x.
A byte with 8 bits is sufficient to control the 8 outputs.
A CAN-Bus-master sending a telegram with ID201h and 8 bytes of data, therefore could
control up to 8 outputs of 8 CANIO =64 outputs
102
User Parameter 11 defines the byte within the telegram to react on:
Parameter 11 Byte
-1 Deactivated
0 0
1 1
2 2
X, x<8 X
The mask gives the possibility to have some outputs working as digital, mixed with some
PWM outputs, which are controlled by another PDO (see next topic).
The telegrams have to be repeated at least every 150ms, otherwise outputs will be reset to
zero because of internal time-out control.
Note: Make sure, not to use “Programming via Parameters” at same time, or consider
mask very carefully!
103
For PLVC Users:
For combination of CANIO with PLVC, outputs can be directly addressed by PLVC as master
via addresses %QB25.0 (byte 0), or %QB26.0(byte1), if parameter k) of
PLVC\Parameter\Submenu4 is set like shown below.
The corresponding telegram with ID201h (202h if Value set to 1) will be generated
automatically after every PLC-cycle:
104
The setpoint value ranges from 0..1000 for single – coils and from -1000 to 1000 for twin
coils. This value must be written into Bytes 1 and 2, with low-byte first.
Telegram will look like this for setpoint of +1000 (03E8h) to output 4.
Note: Make sure, not to use “Programming via Parameters” at same time!
For combination of CANIO with a PLVC as master, outputs can be directly addressed via
Function Block ACT_VALVE, with channels 34, 36, 38 and 40 (for 4 twin coils) .
If parameter h) is set like shown in the following screenshot, the corresponding telegram with
ID301h will be generated on any call of FunctionBlock ACT_VALVE (channel>=34).
105
A second CANIO could be directly addressed via Function Block ACT_VALVE, with
channels 68, 70, 72 and 74 (for 4 twin coils), if parameter i) is set from -1 to 1 in PLVC and
parameter 15 of CANIO set to 1. In this case, the third can be addressed via channels 102, the
fourth one via channel 136.
If configured as twin-coil all outputs can be driven, and channels 0,2,4,6 are addressed.
The setpoint value ranges from 0..1000 for single – coils and from -1000 to 1000 for twin
coils. This values must be written into Bytes 0/1, 2/3, 4/5, 6/7, with low-byte first.
If configured as single coils only even outputs can be driven, and channels 0,2,4,6 are
addressed.
106
To address ouputs 1,3,5,7 RPDO3 has to be used.
User Parameter 17 defines the Telegram to react on:
As all outputs can also be addressed as on/off (digital output) via RXPDO1, a mask is added
to define, which channels are to be used via Parameter 16.
The mask can go from 0..255 for 8 outputs.
Make sure, mask of Parameter 11 does not conflict!
107
4.3 Additional CAN-Open Features
4.3.1 SYNC
If enabled, the telegrams, described in 2.1 and 2.2 will not be sent every 20ms, but only
immediately after reception of a SYNC-Telegram, ID=80h, Telegram-length = 0
Example: SYNC every 100ms:
108
4.3.2 Bootup Message
Bootup Message with ID 700h+Node-ID, B0=0, LENG=1 will be sent, if parameter 14 >0
and bit 0 is set, i.e. value of 1 will enable the feature.
If CANIO14 should send startup telegram (ID=0, B0=1, B1=0, LENG=2), bit 4 of Parameter
14 has to be set, or value of 16 must be added.
Note: in this case CANIO14 acts as Master to (radio) – slave! Only in stand-alone
applications, where no other master is available.
109
4.3.6 CAN-OPEN example
1. To use CANIO14 as CAN-Open Slave, the Master software just has to include the
eds-file (see chapter 4.3.7 EDS-File, Version >=3.7)
Example below is for Node-ID 3, which means that Parameter 2 is set to 2 (Node-ID
minus 1). This enables SDO transfer, and if Parameter 3 is also set, the Transmission
of dig. Inputs (see also chapter 4.2.1 TPDO1 Digital Inputs).
3. If also analog inputs should be sent by CANIO, also Parameter 6 has to be set to
Node-ID -1, and Parameter 7 either to 1 for 4 Analog inputs or 22 for 8 Inputs as
described in chapter 4.2.2 TPDO2, Analogue Inputs
4. If outputs of CANIO should be used as dig. outputs, also Parameter 10 has to be set to
Node-ID -1, and Parameter 11 and 12 like described in chapter 4.2.3 RPDO1 digital
Setpoints for on/off - Outputs:
5. If outputs of CANIO should be used as PWM/Proportional outputs, also Parameter 15
has to be set to Node-ID -1, and Parameter 16 as described in chapter 4.2.4.2 Setpoints
via RPDO2/3, 4 commands per Telegram
6. Parameter 14 should be set to 14 = 1+2+8 to enable standard CANOPEN behaviour
concerning boot-up like described in chapters 4.3.2 Bootup Message 4.3.3 Reset
via Telegram 4.3.4 Activation consumer
7. Canio expects setpoint-telegrams of 4. and 5. Cyclically, however if Heart-Beat of
Master is enabled, also telegrams on change are possible. HB-Time must be smaller
220ms to avoid timeout.
110
Example configuration for Node-ID 3, reading digital and analog inputs, and writing 3
prop. outputs and 5 dig. outputs:
Maybe filters should be considered see chapter 4.1.7 CAN-Bus Filters for Telegrams V4.55
111
4.3.7 EDS-File, Version >=3.7
112
Firmware > 7th. Of June also provides access to all user parameters 0..500 via Index 2002h
and 2003h, Subindex 1 .. 251
113
5. Parameter Save and Restore
If all the (parameter) settings of the chapters above have been done, it is very helpfull to save
these parameters into a file, both for documentation and for the next similar application,
which can use these parameters as well.
114
If you hit the SAVE – Button on right lower side, the following window will appear, showing
the progress of parameter reading. After 4352 Bytes, the windows will close.
Via CTRL+U a windows will open, where you can select the file to be sent to CANIO.
115
This progress- window will appear and close after successful file transfer.
NOTE:
Selecting Menu
\File
\SAVE (AS)
of VT will not save parameters, but only the VT-Environment, i.e. Texts and screen-
configuration!
116
6. Download of Firmware:
6.1 CAN-Bus Download:
The binary file for downloading the firmware can be found in the folder \bin with file-
name CAN_IO14.S19.
Make sure, it has new date of creation of software via hitting F7 in compiler.
If you get a new file from HAWE via email, overwrite the existing one.
PCAN-USB is recommended also for other HAWE Products, however for CANIO
Firmware-Download also most Sontheim CAN-Dongles work. Also CAN-Fox of IFM
works like Sontheim CAN-Fox.
Within the folder there is a batch-file called “flash_cust.bat” which has to be executed via
double-click to it..
If everything is ok, this window will appear, with a bar, indicating progress of download.
117
After success, this window should appear and can be closed via any key.
Modifications necessary for Sontheim: Batch file flash_cust.bat needs two additional
options:
/interface 2 /sh_netnumber xx
Where xx stands for
0: PowerPCI Ch1
15: CANAS Ch1
16: CANAS Ch2
21: CANUSB Ch1
22: CAN USB Ch2
24: CANUSB Ch1
25: CANUSB Ch2
90: MobiCAN Ch1
91: MobiCAN Ch2
105: CanFox Ch1
See also Sontheim Manual
118
6.2 Possible errors during download:
6.2.1 CAN-Dongle not connected to Computer
In case of these errors start PCAN-View, a free program which comes with the dongle and
check the CAN-Bus at 250 kBaud:
119
If no telegrams are received try to send one telegram manually. If red Text BUSHEAVY
or BUS_OFF appears, make sure, there is no other devices with wrong baud rate
connected.
After reboot one telegram with ID 1FFFFFFF0h should appear, indicating the presence of
a CANIO. A download might also fail if there is too much traffic of other devices on the
CAN bus, so try to remove some of them.
120
6.2.3 More than one CANIO connected
Note: only one CANIO is allowed on Bus during Firmware download. If there are two at
same can-bus Errors like this will appear:
With Loader 3.73, available since March 2014, this problem is solved.
If option ALL is used in loader batch-file also several devices can be loaded with same
firmwre with one call of flash_cust.bat.
7. Temperature-protection
CANIO reads internal temperature on controller.
If this temperature is > 92 degree, at every degree until 95 degrees the 1KHz PWM-Mode is
deactivated automatically for channels 0/1, then 2/3 etc.. Moreover the setpoints are reduced
by 20% steps.
If 100 degrees are reached, the device will switch the outputs off, until below 87 degrees.
8. Special parameters
Baud rate :
CANIO is delivered with a default baud rate of 250kBaud.
Also the Batch-files for the firmware-downloader (flash_cust.bat in \bin-folder) assumes this
baudrate.
However, via Terminal, this can be modified for Firmware > CAN_SLAVE V2.8, August
2012
At Login-Screen the baud rate is shown I first line
121
If Parameter is hit, then 29, then d) you reach parameter 292 to modify:
Valid values are: 50, 100, 125, 250, 500, 1000 (kB). Baud rate change will need a reboot of
device!
Note: For download of firmware after change, the batch-file flash-cust.bat in \bin-folder
has to be modified accordingly concerning parameter /baudrate 250k
Reboot has to be done twice to make it valid
122
9. Frequency measurement
Since Version 2.9 of Sept. 2012 also Frequency measurements are possible via CANIO14 up
to 100Hz. The internal resolution is 100th of Hz.
The pin B6 of AI0 has to be used.
Since Firmware-Version 3.8 of June 2013 additional Frequency measurement is possible via
CANIO14, pin B3/IB0. The internal resolution is 100th of Hz.
Frequency will be shown in AI7, which means that this input is no longer available then (dig-
input still remaining).
As future versions of CANIO will also be able to go up to 1kHz, activation at resolution of
10th of Hz is possible via TYPE 24V-S, for both inputs. So 1Khz will result in 10.000.
123
10. Free programming of CANIO, Principle
If the functionality described in chapter 4. Slave Mode, CANIO controlled via CAN-Bus,
CANopen-style and 3.2 Setting of logical connections (Programming via Parameters): are not
sufficient to “program” a CANIO, there is also the possibility of free programming of the
device.
HAWE offers a free programming environment with a very powerful library, making it easy
to realize also complex tasks.
As scaling and ramping of inputs and current-control of outputs are already built – in
functionalities, the programmer can completely concentrate on the logical connections.
If available and for WIN7 it is easier to do it from HAWE-CD Version > July 2012
To install select “CAN-IO Programming system” from the HAWE USB-Stick/CD./ autostart
124
10.1 Project/Template
Upon Request you can get a zip – file from [email protected]
Unzip Template-Folder Export.zip, and copy it to your computer: It includes the
following folders:
\bin : where the downloader and the downloadable files are located: see also 6. Download
of Firmware: It is recommended to make a link to flash_cust.bat on desktop for loading of
firmware
\CAN_IO14_C_DATA for the object files (do not enter)
\include for standard include files
\prm for locating files (do not enter)
\sources : for the relevant source files (.c and .h - files), which can be modified and re-
compiled.
Also the file project.lib which might have to be updated, if new version is published by
HAWE.
Project opens and shows the relevant files visible on the left side of the page:
125
10.2 Variable definitions for program
10.2.1 Input Variables
Openpcs.h starts with possible physical inputs, both as analog and as digital version.
These define-statements could be directly used in code, i.e. if you want to use AI0 you can
use the name IW24_0 or IB0_2 (if used as digital input).
However, for readability, it is better to give names to these inputs in vars.h via defines like
shown here:
126
10.2.2 Local Variables
Normal local variables (not inputs, and not structured variables >integer/INT), especially
those which possibly will be needed also for debugging should be defined as syt_val[x] with
x going from 0 to 49 in vars.h. As vars.h is included both in user_code.c and in user_can.c
they can also be used for variables coming or going via CAN-Bus.
Note: if built-in CANBus functionality will remain within the code (see chapter on
user_can.c) some of them are already reserved, and can therefore not be used anymore.
If features are not enabled these variables can be overwritten.
About 350 integer variables can be defined. If more is needed please ask HAWE.
127
If a variable has to be used in both files, it is recommended to declare them as “external” in
vars.h.
Note: Float/REAL variables are not supported (and not necessary, due to SPLINE and
MUL_DIV functionality)
Hint: As a forgotten semicolon for example can cause many error messages, it is
recommended to hit F7 key after each line of change, to see, if error happens. Error can then
be removed by “undo-key”.
Coding should mainly be done in user_code.c. If the program has much to do with CANBus,
it can also be done completely in user_can.c.
Note: Program is executed every 20ms, so no while-loop to wait for some input to come
are allowed, otherwise watchdog will reset device!
Code-Warrior is a C – Compiler.
Due to some Macros, programming style can however be very similar to ST-language, used
OpenPCS, with statements like IF THEN ELSE END_IF;.
Main difference, which could not be solved by macro:
a) Assignments in ST via := must be changed to = Statement
b) Comparison in ST via = must be changed to == Statement in Codewarrior
c) Logic AND statement ST via AND can remain or must be changed to && Statement
d) Bit-wise AND statement ST via AND must be changed to AND_WORD or &
Statement
e) Logic OR statement ST via OR can remain or must be changed to || Statement
d) Bit-wise OR statement ST via OR must be changed to OR_WORD or | Statement
Most Function Blocks known to Openpcs programmers, are also still available like:
ACT_VALVE, MUL_DIV, SPLINE, TON, TOF, CAN_WRITE, GET_EE, PUT_EE,
AUTO_MOVE, MW_EX…..
They are explained with more details in openpcs.h
128
Details on the parameters of these functions are available in Function Block Description of
OpenPCS: file PLVC_Documentation_EN.pdf. of HAWE-CD, chapter 12.6. HAWE
Function Blocks
Next screenshot shows a short example of a program writing a delayed alarm signal, and
writing a joystick to a proportional output, depending on ENABLE – input. More detailed
programming examples will follow in appendix.
If Function Blocks are used you have to define a variable of the FB-Type in user_code.c
before usercode-function: Example: TON
129
10.3.2 C-Style Programming
If CAN-Bus communication is used, open the file user_can.c and edit can_tx()-Function,
using CAN_WRITE, CAN_WRITE_INT, CAN_WRITE_29 like in OPENPCS to send
telegrams to bus.
To write INT Variables use CAN_WRITE_INT, for bytes use CAN_WRITE
Before starting you have to decide if any built-in canbus-functionality should remain,
otherwise remove these macros of beginning of user_can.c
130
#define CAN_OPEN_NMT 1 // canopen network managment, also enable together with
CAN_RADIO! // Start-up, operational, Heartbeat,
Example:
Frequently Hit F7 to translate the code and check for syntax errors.
If errors appear, double-click on first error message. This will normally place your cursor to
the error reason. Correct it, and hit F7 again. Usually also other errors will have disappeared
then. Also correct any warnings, if possible!
If no error message appear:
Download new firmware via PCAN-Dongle, for details see chapter 6. Download of
Firmware:.
10.6 Debugging
You can make your own version of hwv-file for each project, naming the I/O, the user-
parameters and the Watch-Variables according to your application.
In Watch Windows, activated via \View\Watch you can configure the application-dependent
variables, which you want to see for debugging as well as the input and output variables.
Note: there is a limitation to 20 variables to be shown at same time.
PLC-values show the variables defined in vars.h!
For details on Visual tool see also 3. Amplifier Mode
131
Note: Modification of the name of a watch-variable has to be made in Scope-Windows
(\View\Scope). Hit “marked-only-button”, make slow double-click at variable or hit F2
132
10.6 Saving Parameters
Parameters can be read into a file and written via Binary-Transfer by VT. So a copy of all
parameters to another CANIO is possible. Make sure to safe Parameters to file before
leaving your machine.
133
11. Free programming examples
Programming is done in the language “C”, from within the Codewarrior.
The following description is specially made for users not used to “C”, but rather to
OpenPCS (used for HAWE PLVC) or for users having no programming experience at all.
Programming style is therefore made rather similar to OpenPCS.
In file openpcs.h the relevant functions and variables for programming CANIO are
defined or proto-typed.
As already described in chapter 3 it makes sense to start with defining the variables in
vars.h in order to get a readable code.
Modification of functionality will then in most cases be made in file usercode.c and
sometimes in file user_can.c for CAN-Bus related functions.
It starts with two global variables, also referenced in vars.h, followed by the function
“usercode_init()” where the Project name/version/date can be modified, and where one-
time executed functions should be called.
134
The cyclically called “usercode()” function follows. It looks like this.
The main program and the reading of analogue inputs is only called, after the _20ms-flag
has been set by the timer, so the program normally has a fixed cycle time of 20ms.
If this is too slow you can also additionally use the _10ms-flag, and insert code there as
well.
135
Now application specific code can be added.
Used Variables in file “vars.h”:
Following example drives output nr. 5 by ENABLE input, with a delay of 1 second, and
drives Output 0/1 by JOYSTICK2 at AI1 in combination with SPEED_POTI at AI2 and
digital ENABLE input.
In line before user_code (); the Timer Variable TON1 has to be defined via the line:
TON_TYPE TON1;
Program could now look like this:
136
If output is configured as twin-coil, both A-Side and B-Side will be addressed.
Note: IF,THEN, ELSE written in CAPITAL letters, enable ST-Code-style.
Programmers familiar with C-Language can also use if, then, else as used.
At commissioning the rate of reduction then can be modified without changing code.
Here 25% is set, i.e. full range of JOYSTICK2 will result in +-200 instead of +-1000
137
AUTO_MOVE:
In cyclical part of user_code() the actual position and destination have to be added, the
function has to be called, and result forwarded to output:
138
Curves and scaling :
Scaling of analog inputs already enables quit comfortable calculations for incoming
analogue inputs. Sometimes from these values other values have to be derived, which are
a function of the input.
If it is a simple linear line the function AXB will do, otherwise SPLINE can be used.
AXB:
A linear scaling of type Y = A_X +B is computed and given back in value Y , where A
and B are internally determined by the two pairs X1; Y 1 and X2; Y 2.
AXB_TYPE axb1;
139
SPLINE
To calculate stability of a crane, sometimes more complex curves are needed, which can be
defined as a curve of several points.
The Library of CANIO therefore offers the function C_SPLINE, and a variable type of
C_SPLINE_TY
// before user_code(); :
const C_SPLINE_TY spline =
{ { -150,-50,0,50,150,250,350,450,550,650,750,800,850,900,900,900 //16 X-Values Angle
},
{ 100,80,50,80,100,160,170,180,190,200,220,240,270,300,300,300 //16 y-Values (bar}
}
};
140
12. Closed Loop
With Version >2.9 a closed loop for output zero is available.
It is configured via Parameters 60+x:
Parameter 60 defines the input, where actual sensor value comes from, here AI2
Parameter 61 defines the input, where setpoint for closed loop comes from (can also be a
parameter), here AI1
Parameter 62 defines the percentage of sensor setpoint to be used as part of the output (parts
per thausand), here 700, i.e. if setpoint of closed loop is 1000, there will be a setpoint to valve
of 70% immediately independent of closed loop.
Parameter 63 defines the maximum modification of Integrator, here 30%, which can be
reasonable in combination of the 70% of parameter 62
Parameter 64 defines P-Faktor
Parameter 65 defines I-Faktor, i.e. speed of integrator
Parameter 66 defines D-Faktor, not yet implemented
Parameter 67 : if set to two, Integrator will only integrate, if new pulse has come on freq.
input, i.e. slow integrator with slow speed for frequency control.
Parameter 68 is for linearizing the output, which needs 0..1000. 5030 means that a setpoint of
30% should be converted to 50%.
Parameter 69 is reserved
141
12.1 How to set a closed loop:
To help commissioning, the relevant internal variables of PID can be checked in Watch-
window, PLC-values 40 to 49 and plotted by Smallscope, value 140 to 149.
Example: A Pressure control valve type PMV of HAWE should be made more precise with
the help of CANIO14 and a pressure sensor.
Pressure sensor is connected to AI2, Setpoint comes from a Potentiometer, wired to AI1.-
>parameters 60 to 2 and 61 to 1.
Valve is a 250bar type, pressure sensor is 500 bar type, 0,5V to 10V.
250 bar should become 1000
Parameters as below: At 10V, the scaled pressure becomes 2000-> 500bar and 1000-
>250bar, which is value of valve at 100%
It is known that the worst case error of hysteresis and non-linearity of the valve is +-10%,
if i-min and i-max are perfect, otherwise +-20%
->Parameter 61 becomes 800, so 80% of closed loop are “known”, and closed loop can be
limited to 20% -> Paramter 63 becomes 200
142
Now it can be tested, without touching parameters 64 to 70, and the result should be
working but not yet very precise.
In the valve menu I-min has to be set to the point, when the hydro motor starts to move by
“playing” with the parameter I-min.
I-max has to be set to the point, where the movement doesn’t move faster any more.
143
If now the set point is reduced back to 500 the computed value of the input showing actual
value should also be
halved.
Image 1 Valve menu
At first, if you drive the controller without closed loop but with percentage set to 1000, you
will see the control is not very precise, as the integrator doesn’t set the missing part. Using
parameter 63 you define how much is done by the Closed Loop. Parameter 62 defines the
percentage, done by the setpoint.
144
Image 3 Controller without having parameter 64 and 65 set
Assuming you have a non-linear valve, you should also now linarite it.
Parameter 68 gives the possibility of linearization. In above curves the result of a setpoint of
500 will not be 50% of flow, but less. So you can define a characteristic point on the curve,
which should be met.
For Example above curve has a characteristic point at about 30% of current, where flow is not
30% (which would be linear), but only 15%.
This means that 3015 must be written to parameter 68, to double changes between 0 and 30%,
compensating the too slow reaction, and going then linearly from 30 to 100%
145
Linearized valve parameter 68 at 7030 (PID Return has a knee at 70 percent)
Now P_fak can be set: A value of 1000 means, that at a deviation of 100% there will be
setpoint related to p-fak of 100%.. As 80% are already done via Percentage, only 20%
remain, so 100 for 10% might be a good value.
It is also possible to “play” with p-fak at different positions of the Closed loop until you
get an oscillation. This value should then be halved at least.
The resulting P-Control might probably result in a pressure with an error of < 10%
Now I_fak can be set: A value of 1000 means, that at a deviation of 100% there will be
setpoint related to p-fak of 100% within 1 second.. As 80% + 10% are already done via
Percentage and p-fak, only 10% remain.
Moreover it is known, that the system has a reaction time of 100ms, so 100 for 10% in 1
second will be a defensive value.
It is also possible to “play” with i-fak at different positions of the Closed loop until you
get an oscillation. This value should then be divided by two at least.
With I-fak set, the resulting PI-Control should result in a precise result, maybe oscillating
around the destination.
If not, it can be seen in variable PID_Integr. Stopping at its max. value defined by
Parameter 63, if pressure cannot be reached, or stopping at negative value defined by
parameter 63, if Parameter 62 is much too high, or if sensor does not work properly.
The variables can also be scoped via Smallscope-software, with the variable indices going
from 140 to 149.
Then oscillation can be easily detected.
If the sensor is not a fast pressure sensor, giving a value every cycle of 20ms, but a slow
frequency signal, going for example from 3 to 10Hz, there will only be new data every
100 to 300ms. Therefore the Integrator must be slowed down, depending on quality of
signal, to avoid overshoot.
This can be done via setting Parameter 67 = MODE to two. Then a new setpoint is only
generated, if a new pulse has come, i.e. the integrator is stopped without new actual data.
146
P_fak should be set now to half the value of Parameter 64. Next increase the value until you
observe oscillation. This can easily be detected by using the application
„Smallscope“(Variables 140-148). Once you observe oscillation, set p_fak to half its current
value. The best values are between 2/3 and ½ of Parameter 64. As can be seen in image 4, the
deviation is very large.
Second, the i_Fak has to be set. This is the integrator feedback gain. This is done by setting
Parameter 65 to double the value of Parameter 64. If the oscillation gets too big or
measurement errors produce excessively large peaks in the actual value, the integrator gain
should be reduced (Image 4). On the other hand, if I_fak is too small, it will take quite a long
time to reach the set-value.
147
Image 7 Parameter 65 is set to 3000. Measurement errors result in a high peak.
148