Beruflich Dokumente
Kultur Dokumente
CC-Link Slave
Language: English
www.hilscher.com
Revision History
Rev
Date
Name
Revisions
20.11.07
ES
Created.
CC-Link slave firmware version 2.0.1
25.01.08
ES
06.05.08
RG
26.11.08
RG
Table of Contents
1
1.1
1.2
1.3
1.4
Introduction....................................................................................................................................9
Abstract ...................................................................................................................................... 9
System Requirements ................................................................................................................ 9
Intended Audience ..................................................................................................................... 9
Specifications ........................................................................................................................... 10
1.4.1
1.4.2
1.5
1.6
2.1
2.2
Fundamentals ..............................................................................................................................13
General Access Mechanisms on netX Systems ...................................................................... 13
Accessing the Protocol Stack by Programming the AP Tasks Queue.................................... 14
2.2.1
2.2.2
2.3
Accessing the Protocol Stack via the Dual Port Memory Interface.......................................... 15
2.3.1
2.3.2
2.3.3
2.4
3.1
3.3
Application as Client....................................................................................................................... 21
Application as Server ..................................................................................................................... 22
Dual-Port Memory........................................................................................................................23
Cyclic Data (Input/Output Data) ............................................................................................... 23
3.1.1
3.1.2
3.2
Status ....................................................................................................................................... 31
3.3.1
3.3.2
3.4
4.1
4.2
4.2.1
4.3
4.4
5.1
5.1.1
5.1.2
5.2
6
6.1
6.2
7
List of Figures
Figure 1 - The three different Ways to access a Protocol Stack running on a netX System .................................. 13
Figure 2 - Use of ulDest in Channel and System Mailbox ................................................................................... 16
Figure 3 - Using ulSrc and ulSrcId................................................................................................................... 17
Figure 4: Transition Chart Application as Client ..................................................................................................... 21
Figure 5: Transition Chart Application as Server.................................................................................................... 22
Figure 6: Internal Structure of CC-Link Slave Firmware......................................................................................... 60
List of Tables
Table 1: Names of Tasks in CC-Link Slave Firmware............................................................................................ 10
Table 2: Terms, Abbreviations and Definitions ...................................................................................................... 12
Table 3: References............................................................................................................................................... 12
Table 4: Names of Queues in CC-Link Slave Firmware......................................................................................... 14
Table 5: Meaning of Source- and Destination-related Parameters. ....................................................................... 14
Table 6: Meaning of Destination-Parameter ulDest.Parameters. ........................................................................... 16
Table 7 Example for correct Use of Source- and Destination-related parameters.: ............................................... 18
Table 8: Input Data Image ..................................................................................................................................... 24
Table 9: Output Data Image................................................................................................................................... 24
Table 10: General Structure of Packets for non-cyclic Data Exchange.................................................................. 26
Table 11: Status and Error Codes.......................................................................................................................... 29
Table 12: Channel Mailboxes. ............................................................................................................................... 30
Table 13: Common Status Block............................................................................................................................ 32
Table 14: ST1 Data Transfer from Master to Slave Station ................................................................................ 39
Table 15: Allowed Values of Master Station (User Application Program) .............................................................. 39
Table 16: Allowed Values of Master Station User Application Program Error Check............................................. 39
Table 17: Allowed Values of Refresh Startup ........................................................................................................ 40
Table 18: Allowed Values of Transient Data Status ............................................................................................... 40
Table 19: Allowed Values of Transient Data Reception Enable ............................................................................. 40
Table 20: Allowed Values of Protocol Version ....................................................................................................... 40
Table 21: Allowed Values of Master Station Type.................................................................................................. 41
Table 22: ST1 Data Transfer from Slave to Master Station ................................................................................ 42
Table 23: Allowed Values of Fuse Status .............................................................................................................. 42
Table 24: Allowed Values of Unit Error/Invalid No. of Points ................................................................................. 43
Table 25: Allowed Values of Refresh Receive ....................................................................................................... 43
Table 26: Allowed Values of Parameter Receive ................................................................................................... 43
Table 27: Allowed Values of Switch Change Detection ......................................................................................... 43
Table 28: Allowed Values of Cyclic Transmission Flag.......................................................................................... 44
Table 29: Allowed Values of Watchdog Timer Error .............................................................................................. 44
Table 30: ST2 Data Transfer from Master to Slave Station ................................................................................ 44
Table 31: RY Information Transmission Points ...................................................................................................... 45
Table 32: RWw Information Transmission Points .................................................................................................. 45
Table 33: ST2 Data Transfer from Slave to Master Station ................................................................................ 46
Table 34: Allowed Values of Transient Data Status ............................................................................................... 46
Table 35: Allowed Values of Transient Receive..................................................................................................... 46
Table 36: Allowed Values of Transient Type.......................................................................................................... 47
Table 37: Allowed Values of Transmission Status ................................................................................................. 47
Table 38: Allowed Values of Extended cycle setting.............................................................................................. 47
Table 39: Communication Control Block................................................................................................................ 49
Table 40: Overview about Essential Functionality.................................................................................................. 50
Table 41: Meaning and allowed Values for Warmstart-Parameters. ...................................................................... 52
Table 42: Available Baud Rate Values................................................................................................................... 53
Table 43: Input and Output Data for Remote I/O Device ....................................................................................... 54
Table 44: Input and Output Data for Remote Device Station with One Occupied Station...................................... 54
Table 45: Input and Output Data for Remote Device Station with Two Occupied Stations .................................... 54
Table 46: Input and Output Data for Remote Device Station with Three Occupied Stations ................................. 54
Table 47: Input and Output Data for Remote Device Station with Four Occupied Stations ................................... 55
Table 48: Input and Output Data for Remote Device Station with One Occupied Stations, Single Setting ............ 56
Table 49: Input and Output Data for Remote Device Station with Two Occupied Stations, Single Setting ............ 56
Table 50: Input and Output Data for Remote Device Station with Three Occupied Stations, Single Setting ......... 56
Table 51: Input and Output Data for Remote Device Station with Four Occupied Stations, Single Setting ........... 56
Table 52: Input and Output Data for Remote Device Station with One Occupied Station, Double Setting ............ 57
Table 53: Input and Output Data for Remote Device Station with Two Occupied Stations, Double Setting........... 57
Table 54: Input and Output Data for Remote Device Station with Three Occupied Stations, Double Setting ........ 57
Table 55: Input and Output Data for Remote Device Station with Four Occupied Stations, Double Setting .......... 57
Table 56: Input and Output Data for Remote Device Station with One Occupied Station, Quadruple Setting ....... 58
Table 57: Input and Output Data for Remote Device Station with Two Occupied Stations, Quadruple Setting ..... 58
Table 58: Input and Output Data for Remote Device Station with Three Occupied Stations, Quadruple Setting... 58
Table 59: Input and Output Data for Remote Device Station with Four Occupied Stations, Quadruple Setting..... 58
Table 60: Input and Output Data for Remote Device Station with One Occupied Station, Octuple Setting ........... 59
Table 61: Input and Output Data for Remote Device Station with Two Occupied Stations, Octuple Setting.......... 59
Table 62: Input and Output Data for Remote Device Station with Three Occupied Stations, Octuple Setting ....... 59
Table 63: Input and Output Data for Remote Device Station with Four Occupied Stations, Octuple Setting ......... 59
Table 64: CC-Link APS-Task Process Queue ....................................................................................................... 62
Introduction 8
Introduction 9
1 Introduction
1.1
Abstract
This manual describes the application interface of the CC-Link Slave- stack, with the aim to support
and lead you during the integration process of the given stack into your own application.
Stack development is based on Hilschers Task Layer Reference Programming Model. This model
defines the general template used to create a task including a combination of appropriate functions
belonging to the same type of protocol layer. Furthermore, it defines of how different tasks have to
communicate with each other in order to exchange data between each communication layer. This
Reference Model is used by all programmers at Hilscher and shall be used by the developer when
writing an application task on top of the stack.
1.2
System Requirements
1.3
Intended Audience
This manual is suitable for software developers with the following background:
Knowledge of the programming language C
Knowledge of the use of the real time operating system rcX
Knowledge of the Hilscher Task Layer Reference Model
Knowledge of the CC-Link Specification BAP-05026-J
Introduction 10
1.4
Specifications
This stack has been written to meet the requirements outlined in the CC-Link specification Ver.2.00
BAP-05026-J.
1.4.1
To manage the CC-Link Slave implementation 2 tasks are involved into the system. To send packets
to a task, the task main queue has to be identified. For the identifier for the tasks and there Queues
are the following naming conversion:
Task Name
Queue Name
Description
CCLINK_SLAVE
QUE_CCLSLAVE
CCLINK_APS
QUE_CCLAPS
1.4.2
Technical Data
The data below applies to the CC-Link firmware and stack version V2.2.2 The firmware/stack support
CC-Link Version 2.0 and 1.11
This firmware/stack has been written to meet the requirements outlined in the CC-Link specification
Ver.2.00 BAP-05026-J.
Technical Data
Data for firmware/stack working according to CC-Link Version 2.0
Station Types
368 bytes
368 bytes
Extension cycles
1, 2, 4, 8
Baud rates
Introduction 11
48 bytes
48 bytes
4 bytes (RY)
4 bytes (RX)
Baud rates
yes
yes
Configuration
Configuration by packet to transfer warmstart parameters
Diagnostic
Firmware supports common and extended diagnostic in the dual-port-memory for loadable firmware
Limitations
Intelligent Device Station not supported yet
1.5
Introduction 12
Term
Description
AP
RX
Receive bit data (Remote I/O Station and Remote Device Station)
RY
Send bit data (Remote I/O Station and Remote Device Station)
RWr
RWw
All variables, parameters, and data used in this manual have the LSB/MSB (Intel) data
representation. This corresponds to the convention of the Microsoft C Compiler.
1.6
References
Table 3: References
Fundamentals 13
2 Fundamentals
2.1
This chapter explains the possible ways to access a Protocol Stack running on a netX system :
1. By accessing the Dual Port Memory Interface directly or via a driver.
2. By accessing the Dual Port Memory Interface via a shared memory.
3. By interfacing with the Stack Task of the Protocol Stack.
The picture below visualizes these three ways:
1
2
Send Mailbox
Reveive Mailbox
AP Task
Fieldbus Task(s)
Network
Figure 1 - The three different Ways to access a Protocol Stack running on a netX System
This chapter explains how to program the stack (alternative 3) correctly while the next chapter
describes accessing the protocol stack via the dual-port memory interface according to alternative 1
(and 2, if the user application is executed on the netX chip in the context of the rcX operating system
and uses the shared DPM). Finally, chapter 1 titled describes the entire interface to the protocol
stack in detail.
Depending on you choose the stack-oriented approach or the Dual Port Memory-based approach, you
will need either the information given in this chapter or those of the next chapter to be able to work
with the set of functions described in chapter 5. All of those functions use the four parameters
ulDest, ulSrc, ulDestId and ulSrcId. This chapter and the next one inform about how to
work with these important parameters.
Fundamentals 14
2.2
In general, programming the AP task or the stack has to be performed according to the rules
explained in the Hilscher Task Layer Reference Manual. There you can also find more information
about the variables discussed in the following.
2.2.1
To get the handle of the process queue of the CC-Link Slave Protocol-Task or the CC-Link
Slave Application-Task the Macro TLR_QUE_IDENTIFY() needs to be used. It is described in
detail within section 10.1.9.3 of the Hilscher Task Layer Reference Model Manual. This macro delivers
a pointer to the handle of the intended queue to be accessed (which is returned within the third
parameter, phQue), if you provide it with the name of the queue (and an instance of your own task).
The correct ASCII-queue names for accessing the CC-Link Slave Protocol-Task or the CCLink Slave Application-Task, which you have to use as current value for the first parameter
(pszIdn), is
Description
"QUE_CCLSLAVE
"QUE_CCLAPS
The returned handle has to be used as value ulDest in all initiator packets the AP-Task intends to
send to the CC-Link Slave-Task . This handle is the same handle that has to be used in
conjunction with the macros like TLR_QUE_SENDPACKET_FIFO/LIFO() for sending a packet to the
respective task.
2.2.2
The meaning of the source- and destination-related parameters is explained in the following table:
Variable
Meaning
ulDest
ulSrc
ulSrcId
For more information about programming the AP tasks stack queue, please refer to the Hilscher Task
Layer Reference Model Manual. Especially the following sections might be of interest in this context:
1. Chapter 7 Queue-Packets
2. Section 10.1.9 Queuing Mechanism
2.3
Fundamentals 15
This chapter defines the application interface of the CC-Link Slave Stack.
2.3.1
The mailbox of each communication channel has two areas that are used for non-cyclic message
transfer to and from the netX.
Send Mailbox
Packet transfer from host system to netX firmware
Receive Mailbox
Packet transfer from netX firmware to host system
For more details about acyclic data transfer via mailboxes, see section 3.2. Acyclic Data (Mailboxes) in
this context, is described in detail in section 3.2.1 General Structure of Messages or Packets for NonCyclic Data Exchange while the possible codes that may appear are listed in section 3.2.2. Status &
Error Codes.
However, this section concentrates on correct addressing the mailboxes.
Fundamentals 16
2.3.2
2.3.2.1
How to use ulDest for Addressing rcX and the netX Protocol Stack by the System
and Channel Mailbox
System
Mailbox
Channel 0
Mainbox
ulDest = 0x02
ulDest = 0x01
ulDest = 0x00
ulDest = 0x20
ulDest = 0x02
ulDest = 0x01
ulDest = 0x00
ulDest = 0x20
ulDest = 0x02
ulDest = 0x01
ulDest = 0x00
ulDest = 0x20
The preferred way to address the netX operating system rcX is through the system mailbox; the
preferred way to address a protocol stack is through its channel mailbox. All mailboxes, however, have
a mechanism to route packets to a communication channel or the system channel, respectively.
Therefore, the destination identifier ulDest in a packet header has to be filled in according to the
targeted receiver. See the following example:
Channel 1
Mailbox
netX OS
rcX
AP Task 1
AP Task 2
For use in the destination queue handle, the tasks have been assigned to hexadecimal numerical
values as described in the following table:
ulDest
Description
0x00000000
0x00000001
0x00000002
0x00000003
0x00000004
0x00000020
else
The figure and the table above both show the use of the destination identifier ulDest.
Fundamentals 17
A remark on the special channel identifier 0x00000020 (= Channel Token). The Channel Token is
valid for any mailbox. That way the application uses the same identifier for all packets without actually
knowing which mailbox or communication channel is applied. The packet stays 'local'. The system
mailbox is a little bit different, because it is used to communicate to the netX operating system rcX.
The rcX has its own range of valid commands codes and differs from a communication channel.
Unless there is a reply packet, the netX operating system returns it to the same mailbox the request
packet went through. Consequently, the host application has to return its reply packet to the mailbox
the request was received from.
2.3.2.2
Generally, a netX protocol stack can be addressed through its communication channel mailbox. The
example below shows how a host application addresses a protocol stack running in the context of a
netX chip. The application is identified by a number (#444 in this example). The application consists
of three processes identified by the numbers #11, #22 and #33. These processes communicate
through the channel mailbox with the AP task of the protocol stack. Have a look at the following figure:
Process #33
Process #22
Process #11
Application #444
Channel
Mainbox
Fundamentals 18
This example applies to command messages initiated by a process in the context of the host
application. If the process #22 sends a packet through the channel mailbox to the AP task, the packet
header has to be filled in as follows:
Object
Variable
Name
Numeric Value
Explanation
Destination
Queue
Handle
ulDest
= 32
Source
Queue
Handle
ulSrc
= 444
Destination
Identifier
ulDestId
= 0
Source
Identifier
ulSrcId
= 22
(0x00000020)
For packets through the channel mailbox, the application uses 32 (= 0x20, Channel Token) for the
destination queue handler ulDest. The source queue handler ulSrc and the source identifier ulSrcId
are used to identify the originator of a packet. The destination identifier ulDestId can be used to
address certain resources in the protocol stack. It is not used in this example. The source queue
handler ulSrc has to be filled in. Therefore, its use is mandatory; the use of ulSrcId is optional.
The netX operating system passes the request packet to the protocol stack's AP task. The protocol
stack then builds a reply to the packet and returns it to the mailbox. The application has to make sure
that the packet finds its way back to the originator (process #22 in the example).
2.3.2.3
To route an rcX packet the source identifier ulSrcId and the source queues handler ulSrc in the packet
header hold the identification of the originating process. The router saves the original handle from
ulSrcId and ulSrc. The router uses a handle of its own choices for ulSrcId and ulSrc before it sends the
packet to the receiving process. That way the router can identify the corresponding reply packet and
matches the handle from that packet with the one stored earlier. Now the router replaces its handles
with the original handles and returns the packet to the originating process.
2.3.3
Fundamentals 19
A communication channel represents a part of the Dual Port Memory and usually consists of the
following elements:
This section describes a procedure how to obtain useful information for accessing the communication
channel(s) of your netX device and to check if it is ready for correct operation.
Proceed as follows:
1) Start with reading the channel information block within the system channel (usually starting at
address 0x0030).
2) Then you should check the hardware assembly options of your netX device. They are located
within the system information block following offset 0x0010 and stored as data type UINT16.
The following table explains the relationship between the offsets and the corresponding xC
Ports of the netX device:
0x0010
0x0012
0x0014
0x0016
Check each of the hardware assembly options whether its value has been set to
RCX_HW_ASSEMBLY_CCLINK = 0x0070. If true, this denotes that this xCPort is suitable for
running the CC-Link Slave protocol stack. Otherwise, this port is designed for another
communication protocol. In most cases, xC Port[2] will be used for field bus systems, while xC
Port[0] and xC Port[1] are normally used for Ethernet communication.
Fundamentals 20
3) You can find information about the corresponding communication channel (03) under the
following addresses:
0x0050
Communication Channel 0
0x0060
Communication Channel 1
0x0070
Communication Channel 2
0x0080
Communication Channel 3
In devices which support only one communication system which is usually the case (either a
single field bus system or a single standard for Industrial-Ethernet communication), always
communication channel 0 will be used. In devices supporting more than one communication
system you should also check the other communication channels.
4) There you can find such information as the ID (containing channel number and port number)
of the communication channel, the size and the location of the handshake cells, the overall
number of blocks within the communication channel and the size of the channel in bytes.
Evaluate this information precisely in order to access the communication channel correctly.
The information is delivered as follows:
Size of Channel in Bytes
Address
Data Type
Description
0x0050
UINT8
0x0051
UINT8
0x0052
UINT8
0x0053
UINT8
0x0054
UINT32
0x0058
UINT8[8]
Fundamentals 21
2.4
Client/Server Mechanism
netX
n
o
p
q
r
s
t
u
Figure 4: Transition Chart Application as Client
Confirmation
Indication
Response
Fundamentals 22
2.4.2
Application as Server
The host application has to register with the netX firmware in order to receive indication packets.
Depending on the protocol stack, this is done either implicit (if application opens a TCP/UDP socket)
or explicit (if application wants to receive unsolicited DPV1 packets). Details on when and how to
register for certain events is described in the protocol specific manual.
When an appropriate event occurs and the host application is registered to receive such a notification,
the netX firmware passes an indication packet through the mailbox (transition 1 2). The host
application is expected to send a response packet back to the netX firmware (transition 3 4).
Application
netX
n
o
p
q
Figure 5: Transition Chart Application as Server
Response
Dual-Port Memory 23
3 Dual-Port Memory
All data in the dual-port memory is structured in blocks. According to their functions, these blocks use
different data transfer mechanisms. For example, data transfer through mailboxes uses a
synchronized handshake mechanism between host system and netX firmware. The same is true for IO
data images, when a buffered handshake mode is configured. Other blocks, like the status block, are
read by the host application and use no synchronization mechanism.
Types of blocks in the dual-port memory are outlined below:
3.1
Mailbox
transfer non-cyclic messages or packages with a header for routing information
Data Area
holds the process image for cyclic I/O data or user defined data structures
Control Block
is used to signal application related state to the netX firmware
Status Block
holds information regarding the current network state
Change of State
collection of flags that initiate execution of certain commands or signal a change of state
The input block holds the process data image received from the network whereas the output block
holds data sent to the network
Process data transfer through the data blocks can be synchronized by using a handshake mechanism
(configurable). If in uncontrolled mode, the protocol stack updates the process data in the input and
output data image in the dual-port memory for each valid bus cycle. No handshake bits are evaluated
and no buffers are used. The application can read or write process data at any given time without
obeying the synchronization mechanism otherwise carried out via handshake location. This transfer
mechanism is the simplest method of transferring process data between the protocol stack and the
application. This mode can only guarantee data consistency over a byte.
For the controlled / buffered mode, the protocol stack updates the process data in the internal input
buffer for each valid bus cycle. Each IO block uses handshake bits for access synchronization. Input
and output data block handshake operates independently from each other. When the application
toggles the input handshake bit, the protocol stack copies the data from the internal buffer into the
input data image of the dual-port memory. Now the application can copy data from the dual-port
memory and then give control back to the protocol stack by toggling the appropriate input handshake
bit. When the application/driver toggles the output handshake bit, the protocol stack copies the data
from the output data image of the dual-port memory into the internal buffer. From there the data is
transferred to the network. The protocol stack toggles the handshake bits back, indicating to the
application that the transfer is finished and a new data exchange cycle may start. This mode
guarantees data consistency over both input and output area.
Dual-Port Memory 24
3.1.1
The input data block is used by field bus and industrial Ethernet protocols that utilize a cyclic data
exchange mechanism. The input data image is used to receive cyclic data from the network.
The default size of the input data image is 5760 byte. However, not all available space is actually used
by the protocol stack. Depending on the specific protocol, the area actually available for user data
might be much smaller than 5760 byte. An input data block may or may not be available in the dualport memory. It is always available in the default memory map (see the netX Dual-Port Memory
Manual).
Input Data Image
Offset
Type
Name
Description
0x2680
UINT8
abPd0Input[5760]
3.1.2
The output data block is used by field bus and industrial Ethernet protocols that utilize a cyclic data
exchange mechanism. The output data Image is used to send cyclic data from the host to the
network.
The default size of the output data image is 5760 byte. However, not all available space is actually
used by the protocol stack. Depending on the specific protocol, the area actually available for user
data might be much smaller than 5760 byte. An output data block may or may not be available in the
dual-port memory. It is always available in the default memory map (see netX DPM Manual).
Output Data Image
Offset
Type
Name
Description
0x1000
UINT8
abPd0Output[5760]
3.2
Dual-Port Memory 25
The mailbox of each communication channel has two areas that are used for non-cyclic message
transfer to and from the netX processor.
Send Mailbox
Packet transfer from host system to firmware
Receive Mailbox
Packet transfer from firmware to host system
The send and receive mailbox areas are used by field bus and industrial Ethernet protocols providing
a non-cyclic data exchange mechanism. Another use of the mailbox system is to allow access to the
firmware running on the netX chip itself for diagnostic and identification purposes.
The send mailbox is used to transfer acyclic data to the network or to the firmware. The receive
mailbox is used to transfer acyclic data from the network or from the firmware.
A send/receive mailbox may or may not be available in the communication channel. It depends on the
function of the firmware whether or not a mailbox is needed. The location of the system mailbox and
the channel mailbox is described in the netX DPM Interface Manual.
Note: Each mailbox can hold one packet at a time. The netX firmware stores
packets that are not retrieved by the host application in a packet queue. This
queue has limited space and may fill up so new packets maybe lost. To avoid
these data loss situations, it is strongly recommended to empty the mailbox
frequently, even if packets are not expected by the host application.
Unexpected command packets should be returned to the sender with an
Unknown Command in the status field; unexpected reply messages can be
discarded.
Dual-Port Memory 26
3.2.1
The non-cyclic packets through the netX mailbox have the following structure:
Structure Information
Area Variable
Type
Value / Range
Description
Data
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
Command / Response
ulExt
UINT32
Extension Flags
ulRout
UINT32
Routing Information
Structure Information
User Data
Specific To The Command
Some of the fields are mandatory; some are conditional; others are optional. However, the size of a
packet is always at least 10 double-words or 40 bytes. Depending on the command, a packet may or
may not have a data field. If present, the content of the data field is specific to the command,
respectively the reply.
Dual-Port Memory 27
Destination Identifier
The ulDestId field identifies the destination of an unsolicited packet from the netX firmware to the host
system. It can hold any handle that helps to identify the receiver. Therefore, its use is mandatory for
unsolicited packets. The receiver of unsolicited packets has to register for this.
Source Identifier
The ulSrcId field identifies the originator of a packet. This field is used by a host application, which
passes a packet from an external process to an internal netX task. The ulSrcId field holds the handle
of the external process. When netX operating system returns the packet, the application can identify
the packet and returns it to the originating process. The receiving task on the netX does not evaluate
this field and passes it back unchanged. For inter-task communication, this field is not used.
Identifier
The ulId field is used to identify a specific packet among others of the same kind. That way the
application or driver can match a specific reply or confirmation packet to a previous request packet.
The receiving task does not change this field and passes it back to the originator of the packet. Its use
is optional in most of the cases. However, it is mandatory for sequenced packets.
Example: Downloading big amounts of data that does not fit into a single packet. For a sequence of
packets the identifier field is incremented by one for every new packet.
Dual-Port Memory 28
Command / Response
The ulCmd field holds the command code or the response code, respectively. The command/response
is specific to the receiving task. If a task is not able to execute certain commands, it will return the
packet with an error indication. A command is always even (the least significant bit is zero). In the
response packet, the command code is incremented by one indicating a confirmation to the request
packet.
Extension Flags
The extension field ulExt is used for controlling packets that are sent in a sequenced manner. The
extension field indicates the first, last or a packet of a sequence. If sequencing is not required, the
extension field is not used and set to zero.
Routing Information
The ulRout field is used internally by the netX firmware only. It has no meaning to a driver type
application and therefore set to zero.
Dual-Port Memory 29
3.2.2
Numerical Value
Meaning
RCX_S_OK
0x00000000
RCX_S_QUE_UNKNOWN
0xC02B0001
UNKNOWN QUEUE
RCX_S_QUE_INDEX_UNKNOWN
0xC02B0002
RCX_S_TASK_UNKNOWN
0xC02B0003
UNKNOWN TASK
RCX_S_TASK_INDEX_UNKNOWN
0xC02B0004
RCX_S_TASK_HANDLE_INVALID
0xC02B0005
RCX_S_TASK_INFO_IDX_UNKNOWN
0xC02B0006
UNKNOWN INDEX
RCX_S_FILE_XFR_TYPE_INVALID
0xC02B0007
RCX_S_FILE_REQUEST_INCORRECT
0xC02B0008
RCX_S_UNKNOWN_DESTINATION
0xC0000005
UNKNOWN DESTINATION
RCX_S_UNKNOWN_DESTINATION_ID
0xC0000006
UNKNOWN DESTINATION ID
RCX_S_INVALID_LENGTH
0xC0000007
INVALID LENGTH
RCX_S_UNKNOWN_COMMAND
0xC0000004
UNKNOWN COMMAND
RCX_S_INVALID_EXTENSION
0xC0000008
INVALID EXTENSION
3.2.3
The mailbox system on netX provides a non-cyclic data transfer channel for field bus and industrial
Ethernet protocols. Another use of the mailbox is allowing access to the firmware running on the netX
chip itself for diagnostic purposes. There is always a send and a receive mailbox. Send and receive
mailboxes utilize handshake bits to synchronize these data or diagnostic packages through the
mailbox. There is a pair of handshake bits for both the send and receive mailbox.
The netX operating system rcX only uses the system mailbox.
Dual-Port Memory 30
3.2.4
Send Mailbox
The send mailbox area is used by protocols utilizing a non-cyclic data exchange mechanism. Another
use of the mailbox system is to provide access to the firmware running on the netX chip itself. The
send mailbox is used to transfer non-cyclic data to the network or to the protocol stack.
The size is 1596 bytes for the send mailbox in the default memory layout. The mailbox is accompanied
by counters that hold the number of packages that can be accepted.
3.2.5
Receive Mailbox
The receive mailbox area is used by protocols utilizing a non-cyclic data exchange mechanism.
Another use of the mailbox system is to provide access to the firmware running on the netX chip itself.
The receive mailbox is used to transfer non-cyclic data from the network or from the protocol stack.
The size is 1596 bytes for the receive mailbox in the default memory layout. The mailbox is
accompanied by counters that hold the number of waiting packages (for the receive mailbox).
3.2.6
Master Status
Offset
Type
Name
Description
0x0200
UINT16
usPackagesAccepted
Packages Accepted
Number of Packages that
can be Accepted
0x0202
UINT16
usReserved
Reserved
Set to 0
0x0204
UINT8
abSendMbx[ 1596 ]
Send Mailbox
Non Cyclic Data To The
Network or to the Protocol
Stack
0x0840
UINT16
usWaitingPackages
Packages waiting
Counter of packages that
are waiting to be
processed
0x0842
UINT16
usReserved
Reserved
Set to 0
0x0844
UINT8
abRecvMbx[ 1596 ]
Receive Mailbox
Non Cyclic Data from the
network or from the
protocol stack
Table 12: Channel Mailboxes.
Dual-Port Memory 31
3.3
Status
A status block is present in both system and communication channel. It contains information about
network and task related issues. In some respects, status and control block are used together in order
to exchange information between host application and netX firmware. The application reads a status
block whereas the control block is written by the application. Both status and control block have
registers that use the Change of State mechanism (see section 0).
Dual-Port Memory 32
3.3.1.1
All Implementations
Type
Name
Description
0x0010
UINT32
ulCommunicationCOS
0x0014
UINT32
ulCommunicationState
Communication State
NOT CONFIGURED, STOP, IDLE, OPERATE
0x0018
UINT32
ulCommunicationError
Communication Error
Unique Error Number According to Protocol Stack
0x001C
UINT16
usVersion
Version
Version Number of this Diagnosis Structure
0x001E
UINT16
usWatchdogTime
Watchdog Timeout
Configured Watchdog Time
0x0020
UINT16[ ]
ausProtocolClass[2]
Protocol Class
MASTER, SLAVE, CLIENT, SERVER,
GATEWAY
0x0024
UINT32
ulHostWatchdog
Host Watchdog
Joint Supervision Mechanism
Protocol Stack Writes, Host System Reads
0x0028
UINT32
ulErrorCount
Error Count
Total Number of Detected Error Since Power-Up
or Reset
0x002C
UINT32
ulErrorLogInd
0x0030
UINT32[ ]
aulReserved[2]
Reserved
Set to 0
Dual-Port Memory 33
READY
#define RCX_COMM_COS_READY
0x00000001
The Ready flag is set as soon as the protocol stack is started properly. Then the protocol stack is
awaiting a configuration.
RUNNING
#define RCX_COMM_COS_RUN
0x00000002
The Running flag is set when the protocol stack has been configured properly. Then the protocol
stack is awaiting a network connection.
RESTART REQUIRED
#define RCX_COMM_COS_RESTART_REQUIRED 0x00000004
The Restart Required flag is set when the channel firmware requests to be reset. This may be
caused if a new configuration was downloaded form the host application or if a configuration
upload via the network took place.
CONFIGURATION LOCKED
#define RCX_COMM_COS_CONFIG_LOCKED
0x00000010
The Configuration Locked flag is set, if the communication channel firmware has locked the
configuration database against being overwritten. Re-initializing the channel is not allowed in this
state. To unlock the database, the application has to clear the Lock Configuration flag in the
control block (see section 3.2.4 of the netX DPM Interface Manual). The flag is defined, but not
supported yet.
Dual-Port Memory 34
The communication state field contains information regarding the current network status of the
communication channel. Depending on the implementation, all or a subset of the definitions below is
supported.
UNKNOWN
#define RCX_COMM_STATE_UNKNOWN
NOT CONFIGURED
STOP
#define RCX_COMM_STATE_STOP
0x00000002
IDLE
#define RCX_COMM_STATE_IDLE
0x00000003
OPERATE
#define RCX_COMM_STATE_OPERATE
0x00000004
0x00000000
SUCCESS
#define RCX_COMM_SUCCESS
0x00000000
#define RCX_COMM_WATCHDOG_TIMEOUT
0xC000000C
Runtime Failures
WATCHDOG TIMEOUT
Initialization Failures
0xC0000100
#define RCX_COMM_DATABASE_ACCESS_FAILED
0xC0000101
Configuration Failures
0xC0000120
#define RCX_COMM_INCONSISTENT_DATA_SET
0xC0000121
#define RCX_COMM_DATA_SET_MISMATCH
INSUFFICIENT LICENSE
#define RCX_COMM_INSUFFICIENT_LICENSE
0xC0000123
PARAMETER ERROR
#define RCX_COMM_PARAMETER_ERROR
0xC0000122
0xC0000124
Network Failures
#define RCX_COMM_NETWORK_FAULT
0xC0000140
CONNECTION CLOSED
#define RCX_COMM_CONNECTION_CLOSED
0xC0000141
#define RCX_COMM_CONNECTION_TIMEOUT
0xC0000142
LONELY NETWORK
#define RCX_COMM_LONELY_NETWORK
0xC0000143
DUPLICATE NODE
#define RCX_COMM_DUPLICATE_NODE
0xC0000144
CABLE DISCONNECT
#define RCX_COMM_CABLE_DISCONNECT
0xC0000145
Dual-Port Memory 35
The version field holds version of this structure. It starts with one; zero is not defined.
STRUCTURE VERSION
#define RCX_STATUS_BLOCK_VERSION
0x0001
UNDEFINED
#define RCX_COMM_CLASS_UNDEFINED
0x0000
UNCLASSIFIABLE
#define RCX_COMM_CLASS_UNCLASSIFIABLE
0x0001
MASTER
#define RCX_COMM_CLASS_MASTER
0x0002
SLAVE
#define RCX_COMM_CLASS_SLAVE
0x0003
SCANNER
#define RCX_COMM_CLASS_SCANNER
0x0004
ADAPTER
#define RCX_COMM_CLASS_ADAPTER
0x0005
MESSAGING
#define RCX_COMM_CLASS_MESSAGING
0x0006
CLIENT
#define RCX_COMM_CLASS_CLIENT
0x0007
SERVER
#define RCX_COMM_CLASS_SERVER
0x0008
IO-CONTROLLER
#define RCX_COMM_CLASS_IO_CONTROLLER
0x0009
IO-DEVICE
#define RCX_COMM_CLASS_IO_DEVICE
0x000A
IO-SUPERVISOR
#define RCX_COMM_CLASS_IO_SUPERVISOR
0x000B
GATEWAY
#define RCX_COMM_CLASS_GATEWAY
0x000C
MONITOR
#define RCX_COMM_CLASS_MONITOR
0x000D
PRODUCER
#define RCX_COMM_CLASS_PRODUCER
0x000E
CONSUMER
#define RCX_COMM_CLASS_CONSUMER
0x000F
SWITCH
#define RCX_COMM_CLASS_SWITCH
0x0010
HUB
#define RCX_COMM_CLASS_HUB
0x0011
Dual-Port Memory 36
The communication sub class of a device is determined by the implementation and therefore
described in a separate manual.
UNDEFINED
#define RCX_COMM_SUB_CLASS_UNDEFINED
UNCLASSIFIABLE
NOT USED
#define RCX_COMM_SUB_CLASS_NOT_USED
Others are determined by the protocol stack and therefore defined in a separate manual.
0x0000
0x0002
3.3.1.2
Dual-Port Memory 37
Master Implementation
In addition to the common status block as outlined in the previous section, a master firmware
maintains the additional structures for the administration of all slaves which are connected to the
master. These are not discussed here as they are not relevant for the slave.
3.3.1.3
Slave Implementation
The slave firmware uses only the common structure as outlined in section 3.2.5.1 of the Hilscher netX
Dual-Port-Memory Manual.
Dual-Port Memory 38
For the CC-Link Slave protocol implementation, the extended status area is structured as follows:
typedef struct CCLINK_SLAVE_EXTENDED_STATE_Ttag
CCLINK_SLAVE_EXTENDED_STATE_T;
#define CCLINK_SLAVE_EXT_STATE_FLAG_WDG 0x00000001L
#define CCLINK_SLAVE_EXT_STATE_CTRL
0x00000002L
#define CCLINK_SLAVE_EXT_STATE_NRDY
0x00000004L
#define
#define
#define
#define
#define
#define
#define
CCLINK_SLAVE_CCL_MASTER_ST1_MAS_STAT_USER_APP_PRG_MSK
CCLINK_SLAVE_CCL_MASTER_ST1_MAS_STAT_USER_APP_PRG_ERR_CHK_MSK
CCLINK_SLAVE_CCL_MASTER_ST1_REFRESH_STARTUP_MSK
CCLINK_SLAVE_CCL_MASTER_ST1_TRANSIENT_DATA_STATUS_MSK
CCLINK_SLAVE_CCL_MASTER_ST1_TRANSIENT_DATA_RECEPTION_EN_MSK
CCLINK_SLAVE_CCL_MASTER_ST1_PROTOCOL_VERSION_MSK
CCLINK_SLAVE_CCL_MASTER_ST1_MASTER_STATION_TYPE_MSK
0x00000001L
0x00000002L
0x00000004L
0x00000008L
0x00000010L
0x00000060L
0x00000080L
#define CCLINK_SLAVE_CCL_MASTER_ST2_RY_INFO_TRANSMISSION_POINTS_MSK
#define CCLINK_SLAVE_CCL_MASTER_ST2_RWW_INFO_TRANSMISSION_POINTS_MSK
0x00000F00L
0x0000F000L
#define
#define
#define
#define
#define
#define
#define
#define
CCLINK_SLAVE_CCL_SLAVE_ST1_FUSE_STATUS_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_UNIT_ERROR_INVAL_NUM_OF_POINTS_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_NO_REFRESH_RECEIVE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_NO_PARAMETER_RECEIVE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_SWITCH_CHANGE_DETECTION_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_CYCLIC_COMMUNICATION_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_RES1_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_WDT_ERROR_MSK
0x00000001L
0x00000002L
0x00000004L
0x00000008L
0x00000010L
0x00000020L
0x00000040L
0x00000080L
#define
#define
#define
#define
#define
#define
#define
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSIENT_DATA_STATUS_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSIENT_DATA_RECEPTION_EN_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSIENT_TYPE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_RES2_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSMISSION_ROUTE_STATUS_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_RES_FIXED_TO_ONE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_SETTING_MSK
0x00000100L
0x00000200L
0x00000400L
0x00000800L
0x00001000L
0x00002000L
0x0000C000L
#define
#define
#define
#define
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_SINGLE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_DOUBLE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_QUADRUPLE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_OCTUPLE_MSK
0x00000000L
0x00004000L
0x00008000L
0x0000C000L
struct CCLINK_SLAVE_EXTENDED_STATE_Ttag
{
TLR_UINT32 ulFlags;
TLR_UINT32 ulMasterState;
TLR_UINT32 ulSlaveState;
TLR_UINT32 ulRxByteCount;
TLR_UINT32 ulRWrByteCount;
TLR_UINT32 ulRyByteCount;
TLR_UINT32 ulRWwByteCount;
};
Dual-Port Memory 39
Value
Meaning
CCLINK_SLAVE_CCL_MASTER_ST1_MAS_STAT_USER_APP_PRG_MSK
0x01L
Master
station (user
application
program)
CCLINK_SLAVE_CCL_MASTER_ST1_MAS_STAT_USER_APP_PRG_ERR_CHK_MSK
0x02L
Master
station user
application
program
error check
CCLINK_SLAVE_CCL_MASTER_ST1_REFRESH_STARTUP_MSK
0x04L
Refresh
startup
CCLINK_SLAVE_CCL_MASTER_ST1_TRANSIENT_DATA_STATUS_MSK
0x08L
Transient
data status
CCLINK_SLAVE_CCL_MASTER_ST1_TRANSIENT_DATA_RECEPTION_EN_MSK
0x10L
Transient
data
reception
enable
CCLINK_SLAVE_CCL_MASTER_ST1_PROTOCOL_VERSION_MSK
0x60L
Protocol
version
CCLINK_SLAVE_CCL_MASTER_ST1_MASTER_STATION_TYPE_MSK
0x80L
Master
station type
Meaning
Stop
Run
Meaning
Normal
Abnormal
Table 16: Allowed Values of Master Station User Application Program Error Check
Dual-Port Memory 40
This entry contains the information whether link refresh has been started or stopped.
Value
Meaning
Stop
Start
Meaning
Not present
Present
Meaning
Disabled
Enabled
Protocol Version
This entry contains the protocol version
Value
Meaning
Version 1
Version 2
Dual-Port Memory 41
This entry contains the information whether the station is an (ordinary) master station or a standby
master station.
Value
Meaning
Master station
Dual-Port Memory 42
Value
Meaning
CCLINK_SLAVE_CCL_SLAVE_ST1_FUSE_STATUS_MSK
0x01
Fuse status
CCLINK_SLAVE_CCL_SLAVE_ST1_UNIT_ERROR_INVAL_NUM_OF_POINTS_MSK
0x02
Unit
error/invalid
No. of points
CCLINK_SLAVE_CCL_SLAVE_ST1_NO_REFRESH_RECEIVE_MSK
0x04
Refresh
receive
CCLINK_SLAVE_CCL_SLAVE_ST1_NO_PARAMETER_RECEIVE_MSK
0x08
Parameter
receive
CCLINK_SLAVE_CCL_SLAVE_ST1_SWITCH_CHANGE_DETECTION_MSK
0x10
Switch
change
detection
CCLINK_SLAVE_CCL_SLAVE_ST1_CYCLIC_COMMUNICATION_MSK
0x20
Cyclic
transmission
flag
CCLINK_SLAVE_CCL_SLAVE_ST1_RES1_MSK
0x40
Reserved
CCLINK_SLAVE_CCL_SLAVE_ST1_WDT_ERROR_MSK
0x80
WDT error
Fuse Status
This entry contains the information about the state of the fuse. Allowed values are:
Value
Meaning
Normal
Abnormal
Dual-Port Memory 43
Meaning
No
Yes
Refresh Receive
This entry contains the information whether a refresh has been received. Allowed values are:
Value
Meaning
Receive completed
Not received
Parameter Receive
This entry contains the information whether a parameter has been received. Allowed values are:
Value
Meaning
Receive completed
Not received
Meaning
No change
Dual-Port Memory 44
This entry contains the information whether cyclic data transmission is active. Allowed values are:
Value
Meaning
Meaning
Value
Meaning
CCLINK_SLAVE_CCL_MASTER_ST2_RY_INFO_TRANSMISSION_POINTS_MSK
0x00000F00
RY
information
transmission
points, see
below
CCLINK_SLAVE_CCL_MASTER_ST2_RWW_INFO_TRANSMISSION_POINTS_MSK
0x0000F000
RWw
information
transmission
points, see
below
Dual-Port Memory 45
D2
D1
D0
Number of bytes
256
32
512
64
768
96
1024
128
1280
160
1536
192
1792
224
2048
256
Reserved
D2
D1
D0
Number of bytes
32
64
64
128
96
192
128
256
160
320
192
384
224
448
256
512
Reserved
Dual-Port Memory 46
Value
Meaning
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSIENT_DATA_STATUS_MSK
0x01
Transient data
status
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSIENT_DATA_RECEPTION_EN_MSK
0x02
Transient
receive
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSIENT_TYPE_MSK
0x04
Transient type
CCLINK_SLAVE_CCL_SLAVE_ST2_RES2_MSK
0x08
Reserved
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSMISSION_ROUTE_STATUS_MSK
0x10
Transmission
status
CCLINK_SLAVE_CCL_SLAVE_ST2_RES_FIXED_TO_ONE_MSK
0x20
Reserved (set
to 1)
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_SETTING_MSK
0x40
Extended cycle
setting
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_SETTING_MSK
0x80
Extended cycle
setting
Meaning
Not present
Present
Transient Receive
This entry contains the information whether transient data have been received. Allowed values are:
Value
Meaning
Disabled
Enabled
Dual-Port Memory 47
This entry contains the information which type of transient data has been selected.
Allowed values are:
Value
Meaning
1:n
n:n
Transmission Status
This entry contains the information about the current transmission status. Allowed values are:
Value
Meaning
Normal
Abnormal
Meaning
0x00
Single setting
0x40
Double setting
0x80
Quadruple setting
0xC0
Octuple setting
ulRxByteCount
This entry contains the data count of RX data in bytes.
ulRWrByteCount
This entry contains the data count of RWr data in bytes
ulRyByteCount
This entry contains the data count of RY data in bytes.
Dual-Port Memory 48
ulRWwByteCount
This entry contains the data count of RWw data in bytes.
Dual-Port Memory 49
3.4
Control Block
A control block is always present within the communication channel. In some respects, control and
status block are used together in order to exchange information between host application and netX
firmware. The control block is written by the application, whereas the application reads a status block.
Both control and status block have registers that use the Change of State mechanism (see also
section 2.2.1 of the netX Dual-Port-Memory Manual.)
The following gives an example of the use of control and status block. The host application wishes to
lock the configuration settings of a communication channel to protect them against changes. The
application sets the Lock Configuration flag in the control block to the communication channel
firmware. As a result, the channel firmware sets the Configuration Locked flag in the status block (see
below), indicating that the current configuration settings cannot be deleted, altered, overwritten or
otherwise changed.
The control block of a dual-port memory features a watchdog function to allow the operating system
running on the netX supervise the host application and vice versa. The control area is always present
in the dual-port memory.
Control Block
Offset
Type
Name
Description
0x0008
UINT32
ulApplicationCOS
Application Change Of
State
State Of The Application
Program
INITIALIZATION, LOCK
CONFIGURATION
0x000C
UINT32
ulDeviceWatchdog
Device Watchdog
Host System Writes,
Protocol Stack Reads
For more information concerning the Control Block please refer to the netX DPM Interface Manual.
4.1
You can find the most commonly used functionality of the CC-Link Slave Protocol API within the
following sections of this document:
Topic
Section
Number
Section Name
5.1.2
Start/Stop
network
communication
5.2.5
Initialization
5.2.1
4.2
Warmstart Parameters
The following table contains relevant information about the warmstart parameters for the CC-Link
Slave firmware such as an explanation of the meaning of the parameter and ranges of allowed values:
Parameter
Meaning
System Flags
System flags
CC-Link flags
Bit 0: Vendor Code DISABLED/ ENABLED
Parameter ulVendorCode will be evaluated if
this bit is set. Otherwise the default value will be
used
Bit 1: Model Type DISABLED/ ENABLED
Parameter ulModelType will be evaluated if this
bit is set. Otherwise the default value will be used
Bit 2: SW Version DISABLED/ ENABLED
Parameter ulSwVersion will be evaluated if this
bit is set. Otherwise the default value will be used
BIT 3 - 31: Reserved for further use, set to zero
Watchdog Time
Slave Station
Address
0
20 .. 65535
1 .. 64
255
Baud rate
Number of
occupied stations
0
1
1
1 .. 4
CC-Link version
CC-Link Version 1
CC-Link Version 2
Extension Cycle
0
1
0
1
2
3
Reserved
HoldClrMode
0
1
Vendor Code
0 . 65535
Model Type
0 .. 255
Sw Version
0 .. 63
The applicable baud rates can be coded with the values given in the following table:
Baud rate
Symbolic Constant
Value
156 kBaud
CCLINK_SLAVE_BAUD_156K
625 kBaud
CCLINK_SLAVE_BAUD_625K
2500 kBaud
CCLINK_SLAVE_BAUD_2500K
5 MBaud
CCLINK_SLAVE_BAUD_5M
10 MBaud
CCLINK_SLAVE_BAUD_10M
4.2.1
The following rules apply for the behavior of the CC-Link Slave protocol stack when receiving a set
configuration command:
The configuration packets name is CCLINK_APS_SET_CONFIGURATION_REQ for the request
and CCLINK_APS_SET_CONFIGURATION_CNF for the confirmation.
The configuration data are checked for consistency and integrity.
In case of failure no data are accepted.
In case of success the configuration parameters are stored internally (within the RAM).
The parameterized data will be activated only after a channel init has been performed.
No automatic registration of the application at the stack happens.
The confirmation packet CCLINK_APS_SET_CONFIGURATION_CNF only transfers simple
status information, but does not repeat the whole parameter set.
For all versions up to firmware version V2.1.8.0, only the warmstart command (the predecessor of the
set configuration command) was present showing up the following deviations from the behavior
described above:
1. Contrary to the situation when receiving a set configuration command, on every received
warmstart packet an automatic channel-init is performed..
2. The
entire
parameter
set
is
completely
delivered
within
CCLINK_APS_SET_CONFIGURATION_CNF or CCLINK_APS_WARMSTART_CNF packet.
the
54
4.3
Depending on the CC-Link Slave configuration, the input and output data area is subdivided into
different sections:
4.3.1
Area
Length (Byte)
Type
Output block
RX
Input block
RY
Table 43: Input and Output Data for Remote I/O Device
Input and Output Data for Remote Device Station with One Occupied Station
I/O Offset
Area
Length (Byte)
Type
Output block
RX
Output block
RWr
Input block
RY
Input block
RWw
Table 44: Input and Output Data for Remote Device Station with One Occupied Station
Input and Output Data for Remote Device Station with Two Occupied Stations
I/O Offset
Area
Length (Byte)
Type
Output block
RX
Output block
16
RWr
Input block
RY
Input block
16
RWw
Table 45: Input and Output Data for Remote Device Station with Two Occupied Stations
Input and Output Data for Remote Device Station with Three Occupied Stations
I/O Offset
Area
Length (Byte)
Type
Output block
12
RX
12
Output block
24
RWr
Input block
12
RY
12
Input block
24
RWw
Table 46: Input and Output Data for Remote Device Station with Three Occupied Stations
55
Input and Output Data for Remote Device Station with Four Occupied Stations
I/O Offset
Area
Length (Byte)
Type
Output block
16
RX
16
Output block
32
RWr
Input block
16
RY
16
Input block
32
RWw
Table 47: Input and Output Data for Remote Device Station with Four Occupied Stations
56
4.3.2
Depending on the CC-Link Slave configuration, the input and output data area is subdivided into
different sections:
Input and Output Data for Remote Device Station with One Occupied Station, Single Setting
I/O Offset
Area
Length (Byte)
Type
Output block
RX
Output block
RWr
Input block
RY
Input block
RWw
Table 48: Input and Output Data for Remote Device Station with One Occupied Stations, Single Setting
Input and Output Data for Remote Device Station with Two Occupied Stations, Single Setting
I/O Offset
Area
Length (Byte)
Type
Output block
RX
Output block
16
RWr
Input block
RY
Input block
16
RWw
Table 49: Input and Output Data for Remote Device Station with Two Occupied Stations, Single Setting
Input and Output Data for Remote Device Station with Three Occupied Stations, Single Setting
I/O Offset
Area
Length (Byte)
Type
Output block
12
RX
12
Output block
24
RWr
Input block
12
RY
12
Input block
24
RWw
Table 50: Input and Output Data for Remote Device Station with Three Occupied Stations, Single Setting
Input and Output Data for Remote Device Station with Four Occupied Stations, Single Setting
I/O Offset
Area
Length (Byte)
Type
Output block
16
RX
16
Output block
32
RWr
Input block
16
RY
16
Input block
32
RWw
Table 51: Input and Output Data for Remote Device Station with Four Occupied Stations, Single Setting
57
Input and Output Data for Remote Device Station with One Occupied Station, Double Setting
I/O Offset
Area
Length (Byte)
Type
Output block
RX
Output block
16
RWr
Input block
RY
Input block
16
RWw
Table 52: Input and Output Data for Remote Device Station with One Occupied Station, Double Setting
Input and Output Data for Remote Device Station with Two Occupied Stations, Double Setting
I/O Offset
Area
Length (Byte)
Type
Output block
12
RX
12
Output block
32
RWr
Input block
12
RY
12
Input block
32
RWw
Table 53: Input and Output Data for Remote Device Station with Two Occupied Stations, Double Setting
Input and Output Data for Remote Device Station with Three Occupied Stations, Double Setting
I/O Offset
Area
Length (Byte)
Type
Output block
20
RX
20
Output block
48
RWr
Input block
20
RY
20
Input block
48
RWw
Table 54: Input and Output Data for Remote Device Station with Three Occupied Stations, Double Setting
Input and Output Data for Remote Device Station with Four Occupied Stations, Double Setting
I/O Offset
Area
Length (Byte)
Type
Output block
28
RX
28
Output block
64
RWr
Input block
28
RY
28
Input block
64
RWw
Table 55: Input and Output Data for Remote Device Station with Four Occupied Stations, Double Setting
58
Area
Length (Byte)
Type
Output block
RX
Output block
32
RWr
Input block
RY
Input block
32
RWw
Table 56: Input and Output Data for Remote Device Station with One Occupied Station, Quadruple Setting
Input and Output Data for Remote Device Station with Two Occupied Stations, Quadruple
Setting
I/O Offset
Area
Length (Byte)
Type
Output block
24
RX
24
Output block
64
RWr
Input block
24
RY
24
Input block
64
RWw
Table 57: Input and Output Data for Remote Device Station with Two Occupied Stations, Quadruple Setting
Input and Output Data for Remote Device Station with Three Occupied Stations, Quadruple
Setting
I/O Offset
Area
Length (Byte)
Type
Output block
40
RX
40
Output block
96
RWr
Input block
40
RY
40
Input block
96
RWw
Table 58: Input and Output Data for Remote Device Station with Three Occupied Stations, Quadruple Setting
Input and Output Data for Remote Device Station with Four Occupied Stations, Quadruple
Setting
I/O Offset
Area
Length (Byte)
Type
Output block
56
RX
56
Output block
128
RWr
Input block
56
RY
56
Input block
128
RWw
Table 59: Input and Output Data for Remote Device Station with Four Occupied Stations, Quadruple Setting
59
Input and Output Data for Remote Device Station with One Occupied Station, Octuple Setting
I/O Offset
Area
Length (Byte)
Type
Output block
16
RX
16
Output block
64
RWr
Input block
16
RY
16
Input block
64
RWw
Table 60: Input and Output Data for Remote Device Station with One Occupied Station, Octuple Setting
Input and Output Data for Remote Device Station with Two Occupied Stations, Octuple Setting
I/O Offset
Area
Length (Byte)
Type
Output block
48
RX
48
Output block
128
RWr
Input block
48
RY
48
Input block
128
RWw
Table 61: Input and Output Data for Remote Device Station with Two Occupied Stations, Octuple Setting
Input and Output Data for Remote Device Station with Three Occupied Stations, Octuple
Setting
I/O Offset
Area
Length (Byte)
Type
Output block
80
RX
80
Output block
192
RWr
Input block
80
RY
80
Input block
192
RWw
Table 62: Input and Output Data for Remote Device Station with Three Occupied Stations, Octuple Setting
Input and Output Data for Remote Device Station with Four Occupied Stations, Octuple Setting
I/O Offset
Area
Length (Byte)
Type
Output block
112
RX
112
Output block
256
RWr
Input block
112
RY
112
Input block
256
RWw
Table 63: Input and Output Data for Remote Device Station with Four Occupied Stations, Octuple Setting
4.4
60
The illustration below displays the internal structure of the tasks which together represent the CC-Link
Slave Stack:
The dual-port memory is used for exchange of information, data and packets. Configuration and IO
data will be transferred using this way.
The user application only accesses the task located in the highest layer namely the AP task which
constitutes the application interface of the CC-Link Slave stack.
The triple buffer mechanism provides a consistent synchronous access procedure from both sides
(DPM and AP task). The triple buffer technique ensures that the access will always affect the last
written cell.
5.1
The CC-Link APS-Task coordinates, within the CC-Link Slave stack, the overlaying functions.
It is responsible for all application interactions and represents the counterpart of the AP-Task within
the existing CC-Link Slave stack implementation.
To get the handle of the process queue of the CC-Link APS-Task-Task the Macro
TLR_QUE_IDENTIFY() has to be used in conjunction with the following ASCII-queue name
Description
"QUE_CCLAPS
The returned handle has to be used as value ulDest in all initiator packets the AP-Task intends to
send to the CC-Link APS -Task. This handle is the same handle that has to be used in conjunction
with the macros TLR_QUE_SENDPACKET_FIFO/LIFO() for sending a packet to the CC-Link APSTask.
5.1.1
This service can be used by the user application in order to configure the AP-task with warmstart
parameters. After this request is received, the AP-task will configure the CC-Link Slave task with the
given parameters from this request and, if configured, starts the communication with the CC-Link
network. This request will be denied if the configuration lock flag is set (for more information on this
topic see section 3.3.1.1).
Note: The packet described in this section is obsolete and will not longer be supported
after September, 1, 2009. Do not use this packet for all new developments! It is
replaced by the packet CCLINK_APS_SET_CONFIGURATION_REQ/CNF Set
Configuration described in the next section and has to be used for new
developments.
0x00000001L
0x00000002L
0x00000004L
#define CCLINK_APS_WD_OFF
#define CCLINK_APS_WD_MIN_TIMEOUT
#define CCLINK_APS_WD_MAX_TIMEOUT
0x00000000L
0x00000014L
0x0000FFFFL
#define CCLINK_APS_CCLS_FLAGS_CFG_VENDOR_CODE
#define CCLINK_APS_CCLS_FLAGS_CFG_MODEL_TYPE
#define CCLINK_APS_CCLS_FLAGS_CFG_SW_VERSION
0x00000001L
0x00000002L
0x00000004L
#define CCLINK_APS_STATION_ADDR_CFG_ROTARY_SWITCH
0x000000FFL
struct CCLINK_APS_WARMSTART_REQ_DATA_Ttag
{
TLR_UINT32
ulSystemFlags;
TLR_UINT32
ulCcLinkFlags;
TLR_UINT32
ulWdgTime;
TLR_UINT32
TLR_UINT32
ulSlaveStationAddr;
ulBaudRate;
TLR_UINT32
TLR_UINT32
TLR_UINT32
TLR_UINT32
TLR_UINT32
TLR_BOOLEAN32
ulStationType;
ulNoStation;
ulCcLinkVersion;
ulExtensionCycle;
ulReserved;
fHoldClrMode;
TLR_UINT32
TLR_UINT32
TLR_UINT32
};
ulVendorCode;
ulModelType;
ulSwVersion;
Variable
Type
Value / Range
Description
UINT32
Destination Queue-Handle
ulSrc
UINT32
Source Queue-Handle
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
56
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x00004600
CCLINK_APS_WARMSTART_REQ - Command
ulExt
UINT32
ulRout
UINT32
tData
structure CCLINK_APS_WARMSTART_REQ_DATA_T
ulSystemFlags
System Flags
UINT32
ulCcLinkFlags
CC-Link Flags
UINT32
0
1
0
1
ulWdgTime
Watchdog supervision
UINT32
0
20 .. 65535
ulSlaveStationAddr
UINT32
1 .. 64
255
ulBaudRate
UINT32
0
1
2
3
4
156 kBaud
625 kBaud
2500 kBaud
5 MBaud
10 MBaud
Note: Parameter will not be used if rotary switches
are used for configuration. Parameter
ulSlaveStationAddr has to be set to 255 in
order to activate rotary switch configuration (On
devices with rotary switches, only)
ulStationType
Station Type
UINT32
0
1
UINT32
1
1 .. 4
ulCcLinkVersion
CC-Link Version
UINT32
0
1
ulExtensionCycle
UINT32
Version 1
Version 2 (Remote Device Station only)
Number of extension cycles for CC-Link Version 1
ulReserved
UINT32
fHoldClrMode
BOOLEAN32
0
1
2
3
0
1
ulVendorCode
UINT32
0 .. 65535
ulModelType
UINT32
0 .. 255
ulSwVersion
UINT32
0 .. 63
ulWdgTime;
TLR_UINT32
TLR_UINT32
ulSlaveStationAddr;
ulBaudRate;
TLR_UINT32
ulStationType;
TLR_UINT32
ulNoStation;
TLR_UINT32
TLR_UINT32
ulCcLinkVersion;
ulExtensionCycle;
TLR_UINT32
ulReserved;
TLR_BOOLEAN32 fHoldClrMode;
TLR_UINT32
TLR_UINT32
TLR_UINT32
};
ulVendorCode;
ulModelType;
ulSwVersion;
Variable
Type
Value / Range
Description
UINT32
Destination Queue-Handle
ulSrc
UINT32
Source Queue-Handle
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
56
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x00004601
CCLINK_APS_WARMSTART_CNF - Command
ulExt
UINT32
ulRout
UINT32
tData
structure CCLINK_APS_WARMSTART_CNF_DATA_T
ulSystemFlags
System Flags
UINT32
ulCcLinkFlags
CC-Link Flags
UINT32
0
1
0
1
ulWdgTime
Watchdog supervision
UINT32
0
20 .. 65535
ulSlaveStationAddr
UINT32
1 .. 64
255
ulBaudRate
UINT32
0
1
2
3
4
156 kBaud
625 kBaud
2500 kBaud
5 MBaud
10 MBaud
Note: Parameter will not be used if rotary switches
are used for configuration. Parameter
ulSlaveStationAddr has to be set to 255 in
order to activate rotary switch configuration (On
devices with rotary switches, only)
ulStationType
Station Type
UINT32
0
1
UINT32
1
1 .. 4
ulCcLinkVersion
CC-Link Version
UINT32
0
1
ulExtensionCycle
UINT32
Version 1
Version 2 (Remote Device Station only)
Number of extension cycles for CC-Link Version 1
ulReserved
UINT32
fHoldClrMode
BOOLEAN32
0
1
2
3
0
1
ulVendorCode
UINT32
0 .. 65535
ulModelType
UINT32
0 .. 255
ulSwVersion
UINT32
0 .. 63
Description
TLR_S_OK
(0x00000000)
Status ok
TLR_I_CCLINK_APS_CONFIG_LOCK
(0x406B0009)
Configuration is locked.
TLR_E_CCLINK_APS_PACKET_LENGTH
(0xC06B0008)
TLR_E_CCLINK_APS_STATION_TYPE_
PARAMETER
(0xC06B001A)
TLR_E_CCLINK_APS_NO_STATION_
PARAMETER
(0xC06B000D)
TLR_E_CCLINK_APS_STATION_ADDR_
WITH_NO_STATIONS_PARAMETER
(0xC06B001B)
TLR_E_CCLINK_APS_CCLINK_VERSION
_PARAMETER
(0xC06B0019)
TLR_E_CCLINK_APS_VENDOR_CODE_
PARAMETER
(0xC06B000F)
TLR_E_CCLINK_APS_MODEL_TYPE_
PARAMETER
(0xC06B0012)
TLR_E_CCLINK_APS_SW_VERSION_
PARAMETER
(0xC06B0011)
TLR_E_CCLINK_APS_DATABASE_FOUND
(0xC06B000A)
TLR_E_CCLINK_APS_REQUEST_RUNNING
(0xC06B0014)
TLR_E_CCLINK_APS_EXTENSION_
CYCLE_PARAMETER
(0xC06B001C)
TLR_E_CCLINK_APS_STATION_TYPE_
WITH_CCLINK_VERSION_PARAMETER
(0xC06B001D)
5.1.2
This service can be used by the user application in order to configure the AP-task with warmstart
parameters. After this request is received, the AP-task will configure the CC-Link Slave task with the
given parameters from this request and, if configured, starts the communication with the CC-Link
network. The following applies:
Configuration parameters will be stored internally.
In case of any error no data will be stored at all.
A channel init is required to activate the parameterized data.
This packet does not perform any registration at the stack automatically. Registering must be
performed with a separate packet such as the registration packet described in the netX DualPort-Memory Manual (RCX_REGISTER_APP_REQ, code 0x2F10).
This request will be denied if the configuration lock flag is set
(for more information on this topic see section 3.3.1.1).
0x00000001L
0x00000002L
0x00000004L
#define CCLINK_APS_WD_OFF
#define CCLINK_APS_WD_MIN_TIMEOUT
#define CCLINK_APS_WD_MAX_TIMEOUT
0x00000000L
0x00000014L
0x0000FFFFL
#define CCLINK_APS_CCLS_FLAGS_CFG_VENDOR_CODE
#define CCLINK_APS_CCLS_FLAGS_CFG_MODEL_TYPE
#define CCLINK_APS_CCLS_FLAGS_CFG_SW_VERSION
0x00000001L
0x00000002L
0x00000004L
#define CCLINK_APS_STATION_ADDR_CFG_ROTARY_SWITCH
0x000000FFL
struct CCLINK_APS_SET_CONFIGURATION_REQ_DATA_Ttag
{
TLR_UINT32
ulSystemFlags;
TLR_UINT32
ulWdgTime;
TLR_UINT32
ulCcLinkFlags;
TLR_UINT32
TLR_UINT32
ulSlaveStationAddr;
ulBaudRate;
TLR_UINT32
TLR_UINT32
TLR_UINT32
TLR_UINT32
TLR_UINT32
TLR_BOOLEAN32
ulStationType;
ulNoStation;
ulCcLinkVersion;
ulExtensionCycle;
ulReserved;
fHoldClrMode;
TLR_UINT32
TLR_UINT32
TLR_UINT32
};
ulVendorCode;
ulModelType;
ulSwVersion;
Variable
Type
Value / Range
Description
UINT32
Destination Queue-Handle
ulSrc
UINT32
Source Queue-Handle
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
56
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x00004604
CCLINK_APS_SET_CONFIGURATION_REQ Command
ulExt
UINT32
ulRout
UINT32
tData
structure CCLINK_APS_SET_CONFIGURATION_REQ_DATA_T
ulSystemFlags
System Flags
UINT32
ulWdgTime
Watchdog supervision
UINT32
0
20 .. 65535
ulCcLinkFlags
UINT32
0
1
0
1
ulSlaveStationAddr
UINT32
ulBaudRate
UINT32
0
1
2
3
4
156 kBaud
625 kBaud
2500 kBaud
5 MBaud
10 MBaud
Note: Parameter will not be used if rotary switches
are used for configuration. Parameter
ulSlaveStationAddr has to be set to 255 in
order to activate rotary switch configuration (On
devices with rotary switches, only)
ulStationType
Station Type
UINT32
0
1
UINT32
1
1 .. 4
ulCcLinkVersion
CC-Link Version
UINT32
0
1
ulExtensionCycle
UINT32
Version 1
Version 2 (Remote Device Station only)
Number of extension cycles for CC-Link Version 1
ulReserved
UINT32
fHoldClrMode
BOOLEAN32
0
1
2
3
0
1
ulVendorCode
UINT32
0 .. 65535
ulModelType
UINT32
0 .. 255
ulSwVersion
UINT32
0 .. 63
Packet Description
structure CCLINK_APS_PCK_SET_CONFIGURATION_CNF_T
Type: Request
Area
Variable
Type
Value / Range
Description
UINT32
Destination Queue-Handle
ulSrc
UINT32
Source Queue-Handle
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
0 ... 2 -1
ulSta
UINT32
ulCmd
UINT32
0x00004605
CCLINK_APS_SET_CONFIGURATION_CNF Command
ulExt
UINT32
ulRout
UINT32
5.2
The CC-Link Slave-Task handles, within the CC-Link Slave stack, the CC-Link protocol.
To get the handle of the process queue of the CC-Link Slave-Task-Task the Macro
TLR_QUE_IDENTIFY() has to be used in conjunction with the following ASCII-queue name
Description
"QUE_CCLSLAVE
The returned handle has to be used as value ulDest in all initiator packets the AP-Task intends to
send to the CC-Link Slave-Task. This handle is the same handle that has to be used in conjunction
with the macros TLR_QUE_SENDPACKET_FIFO/LIFO() for sending a packet to the CC-Link SlaveTask.
5.2.1
This request is used in order to reset the CC-Link Slave. This request will be denied if the
configuration lock flag is set (for more information on this topic see section 3.3.1.1).
Note: This command does not delete configuration databases. If the CC-Link Slave is
configured by configuration database, this configuration is reloaded again after the
initialize command is completed.
Variable
tHead
Structure TLR_PACKET_HEADER_T
tData
Type
Value / Range
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x00004500
CCLINK_SLAVE_INITIALIZE_REQ Command
ulExt
UINT32
Reserved
ulRout
UINT32
Routing Information
0 ... 2 -1
Structure CCLINK_SLAVE_INITIALIZE_REQ_DATA_T
ulReserved
UINT32
Packet Description
Structure Information CCLINK_SLAVE_PACKET_INITIALIZE_CNF_T
Type: Confirmation
Area
Variable
tHead
Structure TLR_PACKET_HEADER_T
tData
Type
Value / Range
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
ulExt
UINT32
Extension, reserved
ulRout
UINT32
0 ... 2 -1
0x00004501
CCLINK_SLAVE_INITIALIZE_CNF - Command
Structure CCLINK_SLAVE_INITIALIZE_CNF_DATA_T
ulReserved
UINT32
5.2.2
This packet is used in order to register to the CC-Link Slave-Task. After this request is performed
successfully, indication packets are sent from the CC-Link Slave-Task to the source queue of this
request packet.
Note: This packet is used by the AP-task only and will not be routed from the user
application to the CC-Link Slave-Task.
Note: This packet will no longer be supported by the firmware described in this document
after September 1, 2009.
Use the registering functionality described in the netX Dual-Port-Memory Manual
instead (RCX_REGISTER_APP_REQ, code 0x2F10).
Variable
tHead
Structure TLR_PACKET_HEADER_T
tData
Type
Value / Range
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x00004502
CCLINK_SLAVE_REGISTER_REQ - Command
ulExt
UINT32
Reserved
ulRout
UINT32
Routing Information
0 ... 2 -1
structure CCLINK_SLAVE_APP_REGISTER_REQ_DATA_T
ulReserved
UINT32
Packet Status/Error
Definition / (Value)
Description
TLR_S_OK
(0x00000000)
Status ok
Packet Description
Structure Information CCLINK_SLAVE_PACKET_APP_REGISTER_CNF
Type: Confirmation
Area
Variable
tHead
Structure TLR_PACKET_HEADER_T
tData
Type
Value / Range
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
ulExt
UINT32
Extension, reserved
ulRout
UINT32
0 ... 2 -1
0x00004503
CCLINK_SLAVE_REGISTER_CNF - Command
Structure CCLINK_SLAVE_APP_REGISTER_CNF_DATA_T
ulReserved
UINT32
Packet Status/Error
Definition / (Value)
Description
TLR_S_OK
(0x00000000)
Status ok
TLR_E_CCLINK_SLAVE_
PACKET_LENGTH
(0xC06A0004)
5.2.3
This packet can be used in order to get the handle for the send and receive triple buffer for data
exchange between APS- and CC-Link Slave-Task.
Note: This packet is used by the AP-Task only and will not be routed from the user
application to the CC-Link Slave-Task.
The received handles can be used with the macros TLR_GETEXCHGED_TRIBUFF() and
TLR_EXCHANGE_TRIBUFF() in order to exchange data with the CC-Link network.
Packet Structure Reference
typedef struct CCLINK_SLAVE_GET_BUFFER_HANDLE_REQ_DATA_Ttag
CCLINK_SLAVE_GET_BUFFER_HANDLE_REQ_DATA_T;
struct CCLINK_SLAVE_GET_BUFFER_HANDLE_REQ_DATA_Ttag
{
TLR_UINT32 ulReserved;
};
typedef struct CCLINK_SLAVE_PACKET_GET_BUFFER_HANDLE_REQ_Ttag
CCLINK_SLAVE_PACKET_GET_BUFFER_HANDLE_REQ_T;
struct CCLINK_SLAVE_PACKET_GET_BUFFER_HANDLE_REQ_Ttag
{
TLR_PACKET_HEADER_T
tHead;
CCLINK_SLAVE_GET_BUFFER_HANDLE_REQ_DATA_T tData;
};
Variable
tHead
Structure TLR_PACKET_HEADER_T
tData
Type
Value / Range
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x00004504
CCLINK_SLAVE_GET_BUFFER_HANDLE_REQ Command
ulExt
UINT32
Reserved
ulRout
UINT32
Routing Information
0 ... 2 -1
Structure CCLINK_SLAVE_GET_BUFFER_HANDLE_REQ_DATA_T
ulReserved
UINT32
Variable
Type
Value / Range
tHead
Structure TLR_PACKET_HEADER_T
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
12
0 ... 2 -1
0x00004505
CCLINK_SLAVE_GET_BUFFER_HANDLE_CNF Command
tData
ulExt
UINT32
Extension, reserved
ulRout
UINT32
Structure CCLINK_SLAVE_GET_BUFFER_HANDLE_CNF_DATA_T
ulReserved
UINT32
ulRecvBuffer
UINT32
Receive Buffer
ulSendBuffer
UINT32
Send Buffer
5.2.4
This packet is used by the APS-Task in order to set the bus parameters for the CC-Link Slave Task,
but can also be sent from the user application This request will be denied if the configuration lock flag
is set (see section 3.3.1.1 of this document).
Note: The user application should use the warmstart request for configuration of the CCLink
Slave
stack.
This
request
is
described
in
section
CCLINK_APS_SET_CONFIGURATION_REQ/CNF Set Configuration.
CCLINK_SLAVE_BAUD_156K
CCLINK_SLAVE_BAUD_625K
CCLINK_SLAVE_BAUD_2500K
CCLINK_SLAVE_BAUD_5M
CCLINK_SLAVE_BAUD_10M
0x00000001L
0x00000040L
0x00000000L
0x00000001L
0x00000002L
0x00000003L
0x00000004L
#define CCLINK_SLAVE_STATION_TYPE_IO_DEVICE
0x00000000L
#define CCLINK_SLAVE_STATION_TYPE_REMOTE_DEVICE 0x00000001L
#define CCLINK_SLAVE_NO_STATION_IO_DEVICE
0x00000001L
0x00000000L
0x00000001L
CCLINK_SLAVE_CCLINK_EXTENSION_CYCLE_SINGLE
CCLINK_SLAVE_CCLINK_EXTENSION_CYCLE_DOUBLE
CCLINK_SLAVE_CCLINK_EXTENSION_CYCLE_QUADRUPLE
CCLINK_SLAVE_CCLINK_EXTENSION_CYCLE_OCTUPLE
0x00000000L
0x00000001L
0x00000002L
0x00000003L
struct CCLINK_SLAVE_BUS_PARAM_Ttag
{
TLR_UINT32
ulSlaveStationAddr;
TLR_UINT32
ulBaudRate;
TLR_UINT32
TLR_UINT32
ulStationType;
ulNoStation;
TLR_UINT32
TLR_UINT32
ulCcLinkVersion;
ulExtensionCycle;
TLR_UINT32
ulReserved;
TLR_BOOLEAN32 fHoldClrMode;
};
0x0000FFFFL
0x000000FFL
0x0000003FL
struct CCLINK_SLAVE_ADD_PARAM_Ttag
{
TLR_UINT32 ulVendorCode;
TLR_UINT32 ulModelType;
TLR_UINT32 ulSwVersion;
};
Variable
Type
Value / Range
Description
ulSlaveStationAddr
UINT32
1 .. 64
ulBaudRate
UINT32
Baudrate
0
1
2
3
4
ulStationType
UINT32
Station Type
0
1
ulNoStation
UINT32
UINT32
0
1
ulExtensionCycle
1
1 .. 4
ulCcLinkVersion
156 kBaud
625 kBaud
2500 kBaud
5 MBaud
10 MBaud
Version 1
Version 2 (Remote Device Station only)
Number of extension cycles for CC-Link
Version 1
UINT32
0
ulReserved
UINT32
fHoldClrMode
BOOLEAN32
0
1
2
3
0
1
Type
Range
Description
ulVendorCode
UINT32
0 .. 65535
Vendor Code
ulModelType
UINT32
0 . 255
Model Type
ulSwVersion
UINT32
0 .. 63
Software Version
Packet Description
Structure Information CCLINK_SLAVE_PACKET_SET_BUSPARAM_REQ_T
Type: Request
Area
Variable
Type
Value / Range
tHead
Structure TLR_PACKET_HEADER_T
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
44
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x00004506
CCLINK_SLAVE_SET_BUS_PARAM_REQ - Command
ulExt
UINT32
Reserved
ulRout
UINT32
Routing Information
0 ... 2 -1
tData
Structure CCLINK_SLAVE_SET_BUSPARAM_REQ_DATA_T
CCLINK_
See Table 79: CCLINK_SLAVE_CFG_BUS_PARAM_T - Bus Parameter
SLAVE_CFG_
BUS_PARAM_T
CCLINK_
See Table 80: CCLINK_SLAVE_CFG_ADD_PARAM_T - Additional Configuration
SLAVE_CFG_
ADD_PARAM_T
Packet Description
Structure Information CCLINK_SLAVE_PACKET_SET_BUSPARAM_CNF_T
Type: Confirmation
Area
Variable
tHead
Structure TLR_PACKET_HEADER_T
tData
Type
Value / Range
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
44
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
ulExt
UINT32
Extension, reserved
ulRout
UINT32
0 ... 2 -1
0x00004507
CCLINK_SLAVE_SET_BUSPARAM_CNF - Command
Structure CCLINK_SLAVE_SET_BUSPARAM_REQ_DATA_T
CCLINK_
See Table 79: CCLINK_SLAVE_CFG_BUS_PARAM_T - Bus Parameter
SLAVE_CFG_
BUS_PARAM_T
CCLINK_
See Table 80: CCLINK_SLAVE_CFG_ADD_PARAM_T - Additional Configuration
SLAVE_CFG_
ADD_PARAM_T
5.2.5
This packet starts or stops the communication with the CC-Link network depending on the value of the
ulMode parameter.
Note: This packet is obsolete and will not longer supported after September,1, 2009. It is
replaced by packet RCX_START_STOP_COMM_REQ/CNF which contains
identical functionality. Do not use this packet for all new developments
0x00000000L
0x00000001L
struct CCLINK_SLAVE_STARTSTOP_REQ_DATA_Ttag
{
TLR_UINT32 ulMode;
};
typedef struct CCLINK_SLAVE_PACKET_STARTSTOP_REQ_Ttag
CCLINK_SLAVE_PACKET_STARTSTOP_REQ_T;
struct CCLINK_SLAVE_PACKET_STARTSTOP_REQ_Ttag
{
TLR_PACKET_HEADER_T
tHead;
CCLINK_SLAVE_STARTSTOP_REQ_DATA_T tData;
};
Variable
tHead
Structure TLR_PACKET_HEADER_T
tData
Type
Value / Range
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x00004508
CCLINK_SLAVE_STARTSTOP_REQ - Command
ulExt
UINT32
Reserved
ulRout
UINT32
Routing Information
0 ... 2 -1
Structure CCLINK_SLAVE_STARTSTOP_REQ_DATA_T
ulMode
UINT32
0x00000000L
0x00000001L
struct CCLINK_SLAVE_STARTSTOP_CNF_DATA_Ttag
{
TLR_UINT32 ulMode;
};
typedef struct CCLINK_SLAVE_PACKET_STARTSTOP_CNF_Ttag
CCLINK_SLAVE_PACKET_STARTSTOP_CNF_T;
struct CCLINK_SLAVE_PACKET_STARTSTOP_CNF_Ttag
{
TLR_PACKET_HEADER_T
tHead;
CCLINK_SLAVE_STARTSTOP_CNF_DATA_T tData;
};
Variable
tHead
Structure TLR_PACKET_HEADER_T
tData
Type
Value / Range
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
ulExt
UINT32
Extension, reserved
ulRout
UINT32
0 ... 2 -1
0x00004509
CCLINK_SLAVE_STARTSTOP_CNF - Command
structure CCLINK_SLAVE_STARTSTOP_CNF_DATA_T
ulMode
UINT32
5.2.6
This request can be used in order to get the status of the CC-Link Master and Slave.
Packet Structure Reference
typedef struct CCLINK_SLAVE_GET_CCL_STATUS_REQ_DATA_Ttag
CCLINK_SLAVE_GET_CCL_STATUS_REQ_DATA_T;
struct CCLINK_SLAVE_GET_CCL_STATUS_REQ_DATA_Ttag
{
TLR_UINT32 ulReserved;
};
typedef struct CCLINK_SLAVE_PACKET_GET_CCL_STATUS_REQ_Ttag
CCLINK_SLAVE_PACKET_GET_CCL_STATUS_REQ_T;
struct CCLINK_SLAVE_PACKET_GET_CCL_STATUS_REQ_Ttag
{
TLR_PACKET_HEADER_T
tHead;
CCLINK_SLAVE_GET_CCL_STATUS_REQ_DATA_T tData;
};
Variable
tHead
Structure TLR_PACKET_HEADER_T
tData
Type
Value / Range
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x0000450A
CCLINK_SLAVE_GET_CCL_STATUS_REQ - Command
ulExt
UINT32
Reserved
ulRout
UINT32
Routing Information
0 ... 2 -1
Structure CCLINK_SLAVE_GET_CCL_STATUS_REQ_DATA_T
ulReserved
UINT32
CCLINK_SLAVE_CCL_SLAVE_ST1_FUSE_STATUS_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_UNIT_ERROR_INVAL_NUM_OF_POINTS_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_NO_REFRESH_RECEIVE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_NO_PARAMETER_RECEIVE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_SWITCH_CHANGE_DETECTION_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_CYCLIC_COMMUNICATION_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_RES1_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_WDT_ERROR_MSK
0x00000001L
0x00000002L
0x00000004L
0x00000008L
0x00000010L
0x00000020L
0x00000040L
0x00000080L
#define
#define
#define
#define
#define
#define
#define
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSIENT_DATA_STATUS_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSIENT_DATA_RECEPTION_EN_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSIENT_TYPE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_RES2_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSMISSION_ROUTE_STATUS_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_RES_FIXED_TO_ONE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_SETTING_MSK
0x00000100L
0x00000200L
0x00000400L
0x00000800L
0x00001000L
0x00002000L
0x0000C000L
#define
#define
#define
#define
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_SINGLE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_DOUBLE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_QUADRUPLE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_OCTUPLE_MSK
0x00000000L
0x00004000L
0x00008000L
0x0000C000L
struct CCLINK_SLAVE_GET_CCL_STATUS_CNF_DATA_Ttag
{
TLR_UINT32 ulReserved;
TLR_UINT32 ulMasterState;
TLR_UINT32 ulSlaveState;
};
typedef struct CCLINK_SLAVE_PACKET_GET_CCL_STATUS_CNF_Ttag
CCLINK_SLAVE_PACKET_GET_CCL_STATUS_CNF_T;
struct CCLINK_SLAVE_PACKET_GET_CCL_STATUS_CNF_Ttag
{
TLR_PACKET_HEADER_T
tHead;
CCLINK_SLAVE_GET_CCL_STATUS_CNF_DATA_T tData;
};
Variable
tHead
Structure TLR_PACKET_HEADER_T
tData
Type
Value / Range
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
12
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
ulExt
UINT32
Extension, reserved
ulRout
UINT32
0 ... 2 -1
0x0000450B
CCLINK_SLAVE_GET_CCL_STATUS_CNF - Command
structure CCLINK_SLAVE_GET_CCL_STATUS_CNF_DATA_T
ulReserved
UINT32
ulMasterState UINT32
ulSlaveState
UINT32
5.2.7
This request can be used in order to change several flags within the status of the CC-Link Slave.
Note: The switch change flag cannot be changed from the user application if the rotary
switches are handled by the APS-Task.
0x00000001L
0x00000002L
0x00000004L
struct CCLINK_SLAVE_CHANGE_SLAVE_STATUS_REQ_DATA_Ttag
{
TLR_UINT32
ulFlags;
TLR_BOOLEAN32 fFuseStatus;
TLR_BOOLEAN32 fSwitchChange;
TLR_BOOLEAN32 fWatchdogError;
};
typedef struct CCLINK_SLAVE_PACKET_CHANGE_SLAVE_STATUS_REQ_Ttag
CCLINK_SLAVE_PACKET_CHANGE_SLAVE_STATUS_REQ_T;
struct CCLINK_SLAVE_PACKET_CHANGE_SLAVE_STATUS_REQ_Ttag
{
TLR_PACKET_HEADER_T
tHead;
CCLINK_SLAVE_CHANGE_SLAVE_STATUS_REQ_DATA_T tData;
};
Variable
Type
Value / Range
tHead
Structure TLR_PACKET_HEADER_T
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
16
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x0000450C
CCLINK_SLAVE_CHANGE_SLAVE_STATUS_REQ Command
ulExt
UINT32
Reserved
ulRout
UINT32
Routing Information
0 ... 2 -1
tData
Structure CCLINK_SLAVE_CHANEGE_SLAVE_STATUS_REQ_DATA_T
ulFlags
UINT32
Flags
Bit 0:Parameter fFuseStatus will be evaluated if
this bit is set
Bit 1:Parameter fSwitchChange will be evaluated if
this bit is set
Bit 2:Parameter fWatchdogError will be evaluated
if this bit is set
Bit 3 .. 31: Reserved for further use, set to zero
fFuseStatus
UINT32
fSwitchChange
UINT32
FALSE
TRUE
fWatchdogError
UINT32
FALSE
TRUE
Variable
Type
Value / Range
tHead
Structure TLR_PACKET_HEADER_T
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
16
0 ... 2 -1
0x0000450D
CCLINK_SLAVE_CHANGE_SLAVE_STATUS_CNF Command
ulExt
UINT32
Extension, reserved
ulRout
UINT32
tData
structure CCLINK_SLAVE_CHNAGE_SLAVE_STATUS_CNF_DATA_T
ulFlags
UINT32
Flags
Bit 0:Parameter fFuseStatus will be evaluates if this
bit is set
Bit 1:Parameter fSwitchChange will be evaluates if
this bit is set
Bit 2:Parameter fWatchdogError will be evaluates if
this bit is set
Bit 3 .. 31: Reserved for further use, set to zero
fFuseStatus
UINT32
fSwitchChange
UINT32
FALSE
TRUE
fWatchdogError
UINT32
FALSE
TRUE
5.2.8
This request can be used in order to get the current bus parameters.
Packet Structure Reference
typedef struct CCLINK_SLAVE_PACKET_GET_BUS_PARAM_REQ_Ttag
CCLINK_SLAVE_PACKET_GET_BUS_PARAM_REQ_T;
struct CCLINK_SLAVE_PACKET_GET_BUS_PARAM_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead;
};
Packet Description
Structure Information CCLINK_SLAVE_PACKET_GET_BUS_PARAM_REQ_T
Type: Request
Area
Variable
Type
Value / Range
tHead
Structure TLR_PACKET_HEADER_T
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x0000450E
CCLINK_SLAVE_GET_BUS_PARAM_REQ - Command
ulExt
UINT32
Reserved
ulRout
UINT32
Routing Information
0 ... 2 -1
Variable
tHead
Structure TLR_PACKET_HEADER_T
tData
Type
Value / Range
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
44
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
ulExt
UINT32
Extension, reserved
ulRout
UINT32
0 ... 2 -1
0x0000450F
CCLINK_SLAVE_GET_BUS_PARAM_CNF - Command
structure CCLINK_SLAVE_GET_BUS_PARAM_CNF_DATA_T
CCLINK_
SLAVE_CFG_
BUS_PARAM_T
CCLINK_
SLAVE_CFG_
ADD_PARAM_T
5.2.9
This indication packet signifies a change of the state of the CC-Link Slave-Task or the CC-Link
network. The indication delivers two important blocks containing status information about the CC-Link
Slave, namely
The slave state
The extended slave state
These blocks delivering information about the change of state are described in detail below.
Note: This indication is used by the AP-Task in order to set status information in the DPM
and will not be routed to the user application.
In order to be able to receive this indication, the CCLINK_SLAVE_REGISTER_REQ/CNF Register
Application request described in section 5.2.2 of this document has to be executed by the AP-Task.
Packet Structure Reference
typedef struct CCLINK_SLAVE_STATE_CHANGE_IND_DATA_Ttag
CCLINK_SLAVE_STATE_CHANGE_IND_DATA_T;
__PACKED_PRE struct CCLINK_SLAVE_STATE_CHANGE_IND_DATA_Ttag
{
CCLINK_SLAVE_SLAVE_STATE_T
tSlaveState;
CCLINK_SLAVE_EXTENDED_STATE_T tExtendedState;
}__PACKED_POST;
typedef struct CCLINK_SLAVE_PACKET_STATE_CHANGE_IND_Ttag
CCLINK_SLAVE_PACKET_STATE_CHANGE_IND_T;
__PACKED_PRE struct CCLINK_SLAVE_PACKET_STATE_CHANGE_IND_Ttag
{
TLR_PACKET_HEADER_T
tHead;
CCLINK_SLAVE_STATE_CHANGE_IND_DATA_T tData;
}__PACKED_POST;
Variable
tHead
Structure TLR_PACKET_HEADER_T
tData
Type
Value / Range
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
52
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x0000451E
CCLINK_SLAVE_STATE_CHANGE_IND - Command
ulExt
UINT32
Reserved
ulRout
UINT32
Routing Information
0 ... 2 -1
Structure CCLINK_SLAVE_STATE_CHANGE_IND_DATA_T
tSlaveState
CCLINK_SLAVE_
SLAVE_STATE_T
tExtended
State
CCLINK_SLAVE_
EXTENDED_STATE_T
CCLINK_SLAVE_STATE_FLAG_RDY
CCLINK_SLAVE_STATE_FLAG_RUN
CCLINK_SLAVE_STATE_FLAG_COM
CCLINK_SLAVE_STATE_FLAG_BUS_ON
CCLINK_SLAVE_STATE_FLAG_COMM_ERROR
0x00000001L
0x00000002L
0x00000004L
0x00000008L
0x00000010L
struct CCLINK_SLAVE_SLAVE_STATE_Ttag
{
TLR_UINT32 ulCcLinkState;
TLR_UINT32
TLR_UINT32
ulFlags;
ulErrorCount;
TLR_UINT32
TLR_UINT32
TLR_UINT32
ulCommError;
ulStaLedState;
ulErrLedState;
TLR_UINT32
ulIoByteCnt;
TLR_UINT32
};
aulReserved[3];
CCLINK_SLAVE_CCL_MASTER_ST1_MAS_STAT_USER_APP_PRG_MSK
CCLINK_SLAVE_CCL_MASTER_ST1_MAS_STAT_USER_APP_PRG_ERR_CHK_MSK
CCLINK_SLAVE_CCL_MASTER_ST1_REFRESH_STARTUP_MSK
CCLINK_SLAVE_CCL_MASTER_ST1_TRANSIENT_DATA_STATUS_MSK
CCLINK_SLAVE_CCL_MASTER_ST1_TRANSIENT_DATA_RECEPTION_EN_MSK
CCLINK_SLAVE_CCL_MASTER_ST1_PROTOCOL_VERSION_MSK
CCLINK_SLAVE_CCL_MASTER_ST1_MASTER_STATION_TYPE_MSK
0x00000001L
0x00000002L
0x00000004L
0x00000008L
0x00000010L
0x00000060L
0x00000080L
#define CCLINK_SLAVE_CCL_MASTER_ST2_RY_INFO_TRANSMISSION_POINTS_MSK
#define CCLINK_SLAVE_CCL_MASTER_ST2_RWW_INFO_TRANSMISSION_POINTS_MSK
0x00000F00L
0x0000F000L
#define
#define
#define
#define
#define
#define
#define
#define
CCLINK_SLAVE_CCL_SLAVE_ST1_FUSE_STATUS_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_UNIT_ERROR_INVAL_NUM_OF_POINTS_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_NO_REFRESH_RECEIVE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_NO_PARAMETER_RECEIVE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_SWITCH_CHANGE_DETECTION_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_CYCLIC_COMMUNICATION_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_RES1_MSK
CCLINK_SLAVE_CCL_SLAVE_ST1_WDT_ERROR_MSK
0x00000001L
0x00000002L
0x00000004L
0x00000008L
0x00000010L
0x00000020L
0x00000040L
0x00000080L
#define
#define
#define
#define
#define
#define
#define
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSIENT_DATA_STATUS_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSIENT_DATA_RECEPTION_EN_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSIENT_TYPE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_RES2_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_TRANSMISSION_ROUTE_STATUS_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_RES_FIXED_TO_ONE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_SETTING_MSK
0x00000100L
0x00000200L
0x00000400L
0x00000800L
0x00001000L
0x00002000L
0x0000C000L
#define
#define
#define
#define
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_SINGLE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_DOUBLE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_QUADRUPLE_MSK
CCLINK_SLAVE_CCL_SLAVE_ST2_EXTENDED_CYCLE_OCTUPLE_MSK
0x00000000L
0x00004000L
0x00008000L
0x0000C000L
The extended slave state is described in detail in section 3.3.2 Extended Status.
Packet Description
Structure Information CCLINK_SLAVE_PACKET_STATE_CHANGE_RES_T
Type: Response
Area
Variable
Type
Value / Range
tHead
Structure TLR_PACKET_HEADER_T
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
ulExt
UINT32
Extension, reserved
ulRout
UINT32
0 ... 2 -1
0x0000451F
CCLINK_SLAVE_STATE_CHANGE_RES - Command
Packet Description
Structure Information CCLINK_SLAVE_PACKET_SET_WATCHDOG_FAIL_REQ_T
Type: Request
Area
Variable
Type
Value / Range
tHead
Structure TLR_PACKET_HEADER_T
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
0x000045AA
CCLINK_SLAVE_SET_WATCHDOG_FAIL_REQ Command
ulExt
UINT32
Reserved
ulRout
UINT32
Routing Information
0 ... 2 -1
Packet Description
Structure Information CCLINK_SLAVE_PACKET_SET_WATCHDOG_FAIL_CNF_T
Type: Confirmation
Area
Variable
Type
Value / Range
tHead
Structure TLR_PACKET_HEADER_T
Description
ulDest
UINT32
ulSrc
UINT32
ulDestId
UINT32
ulSrcId
UINT32
ulLen
UINT32
ulId
UINT32
ulSta
UINT32
ulCmd
UINT32
ulExt
UINT32
Extension, reserved
ulRout
UINT32
0 ... 2 -1
0x000045AB
CCLINK_SLAVE_SET_WATCHDOG_FAIL_CNF
Command
Definition / (Value)
Description
TLR_S_OK
(0x00000000)
Status ok
TLR_I_CCLINK_APS_OPEN_DBM_FILE
(0x406B0002)
TLR_E_CCLINK_APS_DATASET
(0xC06B0003)
TLR_E_CCLINK_APS_TABLE_GLOBAL
(0xC06B0004)
TLR_E_CCLINK_APS_TABLE_CCLS_INI
(0xC06B0005L)
Failed to
dataset.
TLR_E_CCLINK_APS_WATCHDOG_PARAMETER
(0xC06B0006)
TLR_E_CCLINK_APS_SIZE_TABLE_CCLS_INI
(0xC06B0007)
TLR_E_CCLINK_APS_DATABASE_FOUND
(0xC06B000A)
TLR_E_CCLINK_APS_SLAVE_STATION_
ADDR_PARAMETER
(0xC06B000BL)
TLR_E_CCLINK_APS_BAUDRATE_PARAMETER
(0xC06B000CL)
TLR_E_CCLINK_APS_NO_STATION_PARAMETER
(0xC06B000D)
TLR_E_CCLINK_APS_MODE_PARAMETER
(0xC06B000E)
TLR_E_CCLINK_APS_VENDOR_CODE_
PARAMETER
(0xC06B000F)
TLR_E_CCLINK_APS_MODEL_CODE_PARAMETER
(0xC06B0010)
TLR_E_CCLINK_APS_SW_VERSION_PARAMETER
(0xC06B0011)
TLR_E_CCLINK_APS_MODEL_TYPE_PARAMETER
(0xC06B0012)
TLR_E_CCLINK_APS_IO_MODE_PARAMETER
(0xC06B0013)
open
CCLS_INI
configuration
Definition / (Value)
Description
TLR_E_CCLINK_APS_INVALD_STATE
(0xC06B0015)
TLR_E_CCLINK_APS_PARAM_CYCLETIME
(0xC06B0016)
TLR_E_CCLINK_APS_PARAM_CHN_INSTANCE
(0xC06B0017)
TLR_E_CCLINK_APS_SET_SWITCH_CHANGE_
NOT_ALLOWED
(0xC06B0018)
TLR_E_CCLINK_APS_CCLINK_VERSION_
PARAMETER
(0xC06B0019)
TLR_E_CCLINK_APS_STATION_TYPE_
PARAMETER
(0xC06B001A)
TLR_E_CCLINK_APS_STATION_ADDR_WITH_
NO_STATIONS_PARAMETER
(0xC06B001B)
TLR_E_CCLINK_APS_EXTENSION_CYCLE_
PARAMETER
(0xC06B001C)
TLR_E_CCLINK_APS_STATION_TYPE_WITH_
CCLINK_VERSION_PARAMETER
(0xC06B001D)
type
in
6.2
Definition / (Value)
Description
TLR_S_OK
(0x00000000)
Status ok
TLR_I_CCLINK_SLAVE_ALREADY_IN_STATE
(0xC06A0003)
TLR_E_CCLINK_SLAVE_DATA_COUNT
(0xC06A0005)
TLR_E_CCLINK_SLAVE_DATA_OFFSET
(0xC06A0006)
TLR_E_CCLINK_SLAVE_INIT_BUFFER
(0xC06A0007)
TLR_E_CCLINK_SLAVE_INVALID_STATE
(0xC06A0008)
TLR_E_CCLINK_SLAVE_MODE
(0xC06A0009)
TLR_E_CCLINK_SLAVE_PARAM_BAUDRATE
(0xC06A000A)
Invalid Baudrate.
TLR_E_CCLINK_SLAVE_PARAM_STATION_ADDR
(0xC06A000B)
TLR_E_CCLINK_SLAVE_PARAM_NO_STATIONS
(0xC06A000C)
TLR_E_CCLINK_SLAVE_PARAM_VENDOR_CODE
(0xC06A000D)
TLR_E_CCLINK_SLAVE_PARAM_MODEL_CODE
(0xC06A000E)
TLR_E_CCLINK_SLAVE_PARAM_SW_VERSION
(0xC06A000F)
TLR_E_CCLINK_SLAVE_PARAM_MODEL_TYPE
(0xC06A0010)
TLR_E_CCLINK_SLAVE_PARAM_STATION_TYPE
(0xC06A0011)
TLR_E_CCLINK_SLAVE_PARAM_CYCLETIME
(0xC06A0012)
TLR_E_CCLINK_SLAVE_PARAM_XC_INSTANCE
(0xC06A0013)
TLR_E_CCLINK_SLAVE_PARAM_STATION_
ADDR_WITH_NO_STATIONS
(0xC06A0014)
TLR_E_CCLINK_SLAVE_PARAM_CCLINK_
VERSION
(0xC06A0015)
TLR_E_CCLINK_SLAVE_PARAM_EXTENSION_
CYCLE
(0xC06A0016)
TLR_E_CCLINK_SLAVE_PARAM_STATION_
TYPE_WITH_CCLINK_VERSION
(0xC06A0017)
type
in
Contact 125
7 Contact
Headquarters
Germany
Hilscher Gesellschaft fr
Systemautomation mbH
Rheinstrasse 15
65795 Hattersheim
Phone: +49 (0) 6190 9907-0
Fax: +49 (0) 6190 9907-50
E-Mail: info@hilscher.com
Support
Phone: +49 (0) 6190 9907-99
E-Mail: de.support@hilscher.com
Subsidiaries
China
Hilscher Ges.f.Systemaut. mbH
Shanghai Representative Office
200010 Shanghai
Phone: +86 (0) 21-6355-5161
E-Mail: info@hilscher.cn
Support
Phone: +86 (0) 21-6355-5161
E-Mail: cn.support@hilscher.com
France
Hilscher France S.a.r.l.
69500 Bron
Phone: +33 (0) 4 72 37 98 40
E-Mail: info@hilscher.fr
Support
Phone: +33 (0) 4 72 37 98 40
E-Mail: fr.support@hilscher.com
India
Hilscher India Pvt. Ltd.
New Delhi - 110 025
Phone: +91 9810269248
E-Mail: info@hilscher.in
Japan
Hilscher Japan KK
Tokyo, 160-0022
Phone: +81 (0) 3-5362-0521
E-Mail: info@hilscher.jp
Support
Phone: +81 (0) 3-5362-0521
E-Mail: jp.support@hilscher.com
Switzerland
Hilscher Swiss GmbH
4500 Solothurn
Phone: +41 (0) 32 623 6633
E-Mail: info@hilscher.ch
Support
Phone: +49 (0) 6190 9907-99
E-Mail: ch.support@hilscher.com
USA
Hilscher North America, Inc.
Lisle, IL 60532
Phone: +1 630-505-5301
E-Mail: info@hilscher.us
Support
Italy
Hilscher Italia srl
20090 Vimodrone (MI)
Phone: +39 02 25007068
E-Mail: info@hilscher.it
Phone: +1 630-505-5301
E-Mail: us.support@hilscher.com
Support
Phone: +39 / 02 25007068
E-Mail: it.support@hilscher.com