Professional Documents
Culture Documents
Related Documentation
Related Documentation
At a Glance
Related Documentation
Table of Contents
Chapter 2 Introduction to the PCMCIA card TSX CPP 100 ........................ ........... 15
At a Glance ............................................................................................................................. ................ 15 2.1 Description of the TSX CPP 100 card...................................................................................... ................ 17 At a Glance ............................................................................................................................. ................ 17 About the TSX CPP 100 card .................................................................................................. ................ 18 Mounting the PCMCIA card ..................................................................................................... ................ 20 Connection unit TSX CPP ACC1 ........................................................................................... ................ 22 2.2 Technical specifications ......................................................................................................... ................ 24 At a Glance ............................................................................................................................. ................ 24 Standards and characteristics .................................................................................................. ................ 25 Processors which support the TSX CPP 100 card .................................................................. ................ 26
Description of the selection of the configuration loading mode .............................................. ................ 40 How to Load a Configuration using XWAY ............................................................................. ................ 42 Slave configuration screen ..................................................................................................... ................ 44 How to configure a CANopen PCMCIA card .......................................................................... ................ 45 Configuration documentation file for the PCMCIA card TSX CPP 100 ................................................... 48 3.3 Programming .......................................................................................................................................... 50 At a Glance ............................................................................................................................................. 50 Access to CANopen SDOs ..................................................................................................................... 51 Accessing the CAN link layer PDUs......................................................................................................... 53 IDENTIFICATION Request .................................................................................................................... 55 Diagnostic Command ............................................................................................................................... 58 3.4 3.5 Debugging .............................................................................................................................................. 60 Description of the debug screen ............................................................................................................ 60 Diagnostics ............................................................................................................................................. 62 At a Glance ............................................................................................................................................. 62 Diagnostics from the status LEDs on the PCMCIA card TSX CPP 100 ................................................. 63 Diagnostics data ..................................................................................................................................... 64 How to perform a diagnostic .................................................................................................................. 67 3.6 Language objects associated with the TSX CPP 100 card ..................................................................... 71 At a Glance ............................................................................................................................................. 71 Language objects in implicit exchange .................................................................................................. 72 Language objects for explicit exchange .................................................................................................. 76 Explicit exchange management ............................................................................................................... 77 Language objects associated with configuration ................................................................................... 78 Error codes ............................................................................................................................................. 79
Chapter 4
4.1
Glossary
.121
Index
........................................................................................... 125
At a Glance
Document Scope
This manual is for users wishing to implement the PCMCIA CANopen communication card: TSX CPP 100 on Premium,
Validity Note
This documentation describes the implementation of the PCMCIA card TSX CPP 100 under PL7 V4.1.
Related Documents
Title of Documentation Shared communication application documentation Reference Number TLX DSCOM PL741E
User Comments
We welcome your comments about this document. You can reach us by e-mail at TECHCOMM@modicon.com
10
TS X DM CPP 100
General
1
Page 12 13 14
Aim
of
this
Chapter
At a Glance
What's in Chapter?
this
11
General
Principles
Introducere
Initial a fost dezvolatat pentru sistemele de vehicule auto, comunicatia Can fiind acum folosita in multe arii, cum ar fi:-trasportul dispozitiveleor mobile -dispozitive medicale, de constructii -controlul industrial Avantajele sistemului Can sunt urmatoarele: Bus-ul sistemului de alocare , detectarea erorilor, schimbul de date de fiabilitate.
Structura Master/slave
Bas-ul can CAN are o structura Stapan(Master)/Sclav(slave)pentru administrare. Stapanul administreaza: initializarea scavului, comunicarea erorilor, starea sclavului.
Comunicatiile de pe bus sunt facute punct la punct , in orice moment oricare dispozitiv poate transmite o cerere de pe bus iar perechea lui raspunde.Prioritatea cererilor trasferate pe bus sunt determinate de un indentificator la nivelul fiecarui mesaj individual.
Identificatori CAN
Schimburile explicie ale CAN PDU-urilor la nivel de legatura foloseste inidentificatori extinsi de pana la 29 bits (Standardul CAN V2.0B). 11 bit de indentificatori (CAN standard V2.0A) pot fi folositi pentr transmitere, dar primirea acestui tip de indentificator nu este acceptat.
Pe scurt
O arhitectura CANopen include : un bus Stapan (PCMCIA card TSX CPP 100 card),dispositive sclave.
Nota:
este de asemenea posibil sa se puna mai multe carduri de tip TSX CPP 100 PCMCIA pe bus,
unul dintre ele devine Stapan/Master iar celelalte sun in modul de ascultatre. Cardurile care sunt in modul de ascultare permite PLC-ului Premium sa cunoasca starea bus-ului si sclavilor in orice moment. Nota: Cardul TSX CPP 100 PCMCIA administreaza doua segmente de bus (A si B) prin intermediu unitatii de conectare TSX CPP ACC1. Debitul fluxului de date pe bus depinde de lungimea cablului utilizat. ( vezi , viteza trasnsmisiunii si viteza
bus-ului .p . 1 4 ) .
12
General
At a Glance
CANopen allows 128 devices (the bus master and 127 remote slaves). The transmission speed is closely linked to the bus length and the type of cable used. The two following examples enable you to evaluate authorized values.
Example 1
The following table describes the relationship between the maximum transmission speed and the bus length in relation to the type of cable used, for a maximum of 32 slaves, without repeater, on segments A or B of the TSX CPP 100 card.
Transmission flow rate 1 Mbit/s 800 Kbit/s 500 Kbit/s 250 Kbit/s 125 Kbit/s 50 Kbit/s 20 Kbit/s 10 Kbit/s
Cable characteristics 0.25 mm2, AWG 23 0.34 mm2, AWG 22 0.34 mm2, AWG 22 0.34 mm2, AWG 22 0.5 mm2, AWG 20 0.75 mm2, AWG 18 0.75 mm2, AWG 18 0.75 mm2, AWG 18
Example 2
The following table describes the relationship between the maximum transmission speed and the bus length in relation to the type of cable used, for a maximum of 100 slaves, without repeater, on segments A or B of the TSX CPP 100 card.
Transmission flow rate 1 Mbit/s 800 Kbit/s 500 Kbit/s 250 Kbit/s 125 Kbit/s 50 Kbit/s 20 Kbit/s 10 Kbit/s
Cable characteristics 0.34 mm2, AWG 22 0.6 mm2, AWG 20 0.6 mm2, AWG 20 0.6 mm2, AWG 20 0.75 mm2, AWG 18 1 mm2, AWG 17 1 mm2, AWG 17 1 mm2, AWG 17
13
At a Glance
This chapter introduces the main technical features of the PCMCIA card TSX CPP 100.
What's Chapter?
in
this
14
15
TS X DM CPP 100
2.1
At a Glance
This section describes the physical appearance of the PCMCIA card TSX CPP 100 and how to connect it.
What's Section?
in
this
At a Glance
The CANopen communication card TSX CPP100 is used to implement a CANopen architecture. This card is master of the bus and allows connection of devices respecting the CANopen standard: Implicit exchange of Process Data Objects using %MW words. Explicit exchange of Service Data Objects via the function blocks READ_VAR and WRITE_VAR. Compatibility with device profiles and standardized communication on CANopen (2.0A and 2.0B).
Physical description
The TSX CPP 100 card is a type III PCMCIA card which is inserted into the PCMCIA communication slot on the processor. This module is composed of the following elements: 1
63).
3 Bus cable. This 60 cm cable has a male 15 point Sub-D connector at the end to connect to the TSX CPP ACC1 (See Connection unit TSX CPP ACC1, P. 22).
16
TSXDM CP
At a Glance
The PCMCIA card is inserted into the slot reserved for communication cards. The cable which connects to the bus is supplied with card and plugs into the TSX CPP ACC1 unit (also called the TAP) by means of the 15 point Sub-D connector. The following procedure describes the various steps to be followed.
A
Procedure
Step 1 2 Step 3
CAUTION A PCMCIA card can only be inserted or unplugged when the PLC is switched off. Failure to observe this precaution can result in injury or equipment damage.
The following table describes the steps to be followed when installing a TSX CPP 100 card.
Action Switch off the PLC. Insert the card into its slot
Illustration
c
Illustration
Action Tighten the card screws so that the card cannot move, thus ensuring it will operate properly.
Connect the card cable to the TSX CPP ACC1 unit using the 15 point Sub-D connector, not forgetting to tighten the fixing screws. Switch the PLC on again.
17
At a Glance
The CANopen TSX CPP 100 card connects to 15 female pin Sub-D connector in the TSX CPP ACC1 connection unit with the cable supplied with the card. This unit allows you to connect two CANopen bus segments (it allows you to double the total length of the bus) using the two 9-pin Sub-D connectors. The cables and other connection accessories are available from specialized companies.
TSX CPP ACC1 This figure illustrates a TSX CPP ACC1 connection unit. connection unit
Figure
Element 1 2 3 4 5 6 7 Description
15-pin Sub-D connector: the TSX CPP 100 card connects using this connector. 9-pin male Sub-D connector: connectorA for connecting the A CANopen segment. TSX CPP ACC1 connection unit. Display LEDs for the bus operation via the TSX CPP ACC1 unit. 9-pin male Sub-D connector: connector A for connecting the A CANopen segment. Fixed top hat rail. CANopen bus connector , with or without line terminal.
18
This figure illustrates bus connector A or B, 9-pin female Sub-D connector of a bus segment on the TSX CPP ACC1 connection unit.
"5
OOOOO9 8 7 6OO OO
21
Connector description
19
2.2
At a Glance
Technical specifications
This section describes the main technical characteristics of the TSX CPP 100 card.
Standards
The TSX CPP 100 communication card conforms to the following international standards:
ISO IS 11898, CAN High Speed Transceiver and Data Link Layer UL508 EU Label, FCC-B (50082-1)
Logical DC V supply: 5 V provided by the rack supply Power consumption: 3W Storage temperature: -25 C to 70 C Operating temperature: 0 C to 70 C Storage hydrometry: 30% to 95 %, with no condensation Operating hydrometry: 5 % to 95 %, with no condensation.
20
At a Glance
Premium and Atrium processors version 5.0 or above support the CANopen PCMCIA card. Implementation is via PL7 V4.0 software. General configuration of a CANopen bus is done using the software Sycon version 2.630 onwards (TLX LFBCM).
Note: It is mandatory for the PCMCIA card to be installed in the slot located in the processor module. As a result, only one CANopen bus is available for each PLC CPU. Types of processors and
Processor
The following table gives details of the processors supporting the CANopen PCMCIA card, TSX CPP 100, and their maximum storage capacities.
Maximum size of PL7 configuration data (1) MAST task 16 Kb 16 Kb 32 Kb 32 Kb 64 Kb FAST task Maximum size of input/output data
TSX P57-203 T PCX 57-203 TSX P57-253 TSX P57-303 TSX P57-353 T PCX-353 TSX P57-453
512 %MW (256+256) 512 %MW (256+256) 1024 %MW (512+512) 1024 %MW (512+512) 3584 %MW (1792+1792)
64 %MW (32+32) 64 %MW (32+32) 128 %MW (64+64) 128 %MW (64+64) 256 %MW (128+128)
Key
(1) : this maximum size can be exceeded if you load the configuration into the card using the Sycon software (See Description of the selection of the configuration loading mode, p. 40). The maximum size of configuration data authorized by the Sycon software is 256 Kb.
Note: the configuration fill rate is given in the word %KWy.1.2 (See L a n g u a g e
objects
21
22
TS X DM CPP 100
Software implementation
At a Glance
This chapter describes the various configuration, operation and diagnostics options for a CANopen application.
23
Software implementation
24
Software implementation
3.1
At a Glance
Aim of this Section What's in this Section?
General
This section describes the software implementation of a PCMCIA TSX CPP 100 card. This Section contains the following Maps:
Topic
Installation principles Implementation methodology
Page
32 33
25
Software implementation
Installation principles
At a Glance
The implementation of a CAN bus requires the definition of the physical context of the application into which it will be integrated (rack, power supply, processor, modules or devices, etc.) and then its software installation. Software installation will be carried out from within the different PL7 editors: either offline, or online: in this case, modification is limited to certain parameters. Configuration of the bus is carried out from within the Sycon software.
Installation principles
Mode Offline
Description It is mandatory for the card to be installed in the type III PCMCIA slot in the processor. Entering of the configuration parameters. Declaration of the bus configuration using the Sycon software and generation of configuration file *.CO Selection of the *.CO configuration file under PL7
On or offline
Symbolization Programming
Symbolization of the variables associated with the CANopen card. Programming of specific functions: associated bit objects and words, specific instructions.
Online
Transfer
Transfer of the application to the PLC A transfer of the application to the PLC or a cold start of the application configures and starts up the TSX CPP 100 card.
Debugging Diagnostics
Different methods can be accessed for debugging the application, controlling inputs/outputs and fault diagnostics: PL7 language objects, the PL7 debug screen, LED signals.
On or offline
Documentation
Printing of the various items of information relating to the configuration of the TSX CPP 100 card.
Note: The order defined above is given as an indication. The PL7 software allows you to use editors interactively in any order you wish. (However, you cannot use the data or program editors without first completing the configuration.)
Implementation methodology
Overview
The following flowchart shows the implementation methodology for a TSX CPP 100 card.
Configuration of the card in the PLC
Declaration and configuration of the TSX CPP 100 card and the slaves using the Sycon tool
Sycon mode
1
PL7 mode Downloading of the configuration into the card using the Sycon tool
4
26
Software implementation
Documentation
Recommendations
When the configuration of the CANopen bus is too big to allow the change to PL7 mode, the following checks are recommended: See if you can remain in PL7 mode using a more powerful Premium processor (See T y p e s o f p r o c e s s o r s a n d c a p a c i t i e s , p . 2 7 ) . Change to Sycon mode, if it is not possible to select a more powerful processor.
27
Software implementation
3.2
At a Glance
Configuration
This section describes the configuration of a PCMCIA TSX CPP 100 card.
28
Software implementation
Procedure
This operation is used to declare a TSX CPP 100 card in the processor's type III PCMCIA slot. The example below describes the procedure.
Step Action Open the hardware configuration editor from within the application browser. Access the configuration screen for the processor communication channel by double clicking on the processor Comm zone. 3 In the pull-down menu, select the communication channel CHANNEL 1 Example CHANNEL 1:---------------------------------------------------------------------------------CHANNEL
In the pull-down menu, select the TSX CPP 100 PCMCIA card: Example - CHANNEL 1 -------------------------------------------------------------------------CHANNEL 1 |-y (No PCMCIA sub-module)
(Link
not
TSX FPP 200 FIPWAY PCMCIA CARD TSX FPP 10 FIPIO PCMCIA CARD TSX MBP 100 MODBUS+ PCMCIA CARD TSX MDM 10 PCMCIA MODEM CARD TSX SCP 111 RS232 OPEN PCMCIA CARD TSX SCP 114 RS485 OPEN PCMCIA CARD TSX CPP 100 CAN OPEN PCMCIA CARD
configi
Result: a CANopen bus configuration screen appears (See PCMCIA Card TSX CPP 100
At a Glance
This screen is used to declare the communication channel and to configure the parameters for a CANopen link. Illustration The screen dedicated to CANopen communication looks like this:
Designation:
TSX
57253
PROCESSOR
2 3. 4 6
O Maintain
Rese
| 32 |-H
|-H
OSyCon
SyCon tool .
I
hilscher
Bus configuration
29
Software implementation
This table describes the different areas that make up the configuration screen:
Zone shared Number 1 Function This zone is composed of: a title bar which indicates the product reference and the module position, a drop-down list enabling configuration or debugging mode to be selected (online
mode only), a window displaying the designation of the selected module. specification 2 This drop-down list is made up of three options that set the rate of update for the storage areas associated with the I/O: 3 4 MAST: MAST task rate FAST: FAST task rate
This zone is used to configure the address (PLC internal memory), to which inputs from the CANopen devices will periodically be copied.
This zone is used to configure the fallback mode for bus device outputs as well as the address (PLC internal memory) where the outputs from CANopen devices will periodically be read.
This zone is used to configure the bus: Selection of the Sycon configuration file (*.CO) (See How to select a PL7 or Sycon configuration (See Description of the selection of the
WARNING
It is recommended that you pay special attention to how the bus is performing if the watchdog is deactivated. Failure to observe this precaution can result in severe injury or equipment damage.
Description of the I/O Data and the Bus Behavior at the Start
At a Glance
The configuration screen allows you to configure the bus behavior at start-up as well as the inputs and outputs of slave devices on the bus.
Bus start-up
O Semi-automatic (bus only) O B Y program The bus start-up can be performed in three ways: Automatic: the bus configuration, communication control and the updating of E/ S slaves are activated at start-up, without application intervention. Semi-automatic: the bus configuration and the communication control are activated at start-up but the E/S control should be confirmed by the application with the help of corresponding language objects (See O u t p u t w o r d o b j e c t s , p . 7 5 ) . Via program (bus and I/O): the bus start-up should be fully managed by the application with the help of corresponding language objects (See O u t p u t w o r d o b j e c t s , p . 7 5 ) . Inputs This figure illustrates the input configuration zone.
- Inputs --------------------------No. of words (%MW) | 32 |41 Index of first %MW I 0
KH
30
Software implementation
To configure slave bus inputs, it is necessary to indicate a memory zone in which they will be recopied periodically. To define this zone, indicate: A number of words: this is the number of input words corresponding to the size of input data configured by the Syconsoftware. Address of the first word: this is the address of the first word in the input memory zone.
Note: the %MW contain slave bus input values. When the PL7 load mode is chosen, it is possible to recognize words associated to slaves by pressing the key Bus configuration on the configuration screen. In Sycon load mode, only the Sycon software allows you to recognize slaves associated to %MW. These %MW are used directly by application as with inputs. Outputs This figure illustrates the output configuration zone.
- Outputs --------------------------
O Maintain
Reset
R-|
To configure the outputs, it is necessary to indicate, as for the inputs, the word table that will contain the bus output value, but also the type of fallback needed when there is a slave fault passage: Maintain, Reset (RAZ)
Note: the %MW contains slave bus output values. When the PL7 load mode is chosen, it is possible to recognize words associated to slaves by pressing the key Bus configuration on the configuration screen. In Sycon load mode, only the Sycon software allows you to recognize slaves associated to %MW. These %MW are used directly by application as with inputs.
Note: the word tables are found in the PLC internal memory. The two zones should not overlap, as there is a risk of application malfunctioning.
Note: If the number of input or output words are different to those determined in the configuration (See A t
a G l a n c e , p . 4 0 ) file (file name *.CO), the PL7 software signals it during configuration confirmation.
Note: the maximum authorized size of the memory zone reserved for E/S is a function of the processor type and the associated task (See T y p e s o f p r o c e s s o r s a n d c a p a c i t i e s , p . 2 7 ) .
Note: as for Fipio bus, if the %SW9 word is used (Set to 1 from %SW9:X0 bit for the master task and to 1 from %SW9:X1 for the high speed job), the bus output device remains as it was before being set to bit 1.
At a Glance
The configuration screen is used to select the configuration loading mode. The two scenarios are as follows: loading via the PL7 software, loading via the Sycon software. For each scenario, you must select the configuration database (See
The following figure illustrates the configuration screen zone that is used to select the configuration loading mode.
OSyCon
31
Software implementation
Auto-Clear
| |
L
Description
Zone Select database
Bus configuration
p. 45).
PL7 When this button is selected, the bus configuration is loaded with the PL7 application. When the application is too big (memory size greater than that allowed for the processor), the PL7 software does not allow this selection and you must select Sycon as described below. Sycon When this button is selected, the bus configuration is considered as having already been loaded into the PCMCIA card from the PC and from the Sycon software. The PL7 software just carries out a check to verify that the card configuration is identical to that of the .CO file selected. Moreover, it is not possible to modify the bus parameters from within PL7. To modify the configuration, it is necessary to use the Sycon software. Transmission speed COB-ID Message SYNC When the PL7 loading mode has been selected, this zone displays the transmission speed on the bus defined in Sycon. When the PL7 loading mode has been selected, this zone displays the COB-ID Message SYNC selected in Sycon.
Message SYNC period When the PL7 loading mode has been selected, this zone displays the bus period selected in Sycon. Auto-Clear When the PL7 loading mode has been selected, this zone displays the mode Auto-clear on or Auto-clear off selected in Sycon. Bus configuration When the PL7 loading mode has been selected, this button provides access to the configuration of the bus slaves.
General
When the CANopen bus is configured in load mode by Sycon, it is possible to load the configuration onto the TSX CPP 100 card using the XWAY Driver. This loading can be carried out with an Ethernet network, or simply on a Unitelway bus.
Note: MAKE SURE you always put the PLC in STOP mode during the downloading process.
Note: when the choice of XWAY communication driver has been validated, you must exit the Sycon software to change the driver.
Procedure
This table describes the steps to be carried out to load the configuration of a CANopen card using the XWAY communication drivers.
Step Action Connect to the PLC, which contains the TSX CPP 100 card with the help of the PL7 V4 software. 2 3 4 5 Switch this PLC to STOP mode. Launch the Sycon software. Load or create the desired configuration with the help of the Sycon software. Select the command Online Load. Result: a message appears, which indicates that during configuration loading, communication between the slaves will be stopped. Question
? If the loading is performed while communication is active, Mr the communication between nodes will stop. Do you really want to load? I
Step 6 Action Click on YES to indicate that you accept this halt in inter-slave communication. Result: a selection window for the XWAY or CIF driver appears.
Yes
No
32
Software implementation
Driver select
CIF Device Driver XWAY Driver Cancel Author Version Date Function Hilscher GmbH V1.100 25.02.2000 11 |
Select the XWAY driver then click on OK. Result: the Setting XWAY driver window appears. Setting XWAY driver Driver selection UNTLW0 -Address Station 0 Module
Type
Rac 0 Version
Modul
I
By
1
Nam
254
T^l I
(Serial)
UNITELWAY
Info Advanced
Select the required driver (Uni-telway, XIP etc.) from the Driver selection group box. Enter the PLC address (Network, Station, Module, Rack) then click on OK to start the loading process. Result: during loading, a window indicates the progress of the data transfer. When the transfer is complete, this window disappears and makes way for the main screen of bus configuration.
33
Software implementation
At a Glance
With PL7 software, it is possible to access bus slave configuration. The information on the screen is almost identical to the debugging screen information (See D e s c r i p t i o n o f t h e
Symbol
J1
1 1 1 1000 5000 0
- Outputs I Parameter!
TJ007
CBM-DIO8
-Details of CANopen devices Name of vendor CBM-DIO8 Device name: I |ESD Description: |
Symbol Nodel
COB-ID TxPTDO=N] EMCY=129
I 0004
|4
I Close
Operation
Click on a slave from the list of CANopen slaves. The slave parameters in inputs and outputs appear in the Inputs and Outputs zones. Slave information appears in the CANopen device details zone.
At a Glance
In order to configure a TSX CPP 100 card, some procedures are essential or require special explanation. Details are given in the following procedures.
How to select a This table describes the steps in the procedure to select a CANopen configuration. configuration file
Action Step
I
database
Select words
Configuration size PL7 Transmission speed COB-ID Message SYNC Message SYNC period Auto-Clear Bus
OSyCon
Result: a screen like this appears: Open Look in: | ___ | Project
IH 11 0 mli
Name: Type:
i: Open
Mr
L_
Cancel
configuration
34
Software implementation
Step 2
Action Select the required *.CO file and then click on OK.
Result: if the number of words reserved for inputs and outputs corresponds to the selected configuration, the configuration appears in the PL7 configuration screen. - Configuration loading mode_
If it does not, a warning message informs you that the number of input or output words does not correspond to the file selected. Example:
When the .CO file passes the maximum capacity for configuration data (See Types of processors
and capacities, p. 27), an error message appears. You must then either use a more powerful
Premium processor, or switch to Sycon mode and load the configuration directly into the card using the Sycon software.
Procedure for The following table describes the procedure for configuring a CANopen TSX CPP configuring a card.
Step Action 1 Select the type of bus start-up. 2 Click on the Sycon Tool button in order to start the Sycon configuration software. 3 Using the Sycon software, configure your CANopen bus according to the devices planned for the bus. 4 Note the size of the buffers to be reserved for inputs and outputs for configuration of the PLC tables. 5 Save the configuration in a file with the .CO extension. 6 Return to PL7. 7 Enter the number of input and output words, indicating the values that you noted at Step 4. Note: Take care! Each %MW is made up of two bytes. 8 Enter the start addresses for the tables, in such a way that there is no overlap between inputs and outputs. 9 Select a configuration file (See How to select a configuration file, p. 45). 10 Select the PL7 radio button, if you want to incorporate the CANopen configuration into the PL7 application. 11 Click on the Watchdog Activated button. 12 Confirm the configuration.
100 PCMCIA
35
Software implementation
Configuration documentation file for the PCMCIA card TSX CPP 100
At a Glance
Via the Processor module, a documentation file describing the application configuration for the PCMCIA card TSX CPP 100 is available in the PL7 documentation editor.
Illustration
Module Identification Product Reference: Address: TSX57353 000 Designation: Symbol: TSX P 57353 PROCESSOR
Channel Parameters: 0 Task/Channel Assignment: Type of Channel: Application-Specific Function: Terminal Port UNI-TELWAY LINK MAST
Symbol:
Channel Parameters: 1 Task/Channel Assignment: Type of Sub-module: Type of Channel: Application-Specific Function: CANOPEN PCMCIA CARD TSX CPP 100 PCMCIA Port Inputs Outputs Address of first %MW Address of first %MW 1056 32 Length: Length: 102 424 CANOPEN Channel Symbol: MAST
Configuration mode:
Automatic
active
36
Software implementation
E:\DB1.CO 128
off
100 ms
CANopen slave configuration Addr. 1 2 3 CANopen slave language objects: Addr. 1. Inputs %MW32 %MW33 %MW34 %MW35 %MW36 %MW1057 %MW1058 Symbol Outputs %MW1056 Symbol Type AMM 09000 Profile 401 standard EDS ADM 37010 Act./Guard poll 1/1 1/0 1/0
3.3
At a Glance
Programming
This section describes the tools available for programming the operation of and obtaining information on a CAN open bus managed by the PCMCIA card TSX CPP 100. You can program the CANopen bus operation using UNI-TE requests: Send and receive SDO messages on the bus, Access the link layer by sending PDUs. You can also monitor the bus and its operation: Identify the master, Send diagnostic requests to the bus devices. These requests are sent to the CANopen master (PCMCIA card TSX CPP 100) which processes them.
What's Section?
in
this
37
Software implementation
At a Glance
WRITE_VAR(ADR#y.1.SYS, %MWk:4)
'SDO',
index:subindex,
NodeID,
%MWi:L,
function
ADR#y.1.SYS
'SDO' index:subindex
SDO object type (always SDO in capitals) Double word or immediate value identifying the CANopen SDO index or subindex: The most significant word making up the double word contains the index and the least significant word the subindex.
Word or value identifying the destination device on the CANopen bus Table of words containing the data to be sent (minimum length = 1) Exchange management parameters: four words identifying the address of the PL7 data used to control the function called WRITE_VAR
READ_VAR(ADR#y.1.SYS, %MWk:4)
'SDO',
index:subindex,
function
NodeID ,
MWi:L ,
ADR#y.1.SYS
'SDO' index:subindex
SDO object type (always SDO in capitals) Double word or immediate value identifying the CANopen SDO index or subindex: The most significant word making up the double word contains the index and the least significant word the subindex.
Word or value identifying the destination device on the CANopen bus Table of words containing the data to be received (minimum length = 1) Exchange management parameters: four words identifying the address of the PL7 data used to control the function called READ_VAR
Management parameters
Word number %MWk %MWk+1 %MWk+2 %MWk+3
Most significant byte Exchange number Operation report Timeout Byte length:
38
Software implementation
for a WRITE_VAR, initialize this word with the number of bytes to be sent. for a READ_VAR, when the request is terminated, this word contains the number of characters received in the word table of received data.
At a Glance
Syntax
SEND_REQ(ADR#y.1.SYS,
16#9F,
%MWi:L,
%MWj:L,
%MWk:4)
ADR#y.1.SYS
16#9F %MWi:L
%MWi: action mode (101: send with local confirmation of the card) %MWi+1 and %MWi+2: identifier at the level of the CANopen link layer; these two
words form a double word which must contain a value between 0 and 536 870 911 (29 bits) Note: identifiers between 0 and 2047 (11 bits) are only accessed in write
%MWj:L %MWk:4
Management parameters
Word number %MWk %MWk+1
%MWi+3
Not used (length set to 1) Exchange management parameters: four words identifying the address of the PL7 data used to control the function
Most significant byte Exchange number Operation report correct response: 16#61 incorrect response: 16#FD
%MWk+2 %MWk+3
user
%MWi:L
function. When the request is completed, this word contains the number of bytes received.
IDENTIFICATION Request
At a Glance
This request enables the master of the CANopen (TSX CPP 100 PCMCIA card ) bus to be identified. This request is carried out using the communication function SEND_REQ.
Syntax
SEND_REQ(ADR#y.1.SYS,
16#0F,
%MWi:L,
%MWj:L,
%MWk:4)
ADR#y.1.SYS
Request code Not used for the IDENTIFICATION function (length is 1) Table of words containing the card identification information. Length L must be 12. Exchange management parameters: four word identifying the address of the PL7 data used to control the iDENTiFiCATiONfunction
39
ware implementation
%MWj:L
(Version 1.0 coded 16#10) %MWj+2 %MWj+3 %MWj+4 %MWj+5 %MWj+6 %MWj+7 %MWj+ 0' 16#00 LED state, the ERR LED is coded on the first two bits and the COM LED on the following two according to the following sequences: Off, Blinking, 0, 0 on 0, 1 1, 0 Product type: 16#02 %MWj+10 Error type x0: Card in Test/Debug mode, x1: Bus error or inactive bus, x2: Absent connection unit, x3: Autotest or inaccessible card, x4: Reserved, x5: Card different to the one configured, x6: Absent card, x7: Error on at least slave, Catalog reference: 16#01 %MWj+11 16#00 Fixed '0' PCMCIA card state: 'T' 'X'
Absent,
Autotest,
%MWj+9
Failure,
Waiting,
Not configured
Management parameters
Word number %MWk %MWk+1 %MWk+2 %MWk+3
Most significant byte Exchange number Operation report, positive 16#3F report Timeout
you
40
Software implementation
Diagnostic Command
At a Glance
Diagnostic commands are sent by the SEND_REQ function block: In this case the SEND_REQ function is used for: obtain slave bus diagnostics, obtain the PCMCIA card version CANopen obtain state variables, obtain the history of bus errors.
Syntax
SEND_REQ(ADR#y.1.SYS,
16#0F,
%MWi:L,
%MWj:L,
%MWk:4)
ADR#y.1.SYS
16#0031 %MWi:3
%MWi:
1 ... 127 : Slave diagnostic 1 to 127 128 : CANopen card version 129 : Status of the CANopen card, the response is equivalent to the contents of the %IWy.1.i (See Input word objects, p. 73) status words.
%MWi+1:
Starting address in the diagnostic table (Value by default 0). To enable partial
access to the diagnostic table, specify a starting word in the table (Starting offset)
%MWi+2: Length in bytes of the diagnostics to be read, this length is generally two times the
length of the responses table
%MWj:L %MWk:4
Reception table contains diagnostics data (See Diagnostics data, p. 64). Exchange management parameters: four word identifying the address of the PL7 data used to control the SEND_REQfunction.
41
Software implementation
Management parameters
Word number %MWk %MWk+1
Most significant byte Exchange number Operation report positive response: 16#61 incorrect response: 16#FD
%MWk+2 %MWk+3
Timeout Length: number of response bytes (initialization compulsory in order to activate the function if the number of bytes emitted are 6)
you
42
Software implementation
3.4
Debugging
At a Glance
The Debugging function or the ability to double click on the TSX CPP 100 PCMCIA card in the PL7 configuration is only available in online mode. The contents of the screen depend upon the configuration mode used. The information detailed on the slaves is only available when the configuration mode selected is: PL7 (PL7 radio button). Illustration The figure below is an example of a debug screen. 1 I TSX 57353 [RACK 0 POSITION 0]
|_L)ebugging~
IE
2
- Designation: TSX P 57353 PROCESSOR 5.0 CHANNEL 1:CHANNEL
|CANopen~
Version:
Lg]
Jw] j MAS!
|-y|
[TJ1LIAG..
6
Act.
Life T. 1000
r Inputs
TO?
CBM-LIO8
1000
7
OK Latabase-
0003
CBM-LIO8
5000
0005
AIV58 E
Information on master
Value
Tot No. of slaves No. of %MW on input No. of %MW output; I 0004 4 I |4
Request send
to OBin Symbol
OLec OHex
9 10
Description
Number 1 2 3 4 5 Element Title bar
The table below shows the different zones of the debug screen:
Function Indicates the product reference and the position of the module Debugging (available in online mode only) Configuration Indicates the characteristics of channel 1. When a module fault is detected, the button is used to access information about the status of the module. This zone displays all the CANopen bus slaves. In load configuration via PL7 mode, a faulty slave is displayed in red, when the fault disappears, it is displayed in blue. If there is no fault, it is displayed in black. Selecting a slave updates zones 6, 8, 9 and 10. Act.: indicates whether the slaves was activated in the Sycon configuration (1=activated, 0=deactivated) Life T. : Life Time.
6 7
When a slave is selected, this zone contains the list of words, which are associated with it on input. When an output word in zone 8 is selected, its value can be modified by entering a new value then clicking on the OK button.
8 9 10
When a slave is selected, this zone contains the list of words, which are associated with it on output. When a slave is selected (click in zone 5), this zone contains its last diagnostic message, and to obtain information on the TSX CPP 100 card simply click on the table header. When a slave is selected, this zone is used to send a SDO request. Parameter syntax is identical to that used to transfer SDOs using READ_VAR and WRITE_VAR requests (See Syntax of the WRITE_VAR function, p. 51). Pressing the Request input button makes the request input fields appear.
43
3.5
At a Glance
Diagnostics
This section describes the diagnostic tools, both hardware and software, available for the PCMCIA card TSX CPP 100.
Diagnostics from the status LEDs on the PCMCIA card TSX CPP 100
At a Glance
LEDs on the card allow you to see the status of the card and the CANopen bus. In normal operation, the ERR LED is off and the COM LED is permanently on.
Illustration ERR CO M
The following figure indicates the position of the two LEDs, ERR and COM.
Diagnostics
Status LEDs ERR Off COM Off Flashing (Irregular) Flashing (Regular) On Permanen tly on. Off Flashing
Bus configured and active, no error Error detected, bus controller stopped Error on card, configuration error, or error on synchronization between the card and the PLC (for more information, consult the module status diagnostics data)
On
Bus configured and active, at least one bus subscriber cannot be reached or signal an error
Diagnostics data
At a Glance
During diagnostics, the first data to be used is implicit exchange %IW words (See
44
Software implementation
Command, p. 58):
on the slave of its choice (1 to 127, one request per slave), on the PCMCIA card version (128), on the card state (129), and is used to obtain the history report on the messaging error messages (130).
Note: code 129 enables the same information to be received as is contained in the implicit exchange input words (See I n p u t w o r d o b j e c t s , p . 7 3 ) . The information provided comes from the PCMCIA card and is periodically updated. The request reception table contains the information described in the following paragraphs.
Note: information is given in byte tables. Whilst taking into account the possibility of requesting all or part of this table, it is necessary to pay attention to the most significant and least significant words of the %MWi:L table
Note: diagnostic information respects the CAN norm, you can find reference information on the site:
http://www.can-cia.de.
Slave diagnostics The following table describes the information received following a request for diagnostics on a slave (code 1 to 127).
Byte rank 0 Description Device status bits: x0: No response x1: Overflow of error messages history table x2: Parameters error x3: Monitoring active device x4 to x6: Reserved x7: Deactivated 1 and 2 3 and 4 5 Complementary information read at bus start-up on the standard object 16#1000 (CAN standardization) Number of profile read at bus start-up on the standard object 16#1000 (CAN standardization) Slave status: 1 : Disconnected 6 2 : Connection in progress 3 : In preparation 4 : Ready 5 : Operating
127 : Being prepared or missing Error code (See Slave diagnostics codes, p. 83) (code of the last error generated by the slave) 7 Number of blocks of urgent information on the slave (0 to 5). Note: these blocks are added to the end of this table. Details of a type of block are given in the following paragraph.
The following table describes a type of information block. Byte rank 0 and 1 2 Description Error code Value of error register, object 16#1001 of the slave (CAN standardization) Register value of the specific manufacturer state, object 16#1002 (CAN normalization) Reserved
3 to 6 7
on
The
following
table
describes
the
information
received
following
request
for
45
Software implementation
Byte rank 0 to 7 8 to 10 11 to 13 14 to 17
Description Firmware version (character string) Date of creation of the firmware version (BCD coded, DD.MM.YY) Date of manufacture (BCD coded, DD.MM.YY) Series number (BCD coded) Protocol name (ASCII, without end of string character, e.g.: "CANopen")
18 to 25
The following table describes the information received following a request for a historical report (code 130). Byte rank 0 and 1 Description Number of error blocks Note: these blocks are added to the end of this table. Details of a type of block are given in the following paragraph. 2 to 49 Contents of the error block (maximum 8 blocks)
The following table describes a type of information block. Byte rank 0 1 2 and 3 4 and 5 Description Service code ID concerned Messaging error code (See Error codes, p. 79) Detail on error code (See History codes, p. 83)
46
Software implementation
At a Glance
The default search on the CANopen bus is first carried out with help from the PCMCIA card LEDs. Next, you can use the procedure (as described above) which details bus start up management and the checks to be carried out using language objects (See L a n g u a g e o b j e c t s
47
Software implementation
Procedure
YES
------------------NOK
NO
Normal operation
How
to
check
This
table
describes
the
actions
to
be
carried
out
in
order
to
obtain
an
accurate
%IWy.1.0
If... x8 = 1 Then...
it is a configuration error Check the detail of the error codes (See Input word objects, p. 73) in the words: %IWy.1.1 %IWy.1.2
x9 = 1 x10 = 1
it is a PDO transfer error Contact Schneider technical support it is a SDO transfer error Check the detail of the error codes (See Input word objects, p. 73) in the words: %IWy.1.1 %IWy.1.2
Check the historical report of error messages (See Historical report of error messages, p. 66). x11 = 1 it is a PCMCIA card error. Check the detail of the error codes in %IWy.1.1. Check the contents of %IWy.1.3 : x0 : parameter error, the source of the error is indicated in %IWy.1.4 x1: the outputs are at zero after the breakdown of a slave (Autoclear ON), the source of the error is indicated in %IWy.1.4 x12 = 1 x3: Serious error, the card is not active on the bus x7: Faulty connection between the card and the TSX CPP ACC1 connection unit
it is a bus error (bus not started or transmission error detected). Check the number of %IWy.1.5 bus errors counter, if it is other than zero, check the line. Check the number of bus stops counter, if it is increasing, check the line and restart the bus. Note: in non-automatic start up mode, the bus start up bit is %QWy.1 :x0.
48
Software implementation
x13 = 1
it is an error on a slave: communication error or I/O not confirmed. Determine the last source of error contained in %IWy.1.4 Determine all the active slaves on the bus by consulting the %IWy.1.16 %IWy.1.23 bus status words
Perform a diagnostic of the faulty slaves with the help ofa diagnostic request (See Diagnostic
Command, p. 58). Note: in non-automatic start up mode, the I/O start up bit is %QWy.1 :x1.
x14 = 1 it is an output error: the outputs are positioned in fallback conditions. Check that the PLC is in RUN mode Check that the task associated with the module is active Test the %IWy.1.0:x12 bit (bus error) and the %IWy.1.0:x13 bit (slave error). Note: in non-automatic start up mode, test the %QWy.1:x0 et %QWy.1:x bits.
49
Software implementation
If... x15 = 1
Then... a new diagnostic is available for one or more slaves. Determine these slaves by using the %IWy.1.16 %IWy.1.23 status words Carry out a diagnostic (See Diagnostic Command, p. 58) of the affected slave(s)
50
Software implementation
3.6
At a Glance
This section describes the implicit and explicit language objects associated with the TSX CPP 100 card. This Section contains the following Maps:
Topic Language objects in implicit exchange Language objects for explicit exchange Explicit exchange management Language objects associated with configuration Error codes Page 72 76 77 78 79
51
Software implementation
At a Glance
This page describes all the implicit exchange (See : PL7 Micro/Junior/Pro ; Communication applications ; Volume 1) language objects for CANopen communication using the PCMCIA card TSX CPP 100, that can be displayed or modified by the application program.
Bit objects
Object (1) %Iy.MOD.ERR
The table below shows the different bit objects for implicit exchange.
Function Module error bit Meaning This bit set to 1, indicates a module error (at least one of the channels has an error)
%Iy.1.ERR
Key (1) Address y y: corresponds to the processor's slot number in the rack (0 or 1 depending upon the power supply used)
The table below shows the different input word objects for implicit exchange.
Object (1) %IWy.1.0 Function Communication channel status word Meaning Communication channel status bits: x0 = 1: Channel error, OR logic between all the bits that follow x1 to X7: Reserved x8 = 1: Incorrectly configured x9 = 1: Error in I/O exchange (PDO) x10 = 1: Messaging exchange error (SDO) x11 = 1: Card error (card missing or not ready) x12 = 1: Bus fault (at least one bus error type event has been generated) x13 = 1: Slave fault (a communication error has been detected with one or more slaves) x14 = 1: Output error (outputs are positioned at fallback conditions) x15 = 1: New slave diagnostics available (a new diagnostic is available for one or more slaves) %IWy.1.1 Error word This word contains a module error code (See Module error codes,
Function
Meaning
CANopen master status word CANopen communication master status bits: X6 = 1: Timeout exceedeed when sending CAN messages x7 = 1: Faulty connection between the card and the connection unit TSX CPP ACC1 x8 to x15: These bits make up a byte whose value indicates the operating mode: 16#00 : offline mode 16#40 : bus in STOP mode 16#80 : outputs are in security mode (set to zero) 16#C0: bus in RUN mode
%IWy.1.4
The least significant byte (bits x0 to x7) contains the address of the slave which has generated the last error. The most significant byte (bits x8 to x15) contains the last error code.
Counter status word Counter status word Counter status word Bus status words
Counter of the number of bus errors Counter of the number of bus stops Counter of the number of timeouts on CAN messages Devices active on the bus, each bit set to 1 corresponds to a slave active on the bus (8 words of 16 bits, so 128 bits, the master and 127
52
Software implementation
slaves) %IWy.1.16 to %IWy.1.23 Bus status words Diagnostics available on the bus, each bit set to 1 corresponds to a device for which diagnostics are available (8 words of 16 bits, so 128 bits, the master and 127 slaves)
Key Address y y: corresponds to the processor's slot number in the rack (0 or 1 depending upon the power supply used)
The table below shows the different output word objects for implicit exchange.
Object (1) %QWy.1.0 Function Operating mode control words Meaning Control bits: x0 = 1: Activates the bus configuration x0 = 0: Deactivates the bus configuration This bit is only used when the bus startup is managed by the application x1 = 1: Activates data transfer on the bus x1 = 0: Deactivates data transfer on the bus This bit is used when the startup is semiautomatic or managed by the application x2 = 1: Initializes the error bits: x3 = 1: Initializes the PCMCIA card. This bit warm starts the card and is only used when the bus start-up is managed by the application. x4 to x15: These bits are reserved. They are set to 0. %QWy.1.1 Reserved I/O errors, messaging errors, history errors.
Key Address y y: corresponds to the processor's slot number in the rack (0 or 1 depending upon the power supply used)
Note: these implicit exchange output objects are also called command words. They are positioned by the application. The bits x2 and x3 of the %Qwy.1.0 word are not automatically reset to zero.
At a Glance
This page describes the explicit exchange (See : PL7 Micro/Junior/Pro ; Communication applications ; Volume 1) language objects for CANopen communication using PCMCIA cards TSX CPP 100. Generally, these objects can be displayed or modified by the application program.
Note: objects %MWy.1.0 and %MWy.1.1 are used for the management of explicit exchanges (See W o r d
objects, p. 77).
Internal word
The following table describes the word %MWy.1.2, updated by the request READ_STS %CHy.1:
Meaning x0 = 1: Bus has a fault or is not initialized (in start-up mode managed by the application) x1 = 1: Slave has an error, one or more slaves have errors or are not in RUN mode x2 = 1: The connection unit TSX CPP ACC1 has an error or its cabling is faulty x3 = 1: The PCMCIA card is: not ready, or initializing, so not ready, or has an error, or missing from its slot, or has a serious error x4 = 1: The PCMCIA card is: cannot be accessed x5 = 1: The card or protocol type is not recognized x6 = 1: Error in I/O exchanges x7 = 1: Configuration or parametering error x8 to x15: Reserved, (value 0)
53
Software implementation
Key Address y y: corresponds to the processor's slot number in the rack (0 or 1 depending upon the power supply used)
54
Software implementation
At a Glance
This page describes all the language objects that manage explicit exchanges (See : PL7 Micro/Junior/Pro ; Communication applications ; Volume 1).
Word objects
Object (1) %MWy.1.0 %MWy.1.1
The table below shows the different word objects for managing explicit exchanges.
Function Exchange in progress Exchange error Meaning x0 = 1: Exchange in progress x0 = 1: Error during exchange
Key Address y y: corresponds to the processor's slot number in the rack (0 or 1 depending upon the power supply used)
55
Software implementation
At a Glance
This page describes all the configuration language objects for CANopen communication with the PCMCIA card TSX CPP 100 that can be displayed by the application program.
Internal constants
Object %KWy.1.0 Function
Meaning Least significant byte: 16#00 Most significant byte: 16#37 Output fallback mode when PLC changes to STOP mode: x0 = 0: Reset x0 = 1: Maintain x1 = 0: Load configuration via the terminal x1 = 1: Use Flash EEPROM configuration Bus control at start-up: x2 = 0: Automatic x2 = 1: Via the application I/O control at start-up: x3 = 0: Automatic x3 = 1: Via the application Data exchange synchronization x4 = 0: MAST task x4 = 1: FAST task x5 reserved CANopen PCMCIA card watchdog x6 = 0: Activated x6 = 1: Deactivated x7 to X15: Reserved
%KWy.1.1
Configuration bits
Configuration bits Configuration bits Configuration bits Configuration bits Configuration bits
Size of the bus configuration in memory (in number of bytes) Size of input image zone in memory (in number of words) Size of output image zone in memory (in number of words) Address of the start of the input image zone (%MW) Address of the start of the output image zone (%MW)
Address y corresponds to the position of the Processor in the rack (0 or 1 according to the selected power supply).
Error codes
At a Glance
The following tables describe the different error codes that can arise in a CANopen configuration. The explanations given in each table allow you to program the application in order to more easily detect and correct any future abnormal operation.
The following table describes the error codes located in the words %IWy.1.1 (in the Description column) and %IWy.1.2 (in the Detail column).
Detail
Invalid address (NULL pointer) Invalid value Invalid ID object Invalid driver status Size of read memory zone invalid Size of data to be written invalid Timeout Synchronization error Stopped by the user Resource errors
Value ID Status code Memory size Size of data Timeout counter for a SDO transfer or loading status when downloading a configuration -
200 201
Invalid source address Invalid destination address Invalid service Invalid service class for a segment ID Primitive function of service invalid ID of service called invalid Invalid communication gate
Value of address Value of address Service code Specified value Function code Specified value Port number
56
Software implementation
307 308
57
Software implementation
Description Invalid SDO sub-index Remote error when executing a service Invalid COB-ID Invalid type of transfer on the link layer
Detail Value of sub-index Error code Value of COB-ID Code of the transfer requested: 101 102 103 : send : receive : send and receive
PCMCIA card errors 600 601 602 603 Card missing Card different to TSX CPP 100 detected Card not ready to communicate Card no longer in RUN mode PCMCIA card communication errors 700 701 -
Error when sending a message to the card Error when receiving a message coming from the card
702 703
Error when sending an output PDO to the card Error when receiving an input PDO from the card Configuration errors
Incorrect size of bus configuration data Description Size of input image data invalid Size of output image data invalid Overlap of memory areas reserved for inputs and outputs
Configuration data size Detail Size, in number of words, fixed at card start-up Size, in number of words, fixed at card start-up Type of overlap: 1 : the start of the input area covers the end of the output area 2 : the start of the output area covers the end of the input area
804
805
Invalid configuration data checksum (inconsistency of bus configuration data in Sycon mode)
Checksum of the bus configuration data located in the card's flash memory Most significant byte: card error code (See 806
806
The following table describes the error codes, situated in the most significant byte of word %IWy1.2 and for the value 806 of the word %IWy1.1.
Code 48 52 53 55 57 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
Description Timeout Unknown zone code Maximum memory size exceeded Incorrect parameter Sequence error in downloading Incomplete data downloaded Duplicate address Size of PDO address table too big Size of the bus device parameter zone too big Mode of PDO transmission unknown Size of PDO data too big Transmission speed unknown Synchro COB-ID outside limits Synchro message Timer Preset value outside limits Size of input data + offset greater than the maximum size of the input image zone Size of output data + offset greater than the maximum size of the output image zone Inconsistency between the configuration of the PDOs and the PDO address table Invalid length of PDO address table Length of download data invalid Urgent message COB-ID outside limits Bus device monitoring message COB-ID outside limits PDO length indicator outside limits
58
Software implementation
76
History codes
The following table describes the error codes, located in the fifth and sixth byte of the diagnostics history table.
Code 3 17 51 53 54 55 57 200 Description Service rejected by the device No response from the device Length of the receive memory zone too long Length of fragmented protocol data greater than the size of the buffer memory Unknown function requested by the card driver Bus device address outside limits Sequence error during a fragmented transfer. The action is canceled. card not configured
The following table describes the error codes, located in the seventh byte of a slave's diagnostics table. Code Description Error in slave monitoring Change of status of a device on the bus, device unavailable Sequence error in bus monitoring protocol No response for a configured PDO No response when configuring device Profile of device configured different to profile of device present on the bus Type of device configured different to type of device present on the bus Unknown SDO response Frame received greater than 8 bytes Device not scanned or stopped (for example in Autoclear mode)
30 31 32 33 34 35 36 37 38 39
Sycon
charging
The
following
table
describes
the
error
codes
that
can
occur
while
loading
error codes
Code 0 Standard errors 8001 8002 8003 8004 8005 8006 Allocation errors 8010 8011 8020 8021 8022 8030 8031 8032 8033 8034 8035 8080 8081 -1 -2 -3 Description
No error, operating correctly Driver inoperative Unknown event code from the driver Command code not recognized by the driver Command refused Another command is always active Command sent to an invalid device No device assigned Device already assigned Sending of a department request when no device is connected Initialization of a connection when there is already one Time-out Driver status reading error Error following the sending of a request on the network Sending mail-box always busy Network response error No available response from the inbox Input/output data transfer error Parametering errors General driver initialization error Non-created work task Invalid task pointer or synchronized object No synchronization event has been created
Communication errors
59
At a Glance
This chapter describes, using examples, the installation software of the CANopen bus configuration with the help of SyCon tool. This Chapter contains the following Sections:
Section 4.1 4.2 Topic Standard configuration Multi-master Configuration Page 87 101
60
61
4.1
At a Glance
Standard configuration
This section describes, using examples, the configuration software of a CANopen bus managed by one master.
What's in this
Topic Example Description
Declaration of CANopen Master CANopen Bus Configuration Declaration of slave 7 Configuration of slave 7 Declaration of slave 8 Configuration of slave 8 Configuration control completed
Example Description
At a Glance
This example is given for educational purposes, It allows you to follow the different stages in the configuration of a CANopen structure made up of: a TSX CPP 100 master module installed in a premium PLC, for a TSX CPP ACC1 connection unit, with two slave devices: a module with 8 inputs (7 slave), a module with 8 outputs (8 slave), The speed of the bus transmission is fixed at 1Mbit/s.
Illustration
Slave 7
Slave 8
Terminator
62
Procedure
The table below shows the different stages when declaring the master CANopen.
Step 1 From the TSX CPP100 card PL7 configuration screen, click on the icon Result: The SyCon tool will appear on the screen. 2 Select the command File New Result: The following screen appears: Action
hilscheil
Select CANopen then confirm by clicking Ok. Result: A blank structure will appear on the screen.
Select the command Insert - Master. Result: The following screen appears:
Step 5
enter a name, which represents the master device, in the Description field, Note: The name should contain neither spaces nor letters with accents and should consist of no more than 32 letters. confirm by clicking Ok. Result: The following structure appears:
CANocco
CANOpen_Master
Master
CPP 100 TSX
Procedure
The table below shows the different stages for declaring the master CANopen.
Step Action Select the command Parameters Bus parameters. Result: The following screen appears: Bus Parameters Speed SYNC COB-ID Cycle Period Com
I 1 Mbit/s
(128"
OK Cancel
1100
63
Enable Global Star node 29 Bits Selectien entries Enable 29 Bit Selector 29... Acceptance Code Acceptance Mask [00] [JM] [JM] [JM] [00] ...0 Bit
Hex.
[JM] Hex.
Configure: speed at 1 Mbit/s, the value of SYNC COB-ID at 128 (default value), the message exchange period is at 100ms.
Select Mode auto Clear OFF. Select Enable Global Start Node. Confirm by clicking Ok.
Declaration of slave 7
Procedure
The table below shows the different stages to declare the slave 7.
Step 1 Action Select the command Insert Node. Result: A scale indicator appears: 2 Place the scale indicator on the bus outside of the text frame that defines the master. Result: The following screen appears: insert Node
All
OK Cancel
| All
ATV58_F ATV58F_E ATV58F_F CBM-AI4 CBM-A04 CBM-DIO8 CIF104-COS CIF104-COSR Add >> Name Vendor Product number Product version Product revision Revision Schneider Electric 0 1 1 A58_E.EDS 2 EDS file name EDS of ID Node Description
64
Step 3
Action Select: the vendor the slave p in the list of 7 in the fiel Descriptio confirm by Result: The fo name (ESD for example), -ofile (401 for example), slaves, the slave type(e.g. CBM-DI08) then click on Add, d ID Node then enter a name of a slave device in the n field, clicking Ok. llowing structure appears:
1
Master
TSX CPP 100
Master
CANOCOO
^ iTIlH Lliiil
Node
ID Node
CBM-DIO8
Slave_7_Inputs
7
65
Configuration of slave 7
The table below shows the different stages to configure the slave 7.
Double click on slave 7. Result: The following screen appears: Node Configuration Node CBM_DIO8 |ESD_Slave7_Inputs Description File name 2 | Node BootUp
ID node (address) Guard Time (msec.) Life time factor Emergency COB-ID Nodeguard COB-ID
1
135 | 1799 1 Configuration Object Current node OPC Objects
0 Activate the node in the current configuration 0 Auto COB-ID (401) "1
CBM_DIO8.EDS 401 7 | 500 | Cancel Type Eqiiip~| Digital Output, Digital Input Ok
Add PDOs
to
configured
IE
Process Data Objects (PDOs) predefined in the EDS Idx. Obj. PDO Process Data Objects Configured name | PDO name Symbolic COB-I I Type I Adr. 1400. rxPDO1 Com Name D 1800 txPDO1_Com
17 / CBM-DIO8" I Len. O Type O Adr. O Len. | Content Mapping Define new PDO Rec. Define new PDO Transmitted. Clear configured PDO PDO Specifications Symbolic Names
66
Step 2
Action Select the 1800 txPD01_Com object then click on the Add to the configured PDOs button. Result: The following window appears: Node PDO specifications , master's input data
Transmission mode
OK
O the node can send a synchro message as an indicator in order to send the PDO
|2
O the node can send a synchro message as an indicator to send to the PDO when this was previously O the node can send to the PDO upon a remote request O
transmitting PDO event processing specific to manufacturer O transmitting PDO event processing defined in the device profile Specific transmission type resulting from CANopen . Counter o t moder output n on 10 node cycle periods 2
3 Step 4
Modify the transmission frequency then confirm by clicking Ok. Action Select PDO_1800 in the Configured process data objects (PDOs) field then click on the key Content Mapping PDO. Result: The following window appears: PDO Content Mapping Index Object 1A00
file Sub. Idx. 0 1 0 1 1 Parameter Number_Blocks_8_in Read_8_inputs_1H_8H Number_Blocks_8_out Write_8_Outputs_1H_8H CounterRegister Access || Reading Reading Reading Read. / Ecr. Read. / Ecr.
Ok Cancel
Add Object . Object Idx. Obj. Sub. Idx. Parameter Symbolic Name | |
Clear Object
Select Read_8_Inputs_1H-8H, click on Add Object then confirm by clicking Ok. Confirm configuration screen by clicking on Ok.
Declaration of slave 8
67
Procedure
Step 1 2 3 Action
The table below shows the different stages to declare the slave 8.
Select the command Insert - Node. Place the scale indicator on the bus outside of the text frame that defines the master. Select: the vendor name (ESD for example), the slave profile (401 for example), in the list of slaves, the slave type (e.g. CBM-DI08) then click on Add, Enter 8 in the ID Node field then enter a name of a slave device in the Description field, confirm by clicking Ok. Result: The following structure appears:
CAN0O30
!
Master
TSX CPP 100
Master Slave_7_Inputs
ID Node
CBM-DIO8 Slave_8_Outputs 7
nillll LSIIIS
Node
num
Ulliil
Node
ID Node
CBM-DIO8
Configuration of slave 8
At a Glance
The configuration of slave 8 is carried out in the same way as the configuration of slave 7 (See C o n f i g u r a t i o n o f s l a v e 7 , p . 9 4 ) . The main difference is in selecting the outputs instead of the inputs.
Procedure
Step Action
The table below shows the different stages to configure the slave 8.
1 Double click on slave 8. Result: The configuration screen appears 2 Select the 1800 txPD01_Com object then click on the Add to the configured PDOs button. Result: The window with PDO features appears 3 Modify the transmission frequency then confirm by clicking Ok. 4 Select PDO_1800 in the Configured process data objects (PDOs) field then click on the Content Mapping PDO button. 5 Select Write_8_Ouputs_1H-8H, click on Add Object,then confirm by clicking Ok. 6 Confirm configuration screen by clicking on Ok.
68
At a Glance
The SyCon tool allows you to monitor work carried out during this example. Access to various visualization tables follows.
Note: After monitoring your bus configuration, do not forget to save it in a CO file. It will be used during the PL7 application loading of or during direct loading in the TSX CPP 100 card.
Procedure
The table below shows the main checking stages of the bus configuration using the visualization tables.
Step Action Select the command Visu Table Devices Result: list of configured devices appears on the following screen. quip. I able
D TSX CPP 100 CBM-DIO8 CBM-DIO8 Description' Master CANopen F.SD Slave7 Inputs FSD_SlaveB_Oi'itputs
Ok
Select the command Visu - Table Addresses Result: the list of configured slaves as well as specifications of data appear on the following screen. Equip. Table
ID Node Equip. CBM-DIO8 CBM-DIO8 idx. Obj. Parameter 1800 1800
ICOB-ID
I Type
I Adr.
I Len.
O Type
Ok
Sort Nodes
according
to
ID
69
Step 3
Action Select the command Visu Table ID Result: list of configured devices appears on the following screen. iD Table
Id 7 1 Equip. CBM-DIO8 CBM-DIO8 Description ESD_Slave7_Inputs ESD Slave8 Outputs Emerg. 135 129 Nodeguard Parameter 1799 1793 txPD01_Com txPD01 Com COB-ID | 391 385
OK
4 Select the command Visu Table SDO Result: list of slaves configured with the SDO specifications appears on the following screen.
SDO
ID Idx. Obi. 7 1800 Sub. Idx 1 2 COB-ID Transmission type 187 2 Parameter Chosen value Dialog
1
X X
I Decimal
Inhibition Time
1.A00
Customized objects
1 1800 1 2
COB-TD
181 2
X X
4.2
At a Glance
Multi-master Configuration
Transmission type 3 Inhibition Time 1.A00 0 Number of declared
62000108
This Section describes, using examples, the configuration software of a CANopen bus, which has two coexisting masters. This configuration is carried out with the help of the SyCon configuration tool.
What's in this
Topic Example Description
_
102 104 105 107 108 109 114
Declaration of master CANopen A and slaves 7 and 8 Declaration of Master B CANopen Master B CANopen Bus Configuration Declaration and Configuration of Slaves 9 and 10 Declaration and Configuration of Slave 7 for Master B Declaration and Configuration of Slave 8 for Master B
70
Example Description
At a Glance
This example is given for educational purposes. It allows you to follow the different stages in the configuration of a CANopen structure made up of: a TSX CPP 100 master module(called A master) installed in a Premium PLC, a TSX CPP 100 master module (called B master) installed in a Premium PLC, on two TSX CPP ACC1 connection units, with four slave devices: a module with 8 inputs (7 slave), a module with 8 outputs (8 slave), a module with 8 inputs (9 slave), a module with 8 outputs (10 slave). The speed of the bus transmission is fixed at 1Mbit/s. Requested functions of masters A and B: Master A manages slaves 7 and 8. Master B manages slaves 9 and 10. Master B is the only master on slaves 7 and 8.
71
Illustration
At a Glance
The declaration et bus CANopen A configuration as well as the declaration and slave 7 and 8 configuration are carried out in the same way as the example of the standard bus (See
Master
Illl
Slave 7 Inputs
nun
Slave_8_Outputs
Procedure
Step 1 Action
The table below shows the different stages to declare the master CANopen.
From the TSX CPP100 card PL7 configuration screen, click on the icon Result: The SyCon tool will appear on the screen. 2 Select the command File New Result: The following screen appears:
hilscheii
72
Select CANopen then confirm by clicking Ok. Result: A blank structure will appear on the screen.
4 Insert Master
Select the command Insert Master. Result: The following screen appears:
Add
Ok
Cancel
---------- 1
Step 5
enter a name, which represents the master device, in the Description field, Note: The name should contain neither spaces nor letters with accents and should consist of no more than 32 letters. confirm by clicking Ok. Result: The following structure appears: CANopen_Master_B_Listen
Master
Procedure
The table below shows the different stages for declaring the CANopen bus.
Step Action Select the command Parameters Bus parameters. Result: The following screen appears: Bus Parameters Speed 1 Mbit/s | |100 | OK Cancel
Enable Global Star node Enable 29 Bit Selector 29... ...0 Bit [00] [JM] Hex. [jf] [JM] Hex.
Configure:
73
speed at 1 Mbit/s, the value of SYNC COB-ID at 127 (every master on the same bus must have a different SYNC COB-ID)), the message exchange period is at 100ms.
Select Mode auto Clear OFF. Select Enable Global Start Node. Confirm by clicking Ok.
At a Glance
The declaration and configuration of slaves 9 and 10 is carried out in the same way as it is for slaves 7 and 8 for the standard bus, only the node numbers and the description of each slave changes: Declaration of slave 9 (See D e c l a r a t i o n o f s l a v e 7 , p . 9 2 ) , Declaration of slave 10 (See D e c l a r a t i o n o f s l a v e 8 , p . 9 7 ) , Configuration of slave 9 (See C o n f i g u r a t i o n o f s l a v e 7 , p . 9 4 ) , Configuration of slave 10 (See C o n f i g u r a t i o n o f s l a v e 8 , p . 9 8 ) ,
Result
The figure below illustrates the result of the declaration and configuration of slaves 9 and 10 on bus B.
CANopen_Master_B_Listens
Master
Slave_9_Inputs
ID Node Node
9 CBM-DIO8
Slave_10_Outputs 10 N o d e CBM-DIO8
ID Node
74
How slave 7
to
declare
The table below shows the different stages to declare the slave 7.
Step Action Select the command Insert - Node. Result: A scale indicator appears: Place the scale indicator on the bus outside of the text frame that defines the master. Result: The following screen appears:
- Node filter Vendor Profile [7AT Canc Add >> ATV58_F ATV58F_E ATV58F_F CBM-AI4 CBM-A04 CBM-DIO8 CIF104-COS CIF104-COSR Add All >> Name Vendor Product number Product version Product revision Revision Schneider Electric 0 1 1 A58_E.EDS 2 Select: the vendor name (ESD for example), the slave profile (401 for example), in the list of slaves, the slave type (e.g. CBM-DI08) then click on Add, 7 in the field ID Node then enter a name of a slave device in the Description field, confirm by clicking Ok. EDS file name EDS of OK
: Remove
<Remove All
ID Node Description
75
How to configure The table below shows the different stages to configure the slave 7. slave 7
Step Action Double click on slave 7. Result: The following screen appears: Configuration Node Node Description File name CBM_DIO8 |Slave7_Inputs_Listens CBM_DIO8.EDS the node in the current ID node (address) Guard Time (msec.) Life time factor Emergency COB-ID 401 0 Auto COB-IT) (401) Device Type Digital Output, Nodeguard COB-ID Digital 7 [500"" 2 I35"" |1799 Ok Cancel Node BootUp
m
I
|
Activate
configuration
I
I
OPC
Objects
Process Data Objects (PDOs) predefined in the EDS Idx. Obj. PDO name 1400. 1800 rxPDO1 Com txPDO1_Com
c r
17 / CBM-DIO8
!
Add to configured PDOs Configured Process Data Objects Symbolic Name COB-I I Type I Adr. D I Len. O Type O Adr. O Len. |
PDO name
I I
2 Step Uncheck the Activate the node in the current configuration box. Action
Symbolic Names
Select the 1800 txPD01_Com object then click on the Add to the configured PDOs button. Result: The following window appears: Specifications of PDO transmitted from the node, master input data
Transmission mode
------------------------------------------------------------------------------------------------------
O the node can send a synchro message as an indicator in order to send the PDO
|2
O the node can send a synchro message as an indicator to send to the PDO when this was O the node can send to the PDO upon a remote request O
transmitting PDO event processing specific to manufacturer O transmitting PDO event processing defined in the device profile Specific transmission type resulting from CANopen |- Counter output --------------------------------------------------------2
[10
Select transmitting PDO event processing defined in the device profile, Select no remote request, PDO transmission dependent on node, confirm by clicking Ok.
76
Step 5
Action Select PDO_1800 in the Configured process data objects (PDOs) field then click on the key Content Mapping PDO. Result: The following window appears: PDO Content Mapping Index Object 1A00
file Sub. Idx. 0 1 0 1 1 Parameter Number_Blocks_8_in Read_8_inputs_1H_8H Number_Blocks_8_out Write_8_Outputs_1H_8H CounterRegister Access || Reading Reading Reading Read. / Ecr. Read. / Ecr.
Ok Cancel
Add Object . Object Idx. Obj. Sub. Idx. Parameter Symbolic Name | |
Clear Object
77
Step Action 7 Confirm configuration screen by clicking on Ok. Result: The following structure appears:
CANOG^^H
^
TSX CPP 100
CANopen_Master_B_Listens Slave_9_Inputs
ID Node
Master
nillill
U11111
Node
CBM-DIO8
^IHIl
^
Slave_10_Outputs
LJ11111
CBM-DIO8
ID Node
10
Node
^WPI
CBM-DIO8
^taiH|
ID Node
7
Slave_7_Inputs_Listens ' N
Node
The table below shows the different stages to declare the slave 8.
Step 1 Action Select the command Insert Node. Result: A scale indicator appears: 2 Place the scale indicator on the bus outside of the text frame that defines the master. Result: The following screen appears: Insert Node - Node filter Vendor All Profile | All
ID
Node filter
OK Cancel
ATV58_E
| Add >>
1
1
<< Remove
| <<Remove All Name Vendor Product number Product version Product revision Revision Schneider Electric 0 1 1 A58_E.EDS 2 EDS file name EDS of
ID Node Description
78
Step
Action Select: Profile 401 standard-EDS in the Vendor field, 401 in the Profile field, click on Add, Enter 127 in the field ID Node then enter a name of a slave device in the Description field, Result:
<Remove All OK Canc el Add >> : Remove Name Vendor Product number Product version Product revision Revision Schneider Electric No Entry 1 1 STANDARD.E DS 2 EDS file name EDS of ID Node Description 127 Profile 401 standard EDS
I
Slave_8_Out put_ListensFa
79
How to configure The table below shows the different stages to configure the slave 8. slave 8
Step Action Double click on slave 8. Result: The following screen appears: Node Configuration Node Profile 401 standard EDS STANDARD.EDS Activate the node in the current configuration 401 Auto COB-JD (401) Digital Output, Digital Input Profile ID node (address) (msec.) Life time factor Emergency COB-ID [27~ [200"" 3 [255"" [99~ Node BootUp OPC Objects Configuration Object Ok Cancel
I Device Type
Process Data Objects (PDOs) predefined in the EDS Idx. Obj. PDO name 1400. 1401 1800 1801 Receive PDO1 Parameter Receive PDO1 Parameter Transmit PDO1 Parameter Transmit PDO1 Parameter Data Objects COB-I I lype D I Adr. I Len. O Type O Adr.
-M
I Content Mapping
O Len. n PDO PDO Specifications Define new PDO Rec.. Define new PDO Rec..
I
Step 2 3 Action Uncheck the Activate the node in the current configuration box. Uncheck the box Auto COB-ID 401. 4
Clear
configured
Click on Define new PDO Transmitted. Result: the following screen appears:
Enter in a name for the PDO and confirm by clicking Ok. Enter in a symbolic name (column Symbolic Name). Result:
Coniigui ed P
PDO name
PDO_1_Dummy
Slave_8
1023
IB
PDO Specifications
||
Symbolic Names
||
80
Step
Action Enter in COB-ID, 520 for example. Caution, this number should be the same as that of slave 8 on bus A. Click on PDO specifications. Result: The following window appears: Specifications of PDO transmitted from the node, master input data
Transmission mode
OK
O the node can send a synchro message as an indicator in order to send the PDO
|2
O the node can send a synchro message as an indicator to send to the PDO when this was previously O the node can send to the PDO upon a remote request O
transmitting PDO event processing specific to manufacturer O transmitting PDO event processing defined in the device profile Specific transmission type resulting from CANopen 2
[10
Select transmitting PDO event processing defined in the device profile, Select no remote request, PDO transmission dependent on node, confirm by clicking Ok.
Step 10
Action Select PDO_1_Dummy in the Configured process data objects (PDOs) field then click on the key Content Mapping PDO. Result: The following window appears: PDO Content Mapping Index Object 1A02 file objects Idx. Obj. 1000 1002 6000 6000 6000 6000 6000 2 "Error Register" "Manufacturer Register" Read 8 inputs 1H Read_8_inputs_9H_10H Read_8_inputs_11 H_18H Read_8_inputs_19H_20H Read_8_inputs_21 H_28H 8H Status Reading Reading Reading Reading Reading Reading Reading Cance l OK EDS Sub. Parameter.
Access
Add Object
Clear Object
11
Select 6200, Write_8_Inputs_1H-8H (use scroll bar), click on Add Object then confirm by clicking Ok. Step 12 Action Confirm configuration screen by clicking on Ok. Result: The following structure appears:
CANopen_Master_B_Listens
Master
TSX CPP 100
- Di nii - [.ill
TSX DM CPP 100
Slave9 __ Inputs
ID Node Node
9 CBM-DIO8
ID Node Node
Slave10 __ Outputs
81
10
CBM-DIO8
Slave_7_Inputs_Listens
ID Node Node
7 CBM-DIO8
Slave_8_Outputs_Listen_Dummy
ID Node Node
127 Profile 401 standard EDS
82
Glossary
CAN
Controller Area Network: field bus originally designed for the automobile, which is now used in many sectors from industrial to tertiary.
CiA COB
CAN in Automation: international organization of users and manufacturers of CAN products. Communication OBject: transport unit on CAN bus. A COB is identified by a unique identifier, which is coded on 11 bits, [0, 2047]. A COB contains a maximum of 8 data bytes. The priority of a COB transmission is shown by its identifier, the weaker the identifier, the more priority the associated COB has.
CRC
Cyclic Redundancy Checksum: cyclic redundancy checksum indicates that no character has been "deformed" during frame transmission. Carrier Sense, Multiple Access / Collision Avoidance : communication control method on a network featuring the link layer.
CSMA/CA
DIN
83
Glossary
EDS
Electronic Data Sheet: description file for each CAN device (provided by the manufacturers). To add a CAN device to the bus with Sycon configuration software, select the corresponding EDS. The EDS are available on the website http:// www.can-cia.de or from the hardware provider.
Life Time = Life Time factor x Guard Time . Logical Link Control .
MAC MDI
MTBF
O
OD Object Dictionary: object dictionary recognized by CAN. A hexadecimal code is given to each objet type, the dictionary regroups the all the object's codes.
PCMCIA
84
Glossary
PDO
Process Data Object: there are RPDO (Receive PDO) and the TPDO (Transmit PDO).
PDU
Process Data Unit: there are APDUs (PDU Application). A PDU on the link layer is an APDU encapsulated by headings and bytes, which characterize this link layer.
PMA
S
SDO Service Data Object: there are SSDOs (SDO server) and CSDOs (SDO client).
TAP
85
Glossary
86
Index
A
Accessing the configuration screen, 35 Architecture, 13
G
General, 11
B
Bus length, 14
I
IDENTIFICATION, 55 Implicit exchange, 72 Input words, 73 Installation Principles, 32 Introduction to CANopen, 12
C
Characteristics, 25 Configuration, 34 How to, 45 Loading, 40 configuration CANopen bus behavior, 38 slave inputs, 38 slave outputs, 38 configuration screen, 36
L
Language objects, 71 Configuration, 78 Explicit, 76 Implicit, 72 LEDs, 63
D
Debugging, 60 diagnostic command, 58 Diagnostics, 62, 64 Documentation file, 48 Exchange management, 77 Explicit exchange, 76
M
Methodology, 33 Mounting PCMCIA card, 20
E
Error codes, 79
O
Output words, 75
87
Index
P
PDU, 53 Physical description of CPP 100, 18 Processors, 26
R
READ_VAR, 51
Report, 77
T
Topology, 13 Transmission speed, 14 TSX CPP 100, 15 TSX CPP ACC1, 22
W
WRITE_VAR, 51
88