Page 3
The changes in the user’ s manual listed below affect changes in the hardware as well as changes in the description of the facts only. Chapter Changes versus previous version Description of CAN-CBM-SIO4 module and CAN-CBM-PLC/331-1 module inserted Technical details are subject to change without notice. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
DSUB9- connector Fig. 1.1: Block-circuit diagram of the CAN-CBM modules The CAN-CBM-SIO1 and CAN-CBM-PLC/331-1 modules offer the linking of one serial interface with the CAN-net. The CAN-CBM-PLC/331-1 module is configured as SPS controller with the software tool CoDeSys. The CAN-CBM-SIO4 module is equipped with five serial interfaces. The physical interface of the serial interfaces can be configured like the CAN-CBM-SIO1 module via piggybacks.
Page 8
Overview For CAN-CBM-SIO1 and CAN-CBM-SIO4 common protocols like 3964 R, Modbus or also FreePort to the connection of a S7-200 are optionally available. Custom-designed protocols can be made on request or developed with the help of GNU-C surroundings. By use of the RS-232-interface as modem connection a remote maintenance of the CAN net can be done in remote operation.
LED 1 Coding Switch SW210 (Low) CAN-ID Serial Interface 5 (X100) SERIAL (Terminal Interface) Power Supply (X101) Serial Interface 2 (P200) Serial Interface 3 (P200) Serial Interface 4 (P200) CAN or DeviceNet (X400) CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Case dimensions height: 85 mm, depth: 83 mm (B x H x T) (including hat-rail holder and connector projection DSUB9, without CAN/DeviceNet connector) Weight CAN-CBM-SIO1, CAN-CBM-PLC/331-1: ca. 150 g Table 1.3.1: General data CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
The CoDeSys software comes with an online help and a handbook, describing the programming system. Further information on the higher protocol layers can be taken from the CAL/CANopen documentation ‘ CiA-Draft Standard 301’ . CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
CAN-CBM-SIO-ME English manual for C.2840.02 1*) C.2840.21 1*) If ordered together with the module, the manual is included in the product package. Table 1.5.1: Order information CAN-CBM-SIO1 and CAN-CBM-SIO4 CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
5 program languages; for RTOS-UH; PC-Host CAN-CBM-PLC/331-MD Additional user manual in English C.2845.20 1*) If ordered together with the module, the manual is included in the product package. Table 1.5.2: Order information for CAN-CBM-PLC/331-1 CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
CAN-Identifier 2. CAN-Identifier The CAN-CBM-SIO4 module is equipped with one Rx- and one Tx-identifier for each of the five channels. The CAN-CBM-SIO1-module is equipped with one identifier-pair, for the only serial channel. Module Physical channel Receive CAN-Data Transceiver CAN-data CAN-...
Page 16
Table 2.2: Offset of the identifier in default setting Calculation of the base value and the identifier: base value = 10 x coding switch value identifier = base value + offset (HEX) CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Unit Description 3.2.2 Connection of the Various Serial Interfaces at DSUB9 Connector Below the wiring of the serial interfaces is represented for channel 1 (CAN-CBM-SIO1 and CAN- CBM-PLC/331-1) and channel 5 (CAN-CBM-SIO4). The figures help to explain the short terms used in for the signals in the appendix (Connector Assignment).
Fig. 3.2.5: Connection diagram for RS-485 operation In order to activate the terminating-impedance network on the piggyback, you have to connect pins 9 and 2 and pins 4 and 7, e.g. in the DSUB-connector. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
8 pole RJ45 connector local pin numbers of the 9 pole DSUB connector, if signal- the adaptor cable RJ45-DSUB9 is connected terms Fig. 3.2.8: Connection-diagram for RS-232 operation CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Pin 4 and 8 of the RJ45 socket lead in RS-485 operation to a termination resistor, on the piggyback. To activate the termination, the signal Rx/Tx+ has to be connected to TERM+ and the signal Rx/Tx- to TERM-. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
8 pole RJ45 connector local pin numbers of the 9pole DSUB-connector, if the signal- adaptor cable RJ45-DSUB9 is connected terms Fig. 3.2.12: Connection diagram for TTY operation (active) CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
The signals CTS, DSR and DCD are not evaluated by the CAN-CBM modules! Pin Position: Pin Assignment: Signal Signal (DCD) (input) (DSR) (input) (input) (output) (output) (CTS) (input) (output) (input) 9-pin DSUB-connector CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
The signals Term+ and Term- are connected to a terminating-impedance network on the board. In order to activate the connection, Term+ has to be connected to the Rx/Tx+ signal and Term- to the Rx/Tx- signal. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Pin Position: Pin Assignment: Signal Signal (transmitter) (transmitter) (I1+) (I2+) (recipient) (recipient) 9-pin DSUB-connector ( ) The signals specified in brackets are assigned, but are not required for operating this physical interface. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Pin Position: Pin Assignment: Signal Signal (transmitter) (GNDA) (transmitter) (recipient) (GNDA) (recipient) 9-pin DSUB-connector ( ) The signals specified in brackets are assigned, but they are not required for operating this physical interface. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Various Serial Interfaces at DSUB9 Connector’ . You find the directions of the signals (Rx<->Tx) in the connection diagram. 4.4.1 Serial Interface 2...4 (P200/P230, 8-pin RJ45 Socket) 1 2 3 4 5 6 7 8 Fig. 4.4.1: Pin assignment of RJ45 socket CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
TERM+ has to be connected to Rx/Tx+ and the signal TERM- has to be connected to the signal Rx/Tx-. The signals shown in brackets are arranged but are not necessary for the operation of the interface. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
(receiver, modem). The arrangement for the RS-232 interface reveals itself as follows: 8-pole RJ45- 9-pole DSUB (female) Terminal (female) (Pin assignment for RS-232C-DCE) RxD (Output) TxD (Input) RTS (Input) CTS (Output) CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Page 38
TERM+ has to be connected to Rx/Tx+ and the signal TERM- has to be connected to the signal Rx/Tx-. The signals shown in brackets are arranged but are not necessary for the operation of the interface. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
TERM+ has to be connected to Rx/Tx+ and the signal TERM- has to be connected to the signal Rx/Tx-. The signals shown in brackets are arranged but are not necessary for the operation of the interface. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Page 40
An DTR signal is needed by some modems (Data from CBM-SIO4 -> terminal). If this is the case, the DTR signal can be created by bridgeing the RTS signal in the connector on the DTR pin. With a 25-pin DSUB-connector pin 4 has to be bridged to pin 20 in this case. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
G N D + 2 4 V G N D G N D + 2 4 V G N D Fig. 4.5.1: Voltage feed Fig. 4.5.2: Voltage feed CAN-CBM-SIO1-module and CAN-CBM-SIO4-module CAN-CBM-PLC/331-1- module CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Fig.1: Settings of the target platform The Configuration has to be set to ‘ CoDeSys for CAN-CBM-PLC/331-1/2’ . By selecting this target the platform-specific basis configuration is loaded. Set CPU to’ CPU32’ . Acknowledge by OK. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Page 44
It must not be deleted or renamed (does not apply for the use of task configuration). You can find further information on this in the CoDeSys online help. Acknowledge the settings without further changes by OK. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Page 45
Select menu point PLC Configuration. Fig.4: Select CAN-master The PLC Configuration field appears on screen. Click the field Hardware- Configuration with the right mouse key and select the menu point Append Subelement and then CAN-Master. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Page 46
SYNC telegram can be started. See Fig.6. Attention! If the fields Com. Cycle Period and Sync.Windows Length have been assigned with ‘ 0’ , no SYNC telegrams will be transmitted. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Page 47
Configuration field is included into the configuration scheme under hardware configuration (see Fig. 7 ‘ Append subelements’ ). Further information and details can be found in the CANopen specification ‘ CANopen CiA Draft Standard 301’ chap. 9.3.1. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Page 48
I,O, IO (Input, Output, In/Output) yy... following numbers: length of the transmitted data in bits, zz... e.g.:8, 16, 32 or 64 Example: TST-DI8 (EDS) digital input, 8 bits TST-DO32 (EDS) digital output, 32 bits CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Page 49
Further details, also about the menu points PDO Mapping Receive, PDO Mapping Send and Editable Parameters can be found in the CoDeSys online help. Acknowledge your selection with OK CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Page 50
The identifier of the desired module has got the node ID = 6, the output address: %QB55 (the output byte 55), the diagnose address: %MB40 (the byte at the address of the pointer 40), the guard COB-ID results from 0x700+Node ID (here 6) CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Page 51
%QB55 Data type: here of integer type (*Comment*): WriteOutput16_1H: Output 16 bits on channel 1(1H), under the COB-ID = 0x306 the process data is transmitted in the CAN network. CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
CAN_L CAN_L n.c. n.c. n.c. n.c. n.c. n.c. CAN_GND CAN_H n.c. n.c. n.c. n.c. n.c. n.c. connector case connector case earth (PE) n.c. = not connected Figure: Structure and connection of wire CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Page 54
• each CAN user without electrically insulated interface works as an earthing, therefore: do not connect more than one user without potential separation! • Earthing CAN e.g. be made at a connector CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Page 55
LiYCY 2 x 0,75 mm² , LiYCY 2 x 1,0 mm² , Äußerer Eichwald Best-Nr. 93022016 Postfach 410109 1P x AWG 22 C, 1P x AWG 20 C 74535 Mainhardt (UL approved) 12111 Berlin CAN-CBM-SIO1 / CAN-CBM-SIO4 / CAN-CBM-PLC/331-1 Hardware Rev. 2.0...
Page 59
CAN-CBM-SIO CAN-CBM-SIO4 CAN - RS-232, RS-422, RS-485 or TTY Interface Manual of the Module-Specific Software CAN-CBM-SIO, CAN-CBM-SIO4 Software Rev. 1.0...
Page 60
Vahrenwalder Str. 205 D-30165 Hannover Germany...
Page 61
I:\TEXTE\DOKU\MANUALS\CAN\CBM\SIO-331\CSIO-10S.EN6 Manual file: 14.07.1999 Date of setting copy: sio4_V1.0aE0 Software version: Changes in the chapters The changes in the user’ s manual listed below affect changes in the firmware as well as changes in the description of the facts only. Manual Rev.
Overview 1. Overview 1.1 Which is Where? The description of esd-CAN modules has been divided into three manuals, which are delivered together in one ring binder. MODULE xy Manual of the Module-Specific Software CAN Application Layer esd Protocol LMT, NMT and DBT CAN Modules esd CAN Modules optional...
Page 66
Overview The second manual contains general software descriptions which are valid for all esd-CAN modules operated by the same protocol. Two different protocols are available for the modules: The esd-CAN protocol and the CMS protocol. The protocols are independent from each other and are used alternatively. Depending on the implemented protocol, therefore, one of the following two manuals is valid for the module: The esd-CAN protocol is described in the manual: esd Protocol for CAN Modules...
Overview 1.2 Default Settings The default settings of the manual are active, when one or more of the following conditions apply: A default RESET had been triggered on the module via the esd-CAN protocol. The data of the I²C-EEPROM are not OK (e.g. EEPROM is not equipped). The position of the coding switches after a RESET or power-on had been set to ‘...
Page 68
Overview Default values when operating the module with the CAL protocol Manufacturer name ASCII 'esd_han' Product name has not been defined yet Module-ID = setting of coding switches Module name has not been defined yet CAN-bit rate 125 KBIT/s After a default RESET a Configuration Download to the module via the NMT protocol is absolutely necessary! Table 1.2.2: Default settings of the module when operated with CAL 1 - 4...
Page 69
Overview Default values of user parameters (regardless of protocol used) First Tx-activate delay 10.000 msec CAN-Tx mode $1411, i.e. 'MinChar', 'MaxChar' = 1, (all channels) 'Inhibit-Time' = 20 ms $2273, ie. CTS* active (terminal interface: no CTS), 9600 baud, Serial mode 2 stop bit (terminal interface: 1 stop bit) (all channels) no parity,...
Data Transfer 2. Description of the Data Transfer The serial data are buffered between the CAN-bus and the serial interfaces in both data directions and by means of a 256 bytes sized toroidal-core store for each channel. The data being received first are also transmitted again first.
Page 72
Data Transfer When operating with the esd protocol, the data output on the serial interfaces can be stopped by the supervisor command 'Suspend Module'. All four channels are stopped simultaneously. By means of the command 'Continue' the channels are started again simultaneously. If the module is in 'Suspended' status, data being received from the CAN-bus and the serial interfaces will be stored in the toroidal-core store.
Data Transfer 2.2 Serial Interfaces Receive Data The amount of serial interface data which is stored in the toroidal-core store per interval has to be smaller than the amount of data transmitted from the CAN-bus. The CAN-bus limits the data flow via the bus demand (priority), the CAN-bus bit rate, the frequency of transmissions and the amount of transmitted bytes.
User Parameters 3. User Parameters of the CAN-CBM-SIO and CAN-CBM-SIO4 Modules By means of the user parameters the parameters for the serial interfaces and the parameters ‘ Inhibit Time’ , ‘ MaxChar’ and ‘ MinChar’ (CAN-Tx mode) for controlling the CAN-bus transmission rate are specified on the module.
User Parameters 3.1 First Tx-activate Delay (Parameter 0) Parameter 0 specifies the delay before the module starts transmitting data to the CAN-bus and the serial interfaces after a RESET. This delay is to secure that all modules operate stable on the CAN-bus before the module starts transmitting.
User Parameters The two bytes of parameter CAN-Tx-mode are structured as follows: CAN-Tx-mode Byte 5 of INIT-Id $700 Byte 6 of INIT-Id $700 Parameter Inhibit-Time MaxChar MinChar Value range $00...$FF $1...$8 $1...$8 Table 3.2.2: Structure of parameter CAN-Tx-mode Inhibit-Time..The parameter Inhibit-Time specifies the time the CAN-controller waits after the last successful transmission of CAN-bus data, before it starts a new transmission.
Page 78
User Parameters Flag Trans. MinChar transmission to Comments [HEX] status At least 1 to 8 bytes are always transmitted. 1...8 Parameter MaxChar is also evaluated. Data is transmitted, if < Cr > had been < Cr > with < Cr > received.
User Parameters 3.3 Serial Mode (Parameters 2, A, 12, 1A, 22) The 'Serial Mode' user parameters set the bit rate, the stop bits, the number of bits/character and the CTS* locking and determine the parity evaluation of the serial channels. User parameter No.
Page 80
User Parameters Rx-bit rate, Tx-bit rate... 4 bits each determine the bit rate with which data is transmitted (Tx) or received (Rx) on the serial interfaces. The default setting for Tx- and Rx-bit rate is 9600 KBIT/s. The physically attainable bit rate is limited by the hardware to a maximum of 38.4 kbit/s, when at the same time using all four channels.
Page 81
User Parameters Explanations of bits of parameter Mode RTS-Mode..Via this bit the RTS-modem mode for RS485-interfaces can be selected. RTS-mode Evaluation RTS on Rx (default setting) RTS-modem (RS485) Table 3.3.5: Evaluation of RTS-mode bits CTS* enable... Via this bit the CTS*-function of the serial controllers is enabled.
Page 82
User Parameters Stop Bit..Here the number of stop bits of the serial interface is determined: Stop bit Number of stop bits 1 stop bit (always at terminal interface) 2 stop bits (default setting for channel 1...4) Table 3.3.7: Number of stop bits The terminal interface (DSUB9) always operates with only one stop bit.
Page 83
User Parameters Parity Type... The polarity of the parity bit is determined by the parameter bit ‘ Parity Type’ : Parity Type Polarity 'even' (default setting) 'odd' Table 3.3.9: Setting the polarity Bits per Character..Via these two bits the number of bits/character is selected: Bits per Character Number of transmitted bits Bit 1...
Examples 4. Examples In this chapter the operation and initialization of a module which is operated with the esd-CAN- Protocol will be explained by means of some examples. 4.1 Operation with Default Parameters 4.1.1 Basic Conditions, Objective A device is to be connected to channel 1 of the CAN-CBM-SIO4 which corresponds in parameters to the default setting of the CAN-CBM-SIO4: - 9600 Baud - 8 Bit/Character...
Examples 4.1.2.2 Transmitting the Data to the Serial Interface Via Rx-identifier RxId1 data is transmitted to the module. The number of data bytes transmitted can be between 0 and 8. In this example the following 5 bytes are to be transmitted: Byte 1 Byte 2 Byte 3...
Examples 4.2 Changing the Bit Rate The bit rates of channel 1 are to be increased from 9600 baud (default setting) to 19200 baud for receive and transmission data. The module No. of the CAN-CBM-SIO4 corresponds to the default setting of the coding switch setting and is therefore $23.
Page 89
CAN Protocol CAN-CBM-SIO1/4 esd Protocol for CAN Modules Rev. 3.2...
Page 90
I:\texte\Doku\MANUALS\CAN\Cbm\SIO-331\Englisch\ESD_SIO1.EN6 Manual File: 11.04.2001 Date of Print: Described Software Revision: CAN kernel : from revision '1.f' (HEX) esd protocol : from revision '0' (HEX) Module specific implementation: refer to manual of the module specific software esd Protocol for CAN Modules Rev. 3.2...
Page 91
Vahrenwalder Str. 205 30165 Hannover Germany...
Page 92
Content Page 1. Introduction ............1 - 1 1.1 Notes to this Manual .
Page 93
i - 2 esd Protocol for CAN Modules Rev. 3.2...
Overview 1. Introduction 1.1 Notes to this Manual This manual describes the 'esd-CAN protocol' for esd-CAN modules, here specially for the CAN-CBM- SIO modules. By this protocol it is possible to set the CAN parameters of the modules, as for example, the Rx and Tx identifiers or the baudrate.
Overview 1.4 General Hardware Functions To use the esd CAN protocol at the CAN modules at each module the following hardware circuits are necessary: CAN controller SJA1000 (or compatible) The controller has a internal RAM, that is used as a working memory. In this RAM the dynamical parameters are stored.
Page 96
Overview Actual position of I²C I²C CAN identifier the coding switches EEPROM EEPROM (CAN Id.), parameter, module no. after RESET status module no. > CAN Id. Coding switches Parameter = default I²C EEPROM mod no. = in this case the previous module no.
Page 97
Overview Explanations to Table 1.5.1: Some of the terms from the table above will be described in detail in following sections of this manual. For a general understanding of the table, a short explanation of the terms: Module no..Serial number (1...254) which can be allocated to the module by the user independently from the module type.
Page 98
Overview Combination 2 In the third combination the module no. $00 is stored. The modules works with the default parameters. Combination 3 In this combination of the factors listed above, the module operates after a RESET with the previously changed and in the I²C EEPROM stored parameters. Requirements for this are I²C EEPROM status=OK, a coding switch position unequal $00 and a module no., stored in the I²C EEPROM, which has got a value unequal $00.
Overview 1.6 Advanced Configuration With the Advanced Configuration you can set up to 15 additional parameters with the coding switches. To set the value of the parameters you have to execute the below described step-by-step instruction. Coding Switch SW211 (High) LED 2 HIGH LED 1...
Overview 1.6.2 Parameter Numbers and Values Coding Switch HIGH Meaning (parameter number) setting the CAN baudrate index (values see table at baud (0...F) page 11) reserved write data to EEPROM esd Protocol for CAN Modules Rev. 3.2 1 - 7...
Overview 1.7 Summary of LED States State of LEDs Meaning LED 1 LED 2 - power supply off lights - module is working with stored parameters continuously lights - module is working with default parameters continuously lights - local firmware verifies parameter settings of coding flash slow continuously switches (see page 6)
Overview 1.8 Calling the Commands and Setting the Parameters If the module is in original condition (default condition at delivery), it operates only by the CAN identifiers on the CAN (see hardware manual) adjusted by hardware. To report the initialisation parameters to the module nevertheless, a special CAN identifier (INIT Id) has been reserved which is the same for all esd-CAN modules.
Page 104
Overview The parameter interchange can lead to the setting of parameters, to the reply of already adjusted parameters or to the execution of a command. At the command interchange and the setting of parameters the highest bit of the command byte is always '1', at the request of parameters it is always '0'.
Page 105
Overview 1 - 12 esd Protocol for CAN Modules Rev. 3.2...
Overview 2. Overview of the Implemented Commands and Parameters The two following tables give a complete summary of all bytes implemented until now and the parameters given back by the module. The individual designations of the commands and parameters will not be explained in detail in the tables in favour of the clarity.
Page 107
Overview Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 Byte 8 Command Sub-Command don't care Module No. Parameter 1 Parameter 2 not used not used $00 - TxId1 TxIds TxId $01 - TxId2 $82 - set $0000...$07FF Please write selected Module No.
Page 108
Overview Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 Byte 8 Command Sub-Command don't care Module No. Parameter 1 Parameter 2 not used not used $00 - RESET $AAAA - RESET Module $01 - reserved $02 - Supervisor $00 - all Modules Watchdog...
Commands and Parameters 3. Description of the Commands and Parameters 3.1 Configuration Reply The transmission is called by transmitting a 'request configuration' command. The identifier on which the module should transmit the information on the CAN is reported to it by byte 5 and 6. Contrary to the other commands only parameters are called with this command.
Page 113
Commands and Parameters Transmission of the adjusted configuration by the module: Decisive for the selection of the message to be transmitted is the value of the sub command received by the module. The following table shows the information which is transmitted to the CAN by the module. Reply of the Byte 1 Byte 2...
Page 114
Commands and Parameters Modules type (examples) reserved CDO16 CDI16 CAI810 CAO812 CDIO16/16 CAI812 reserved CREL8 CSC595 CPIO16/8 CCOM4 CCOM1 PTIDAC SPS16 CMIO reserved CTERM CBIP CANSAT AIS16 CI488 CAN-PT100/DMS4 CDMS4I CAN-PCC CCOM1 XMIO4 reserved reserved LasCon I/O SIO4 reserved reserved Table 3.1.4 Examples for module type designations esd Protocol for CAN Modules Rev.
Page 115
Commands and Parameters Byte 4: iomode... The byte 'iomode' contains, broken down into 6 bits, information about the operating mode of the addressed module. A '1' of the respective bit signalizes the operating mode possible for this module: Example: CAN- Function CMIO Output...
Page 116
Commands and Parameters < Sub command $02 -- ASCII Id Byte 1... See sub command $00. Byte 2 - Byte 6 a, b, c, d, e... These bytes describe the module type in ASCII code. Byte 7, Byte 8: mod no. ASCII... These two bytes describe the module name and the active module number in ASCII code.
Page 117
Commands and Parameters Byte Parameter level H level L rev. esd/cms prot-rev ASCII display Table 3.1.7: Example for the ASCII software rev no. 'V1.0aE0' < Sub command $04 -- reserved < Sub-Command $05 -- serial-number Byte 1, Byte 2 ... refer to sub command $00.
Commands and Parameters 3.2 System Parameters With the command $81 the parameters described below are set. By command $01 and the according sub command the module is lead to reply the actual parameters. If the command 'store parameter' (sub command $00) is transmitted to the module, all previously interchanged parameters are stored in the local I²C EEPROM.
Page 119
Commands and Parameters Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Function Command Sub command Not used Module no. Parameter 1 Parameter 2 CTxId Request: $01 $00...$03 $0000...$07FF active mod $00 store parameter Selected Always $01 module no. new mod no.
Page 120
Commands and Parameters The kind of the parameters interchanged to the module depends on the selected sub command: < Sub command $00 -- store parameter active mod. no... To store all interchanged parameters (also those of other commands) the actual module no.
Page 121
Commands and Parameters Notes on the internal management of the CAN-error bit: The CAN-error bit is set by the local software if the status bit of the CAN controller 'error status' is activated. (see constat). After the first recognition of a CAN error the controller at first tries to transmit or receive data repeatedly.
Page 122
Commands and Parameters If no communication is possible with the module, this is often due to a wrong adjustment of the bitrate. If the local software discovers a malfunction on the CAN, the bitrate is adjusted again to the default value (adjustment at the configuration jumper of the module), but without changing the other parameters.
Page 123
Commands and Parameters < Sub command $04 -- set watchdog Tx identifier < Sub command $05 -- set watchdog time (guard time) The watchdog protocol functions with following scheme: After a RESET, the watchdog is inactive. The 'master' interchanges with these sub commands a Tx identifier, a watchdog time (Guard Time) and a life time factor to the module.
Page 124
Commands and Parameters The interchanged parameters of the sub command $04 and $05 have the following meaning: WTxId ... In this word the Tx identifier is interchanged on which the master transmits the remote request and on which the module transmits the response. WDtime...
Page 125
Commands and Parameters Requesting the actual parameters by the module (command $01): Command... The command $01 leads to the reply of the actual parameters. Sub command... The sub command determines the configuration bytes which should be returned: Reply of the parameter command Saved module no.
Page 126
Commands and Parameters Explanation of the bytes transmitted by the module: < Sub command $00 -- stored module no. Byte 1... The first byte returns the contents of the received command byte (here always $01). Byte 2... The second byte returns the contents of the received sub command byte (here always $00).
Page 127
Commands and Parameters < Sub command $02 -- CAN-status byte Byte1, Byte2... See sub command $00. cstat... Byte 3 describes status information about the condition of the CAN components of the selected module (see the following table). Designation Power-down RESET Suspend bit (Error on CAN) (I²C error)
Page 128
Commands and Parameters If bit 1 has got the value '1', the module is in condition 'suspended'. In normal operating mode (continue) bit 1 has got the value '0'. Error on CAN (bit 2) This bit is always ‘0’ at the CAN-CBM-SIO module. I²C error (bit 3) This bit is always ‘0’...
Page 129
Commands and Parameters < Sub command $03 -- stored bitrate Byte1, Byte2... See sub command $00. Byte 3, 4: bust 0, bust1 ... These two bytes describe the contents of the registers BTR0 and BTR1 of the CAN controller SJA1000 which determine the bitrate of the CAN interface. The allocation of the register contents to the bit rates has already been explained in the description of setting these registers.
Commands and Parameters 3.3 Process TxIds By this command one or more Tx identifiers are allocated to the module, depending on the module type, by which it is able to transmit the data onto the CAN (set TxIds). The new Tx identifier replaces immediately after he had been received by the module the default identifier adjusted by the coding switches.
Page 131
Commands and Parameters Parameter 1 and 2... With these parameters it is reported to the module at a request command onto which CAN Id (CTxId) it should transmit the requested reply. The module only transmits once on this identifier. The identifier is not stored on the module.
Page 132
Commands and Parameters Reply of the modules to the command 'request TxIds': The reply of a Tx identifier depends on the value of the received sub command. The following table shows the information which the module transmits onto the CAN. Reply of the Byte 1 Byte 2...
Commands and Parameters 3.4 Process RxIds Depending on the module type one or more Rx identifiers are allocated to the module on which it is able to receive data to the CAN (set RxIds). The new Rx identifier replaces the default identifier adjusted by the coding switches immediately after it had been received by the module.
Page 134
Commands and Parameters Parameter 1 and 2... With these parameters it is reported to the module at a request command onto which CAN Id (CTxId) it should transmit the requested reply. The module only transmits once on this identifier. The identifier is not stored on the module.
Page 135
Commands and Parameters Reply of the modules to the command 'request RxIds': The reply of the Rx identifiers depends on the value of the received sub command. The following table shows the information which the module transmits to the CAN. Reply of the Byte 1 Byte 2...
Commands and Parameters 3.5 Cyclic Tx Transfers (Tx Activate Time) The interchange of the parameter 'Tx activate time' makes the module transmit I/O data onto the CAN in regular periods of time. This parameter has no effort on the CAN-CBM-SIO module ! The data are transmitted on the actual Tx identifier (see also chapter 'Setting/Reading TxIds', and 'Parameters after RESET').
Page 137
Commands and Parameters Parameter 1 and 2... By these parameters it is reported to the module at a request command onto which CAN Id (CTxId) it should transmit the requested reply. The module transmits only once on this identifier. The identifier is not stored on the module.
Page 138
Commands and Parameters Reply of the modules to the command 'request Tx activate time': The reply of the activate time depends on the value of the received sub command. The following table shows the information which the module transmits onto the CAN. Activate time Byte 1 Byte 2...
Commands and Parameters 3.6 Process User Parameters The user parameters are designed for module-specific applications. By this sub command it is possible to process up to 127 parameters with 16 bit width. The user parameters are described in detail in the manual CAN-CBM-SIO/SIO4, Manual of the User-specific Software’.
Page 140
Commands and Parameters Reply of the modules to the command 'request user parameters': The parameter returned by the module is selected by the corresponding sub command. The following table shows the information which is transmitted to the CAN by the module. Sub command Parameter Byte 1...
Commands and Parameters 3.7 Service Request By this command it is possible to inquire the error condition of the esd-CAN modules. It is possible to make various or individual modules return a transmission if they show the error status 'error on CAN' or the status bit 'new on bus' is active.
Page 142
Commands and Parameters Reply of the module to the command 'service request': If a module receives this command, and if a short term CAN error existed (bit 'error on CAN' = 1) or/and if the bit 'new on bus' is active, the module transmits a message with the length 0 on the received Tx identifier.
Commands and Parameters 3.8 Supervisor Commands In contrast to the other commands, supervisor commands are able to address individual or all modules in the CAN net. By the module no. $00 all modules are selected. Therefore it is not recommendable to adjust the module no.
Page 144
Commands and Parameters Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 selected Function Command Sub command Not used Parameter 1 Parameter 2 module no. $00 Trigger RESET $AAAA - RESET $01 Reserved $00 All $02 Supervisor modules Watchdog Always...
Page 145
Commands and Parameters Module no..Here the desired actual module no. is entered. The setting of individual modules occurs by the module no. $01 to $FF. At this command all esd modules connected to this CAN net are accessed at the same time by the module no.
Examples 4. Examples for Parameterization In this chapter the operation and the initialisation of a module should be clarified with some examples. 4.1 Setting the Tx Identifier TxId1 In this example it will be shown how the Tx identifier TxId1 is programmed on a module. The Tx identifier should get the value $1AA.
Page 147
Examples Now the Tx identifier TxId1 (=$1AA) is allocated to the module: Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 CAN Id (command) (sub command) (always $00) (module no.) (TxId-H) (TxId-L) $700 =INIT Id Table 4.1.3: Setting the Tx identifier TxId1 Byte 7 and 8 are not needed for this command.
Examples 4.2 Restoring the Default Parameters This example should show how a module whose default parameters have been changed during an initialisation is put back into the original condition. There are various ways to reactivate the default parameters. 4.2.1 ...if the actual module no. is unknown: If only on this esd-CAN module the default parameters should be restored, you have to proceed as follows: The coding switches of the module have to be set to $00 and a RESET has to be triggered.
Examples 4.2.2 ...if the module no. is known: If the module no. is known it is possible to restore the default parameters by the command 'default RESET' at the desired module. The module no. of the module is presumed with $12 here, again: Byte 1 Byte 2 Byte 3...
Need help?
Do you have a question about the CAN-CBM-SIO1 and is the answer not in the manual?
Questions and answers