Specifications

Chapter 4 - AsconCPULib
115
4-2-1 CANopen network definition
The use of the S2_CU02 joined with the library for the IO modules (please see the
AsconBasicIOLib
documentation), allows the user to define easly the architecture
of his CANopen network. Using the
NETWORK
output signal of the S2_CU02 is
possibile to connect all the NETWORK inputs of the IO function blocks of the
AsconBasicIOLib
library in order to grant an effective control of the communication
status, and a correct management of the possible failures
1
. The picture on the
right shows an example of a simple system with a CU-02 and three IO modules.
4-3 Function Block Description
4-3-1 S2_CU02
FB Prototype
S2_CU02
Input parameters
Output parameters
Description
This Function Block performs a scan of the network in order to recognize
the modules connected, and it is able to control the enable of each single
IO FBs linked to the
NETWORK
output
2
. It is able to provide diagnostic activi-
ties in order to verify the proper CAN communication status, and it is also able to
detect the emergency messages eventually generated by devices connected to
the line. The output
NETINITERR
is used to signal an error occurred during the
1. The S2_CU02 function block needs some gloabal variables that must be linked to the
active resource at compile time. In the Ascon Template project these variables are
present in the file
SystemDirectVar.POE
Label Type Description
Enable BOOL Function Block Enable
Alarm_DO BOOL AlarmOut Output State
Wakeup_DO BOOL WakeOut Output State
Label Type Description
Network DWORD Network Line Connection
NetInitErr BOOL Network Initialization Error
CommErr BOOL Error Communication Flag
EmcySts BOOL Emergency Error Flag
DevCommSts ARRAY[1..32] OF WORD Communication Status Node Array
DevEmcySts ARRAY[1..32,1..8] OF BYTE Emergency Message Node Matrix
DI BOOL Digital Input State
ENABLE
ALARM_DO
WAKEUP_DO
BOOL
BOOL
BOOL
¡
¡
¡
DWORD
BOOL
BOOL
BOOL
ARRAY[1..32] OF WORD
ARRAY[1..32,1..8] OF BYTE
BOOL
NETWORK
NETINITERR
COMMERR
EMCYSTS
DEVCOMMSTS
DEVEMCYSTS
DI
¡
¡
¡
¡
¡
¡
¡
2. The S2_CU02 function block needs some gloabal variables that must be linked to the
active resource at compile time. In the Ascon Template project these variables are
present in the file
SystemDirectVar.POE