Home

L-1008, CANopen Extension for IEC 61131-3

image

Contents

1. CAN GET LOCAL NODE ID Request own node address Section 2 1 CAN_GET_CANOPEN_KERNEL_STATE yes Request CANopen kernel state of Aah own PLC CAN_REGISTER_COBID Ga Register COBID for reception of ee PDOs CAN_PDO_READ8 Read received PDO CAN_PDO_WRITE8 Send PDO SDO transfer SDO transfer CAN_SDO_READ_STR yes Read character strings from the 4 4 3 Object Dictionary of a node via SDO transfer CAN_SDO_WRITE_STR yes Write character strings to the Object 4 4 4 Dictionary of a node via SDO transfer CAN_SDO_READ_BIN yes Read binary data from the Object 4 4 5 Dictionary of a node via SDO transfer CAN_SDO_WRITE_BIN yes Write binary data to the Object 4 4 6 Dictionary of a node via SDO transfer CAN GET STATE Request node state CAN NMT Send NMT messages specific nodes any nodes CAN _WRITE_EMCY Send emergency message 1455 specific nodes any nodes SYSTEC electronic GmbH 2011 L 1008 07 33 CAN CANopen Extension for IEC 61131 3 CAN_ENABLE_CYCLIC_SYNC Enable or disable cyclic SYNC messages CAN_SEND_SYNC Send an individual SYNC message The column CiA 405 in Table 6 indicates whether the functionality of the respective block is defined by the CiA Draft Standard 405 yes or whether this block is a manufacturer specific expansion of this standard no Please note that due to the specific peculiarities of the IEC61131 programming system implementation of blocks defined by the CiA also d
2. BOOL RTR_FRAME BOOL DATAO BYTE DATA BYTE DATA2 BYTE DATA3 BYTE DATA4 BYTE DATA5 BYTE DATA6 BYTE DATA7 BYTE DATALENGTH USINT USINT NETNUMBER CONFIRM BOOL BOOL ENABLE ERROR USINT hice eee ee ee ee Definition of Operands CANID CAN Identifier of the received CAN Message EXT_FRAME TRUE the CAN Identifier marks an Extended Frame 29 Bit FALSE the CAN Identifier marks a Standard Frame 11 Bit RTR_FRAME TRUE CAN Object has been passed as RTR Frame FALSE CAN Object has not been passed as RTR Frame DATAO DATA7 Data bytes of the received CAN Message DATALENGTH Length of the received CAN Message NETNUMBER Network number ERROR Errorcode according to data type CANL2_ ERROR see Table 19 section 6 1 3 ENABLE Input for enabling or disabling of the FB see section 6 1 2 CONFIRM Output for message completed through the FB see section 6 1 2 Description The function block CANL2_MESSAGE_READS serves for reading a received CAN Message from the receive buffer of the CAN Interface Transfer of data occurs byte by byte at the outputs of the function block alternatively FB CANL2 MESSAGE READ BIN see section 6 2 10 Only CAN messages can be received for which appropriate CAN objects have been specified previously by means of the function blocks CANL2_DEFINE_CANID or CANL2_DEFINE_CANID_RANGE respectively If the Output CONFIRM is set to TRUE during the re
3. 6 2 1 Function Block CANL2_INIT FB for Initialization of the CAN Interface Prototype of the function block CANL2_INIT UDINT BITRATE DWORD AMR DWORD ACR USINT NETNUMBER CONFIRM BOOL BOOL ENABLE ERROR USINT Definition of Operands BITRATE Bitrate in Bit s e g BITRATE 125000 125 kBit s BITRATE 250000 250 kBit s BITRATE 1000000 1 MBit s SYSTEC electronic GmbH 2011 L 1008 07 71 CAN CANopen Extension for IEC 61131 3 AMR Configuration value for Acceptance Mask Register AMR of the CAN Controllers allows for hardware filtration of CAN Identifiers in the CAN Controller Standard value for processing of all CAN Messages AMR 16 FFFFFFFF ACR Configuration Value for Acceptance Code Register ACR of the CAN Controllers allows for a hardware filtration of CAN identifiers in the CAN Controller Standard value for processing of all CAN Messages ACR 16 00000000 NETNUMBER Network number ERROR Errorcode relates to data type CANL2_ ERROR see Table 19 section 6 1 3 ENABLE Input for enabling or disabling the FB see section 6 1 2 CONFIRM Output for message completed through the FB see section 6 1 2 Description The function block CANL2_INIT is used for initializing the CAN Interface This requires the deactivation of the CANopen functionality for this interface The procedure herefor is described in the s
4. CANopen Extension for IEC 61131 3 List of Tables Table 1 Availability of services on the PLC with and without CANopen Master en 10 Table 2 Overview of EDS files for SYSTEC devices transe tr anst tnnnsttrnnnttn rnnr nn nnns nennen 19 Table 3 Overview of predefined DCF files 0 ceeccececeeeeseeeeeeeeeceaeeeeeaeeeeeeeceaeeesaaeeesaaeseeeeeseaeessaaeeeeeeeeaes 20 Table 4 Network variables of the predefined DCF files 20 Table 5 Assignment of data types between IEC61131 and CANOpen ssssssssssssnnssssrnsssnnnnssrnnnnnrnnnnnnenn 30 Table 6 Overview of the CANopen function blocks for IEC61131 3 2400snsunnsnennnnnnnnnnennnnnenn 33 Table 7 Availability of CANopen FBs on controls with and without Master 34 Table 8 Constants for data type CIA405 CANOPEN_KERNEL_ERROR NR 37 Table 9 Constants for data type CIA405 STATE iii 37 Table 10 Constants for data type CIA405 TRANSITION STATE 38 Table 11 Constants for data type CAN SDO TYPE eee 38 Table 12 Constants for data type CIA405 SDO ERROR eee 38 Table 13 Object Dictionary entry for interval limits of the network scan nenn 64 Table 14 Object Dictionary entry for COBID of the node state messages 64 Table 15 Object Dictionary entries for defining waiting Periods snnersnsnnnnnennnnnnnnnnnnnnnenn 65 Table 16 Configuration of Heartbeat sise 65 Table 17 Configuration of Lifeguarding sseesseessesssessessertssnrst
5. MAXLENGTH Limitation of number of bytes to read if 0 the length of the object addressed by PTR_RXDATA is internally determined and used as the number of bytes to be read the maximum of bytes reads equals the number of bytes the object is able to take up RXLENGTH Number of read data bytes ERROR Error code according to data type CIA405 CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 ERRORINFO SDO Abort Code of the communication partner according to data type CIA405 SDO ERROR see Table 12 section 4 1 5 NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value O according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN_SDO_READ_STR is used for reading binary data from the Object Dictionary of a node by using the SDO transfer The SDO transfer always takes place in the background the procedure described in section 4 1 3 therefore has to be used for synchronization between the function block and the PLC program using the parameters ENABLE and CONFIRM If output CONFIRM has been set to TRUE when the function block returns then the object addressed by element PTR_RXDATA contains the binary data bytes of the read object entry Output RXLENGTH states the number of read b
6. 4 1 2 SYSTEC electronic GmbH 2011 L 1008 07 58 CAN CANopen Extension for IEC 61131 3 4 5 8 Function Block CAN_ENABLE_CYCLIC_SYNC FB for activating or deactivating cyclic SYNC messages Prototype of the Function Block CAN_ENABLE_CYCLIC_SYNC BOOL SYNC_MODE CONFIRM BOOL TIME SYNC_TIME ERROR WORD BOOL ENABLE USINT NETNUMBER Definition of Operands SYNC_MODE TRUE Activate the generation of cyclic SYNC messages FALSE Deactivate the generation of cyclic SYNC messages SYNC_TIME Time between two consecutive SYNC messages or 0 for SYNC message after each PLC cycle ERROR Error code according to data type CIA405_CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value 0 according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN ENABLE CYCLIC SYNC is used for activating or deactivating the generation of cyclic SYNC messages via the PLC When activated the control generates a SYNC message between two consecutive PLC cycles if the last SYNC at least dates back to the time specified at input SYNC_TIME If the time since the last S
7. 6 6 1 6 1 1 6 1 2 6 1 3 6 2 6 2 1 6 2 2 6 2 3 6 2 4 6 2 5 6 2 6 6 2 7 6 2 8 6 2 9 6 2 10 6 2 11 6 2 12 6 2 13 6 2 14 Configuration of Heartbeat Lifeguarding of the CANopen Devices seseeeeeresrresrresrens 65 IEC61131 Function Blocks for CAN Layer 2 unussusnsnnnnnnannnnnansnnnnnnnannnnnannnnnnnnnnnnnnnannnnnnannn 69 Basic Information on CAN Layer 2 Function Block 69 Overview of CAN Layer 2 Funtion BIOCKS ss 69 Synchronisation Between CAN Layer 2 Function Block and PLC Program 70 CAN Layer 2 specific Constants sisi 70 Function Blocks Tor CAN Layer 2 ere nn eaaa Ea Aera aaa aaa anaE aeai aaa 71 Function Block CAN INIT E e Bienen Heise 71 Function Block CANL2 GHUTDOWN 72 Function Block CANL2 RE SE T aa aa r aa aaa ra n a a D E AAA EE a Ea a D Eaa ara EEA 73 Function Block CANL2 GET STATUS iii 74 Function Block CANL2_ DEFINE _CANID iii 74 Function Block CANL2_DEFINE_CANID_RANGE iii 75 Function Block CANL2 UNDEFINE_CANID ie 76 Function Block CANL2_UNDEFINE_CANID_RANGE sseeseesseessiessetrsrerrerrrerrrrrrererenns 77 Function Block CANL2_MESSAGE _READ8 ir 78 Function Block CANL2 MESSAGE READ BIN iii 79 Function Block CANL2_MESSAGE_WRITE8 esses eeeeee scenes seaeeesaeeneeeeees 80 Function Block CANL2_MESSAGE_WRITE_BIN nen 81 Function Block CAN 2 MESSAGE UPDATER tees eeeeee scenes teaeeeseaeeneneeees 82 Function Block CANL2_MESSAGE UPDATE DIN nen 83 MINOX GRR PE RE EE 85 SYSTEC electronic GmbH 2011 L 1008 07 5 CAN
8. Figure 17 SYSTEC CANopen Master Configurator 5 2 Definition of the Node List Definition of the nodes to be configured and monitored by the CANopen Master takes place via the node list in the object entry 1F81H NMT Slave Assignment see CiA DS302 V3 Configuration of this object should preferably be carried out in the NMT Slave view of the SYSTEC CANopen Master Configurator SYSTEC electronic GmbH 2011 L 1008 07 63 CAN CANopen Extension for IEC 61131 3 If object 1F81H has not been created in the Object Dictionary of the Master PLC i e object 1F81H is not contained in the DCF file of the Master PLC the control determines all the CANopen devices available in the network via a network scan which as standard covers the entire range for all node addresses from 1 to 127 Due to the application specific requirements it might be necessary to limit the scanning range to ensure that not all the available node numbers between 1 and 127 are included in the network scan A manufacturer specific object with the Index 3001H is created for setting interval limits This object contains two sub entries for marking the lower limit Subindex 1 and the upper limit Subindex 2 See Table 13 for a description of the design of object 3001H The network scan then only takes place within this interval incl lower and upper limit Node monitoring for nodes with a node number outside this interval is not possible Table 13 Object Dictionary entry for
9. These are used as start values for the network variables when creating the dynamic Object Dictionaries see section 3 1 The content of the network variables is exchanged between the individual nodes by sending PDOs Process Data Object Usually the transfer of PDOs occurs event controlled so that the communication partners are only informed of variable changes asynchronous transfer This procedure reduces the bus load to the necessary minimum However from a CANopen device s point of view this means that it does not know the real value of a variable without further measures from the start time to the first change Therefore it is necessary that the Master control prompts all the CANopen devices to send their PDOs once when starting the PLC program This way all CANopen nodes including the Master PLC know the real initial values of the input network variables Subsequently the notification of changes is sufficient The initial initialization of network variables has been realized differently on controls with and without master functionality PLC with CANopen Master The only possibility supported by all CANopen devices to prompt the nodes to mandatorily send their PDOs is to change the state from Pre Operational to Operational To achieve this the Master PLC at first sends the NMT command Enter Pre Operational State followed by Start Remote Node for all nodes node address 0 when starting its own PLC program This way all CANopen no
10. are written in the object addressed via pointer Sending of CAN massages data are passed on FB inputs from the object addressed via pointer 1 SYSTEC electronic GmbH 2011 L 1008 07 69 CAN CANopen Extension for IEC 61131 3 CANL2_MESSAGE_UPDATE8 Update of data of an RTR message data are 6 2 13 passed on FB inputs CANL2_MESSAGE_UPDATE_BIN Update of data of an RTR message data are 6 2 14 read from the object addressed via pointer 6 1 2 Synchronisation Between CAN Layer 2 Function Block and PLC Program The process synchronisation between CAN Interface and the PLC program occurs by means of signal ENABLE and CONFIRM of the function blocks The meaning of the signals ENABLE and CONFIRM as well as the process of synchronisation are identical to the synchronisation described for CANopen function blocks in section 4 1 3 for details refer to section 4 1 3 6 1 3 CAN Layer 2 specific Constants To mark error status the data type CANL2_ERROR is used Here the error status which can occur within the CAN Interface of an PLC are summarized These error codes are used by different function blocks as output parameter ERROR Table 19 shows the allocation of used numeric constants to the respective error codes Table 19 Constants for data type CANL2_ERROR Constant Errorcode 16 00 00 dez 6 02 02 dez 16 03 03 dez 16 04 04 dez 16 05 05 dez 16 06 06 dez 16 07___ 07 dez 16 08 08 dez 16 0
11. see section 6 2 13 Only CAN objects can be updated that have been desgined previously with the help of function block CANL2_DEFINE_CANID The data of the message to be updated are taken from the object addressed via PTR_TXDATA By means of input DATALENGTH the number of bytes that have to be updated can be limited If DATALENGTH is set to 0 the size of the object addressed via PTR_TXDATA is determined internally and the number of bytes to be updated is used When calling function block CANL2_MESSAGE_UPDATE_BIN only the data of the message in the send buffer of the CAN controller are updated To transfer the message on the CAN bus this has to be requested explicitely by another node via RTR Frame SYSTEC electronic GmbH 2011 L 1008 07 84 CAN CANopen Extension for IEC 61131 3 7 Index Assignment table 27 CAN_ENABLE_CYCLIC_SYNC 59 CAN_GET_CANOPEN_KERNEL_STATE 40 CAN_GET_LOCAL_NODE_ID 39 CAN_GET_STATE 52 CAN_NMT 53 CAN_PDO_READ8 42 CAN_PDO_WRITE8 43 CAN_RECV_BOOTUP 58 CAN_RECV_BOOTUP_DEV 57 CAN_RECV_EMCY 55 CAN_RECV_EMCY_DEV 54 CAN_REGISTER_COBID 41 CAN_SDO_READ BIN 49 CAN_SDO_READ_STR 47 CAN_SDO_READ8 44 CAN_SDO_WRITE_BIN 51 CAN_SDO_WRITE_STR 48 CAN_SDO_WRITE8 45 CAN_SEND_SYNC 60 CAN_WRITE_EMCY 56 CANL2_DEFINE_CANID 74 CANL2_DEFINE_CANID_RANGE 75 CANL2_GET_STATUS 74 CANL2_INIT 71 CANL2_MESSAGE_READ BIN 79 CANL2_MESSAGE_READ8 78 CANL2_MESSAGE_UPDATE_BIN 83 CANL2_MESSAGE_UPDATE8 82 CANL2_MESSAGE_WRITE_BIN 81 CANL2
12. 3 If the output CONFIRM is set to TRUE during the return of the function block the object addressed via PTR_RXDATA contains the data of the received message The output DATALENGTH specifies the number of valid data bytes Is the output CONFIRM set to FALSE however the receive buffer does not contain a message With the help of CONFIRM it can be distinguished whether a valid message with a length of 0 bytes or no message has been received If there is no message available it is indicated through the error code NO_MESSAGE at the output ERROR see Table 19 section 6 1 3 6 2 11 Function Block CANL2_MESSAGE_WRITE8 FB for sending a CAN message transfer of data on FB inputs Prototype of the function block CANL2_MESSAGE_WRITE8 UDINT CANID BOOL EXT_FRAME BOOL RTR_FRAME USINT CHANNEL BYTE DATAO BYTE DATA1 BYTE DATA2 BYTE DATA3 BYTE DATA4 BYTE DATA5 BYTE DATA6 BYTE DATA7 USINT DATALENGTH USINT NETNUMBER CONFIRM BOOL BOOL ENABLE ERROR USINT Definition of Operands CANID CAN Identifier of the CAN message to be sent EXT_FRAME TRUE the CAN Identifier marks an Extended Frame 29 Bit FALSE the CAN Identifier marks a Standard Frame 11 Bit RTR_FRAME TRUE CAN Object is passed as RTR Frame FALSE CAN Object is not passed as RTR Frame CHANNEL I
13. DCF files is that the used CANopen IO modules support the standard configuration specified by CiA CAN in Automation e V in the CiA Draft Standards 301 and 401 SYSTEC electronic GmbH 2011 L 1008 07 19 CAN CANopen Extension for IEC 61131 3 The following CANopen devices can for example be used with predefined DCF files SYSTEC CANopen IO C12 phyPS 409 Y SYSTEC CANopen IO X1 SYSTEC CANopen IO X2 SYSTEC CANopen IO X3 SYSTEC CANopen IO X4 SYSTEC CANopen Chip164 MM 215 Y SYSTEC CANopen ChipF40 MM 217 Y CANopen IO modules of third party manufactures which use a standard configuration according to the CiA Draft Standards 301 and 401 Storing predefined DCF files The predefined DCF files are stored under the name DxSALVE DCF in directory EDS DCF within the OpenPCS path e g C OpenPCS EDS DCFl The number which replaces the symbolic character x in the file name states the number of supported CANopen IO modules Table 3 Overview of predefined DCF files File Name Supported Save Addresses D1SLAVE DCF D2SLAVE DCF 40H 41H D3SLAVE DCF 40H 41H 42H D4SLAVE DCF 40H 41H 42H 43H D5SLAVE DCF 40H 41H 42H 43H 44H It is recommended to always integrate the DCF file as configuration file for the resource with which all required IO modules are currently covered However if a configuration file which supports more than the required number of IO modules is used it does not have a negative effec
14. Note If no value is explicitly assigned to this input input open or not used the function block uses mode SDO_TYPE_AUTO_BEST_CASE The network layer individually selects the best suitable SDO transfer mode based on the amount of data to be transferred String variable for receiving the read characters Limitation of the number of characters to be read If the number is 0 the buffer length of the transferred string is internally determined and used as the delimiter for the number of characters to be read Note the standard buffer size of a string in OpenPCS is 32 characters Length of the read character string Error code according to data type CIA405 CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 SDO Abort Code of the communication partner according to data type CIA405_SDO_ERROR see Table 12 section 4 1 5 Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value O according to IEC61131 Input for enabling or disabling the FB see section 4 1 3 Output for message completed through the FB see section 4 1 3 The function block CAN SDO READ STR is used for reading character strings from the Object Dictionary of a node by using the SDO transfer The SDO transfer always takes place in the SYSTEC electronic GmbH 2011 L 1008 07 47 CAN CANopen Extension for IEC 61131 3 background the procedure
15. according to data type CIA405 CANOPEN_KERNEL_ ERROR see Table 8 section 4 1 5 NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value O according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN_REGISTER_COBID is used to register a PDO or a CAN Layer 2 message for reception by the network layer or to delete such a registration When calling the block with input REGISTER set to TRUE the specified COBID CAN identifier for receiving messages in the network layer is registered When calling with REGISTER FALSE registry of the respective COBIDs is deleted again Calling the block with REGISTER FALSE and COBID 0 deletes all registries and all the messages stored in the buffer of the network layer Basically the network layer only supports access to PDOs and CAN Layer 2 messages by calling function block CAN_PDO_READ8 see section 4 3 2 for registered messages SYSTEC electronic GmbH 2011 L 1008 07 41 CAN CANopen Extension for IEC 61131 3 4 3 2 Function Block CAN PDO READ8 FB for reading PDOs and CAN Layer 2 messages from the receive buffer of the network layer Prototype of the Function Block CAN_PDO_READ8 UINT
16. and its various services SYSTEC electronic GmbH 2011 L 1008 07 7 CAN CANopen Extension for IEC 61131 3 With the aid of CANopen function blocks it is possible e To directly exchange data via SDO Service Data Object or PDO Process Data Object with other CANopen nodes e To request or influence the state of other CANopen nodes e To receive error messages of other CANopen nodes To enable the generation of SYNC messages Using CAN Layer 2 function blocks gt Section 6 CAN Layer 2 function blocks allow for a protocol independent exchange of data between PLC and diverse CAN devices Here the PLC program directly processes the CAN messages which are transferred to the CAN bus CAN Layer 2 function blocks allow for e aconfiguration of the CAN interface of the control with the parameters preset by the PLC program e Writing and processing CAN telegrams directly through the PLC program e Sending and receiving CAN messages in an Extended Frame Format 29 bit CAN Identifier according to CAN 2 0 B Note CAN Layer 2 function blocks cannot be used simultaneously with CANopen services on the same CAN Interface CAN Layer 2 function blocks can only be used if the CANopen functionality for the relevant CAN Interfaces has been disabled in advance SYSTEC electronic GmbH 2011 L 1008 07 8 Part 1 CANopen High Level Protocol SYSTEC electronic GmbH 2011 L 1008 07 9 CAN CANopen Extension for IEC 61131 3 2 Ba
17. described in section 4 1 3 has to be therefore used for synchronization between the function block and PLC program using the parameters ENABLE and CONFIRM If output CONFIRM has been set to TRUE when the function block returns the string transferred as element RXDATA contains the character string of the read object entry Output RXLENGTH states the number of read characters equals LEN RXDATA The network layer only supports a limited number of SDO transfers via the PLC program at a time Standard max 5 transfers if there is no deviating entry in the manual of the PLC After starting the SDO transfer by setting ENABLE to TRUE the respective SDO channel is locked and cannot be used by other blocks The lock state remains until the SDO function block has been recalled with input ENABLE set to FALSE see section 4 1 3 If calling through ENABLE FALSE is skipped the resource remains permanently locked and is no longer available for the PLC The local Object Dictionary of the PLC can be accessed by calling the function block with DEVICE 0 This way it is also possible to read values from your own OD 4 4 4 Function Block CAN_SDO_WRITE_STR FB for writing character strings into the Object Dictionary of a node via SDO transfer Prototype of the Function Block CAN_SDO_WRITE_STR USINT DEVICE CONFIRM BOOL WORD INDEX BYTE SUBINDEX ERROR WORD USINT SDOTYPE ERRORINFO DWOR
18. for configuration details of Heartbeat and Lifeguarding If the control receives bootup messages from other CANopen devices e g because these devices are fed via a voltage supply which is subsequently switched on after the network scan these nodes are configured the same way as described above Note When using DCF files for configuring nodes the user is responsible for activating node guarding Heartbeat or Lifeguarding accordingly Otherwise node monitoring and a state request by the PLC program are not possible for the respective node see below If errors occur during the configuration phase the PLC sets a respective error state and checks it when restarting the PLC program see below Possible causes for configuration errors are e Anode marked as Mandatory Slave in the object 1F81H is not available the absence of a node marked as Mandatory Slave is not an error or e Anerror occurred while configuring a node with the parameters specified in the DCF file SDO Abort due to access to a non available object write access to a read only object other logical configuration errors During PLC program start up the PLC at first checks whether any errors occurred during the previous configuration phase If the configuration was successful and nothing contrary is set in object 1F80H the Master PLC sends the NMT command Enter Pre Operational State followed by Start Remote Node for each node node address 0 This prompts the CANo
19. index entry to be written SUBINDEX Number of the subindex entry to be written DATAO DATA7 Data bytes of the entry to be written DATALENGTH Length of the entry to be written ERROR Error code according to data type CIA405 CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 ERRORINFO SDO Abort Code of the communication partner according to the data type CIA405 SDO ERROR see Table 12 section 4 1 5 NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value O according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN_SDO_WRITE8 is used for writing object entries of a node using the SDO transfer The SDO transfer always takes place in the background the procedure described in section 4 1 3 therefore has to be used for synchronization between the function block and PLC program using the parameters ENABLE and CONFIRM The individual bytes of the object entry to be written have to be transferred to the elements DATAO to DATA7 Input DATALENGTH states the number of valid data bytes from DATAO The network layer only supports a limited number of SDO transfers via the PLC program at a time Standard max 5 transfers if there is no deviating entry in the manual of the PLC After
20. interval limits of the network scan Index Sub Name Default Typ Attr Meaning index Value e 3001H O Number of entries 2 u8 ro 1 Network scan Upper 1 u8 rw First valid node number for network limit scan 2 Network scan Lower 127 u8 rw Last valid node number for network limit scan If object 3001H is not in the Object Dictionary the specified default values apply 5 3 Configuration of the COBID for Node State Messages Basis for the CANopen function block CAN_GET_STATE with which a PLC program can determine the current state of a network node is node monitoring via Heartbeat or Lifeguarding Since this node monitoring only takes place on the Master PLC the current states of the network nodes are unknown to all the other controls Therefore a Master PLC sends a broadcast message with the current node state to all controls without CANopen Master when recognizing a change of a node state This ensures that the new state is also known on these controls and can be requested there by calling the CANopen function block CAN_GET_STATE The default COBID can be configured via the Object Dictionary to prevent conflicts during integration of third party CANopen devices see Table 14 When changing the default COBID please note that this has to be carried out for all nodes concerned Table 14 Object Dictionary entry for COBID of the node state messages Index Sub Name Defaul
21. module follow its input values The demo program for the PDO function blocks reads the PDO generated by the IO module as a reaction to the changes at its inputs and returns the process data contained therein to the IO module via PDO In the demo program for the SDO functionality the PLC cyclically reads the current value of the inputs from the respective entry in the Object Dictionary of the node und subsequently writes it back onto the OD entry for the outputs via SDO The following consitheations are based on the demo program for SDO function blocks SDODEMO POE The internal process control is based on the variable ProcStep which states the SYSTEC electronic GmbH 2011 L 1008 07 60 CAN CANopen Extension for IEC 61131 3 respective current process step and is used for program linking Its value is incremented after each successful completion of a process step SDO processing RunCycle LD ProcStep EQ 1 UMPC StartSDORead LD ProcStep EQ 2 JMPC RunSDORead As described in section 4 1 3 synchronization between CANopen function blocks and PLC program a rising edge is required at input ENABLE to start an SDO transfer To achieve this instance FB_SDO Read8 is at first called with ENABLE FALSE During the subsequent second call ENABLE TRUE is set and the required CANopen communication parameters are additionally transferred DEVICE INDEX SUBINDEX Init SDO read Start SDORead CAL FB_SDO_Read
22. network variables used in the PLC program are linked to the inputs and outputs of CANopen IO units in order to assign decentral IOs to a PLC Usually a CANopen configurator is required for this task In contrast to standard IO modules there is no EDS file which specifies which inputs and outputs SYSTEC electronic GmbH 2011 L 1008 07 16 CAN CANopen Extension for IEC 61131 3 are available for a PLC The end user specifies the number and types of accessible inputs and outputs via a precise PLC program by declaring the respective network variables Therefore there is only one general EDS file for a PLC which simply states that the control supports dynamic objects 3 2 Configuration Process 3 2 1 Network Configuration The EDS file is very important for the configuration process of IO modules The EDS file is read by the CANopen configurator to ensure that the user can access the resources provided by the CANopen IO module In the configuration the user specifies amongst other things which inputs or outputs are to be used in which bit or byte of a CAN message a respective value is transferred to the bus mapping and which identifier is to be used for this As a result of this configuration process the CANopen configurator generates a DCF file for the respective node see Figure 2 A manual configuration of CANopen modules is only necessary if the user wishes to or has to change the standard parameters identifier mapping specified
23. node to be written 1 127 or 0 for local OD Number of the index entry to be written Number of the subindex entry to be written Type of the SDO transfer mode to be used according to the data type CAN_SDO TYPE see Table 11 section 4 1 5 Note If no value is explicitely assigned to this input input open or not used the function block uses mode SDO_TYPE_AUTO_BEST_CASE The network layer individually selects the best suitable SDO transfer mode based on the amount of data to be transferred Address of an object with binary data to be written Number of bytes to write if 0 the length of the object addressed by PTR_TXDATA is determined internally and used as the number of bytes to be written Error code according to data type CIA405 CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 SDO Abort Code of the communication partner according to data type CIA405_SDO_ERROR see Table 12 section 4 1 5 Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value 0 according to IEC61131 Input for enabling or disabling the FB see section 4 1 3 Output for message completed through the FB see section 4 1 3 The function block CAN_SDO_WRITE_STR is used for writing binary data into the Object Dictionary of a node by using the SDO transfer The SDO transfer always takes place in the background the procedure described in
24. of the user application to be sent according to the CiA Draft Standard 301 Via element EMCY_ADD_INFO the user application can transfer further error information which is not a component of the emergency message to be sent but entered in Index 1003H of the Object Dictionary Error Field see CiA Draft Standard 301 This error information is only used for diagnosis purposes and can therefore also be zero Index 1003H of the Object Dictionary can be read via a configuration or diagnosis tool When calling function block CAN_WRITE_EMCY the message to be sent is stored in the send buffer of the CANopen kernel If no error occurs during this phase message could be successfully stored in the send buffer the block whose output CONFIRM has been set to TRUE returns However there is no feedback to the PLC program stating whether the message has been sent successfully or not 4 5 6 Function Block CAN_RECV_BOOTUP_DEV FB for reading bootup messages of a specific node from the receive buffer of the network layer Prototype of the Function Block CAN_RECV_BOOTUP_DEV USINT DEVICE CONFIRM BOOL BOOL ENABLE ERROR WORD USINT NETNUMBER Definition of Operands DEVICE Address of the node 1 127 for which the reception of bootup messages is to be checked ERROR Error code according to data type CIA405_CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 NETNUMBER Network nu
25. program several times until realization of the CANopen service has been completed The input ENABLE has to remain set to TRUE to enable continued execution of the CANopen service in the background calls 2 and 3 3 After successful completion of the CANopen service the function block sets its output CONFIRM to TRUE This signals to the PLC program that the service has been finished via CANopen and if necessary displays that further output variables are now occupied with valid values e g with the data read by a node step b call 4 4 The PLC program confirms to the function block that the CANopen service has been completed by setting the input ENABLE to FALSE Thus the PLC program also signals that it has if necessary accepted the output variables supplied by the function block step c call 5 During the last step the function block sets its output CONFIRM to FALSE again so that the system is now back in the initial state step d SYSTEC electronic GmbH 2011 L 1008 07 35 CAN CANopen Extension for IEC 61131 3 Output CONFIRM only changes from FALSE to TRUE if the respective CANopen service is completed successfully Any occurred errors are displayed at the output ERROR or ERRORINFO It is therefore necessary that a PLC program not only monitors the output CONFIRM but also the value of ERROR in order to evaluate occurred errors If the function block with input ENABLE set to FALSE is called this always results in
26. reading via the function block CAN PDO READB8 the respective message is deleted from the receive buffer of the network layer This prevents repeated reading of a message by the PLC program If the output CONFIRM has been set to TRUE when the function block returns the elements DATAO to DATA7 contain the individual bytes of the received message Output DATALENGTH states the number of valid data bytes from DATAO But if output CONFIRM has been set to FALSE the receive buffer in the network layer does not contain messages with the specified COBID With CONFIRM it is SYSTEC electronic GmbH 2011 L 1008 07 42 CAN CANopen Extension for IEC 61131 3 thus possible to distinguish whether a valid message with a 0 byte length or without a message has been received An unavailable message is also displayed via the error code NO_VALID_DATA_AVAILABLE at output ERROR see Table 8 section 4 1 5 4 3 3 Function Block CAN_PDO_WRITE8 FB for sending PDOs and CAN Layer 2 messages via the network layer Prototype of the Function Block CAN_PDO_WRITE8 UINT COBID CONFIRM BOOL BOOL ENABLE ERROR WORD ERRORINFO DWORD E DATAO KE DATA E DATA2 E DATA3 E DATA4 BYTE DATAS E N DATA6 DATA7 T DATALENGTH USINT NETNUMBER Definition of Operands COBID COBID CAN identifier of the message to be sent PDO or CAN Layer 2 DATAO DATA7 Data b
27. section 4 1 3 therefore has to be used for synchronization between the function block and PLC program using the parameters ENABLE and CONFIRM The address of an object with the binary data to be written in to the Object Dictionary has to be transferred to element PTR_TXDATA Input TXLENGTH specifies the number of valid bytes If this SYSTEC electronic GmbH 2011 L 1008 07 51 CAN CANopen Extension for IEC 61131 3 value is 0 the length of the object addressed via PTR_TXDATA is internally determined and used as the number of bytes to be written The network layer only supports a limited number of SDO transfers via the PLC program at a time Standard max 5 transfers if there is no deviating entry in the manual of the PLC After starting the SDO transfer by setting ENABLE to TRUE the respective SDO channel is locked and cannot be used by other blocks The lock state remains until the SDO function block has been recalled with input ENABLE set to FALSE see section 4 1 3 If calling with ENABLE FALSE is skipped the resource remains permanently locked and is no longer available for the PLC The local Object Dictionary of the PLC can be accessed by calling the function block with DEVICE 0 This way it is also possible to write values in your own OD 4 5 Function Blocks for Master Services The function blocks for Master services enable state requests monitoring and changing of the operational mode of any node and the generation o
28. the menu item Link to Active Resource in the context menu of the network see Figure 5 PowerMap E SS PLC 32 Link to Active Resource aT 10 Module Add Node Delete Network Rename Network Load File gt Printing gt Configuration Files E Resources Figure 5 Linking the imported network project to the active PLC resource See section 3 4 for the next required steps for using the network variables defined in the PLC program 3 3 2 Manual Integration of Individual DCF Files Manual integration of individual DCF files is an alternative to the integration of complete network projects described in section 3 3 1 Manual integration enables e g the application of predefined DCF files see section 3 2 3 as well as the import of DCF files from network projects where OpenPCS cannot recognize the format of the project file generated by the CANopen configurator To integrate DCF files into OpenPCS change to the Network view in the project browser see section Figure 6 Proceed as described below to manually integrate DCF files 1 Right mouse click on the PowerMap icon see Figure 6 SYSTEC electronic GmbH 2011 L 1008 07 23 CAN CANopen Extension for IEC 61131 3 2 Select Add Network in the context menu see Figure 6 Project x Load File B Files Resources u Network Figure 6 Creating a network in OpenPCS In the dialog Create a new file see Figure 7 select the categor
29. 131 CANopen Application Data Size Bit BOOL Boolean Logic 1 BYTE Unsigned8 8 USINT Unsigned8 Arithmetic without 8 VZ SINT Integer8 Arithmetikc with VZ 8 WORD Unsigned16 16 UINT Unsigned16 Arithmetic without 16 VZ INT Integer16 Arithmetic with VZ 16 DWORD Unsigned32_ Logik 32 UDINT Unsigned32 Arithmetic without 32 VZ DINT Integer32 Arithmetic without 32 VZ REAL Arithmetic 32 The data types labeled with in Table 5 are not available for all control types SYSTEC electronic GmbH 2011 L 1008 07 30 CAN CANopen Extension for IEC 61131 3 3 5 Summary of Required Steps The steps described below are required to integrate network variables in a PLC program A practical implementation is displayed in the example project in section 3 6 Create Network Netw ork view in Project Brow ser The step by step procedure for creating Integration of DCF Files _ a network and for integrating the DCF either via import of complete Netw ok Project fil isd ibed i s 3 3 or via import of individual DCF Files iles is described in section 3 Link Network to active PLC Resource Create Assignment Table Menu File gt New Import of Network Variables The step by step procedure for creating into Assignment Table network variables is described in View Netw ork in Project Brow ser section 3 4 Link Assignment Table to active PLC Resource Definition of Network Variables as VAR_EXTERNA
30. 16 08000022 DATA_NOT_TRANSF_DUE_DEVICE_STATE 16 08000023 OBJECT_DICTIONARY_NOT_EXIST The data types EMCY_ERR_CODE and EMCY_ERR_REGISTER are used for the respective parameters of function blocks CAN RECV_EMCY and CAN_RECV_EMCY_DEV They contain the emergency error information of the node which generates the respective emergency message The general emergency errors are defined in the CiA Draft Standard 301 but can be extended by the manufacturer of the respective CANopen module 4 2 Function Blocks for Accessing the Local CANopen Kernel The function blocks for accessing the local CANopen kernel of your own PLC enable the request of the node address as well as the state of the network layer These function blocks do not require communication with other nodes 4 2 1 Function Block CAN_GET_LOCAL_NODE_ID FB for requesting the local node address Prototype of the Function Block CAN_GET_LOCAL_NODE_ID BOOL tre SSC BOOL le USINT USINT PNR Definition of Operands DEVICE Local node address of the PLC NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value O according to IEC 61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN_GET_LOCAL_NODE_ID is used to request the lo
31. 61131 programming system To integrate a network project into OpenPCS change to Network view in the project browser see Figure 3 SYSTEC electronic GmbH 2011 L 1008 07 21 CAN CANopen Extension for IEC 61131 3 Proceed as described below to integrate a complete network project 1 Right mouse click on the PowerMap icon see Figure 3 2 Select Load File gt Import ProCANopen network in the context menu see Figure 3 Bee PowerMap Add Network Load File gt Reload DCF File EDS File Import DCF File Import ProC Nopen network Files E Resources Figure 3 Importing networks into OpenPCS Select the directory with the network project to be imported in the file dialog which appears and confirm it via OK Once the import of the network has been completed the respective CANopen nodes are displayed in the Network view of the project browser see Figure 4 E PowerMap GE CANO CANopen PLC 32 Tr 0 Module 64 Files B Resources W Network TA Lib Help Figure 4 Presentation of the imported network in the OpenPCS project browser SYSTEC electronic GmbH 2011 L 1008 07 22 CAN CANopen Extension for IEC 61131 3 4 The name of the imported network can be freely changed if necessary The menu item Rename Network in the context menu of the network node is responsible for this 5 To link the imported network project to the active PLC resource select
32. 8 ENABLE FALSE CAL FB_SDO_Read8 DEVICE RX_DEVICE INDEX RxIndex SUBINDEX RxSubIndex ENABLE TRUE LD ProcStep ADD 1 ST ProcStep RET After starting the SDO transfer the variable ProcStep used for the internal process control is incremented so that the process step for waiting for completion of the SDO transfer is called from the next PLC cycle onwards The PLC repeats this process step cyclically as long as the output value of FB_SDO_Read8 CONFIRM is set to FALSE and output FB_SDO_Read8 ERROR does not display errors equals zero Processing SDO read RunSDORead CAL FB_SDO_Read8 ENABLE TRUE LD FB_SDO_Read8 CONFIRM JMPC RunSDOReadEnd LD FB_SDO_Read8 ERROR EQ 0 RETC RunSDOReatheror LD ProcStep restart SDO transfer after error SUB 1 ST ProcStep RET If the function block returns to FB_SDO_Read8 ERROR with an output value unequal to zero the SDO transfer has been cancelled due to an error The error code of FB_SDO_Read8 ERROR then states the reason according to Table 8 section 4 1 5 As a result of this the value of the variable ProcStep is decremented again to ensure that the process step for starting the SDO transfer is executed again in the following PLC cycle SYSTEC electronic GmbH 2011 L 1008 07 61 CAN CANopen Extension for IEC 61131 3 If output FB_SDO_Read8 CONFIRM contains the value TRUE the SDO transfer has been successful In this case program ex
33. 9 09 dez 16 0A___ 10 dez 16 0B 11 dez The data type CANL2 BUS STATUS is used for marking the status in which a CAN Interface is arranged Table 20 shows the allocation of used numerical constants to the respective status values Table 20 Constants for Data Type CANL2_BUS_STATUS Constant 16 00 00 dez BUS_STATE_OK BUS STATE OK 16 01 01 dez BUS_STATE WARNING_LIMIT 16 02 02 dez BUS_STATE ERROR PASSIVE 16 03 03 dez BUS_STATE_BUS_OFF The data type CANL2_CDRV_STATUS is used for signalling error and status states within the CAN driver Thereby an own bit is assigned to each event within the status mask Several events can occur parallel at a particular time In this case multiple bits are set simultaneously within the status mask OR combination Table 21 shows the allocation of used numeric constants to the respective status values SYSTEC electronic GmbH 2011 L 1008 07 70 CAN CANopen Extension for IEC 61131 3 Table 21 Constants for Data Type CANL2_CDRV_STATUS Konstante 2 Statuswert CDRV_STATE_OVERRUN Hardware Overrun 16 0800 Bit11 16 2000 Bit 13 16 4000 Bit 14 16 8000 Bit 15 6 2 Function Blocks for CAN Layer 2 The function blocks for access to the local CAN open kernel of the own PLC allow for a query of the node address as well as the status of the network layer These function blocks do not require any communication with other nodes
34. A Address of an object containing the data to be sent with the CAN message DATALENGTH Number of bytes to be sent through the CAN message at 0 the size of the object addressed via PTR_TXDATA is determined and the number of bytes that have to be sent is used SYSTEC electronic GmbH 2011 L 1008 07 81 CAN CANopen Extension for IEC 61131 3 NETNUMBER Network number ERROR Errorcode according to data type CANL2 ERROR see Table 19 section 6 1 3 ENABLE Input for enabling or disabling the FB see section 6 1 2 CONFIRM Output for message completed through the FB see section 6 1 2 Description The function block CANL2 MESSAGE_WRITE_BIN serves for sending a CAN message The data of the message to be sent are expected in the object addressed via PTR_TXDATA alternatively FB CANL2_MESSAGE_WRITE8 see section 6 2 11 Only CAN messages can be sent for which appropriate CAN objects have been designed by means of function blocks CANL2_DEFINE_CANID or CANL2_DEFINE_CANID_RANGE respectively The data of the message to be sent are taken from the object addressed via PTR_TXDATA By means of the input DATALENGTH the number of bytes to be sent can be limited If DATALENGTH is set to 0 the size of the object addressed via PTR_TXDATA is determined internally and used as the number of bytes to be sent When calling function block CANL2_MESSAGE_WRITE_BIN the message to be sent is stored in the send buffer of the CAN interface If no error occurs her
35. COBID CONFIRM BOOL BOOL ENABLE ERROR WORD ERRORINFO DWORD DATAO BYTE DATA1 BYTE DATA2 BYTE DATA3 BYTE DATA4 BYTE DATA5 BYTE DATA6 BYTE DATA7 BYTE DATALENGTH USINT USINT NETNUMBER Definition of Operands COBID COBID CAN identifier of the message to be read PDO or CAN Layer 2 DATAO DATA7 Data bytes of the received CAN message DATALENGTH Length of the received CAN message ERROR Error code according to data type CIA405 CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 ERRORINFO Reserved for additional error information NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value O according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN_PDO_READS is used for reading PDOs and CAN Layer 2 messages from the receive buffer of the network layer It is only supported to access messages which have been registered via function block CAN_REGISTER_COBID see section 0 If several messages with the same COBID are received between to subsequent calls of CAN PDO READB the last received message overwrites the previous one This way the current message always remains in the receive buffer After
36. D BOOL ENABLE STRING T DATA TXDATA STRING INT TXLENGTH USINT NETNUMBER Definition of Operands DEVICE Address of the node to be written 1 127 or 0 for local OD INDEX Number of the index entry to be written SUBINDEX Number of the subindex entry to be written SDOTYPE Type of the SDO transfer mode to be used according to data type CAN_SDO_TYPE see Table 11 section 4 1 5 Note If no value is explicitely assigned to this input input open or not used the function block uses mode SDO_TYPE_AUTO_BEST_CASE The network layer individually selects the best suitable SDO transfer mode based on the amount of data to be transferred TXDATA String variable with the character string to be written TXLENGTH Number of characters to be written if the number is 0 the length of the character string contained in the string TXDATA is internally determined equals LEN TXDATA and used as the number of characters to be written ERROR Error code according to data type CIA405 CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 ERRORINFO SDO Abort Code of the communication partner according to data type CIA405 SDO ERROR see Table 12 section 4 1 5 SYSTEC electronic GmbH 2011 L 1008 07 48 CAN CANopen Extension for IEC 61131 3 NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric v
37. FB see section 6 1 2 CONFIRM Output for message completed through the FB see section 6 1 2 Description The function block CANL2 DEFINE_CANID serves for the definition of a CAN Object for data exchange The input EXT_FRAME indicates if the CAN Identifier which has been passed at the input CANID can be construed as an 11 Bit Identifier of a standard message CAN 2 0A or as 29 Bit Identifier of an extended message CAN 2 0B The input RX_FRAME defines whether the object is used for either sending or receiving of data Through the input RTR FRAME a CAN object can be marked as an RTR object Remote Transmission Request Remote Frames are only sent by a node if this node has been requested by another node The output CHANNEL delivers the channel number for the CAN Object which has been assigned by the CAN driver Especially for RTR Objects the channel number is of high meaning as principally each message has to be managed within an own channel of the CAN Controller 6 2 6 Function Block CANL2 DEFINE CANID RANGE FB for defining CAN Objects for data transfer Prototype of the function block CANL2_DEFINE_CANID_RANGE UDINT CANID_START UDINT CANID_END BOOL EXT_FRAME BOOL RX_FRAME USINT NETNUMBER CONFIRM BOOL BOOL ENABLE ERROR USINT SYSTEC electronic GmbH 2011 L 1008 07 75 CAN CANopen Extension for IEC 61131 3 Definiti
38. L in PLC Program Name and type as defined in Assignment Table 3 6 Example Project for Network Variables The example project TrafLghtl Traffic Light contained in the SYSTEC OpenPCS Extension software package displays the integration of network variables based on the application of predefined DCF files The file DISALVE DCF which is correspondingly entered for the project configuration of the resource is used SYSTEC electronic GmbH 2011 L 1008 07 31 CAN CANopen Extension for IEC 61131 3 The example project TrafLght realizes the function of a pedestrian traffic light The PLC controls the lights for vehicles red amber green and a CANopen IO module node address 40H switches the signals for pedestrians red and green The PLC and decentral IO module are both provided with a button to start the traffic light The traffic light cycle is started via a 0 1 intersection at one of these inputs For access to the inputs and outputs of the CANopen IO module the network variables declared in D1SLAVE DCF are assigned in the PLC program TRAFLGHT POE as follows VAR_EXTERNAL INO INS AUR BYTE declared in DISLAVE DCF OUTO _OUT7 40H e BYTE declared in DISLAVE DCF END_VAR The logical link of the buttons at the local input of the PLC and at the input of the IO module accessible via CANopen occurs via a command sequence WaitStartButton Link buttons of PLC and I O module LD StartButton but
39. LC without CANopen Master acts the same way as any other CANopen IO device During start up switching on the operating voltage reset the PLC sends a bootup message and thus logs into the network Subsequently the PLC remains in the Pre Operational state until it receives the NMT command Enter Operational State from the CANopen Master The PLC reacts the same as any other CANopen IO device by sending its initial PDOs Depending on the application it might be necessary for the PLC to link the execution of its own PLC program to the respective network state Pre Operational Operational The state of the own node SYSTEC electronic GmbH 2011 L 1008 07 14 CAN CANopen Extension for IEC 61131 3 can be determined via the CANopen function block CAN_GET_STATE see section 4 5 1 The following example illustrates the request and evaluation of the own node state VAR FB_CanGetState CAN_GET_STATE END_VAR CAL FB_CanGetState DEVICE 0 own node ENABLE TRUE LD FB_CanGetState STATE EQ 16 0005 Operational JMPCN PreOperationalMode OperationalMode Eu RET PreOperationalMode Fie A RET SYSTEC electronic GmbH 2011 L 1008 07 15 CAN CANopen Extension for IEC 61131 3 3 1EC61131 Network Variables for CANopen 3 1 Basic Information for Network Variables Numerous control units can exchange data via a CANopen network or can be extended by additional inputs and outputs via CANopen IO modules At
40. LENGTH USINT NETNUMBER CONFIRM BOOL BOOL ENABLE ERROR USINT Definition of Operands CANID CAN Identifier of the CAN message to be updated EXT_FRAME TRUE the CAN Identifier marks an Extended Frame 29 Bit FALSE the CAN Identifier marks a Standard Frame 11 Bit SYSTEC electronic GmbH 2011 L 1008 07 83 CAN CANopen Extension for IEC 61131 3 RTR_FRAME TRUE CAN Object is passes as RTR Frame FALSE CAN Object is not passed as RTR Frame CHANNEL Channel number which has been returned from function block CANL2_DEFINE_CANID during the definition of the CAN Objects Note CAN objects defined through CANL2_ DEFINE_CANID_RANGE cannot be used for RTR messages PTR_TXDATA Address of an object that contains the data of the CAN message to be updated DATALENGTH Number of bytes in the CAN message to be updated at 0 the size of the object addressed via PTR_TXDATA is determined internally and used as number of bytes to be updated NETNUMBER Network number ERROR Errorcode according to data type CANL2 ERROR see Table 19 section 6 1 3 ENABLE Input for enabling or disabling of the FB see section 6 1 2 CONFIRM Output for message completed through the FB see section 6 1 2 Description The function block CANL2_MESSAGE_UPDATE_BIN serves for updating data of an RTR message The data to be updated are expected in the object addressed via PTR_TXDATA alternatively FB CANL2_MESSAGE_UPDATE8
41. N NOT_AVAIL Other The CANopen device at the specified address supports neither Heartbeat nor Lifeguarding i e its state cannot be monitored On a PLC without CANopen Master this state is also reported if there is no PLC with CANopen Master available in the network which supports state forwarding according to section 2 2 or if this Master PLC is in stop state PLC program has stopped The CANopen device at the specified address no longer responds to Heartbeat or Lifeguarding requests and is thus no longer available for the system Except for the state values UNKNOWN and NOT_AVAIL the return values correspond with the respective definitions in the CiA Draft Standard 301 see Table 9 section 4 1 5 The local node state of your own PLC is returned when calling the function block with DEVICE 0 4 5 2 Function Block CAN_NMT FB for sending NMT messages Prototype of the Function Block USINT gt WORD BOOL USINT CAN_NMT DEVICE CONFIRM BOOL STATE ERROR WORD ENABLE NETNUMBER Definition of Operands DEVICE STATE ERROR NETNUMBER ENABLE CONFIRM Address of the node to be controlled 1 127 or 0 for all nodes Node state according to data type CIA405 TRANSITION STATE see Table 10 section 4 1 5 Error code according to data type CIA405 CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 Network number Note If the PLC only supports one CANopen interface setting
42. NT NETNUMBER Definition of Operands DEVICE Address of the node 1 127 which received a bootup message ERROR Error code according to data type CIA405_CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value O according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN_RECV_BOOTUP is used for reading bootup messages of any node from the receive buffer of the network layer If output CONFIRM has been set to TRUE when the function block returns output DEVICE states the node address which received a message However if output CONFIRM has been set to FALSE the receive buffer in the network layer does not contain bootup messages The function block always returns the bootup message of the respective node which has been entered first in the receive buffer oldest message the message is subsequently deleted from the receive buffer Each bootup message can thus only be read once by the PLC program The function blocks CAN_RECV_BOOTUP_DEV see section 4 5 6 and CAN_RECV_BOOTUP both access the same receive buffer This function block is only available on a control in mode PLC with CANopen Master see section
43. ONFIRM BOOL BOOL ENABLE ERROR USINT Definition of Operands NETNUMBER Network number ERROR Errorcode relates to data type CANL2_ERROR see Table 19 section 6 1 3 SYSTEC electronic GmbH 2011 L 1008 07 72 CAN CANopen Extension for IEC 61131 3 ENABLE Input for enabling or disabling the FB see section 6 1 2 CONFIRM Output for message completed through the FB see section 6 1 2 Description The function block CANL2 SHUTDOWN serves for the deactivation of the CAN Interface 6 2 3 Function Block CANL2_RESET FB to reset the the CAN Interface Prototype of the function block CANL2_RESET BOOL gt RESET_TX_BUFFER BOOL RESET_RX_BUFFER BOOL RESET_CONTROLLER USINT NETNUMBER CONFIRM BOOL BOOL ENABLE ERROR USINT Definition of Operands RESET TX BUFFER TRUE Reset send buffer reject all messages FALSE Do not change send buffer RESET _RX_BUFFER TRUE Reset receive buffer reject all messages FALSE Do not change receive buffer RESET CONTROLLER TRUE Reset CAN Controller and initialize again FALSE Do not change CAN Controller NETNUMBER Network number ERROR Errorcode relates to data type CANL2_ERROR see Table 19 section 6 1 3 ENABLE Input for enabling or disabling of the FB see section 6 1 2 CONFIRM Output for message completed through the FB see section 6 1 2 Description The function bloc
44. Operands DEVICE Address of the node to be read 1 127 or 0 for local OD INDEX Number of the index entry to be read SUBINDEX Number of the subindex entry to be read DATAO DATA7 Data bytes of the read entry DATALENGTH Length of the read entry ERROR Error code according to data type CIA405_CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 ERRORINFO SDO Abort Code of the communication partner according to data type CIA405_SDO_ERROR see Table 12 section 4 1 5 SYSTEC electronic GmbH 2011 L 1008 07 44 CAN CANopen Extension for IEC 61131 3 NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value O according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN SDO READB8 is used for reading object entries of a node by using the SDO transfer The SDO transfer always takes place in the background the procedure described in section 4 1 3 therefore has to be used for synchronization between the function block and PLC program using the parameters ENABLE and CONFIRM If the output CONFIRM has been set to TRUE when the function block returns the elements DATAO to DATA7 contain the individual bytes of the read object entry Output DATALENGTH states the number of valid data by
45. SYS TEC CAN CANopen Extension for IEC 61131 3 User Manual Version 7 0 Edition May 2011 Document No L 1008e_7 SYSTEC electronic GmbH August Bebel StraBe 29 D 07973 Greiz Telefon 49 3661 6279 0 Telefax 49 3661 6279 99 Web http www systec electronic com Mail info systec electronic com SYS TEC electronic GmbH System House for Distributed Automation Solutions CAN CANopen Extension for IEC 61131 3 Status Changes Status Released 2007 04 02 2 3 and5 Sections 2 3 and 5 have been revised R Sieber 6 0 completely 2011 05 25 4 4 5 4 4 6 New Sections R Sieber 7 0 4 4 5 CAN_SDO_READ_BIN 4 4 6 CAN_SDO_WRITE_BIN and 6 CAN Layer 2 FB SYSTEC electronic GmbH 2011 L 1008 07 2 CAN CANopen Extension for IEC 61131 3 Product names used in this manual which are also registered trademarks have not been marked additionally The missing mark does not imply that the trade name is unregistered Nor is it possible to determine the existence of any patents or protection of inventions on the basis of the names used The information in this manual has been carefully checked and is believed to be accurate However it is expressly stated that SYS TEC electronic GmbH does not assume warranty or legal responsibility or any liability for consequential damages which result from the use or contents of this user manual The information contained in this manual can be changed without prior notice Therefor
46. TNUMBER Definition of Operands DEVICE Address of the node 1 127 for which the reception of emergency messages is to be checked EMCY_ERR_CODE EMCY_ERR_REGISTER EMCY_ERR_FIELD1 EMCY_ERR_FIELD5 Emergency error information according to CiA Draft Standard 301 ERROR Error code according to data type CIA405 CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value O according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN_RECV_EMCY_DEV is used for reading emergency messages of a specific node from the receive buffer of the network layer If output CONFIRM has been set to TRUE when the function block returns the elements EMCY_ERR contain the emergency error information of the node SYSTEC electronic GmbH 2011 L 1008 07 54 CAN CANopen Extension for IEC 61131 3 according to the CiA Draft Standard 301 However if output CONFIRM has been set to FALSE the receive buffer of the network layer does not contain any emergency message for the respective node The function block always returns the emergency message of the respective node which has been entered first in the receive buffer oldest messa
47. WORD EMCY_ERR_CODE BYTE EMCY_ERR_REGISTER BYTE EMCY_ERR_FIELDI BYTE EMCY_ERR_FIELD2 BYTE EMCY_ERR_FIELD3 BYTE EMCY_ERR_FIELD4 BYTE EMCY_ERR_FIELD5 WORD EMCY_ADD_INFO USINT NETNUMBER Definition of Operands EMCY_ERR_CODE EMCY_ERR_REGISTER EMCY_ERR_FIELD1 EMCY_ERR_FIELD5 Emergency error information according to the CiA Draft Standard 301 for the emergency message to be sent EMCY_ADD_INFO Additional user specific emergency error information is entered in Index 1003H of the Object Dictionary Error Field see CiA Draft Standard 301 is not a component of the emergency message to be sent but is used for diagnosis purposes and can therefore also be zero ERROR Error code according to data type CIA405 CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 SYSTEC electronic GmbH 2011 L 1008 07 56 CAN CANopen Extension for IEC 61131 3 NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value O according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN_WRITE_EMCY is used to send application specific emergency messages via the network layer The elements EMCY_ERR contain the emergency error information
48. YNC is less than SYNC_TIME no SYNC message is generated The input value SYNC_TIME 0 prompts the control to finish each PLC cycle with a SYNC message In this case the exchange of the network process image takes place synchronous to the exchange of the process image for the local inputs and outputs of the PLC At the end of each PLC cycle the control always checks the time specification for sending a SYNC message The time specified at input SYNC_TIME is therefore the minimum time between two consecutive SYNC messages The real time interval between two SYNC messages can in the worst case scenario vary by the length of one PLC cycle T syne worst case SYNC_TIME Tic cycle This function block is only available on a control in mode PLC with CANopen Master see section 4 1 2 and can only be used as an alternative to function block CAN_SEND_SYNC see section 4 5 9 SYSTEC electronic GmbH 2011 L 1008 07 59 CAN CANopen Extension for IEC 61131 3 4 5 9 Function Block CAN_SEND_SYNC FB for sending an individual SYNC message Prototype of the Function Block CAN_SEND_SYNC BOOL ENABLE CONFIRM BOOL ERROR WORD USINT NETNUMBER Definition of Operands ERROR Error code according to data type CIA405_CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric vari
49. _MESSAGE_WRITE8 80 CANL2_RESET 73 CANL2_SHUTDOWN 72 CANL2_UNDEFINE_CANID 76 CANopen Configurator 19 CANopen Master 11 DCF file Integration into the PLC project 21 Predefined variables 20 DCF file for SYSTEC devices 20 DCF file predefined 19 EDS file for SYSTEC devices 18 Error codes CANopen 36 Errorcodes SYSTEC electronic GmbH 2011 CAN Layer 2 70 Function blocks Availability 34 Example project 60 Local kernel 39 Overview CAN Layer 2 69 CANopen 33 PDO and CAN Layer 2 40 SDO 44 Function Blocks CAN Layer 2 71 Master Services 52 Heartbeat Configuration 65 Lifeguarding Configuration 66 Master Configurator 63 Network Configuration 17 Network Scan 11 Network variables Assignment table 27 Declaration on the PLC program 27 Example project 31 General 16 Initial initialization 14 Summary 31 Node Configuration 11 Node list Definition 63 Node Monitoring 11 Node state messages COBID 64 PLC Types 10 PLC with Master 10 PLC without Master 10 State values CANopen 37 Statuswerte CAN Layer 2 70 74 Synchronization CANopen PLC 35 VAR_EXTERNAL 27 Waiting periods Definition 64 L 1008 07 85 CAN CANopen Extension for IEC 61131 3 Document CAN CANopen Extenstion for IEC 61131 Document number L 1008 07 May 2011 Do you have any suggestions for improving this manual Have you discovered any errors in this manual Page Sent by Customer number Name Company Address Please send the filled out fo
50. ables have already been set with the initial value O according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN SEND SYNC is used for generating individual SYNC messages with complete control of the PLC program Each time the block with output ENABLE set to TRUE is called a SYNC message is sent Due to these targeted measures it is possible to only generate SYNC messages when really relevant data have been changed e g in connection with the function blocks for PDOs and CAN Layer 2 messages CAN_PDO_READ8 or CAN PDO WRITES see section 4 3 This function block is only available on a control in mode PLC with CANopen Master see section 4 1 2 and can only be used as an alternative to function block CAN_ENABLE_CYCLIC_SYNC see section 4 5 8 4 6 Example Project for CANopen Function Blocks The example project CopDemo included in the OpenPCS standard installation shows the application of various CANopen function blocks It contains two programs with identical functionality whereby one program realizes data exchange via PDO function blocks PDODEMO POE and the other one via SDO function blocks SDODEMO POE Both demo programs of the example project CopDemo read process data from a CANopen IO module node address 40H and subsequently write it back onto the IO module Therefore the outputs of the IO
51. ar2 UINT END_VAR In addition to CANopen there can also be other sources for external variables e g EPL Ethernet Power Link or OPC Therefore the OpenPCS programming environment requires an assignment table in which the source of an external variable is specified This means that the following steps are required for the declaration of network variables in the PLC program 1 Creating a network and integrating the required DCF files in the PLC project as described in section 3 3 2 Calling the menu item File gt New in order to create a new assignment table with the aid of the dialog Create a new file In the dialog Create a new file see Figure 12 select the category Declarations as the File Type and the entry I O Mapping as the Template Enter a name for the assignment table which is to be created in the Name field Finally close the dialog via the OK button Create a new file X File Type Template E RS Resource Projects Other t PowerMap Network Direct Global 1 0 Mapping j variables mapped to OPC CANopen Name NetVarAssign Location D 10 penPCS Projects T rafLahts LE OK Cancel Figure 12 Creating a new assignment table SYSTEC electronic GmbH 2011 L 1008 07 27 CAN CANopen Extension for IEC 61131 3 3 After creating the assignment table the entries for the network variables have to be inserted into the assignment table from the netw
52. ariables have already been set with the initial value O according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN _SDO_WRITE_STR is used for writing character strings into the Object Dictionary of a node by using the SDO transfer The SDO transfer always takes place in the background the procedure described in section 4 1 3 therefore has to be used for synchronization between the function block and PLC program using the parameters ENABLE and CONFIRM The character string to be written in to the Object Dictionary has to be transferred to element TXDATA Input TXLENGTH specifies the number of valid characters If this value is 0 the length of the character string contained in string TXDATA is internally determined equals LEN TXDATA and used as the number of characters to be written In this case the string content occupied entirely is written The network layer only supports a limited number of SDO transfers via the PLC program at a time Standard max 5 transfers if there is no deviating entry in the manual of the PLC After starting the SDO transfer by setting ENABLE to TRUE the respective SDO channel is locked and cannot be used by other blocks The lock state remains until the SDO function block has been recalled with input ENABLE set to FALSE see section 4 1 3 If calling through ENABLE FALSE is
53. aster 11 Initial Initialization of the Network Variables 14 IEC61131 Network Variables for CANOpeD isnnennnnennns 16 Basic Information for Network Variables esseeeseeesenesrnesrnssrnssrnssrnssrnssinnsrnsssrnssrnssrnssrnnsnns 16 Configuration Process ieena iiaii iiidid nalen und 17 Network Configuration siennes 17 CANopen Gonfigurator une nn eel E iaaiiai ia 19 Predefined DGF Files un 2a nee Eege 19 Integrating DCF Files into the PLO Project 21 Integrating Complete Network Projects ccccceecececeeeeeeeeeeeeeeeeeeeeeaeeseaeeseeeeeseaeeesaeeseeeee 21 Manual Integration of Individual DCF Files seeeeeeeeneeeesrsssrnssrrssrrssrrssrnssrresrnesrnssrnesrn 23 Using Network Variables in the PLC Program 27 Summary of Required Steps iii 31 Example Project for Network Variables nen 31 IEC61131 Function Blocks for CANopen uuusnresnsnnnnnnnannnnnnnnnnnnnnnnannnnnnnnnnnnnnnnnnnnnnnnnnnnnnn 33 Basics of CANopen Function Blocks us 33 Overview of the CANopen Function Blocks sseessessseesseessnesnnsenntstnnstnnstnnntnnstnnnnnnnnnnnnnn nnna 33 Availability of the Function Blocks on Controls with and without CANopen Master 34 Synchronization between the CANopen Function Block and PLC Program ssssssssesssseeeean 35 Input Output Parameters of the CANopen Function Blocks ssssseesseeeseessseeseeeeneeresrreenee 36 CANopen Specific Constants sis 36 Function Blocks
54. ation The basis for the configuration of the CANopen Master is the DCF file of the Master PLC Integration of the DCF file into the PLC configuration is described in section 3 3 The configuration objects described below have to be parameterized accordingly in this DCF file It is recommended to use the SYSTEC CANopen Master Configurator which is opened in the OpenPCS programming environment via the menu item Extras gt Tools gt CANopen Master Configurator see Figure 17 The Master Configurator is described in detail in the manual L 1109 Software Manual CANopen Master Configurator di CANO_pmc CANopen Master Configurator Project View Help sun Select Master NMT master NMT slave Node Data Configuration SDO manager SYS TEC Master SYS TEC Node SYS TEC Generic Slave Settings SlaveAssignment 1F81h Bit 0 M Node is nMi sayes Bit 1 FE Reserved For compatibility Bit2 Restart on errors Bit 3 Bit Do not reset this node when it is already in operational mode BitS IT Application software version verification required Bit IT Automatic software update is allowed Bt7 I reserved Node Error Control Heartbeat Life Guarding Slave producer time 0 Retry faktor 0 1017h ms 1F81h Bit 8 15 Master consumer time 0 Guard time 1F81h 0 1016h ms Bit 16 31 Configure other Consumers Select all Reset Apply for selected slaves Ready NUM
55. by the manufacturer The standard parameters usually result from a defined algorithm from the settable node number Node ID of a device and are displayed in the respective manual In contrast to IO modules with static inputs and outputs a PLC uses dynamic objects i e the network variables defined in the respective PLC program But since the manufacturer of a device is unable to know the objects which are created dynamically with the operating time there are also no specifications on this in the EDS file Therefore a configurator is always required for linking dynamic objects The result of the configuration process is then stored in the DCF file The IEC61131 programming system uses the DCF file for the PLC generated by the configurator for resolving the network variables declared as VAR_EXTERNAL and generates the required control information for the network layer from this The DCF file of the control is thus the central link between CANopen and the IEC61131 PLC program See Figure 2 for an overview of the CANopen node configuration SYSTEC electronic GmbH 2011 L 1008 07 17 CAN CANopen Extension for IEC 61131 3 PLCxxx EDS Slave1 EDS Slave2 EDS CANopen CANopen VO Module 1 d Configuration Tool ro q CANopen 15 1 0 Modul 2 8 ne PLCxxx DOF Slava DCF Slave DCF Z ni CANopen ie ee er E gd f Le I 10 IEC 61131 OpenPCS 18 OpenPGS also provides pre configu
56. cal node address of the PLC The node address of a control influences the availability of the various function blocks PLC with and without CANopen Master see section 4 1 2 SYSTEC electronic GmbH 2011 L 1008 07 39 CAN CANopen Extension for IEC 61131 3 4 2 2 Function Block CAN_GET_CANOPEN_KERNEL_STATE FB for state request of the CANopen kernel of your own PLC Prototype of the Function Block CAN GET _CANOPEN KERNEL_ STATE BOOL ENABLE a BOOL STATE WORD USINT NETNUMBER Definition of Operands STATE State or error code according to the data type CIA405_CANOPEN_KERNEL_ERROR see Table 8 in section 4 1 5 NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value O according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN_GET_CANOPEN_KERNEL_STATE is used to request the state of the CANopen kernel of your own PLC 4 3 Function Blocks for PDOs and CAN Layer 2 From the PLC s point of view PDOs and CAN Layer 2 messages are generated by a transmitter at any time Their reception does not depend on the execution of the PLC program but occurs asynchronously Therefore the reception of these messages cannot be controlled or i
57. cancellation of a CANopen service active in the background and causes the internal reset of the function block At the same time the output CONFIRM is set to FALSE and the outputs ERROR and ERRORINFO are set to the value NO_ERROR 4 1 4 Input Output Parameters of the CANopen Function Blocks The realization of the CANopen function blocks ensures they fulfill the functionality defined by the CiA Draft Standard 405 However the used input and output parameters sometimes differ from the specification of the standard e Arrays or structures are not used as input or output parameters of a function block instead the member elements contained in the array or structure are addressed as direct variables flat input output structure This reduces the internal overhead during parameter passing e Instead of a specific type definition e g CIA405 DEVICE the respective underlying elementary type e g USINT is used for the input and output parameter of the function block e Instead of enumerated types e g CIA405 STATE numerical constants are used These are listed in the section 4 1 5 The precise input output parameters of the CANopen function blocks that are used are described in detail in the respective function block section 4 1 5 CANopen Specific Constants To identify internal error states of the network layer the CiA Draft Standard 405 defines the specific data type CIA405_CANOPEN_KERNEL_ERROR This summarizes the error states wh
58. ctionality can only be executed by one node network wide If the network only contains one PLC it has to be operated in master mode e g node address 20H This ensures that the PLC program can monitor the state of other nodes via the CANopen function block CAN_GET_STATE see section 2 2 for basics as well as section 4 5 1 for the description of the function block Moreover only a PLC in master mode can generate SYNC objects see section 4 5 8 In networks with several controls just one PLC has to be active in the master mode SYSTEC electronic GmbH 2011 L 1008 07 10 CAN CANopen Extension for IEC 61131 3 2 2 Node Configuration via PLC with CANopen Master A PLC with CANopen Master can configure other devices in the network The DCF files of the IO modules which were also transferred to the control while downloading the PLC program are required for this A PLC with CANopen Master also automatically monitors each CANopen module in the network via Heartbeat or Lifeguarding This is also the basis for the state request using function block CAN_GET_STATE see section 4 5 1 Monitoring of the node is primarily determined by the respective entries in the DCF file of the corresponding node The alternative default configuration of Heartbeat or Lifeguarding which is used when there is no DCF file available for the respective node is described in section 5 5 Internally monitoring of the node occurs via the master PLC according to the followi
59. des which were active at this time in the network are prompted to send their PDOs once Thus after starting a PLC program on the Master PLC all the active nodes of the network are in the Operational state Note The waiting period between the NMT command Enter Pre Operational State and Start Remote Node can be configured via Index 3003H Subindex 1 in the Object Dictionary of the Master PLC see section 5 4 The PLC independently delays the first sending of its own output network variable until the first PLC cycle has finished The PLC program can therefore pre assign the output network variables within the first PLC cycle with specific values which may differ from the initial values set in the DCF file also see section 7 At the same time it can prevent the PLC from sending initial PDOs with invalid data initial PDOs with zero bytes The Master PLC sends the NMT command Enter Operational State with the specific node address of the respective device to CANopen IO devices which login at the network once the PLC program of the Master PLC has been started The device is thus also prompted to transfer its PDOs with initial values At the same time the Master PLC also sends all its PDOs once irrespective of whether the values therein have changed or not This also ensures the correct initial initialization of network variables for devices which are connected with a delay PLC without CANopen Master From the network s point of view a P
60. e SYS TEC electronic GmbH shall not accept any obligation Furthermore it is expressly stated that SYS TEC electronic GmbH does not assume warranty or legal responsibility or any liability for consequential damages which result from incorrect use of the hardware or software The layout or design of the hardware can also be changed without prior notice Therefore SYS TEC electronic GmbH shall not accept any obligation Copyright 2011 SYS TEC electronic GmbH 07973 Greiz Germany All rights reserved No part of this manual may be reproduced processed copied or distributed in any way without prior written permission of SYS TEC electronic GmbH Inform yourselves Contact Direct Your local distributor Address SYS TEC electronic GmbH August Bebel Str 29 D 07973 Greiz GERMANY Ordering 49 0 36 61 62 79 0 GC a a a of our Information info systec electronic com ISLDHLOSUNDER http www systec 49 0 36 61 62 79 0 electronic com distributors support systec electronic com ee un Fax 49 0 36 61 6 79 99 Technical Support Web Site http www systec electronic com 7 Edition Mai 2011 SYSTEC electronic GmbH 2011 L 1008 07 3 CAN CANopen Extension for IEC 61131 3 Table of Contents Introd uecHtopn nE EET E EE E E A EES 7 Basics of CANopen Integration of a PLC ms sisnnennennenns 10 Differences between a PLC with and without CANopen Master 10 Node Configuration via PLC with CANopen M
61. e message could be stored properly in the send buffer the module returns with the output CONFIRM which is set to TRUE However there is no feedback signal to the PLC program whether the message could be sent successfully 6 2 13 Function Block CANL2_MESSAGE_UPDATE8 FB to update data of a RTR Message transfer of data on FB inputs Prototype of the function block CANL2_MESSAGE_UPDATE8 UDINT CANID BOOL EXT_FRAME BOOL gt RTR_FRAME USINT CHANNEL BYTE DATAO BYTE DATA1 BYTE DATA2 BYTE DATA3 BYTE DATA4 BYTE DATAS BYTE DATA6 BYTE DATA7 USINT DATALENGTH USINT NETNUMBER CONFIRM BOOL BOOL ENABLE ERROR USINT Definition of Operands CANID CAN Identifier of the CAN Message to be updated EXT_FRAME TRUE the CAN Identifier marks an Extended Frame 29 Bit FALSE the CAN Identifier marks a Standard Frame 11 Bit SYSTEC electronic GmbH 2011 L 1008 07 82 CAN CANopen Extension for IEC 61131 3 RTR_FRAME TRUE CAN Object is passed as RTR Frame FALSE CAN Object is not passed as RTR Frame CHANNEL Channel number that has been returned during the definition of the CAN Object from function block CANL2_DEFINE_CANID Note CAN objects defined with CANL2_DEFINE_CANID_RANGE cannot be used for RTR Messages DATAO DATA7 Data bytes of the CAN message to be updated DATALENGTH Length o
62. ecution is continued at label RunSDOReadEnd see below As described in section 4 1 3 synchronization between CANopen function block and PLC program the PLC program has to inform the network layer about completion of the SDO transfer To achieve this instance FB_SDO_Read is recalled with ENABLE FALSE This also causes the network layer to reactivate the SDO channel so that it can be used by other function blocks again The read data is subsequently transferred locally and the variable ProcStep is re incremented The SDO transfer is now completely finished from the next PLC cycle the control continues its program execution with the following process step RunSDOReadEnd CAL FB_SDO_Read8 ENABLE FALSE copy received data LD FB_SDO_Read8 DATALENGTH ST DataLength LD FB_SDO_Read8 DATAO ST Data 0 LD ProcStep ADD 1 ST ProcStep RET Without the last call ENABLE FALSE the SDO channel remains in the lock state and can only be used by the locking instance in this case FB_SDO_Read8 For the demo program SDODEMO POE this would mean that the subsequent call of instance FB_SDO_Write8 for returning the data not described here aborts with the error message TRANSFER_BUSY at output ERROR Sending of the data would no longer be possible SYSTEC electronic GmbH 2011 L 1008 07 62 CAN CANopen Extension for IEC 61131 3 5 Configuration of a PLC with CANopen Master 5 1 Basic Information for the Master Configur
63. er of the received CAN Message EXT_FRAME TRUE the CAN Identifier marks an Extended Frame 29 Bit FALSE the CAN Identifier marks a Standard Frame 11 Bit RTR_FRAME TRUE CAN Object has been passed as RTR Frame FALSE CAN Object has not been passed as RTR Frame NETNUMBER Network number ERROR Errorcode according to data type CANL2_ ERROR see Table 19 section 6 1 3 ENABLE Input for enabling or disabling the FB see section 6 1 2 CONFIRM Output for message completed through the FB see section 6 1 2 Description The function block CANL2_MESSAGE_READ_BIN serves for reading a received CAN message from the receive buffer of the CAN interface The data of the received message are stored within the object addressed via PTR_RXDATA alternatively FB CANL2_MESSAGE_READ8 see section 6 2 9 Only CAN messages can be received for which appropriate CAN objects have been specified by means of the function blocks CANL2_DEFINE_CANID or CANL2_DEFINE_CANID_RANGE respectively By means of input MAX_LENGTH the number of stored bytes can be limited If MAX_LENGTH is set to 0 the size of the addressed object via PTR_RXDATA is determined internally and the number of bytes to be stored is used The number of stored bytes does not exceed the number of bytes the object is able to store Therewith an overwriting of memory areas of other objects or variables is prevented SYSTEC electronic GmbH 2011 L 1008 07 79 CAN CANopen Extension for IEC 61131
64. f SYNC messages CANopen services are used which are exclusively permitted for just one node in the network e g NMT services Therefore the functionality PLC with CANopen Master is connected to a specific node address so that only one control in the network can use this function see section 4 1 2 4 5 1 Function Block CAN GET STATE FB for requesting the node state of devices Prototype of the Function Block CAN _GET_STATE USINT DEVICE CONFIRM BOOL BOOL ENABLE STATE WORD USINT NETNUMBER Definition of Operands DEVICE Address of the node to be requested 1 127 or 0 for own node STATE Node state according to data type CIA405 STATE see Table 9 section 4 1 5 NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value O according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 SYSTEC electronic GmbH 2011 L 1008 07 52 CAN CANopen Extension for IEC 61131 3 Description The function block CAN_GET_STATE is used to request the node state of a device The state request is based on monitoring via Heartbeat or Lifeguarding See section 2 2 for detailed information The return values at output STATE have the following meaning UNKNOW
65. f the CAN message to be updated NETNUMBER Network number ERROR Errorcode relates to data type CANL2_ ERROR see Table 19 section 6 1 3 ENABLE Input for enabling or disabling the FB see section 6 1 2 CONFIRM Output for message completed through the FB see section 6 1 2 Description The function block CANL2_MESSAGE_UPDATES serves for updating data of a RTR message The transfer of data occurs byte by byte at the inputs of the function block alternatively FB CANL2_MESSAGE_UPDATE_BIN see section 6 2 14 Only CAN objects can be updated that have been designed previously by means of the function block CANL2_ DEFINE_CANID On the elements DATAO to DATA7 the single bytes have to be passed for the message to be updated The input DATALENGTH thereby specifies the number of valid data bytes from DATAO When calling function block CANL2 MESSAGE UPDATES only the data of messages in the send buffer of the CAN controller are updated To transfer the message on the CAN bus this has to be requested explicitely by another node through RTR Frame 6 2 14 Function Block CANL2_MESSAGE_UPDATE_BIN FB for the update of data of an RTR Message transfer of data within the object addressed through pointer Prototype of the function block CANL2_MESSAGE_UPDATE_BIN UDINT CANID BOOL EXT_FRAME BOOL RTR_FRAME USINT CHANNEL POINTER PTR_TXDATA USINT DATA
66. f the CAN object has been defined by means of function block CANL2_DEFINE_CANID then the channel number returned by this FB is to be passed for the CAN object Ifthe CAN object has been defined by means of function block CANL2_DEFINE_CANID_RANGE then 0 has to be passed Note an object defined through CANL2_DEFINE_CANID_RANGE cannot be used for RTR messages DATAO DATA7 Data bytes ofthe CAN message to be sent DATALENGTH Length of the CAN message to be sent NETNUMBER Network number ERROR Errorcode according to data type CANL2_ERROR see Table 19 section 6 1 3 ENABLE Input for enabling or disabling the FB see section 6 1 2 CONFIRM Output for message completed through the FB see section 6 1 2 SYSTEC electronic GmbH 2011 L 1008 07 80 CAN CANopen Extension for IEC 61131 3 Description The function block CANL2_MESSAGE_WRITES serves for sending a CAN Message The transfer of data occurs byte by byte at the inputs of the function block alternatively FB CANL2_MESSAGE_WRITE_BIN see section 6 2 12 Only CAN messages can be sent for which appropriate CAN objects have been designed by means of function blocks CANL2_DEFINE_CANID or CANL2_DEFINE_CANID_RANGE At the elements DATAO to DATAT the single bytes of the message to be sent are to pass The input DATALENGTH thereby specifies the number of valid data bytes from DATAO When calling function block CANL2_MESSAGE_WRITE8 the message to be sent is stored in the send buffer of
67. figuration process Configuration of Liteguarding Lifeguading values for nodes no configured in Object 1F81H Is Lifeguarding Slave Objects 100CH and 100DH configured in Node fe Configure Lifeguarding Is Lifeguarding Slave Objects 100CH and 100DH configured in Node Im Start Lifeguarding Configure Lifeguarding Slave in node with Configure Lifeguarding Master in PLC with values of Lifeguarding Master in PLC and Lifeguarding Slave in node with default z i Slave in node values Master in REG vaos tom ne store this values also Lifeguarding Time to Object 1F81H in 1000ms and PLC Lifeguarding Factor 3 C Life guarding configured gt Figure 19 Lifeguarding configuration process SYSTEC electronic GmbH 2011 L 1008 07 67 Part 2 CAN Layer 2 Low Level Protocol SYSTEC electronic GmbH 2011 L 1008 07 68 CAN CANopen Extension for IEC 61131 3 6 1EC61131 Function Blocks for CAN Layer 2 6 1 Basic Information on CAN Layer 2 Function Blocks Within the IEC61131 3 different manufacturer specific function blocks are available for a direct access to the CAN interface Herewith CAN telegrams can be written and processed directly through the PLC program Furthermore those function blocks support CAN messages in the Extended Frame Format 29 Bit CAN identifier according to CAN 2 0B The CAN Layer 2 functi
68. for Accessing the Local CANopen Kernel 39 Function Block CAN GET LOCAL NODE_ID ire 39 Function Block CAN GET CANOPEN KENE GIATE 40 Function Blocks for PDOs and CAN Layer 2 40 Function Block CAN_REGISTER_COBID ie 41 Function Block CAN PDO READ8 ins 42 Function Block CAN PDO WRIIES sosassnnnnnnnsensennnnnnnssnsinnnnnnnssnsrrnnnnnnssrnnrnrnnnansrnrrnnnnsnnsennt 43 Function Blocks for SDOS iii 44 Function Block CAN SDO READB ins 44 Function Block CAN SDO_ WRITES ii 45 Function Block CAN SDO READ GI 47 Function Block CAN SDO WRITE_STR ii 48 Function Block CAN SDO READ DIN 49 Function Block CAN_SDO_WRITE_BIN iii 51 Function Blocks for Master Services 52 Function Block CAN GET SIATE 52 Function Block CAN_NMT iii 53 Function Block CAN_RECV_EMCY_ D N iii 54 Function Block CAN RECH EMCN ire 55 Function Block CAN WRITE _EMCY ir 56 Function Block CAN_RECV_BOOTUP DEV ie 57 Function Block CAN DECN BOOTUD nenn 58 Function Block CAN_ENABLE_CYCLIC_SYNC iii 59 Function Block CAN SEND GN 60 Example Project for CANopen Function Dlocks 60 Configuration of a PLC with CANopen Master sise 63 Basic Information for the Master Configuration 63 Definition of the Node List anne th ann innen aan 63 Configuration of the COBID for Node State Messages ssseesseesseeeseeesrresrrssrresrresrnssrnssns 64 Definition of Waiting Periods is 64 SYSTEC electronic GmbH 2011 L 1008 07 4 CAN CANopen Extension for IEC 61131 3 5 5
69. ge the message is subsequently deleted from the receive buffer Each emergency message can thus only be read once by the PLC program The function blocks CAN_RECV_EMCY_DEV and CAN_RECV_EMCY see section 4 5 4 both access the same receive buffer This function block is only available on a control in mode PLC with CANopen Master see section 4 1 2 4 5 4 Function Block CAN_RECV_EMCY FB for reading emergency messages of any node from the receive buffer of the network layer Prototype of the Function Block CAN_RECV_EMCY BOOL ENABLE CONFIRM BOOL DEVICE USINT ERROR WORD EMCY_ERR_CODE WORD EMCY_ERR_REGISTER BYTE EMCY_ERR_FIELD1 BYTE EMCY_ERR_FIELD2 BYTE EMCY_ERR_FIELD3 BYTE EMCY_ERR_FIELD4 BYTE EMCY_ERR_FIELD5 BYTE USINT NETNUMBER Definition of Operands DEVICE Address of the node 1 127 which received an emergency message EMCY_ERR_CODE EMCY_ERR_REGISTER EMCY_ERR_FIELD1 EMCY_ERR_FIELD5 Emergency error information according to CiA Draft Standard 301 ERROR Error code according to data type CIA405 CANOPEN_KERNEL_ERROR see Table 8 section 4 1 5 NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value O according to IEC61131 ENABLE Input for enabling or disabling the FB see secti
70. ice with the node address 40H The Heartbeat Producer of the device is configured with a third of the value here 1000ms This means that the Master PLC stores the value 1000 in the object entry 1017H for the device See Figure 18 for details of the Heartbeat configuration process SYSTEC electronic GmbH 2011 L 1008 07 65 CAN CANopen Extension for IEC 61131 3 Configuration of Lifequarding Configuration of Lifeguarding occurs with the object entry 1F81H NMT Slave Assignmet see CiA DS302 V3 For each device to be monitored the entry has to be carried out in the subindex which corresponds to the node address of the device The entry has the following structure Data type UNSIGNED32 Table 17 Configuration of Lifeguarding Bis 31 16 sg en O Retry Factor UNSIGNED16 UNSIGNED8 UNSIGNED8 Example 05DCH 41H OH Subindex 41H In the example Lifeguarding is set with a time of 1500ms for the device with node address 41H The repetition factor for the device is set to 5 The Master PLC sets the following values in the device Guard Time Object entry 100CH 1500ms Lifetime Factor Object entry 100DH 5 The interval between two requests of the Master equals the Guard Time multiplied by a safety factor of 0 8 In this example a request is carried out approx every 1200ms See Figure 19 for details of the Lifeguarding configuration process Configuration with Default Values If neither Heartbeat nor Lifeguarding has bee
71. ich can occur within the local network layer of a PLC These error codes are used by various function blocks as the output parameter ERROR Table 8 lists the assignment of the used numeric constants to the corresponding error codes SYSTEC electronic GmbH 2011 L 1008 07 36 CAN CANopen Extension for IEC 61131 3 Table 8 Constants for data type CIA405_CANOPEN_KERNEL_ERROR Constant Error Code 16 0000 00 dec 6 0025 37 dec 16 0031 49 dec 16 0032 50 dec 16 0033 _ 51 dec 16 0034 52 dec 16 0040 64 dec 16 0041 op dec 16 0042 66 dec To identify the current state of the CANopen device the CiA Draft Standard 405 defines the specific data type CIA405 STATE Table 9 lists the assignment of the used numeric constants to the respective state values The state values UNKNOWN and NOT_AVAIL are an extension of the respective definitions of the CiA Draft Standard 301 all the other constant values correspond with this standard Table 9 Constants for data type CIA405_STATE Constant State Value To identify the state in which a CANopen device should change the CiA Draft Standard 405 defines the specific data type CIA405 TRANSITION STATE Table 10 lists the assignment of the used numeric constants to the respective state values The constant values correspond with the respective definitions of the CiA Draft Standard 301 SYSTEC electronic GmbH 2011 L 1008 07 37 CAN CANopen Extens
72. iffers slightly from the Draft Standard 405 For general information please refer to the section 4 1 4 detailed information is contained in the respective function block section 4 1 2 Availability of the Function Blocks on Controls with and without CANopen Master The CANopen function blocks for IEC61131 are based on various CANopen services some of which can be simultaneously active on several nodes e g PDO and SDO transfer while others can only be executed by a single node e g NMT services A PLC without CANopen Master only provides the non exclusive services while a PLC with CANopen Master also utilizes the exclusive services The differentiation of the two PLC variants generally occurs via the node address for SYSTEC controls see section 2 1 Table 7 displays the availability of the individual CANopen function blocks on controls with and without Master A PLC program can define the node address and thus indirectly the number of usable function blocks via function block CAN_GET_LOCAL_NODE_ID see section 4 2 1 Table 7 Availability of CANopen FBs on controls with and without Master Function Block PLC without CANopen PLC with CANopen Master Master AN DECH EMGN DEV fe KT CAN DECH EMCH boo K EEE EG EE GE ER EE booo K CAN_SEND_SYNC Legend X Functionality available x Functionality availability but limited please refer to the text Functionality not available SYSTEC electr
73. ing possible Configure node with parameters specified in DCF File yes Are there any errors occurred during configuration no Configure Heartbeat Fill Node List with all node adresses found during Network Scan For details of Heartbeat and Lifeguarding configuration see section 5 ls Heartbeat supported is by this node yes no by this node yes Configure Lifeguarding Set error state yes Are there still other node in Node List no yes Are there any errors occurred error state set Is Bit 3 set in Object 1F80H Do not send NMT Start Remote Node no Wait for start command of PLC Program The waiting period between this two NUT commands can be adjusted with Object 3003H in the local Object Dictionary of the Master PLC see section 5 Send NMT command Enter Pre Operational State Send NMT command Enter Operational State Master Running Figure 1 Node configuration procedure via CANopen Master SYSTEC electronic GmbH 2011 L 1008 07 nal Stay in state Pre Oper PLC Program can force state change to Operational by using FB CAN_NMT 13 CAN CANopen Extension for IEC 61131 3 2 3 Initial Initialization of the Network Variables The primary initial initialization of the network variables occurs with the initial values entry ParameterValue or DefaultValue set in the DCF file of the PLC
74. ion for IEC 61131 3 Table 10 Constants for data type CIA405 TRANSITION STATE State Value Constant State Value 16 0000 START_REMOTE_NODE 16 0001 STOP_REMOTE_NODE 16 0002 ENTER_PRE_OPERATIONAL 16 0003 RESET_NODE 16 0004 RESET_COMMUNICATION The CiA Draft Standard 405 furthermore defines the specific data types CIA405 SDO ERROR as well as EMCY_ERR_CODE and EMCY_ERR_REGISTER These data types represent the error message generated by another node The SYSTEC specific data type CAN_SDO_TYPE is used with some SDO function blocks to select the SDO transfer mode Table 11 lists the assignment of the used numeric constants to the respective SDO types Table 11 Constants for data type CAN_SDO_TYPE Constant Jeng Type SDO_TYPE_AUTO_BEST_CASE SDO TYPE_SEGMENTED_ TRANSFER SDO_TYPE_BLOCK_TRANSFER The data type CIA405 SDO ERROR is used for the parameter ERRORINFO of the SDO function blocks and provides the SDO Abort Code of the communication partner The general Abort Codes are defined in the CiA Draft Standard 301 but can be extended by the manufacturer of the respective CANopen module Table 12 lists the assignment of the used numeric constants to the typical SDO Abort Codes Table 12 Constants for data type CIA405_SDO_ERROR Constant Jeng AbortCode Cd SYSTEC electronic GmbH 2011 L 1008 07 38 CAN CANopen Extension for IEC 61131 3 16 08000021 DATA_NOT_TRANSF_DUE_LOCAL_CONTROL
75. is a unit which provides the network with certain resources such as inputs and outputs This type of module is a slave unit for the network management NMT Mapping The assignment variables as well as inputs and outputs to bytes or bit positions within a CAN message is called mapping CANopen configurator The CANopen configurator is a special software tool which enables the planning and management of CANopen networks the logical connection of inputs and outputs of different units as well as the setting of network parameters Moreover the CANopen configurator is used to link network variables in PLC programs to the inputs and outputs of the respective CANopen IO module A CANopen configurator is always an external software tool which is not contained in the scope of delivery of the IEC61131 programming system OpenPCS We recommend among others the program ProCANopen from Vector Informatik EDS file The EDS file Electronic Data Sheet is supplied by the device s manufacturer and describes the various properties of the unit e g usable lOs factory default settings for mapping and network communication as well as the parameters which can be modified by the user DCF file The DCF file Device Configuration File is generated by the CANopen configurator as the result of the configuration process The configurator uses the EDS file as a template and amplifies it with the parameters set by the user e g identifier and mapping The
76. k CANL2 RESET serves for reset of the CAN Interface Through the inputs RESET_TX_BUFFER RESET_RX_BUFFER and RESET_CONTROLLER the PLC program is able to control which parts of the interface are to reset If the inputs RESET TX BUFFER RESET_RX_BUFFER are set to TRUE the respective bufferis reset and thereby all messages still in the buffer are rejected If the input RESET_CONTROLLER is set to TRUE this results in the reset of the CAN Controllers with a subsequent reinitialization SYSTEC electronic GmbH 2011 L 1008 07 73 CAN CANopen Extension for IEC 61131 3 6 2 4 Function Block CANL2 GET STATUS FB for status request of the CAN Interface Prototype of the function block CANL2_GET_STATUS BUS_STATUS USINT ERROR_FIELD WORD USINT NETNUMBER CONFIRM BOOL BOOL ENABLE ERROR USINT Definition of Operands BUS_STATUS Bus Status according to data type CANL2_BUS_STATUS see Table 20 section 6 1 3 ERROR_FIELD CAN Driver Status according to data type CANL2_CDRV_STATUS see Table 21 section 6 1 3 NETNUMBER Network number ERROR Errorcode according to data type CANL2_ERROR see Table 19 section 6 1 3 ENABLE Input for enabling or disabling the FB see section 6 1 2 CONFIRM Output for message completed through the FB see section 6 1 2 Description The function block CANL2_GET_STATUS serves for querying the status of the CAN Interface The out
77. le data type for IEC61131 and CANopen has to be selected as the type of network variables see Table 5 e The initial values specified in the DCF file of the PLC are used as the initial values of the network variables entry ParameterValue or DefaultValue Therefore the renewed specification of an explicit initial value for the declaration of the network variables in the PLC program is not permitted in order to prevent discrepancies with the specifications in the DCF file However within the first PLC cycle the PLC program can prior to the initial sending of specific values assign output network variables which can deviate from the initial values specified in the DCF file for the initial initialization of network variables also see section 2 3 SYSTEC electronic GmbH 2011 L 1008 07 29 CAN CANopen Extension for IEC 61131 3 In compliance with IEC61131 a data type has to be selected according to the application logic arithmetic for the declaration of network variables in the PLC program There is no clear assignment between IEC61131 and CANopen Table 5 contains the assignment of the data types used by IEC61131 and CANopen which can be applied as network variables Note that there is no clear assignment of the data types between IEC61131 and CANopen Therefore the IEC61131 type has to be selected for the PLC program according to the variable application Table 5 Assignment of data types between IEC61131 and CANopen IEC61
78. mber Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value 0 according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN_RECV_BOOTUP_DEV is used for reading bootup messages of a specific node from the receive buffer of the network layer If output CONFIRM has been set to TRUE when the function block returns the specified node received a bootup message However if output CONFIRM SYSTEC electronic GmbH 2011 L 1008 07 57 CAN CANopen Extension for IEC 61131 3 has been set to FALSE the receive buffer in the network layer does not contain a bootup message for the respective node After reading a bootup message it is deleted from the receive buffer and therefore only reported once to the PLC program The function blocks CAN RECV BOOTUP DEV and CAN_RECV_BOOTUP see section 4 5 7 both access the same receive buffer This function block is only available on a control in mode PLC with CANopen Master see section 4 1 2 4 5 7 Function Block CAN_RECV_BOOTUP FB for reading bootup messages of any node from the receive buffer of the network layer Prototype of the Function Block CAN_RECV_BOOTUP BOOL ENABLE CONFIRM BOOL DEVICE USINT ERROR WORD USI
79. n IO modules are also contained in the scope of delivery for these devices Several EDS files can be selected for the PLC SYSTEC electronic GmbH 2011 L 1008 07 18 CAN CANopen Extension for IEC 61131 3 Table 2 Overview of EDS files for SYSTEC devices Filenames Application PLCO2PDO EDS Unspecific General EDS file for a small number of nodes and network variables Enables max 2 send PDOs and 2 receive PDOs PLC64PDO EDS Unspecific General EDS file for a large number of nodes and network variables Enables max 64 send PDOs and 64 receive PDOs Device specific EDS file for CAN instance 0 usually primary CAN instance with dynamic Object Dictionary e g PmC14_CANO EDS PLCcoreCF54 CANO EDS Device specific EDS file for CAN instance 1 usually secondary CAN instance with static Object Dictionary e g PmC14_CAN1 EDS PLCcoreCF54_CAN1 EDS The EDS files differ amongst other things in the number of possible PDOs for data exchange between PLC and CANopen IO module However for controls with a dynamic Object Dictionary the number of PDOs created is determined by the precise configuration 3 2 2 CANopen Configurator Network parameters for the exchange of process data e g send mode synchronous asynchronous the used identifiers or mapping are specified according to the demands of the user via a CANopen configurator The configurator additionally enables the creation of links between PLC and CANopen IO modules required for ne
80. n configured for the CANopen device in the DCF file the Master PLC uses default values for node monitoring The configuration takes place as described below 1 Does the device support Heartbeat Access to the object entry 1017H of the device If the object entry is available the Heartbeat Producer of the device object 1017H is set to 1000ms and the Heartbeat Consumer of the Master PLC object 1016H is set to 3000ms 2 If the device supports Lifeguarding instead of Heartbeat a lifetime object 100CH of 1000ms and a lifetime factor object 100DH of 3 are set in the device These parameters are stored for the device in the Master PLC in the object entry 1F81H SYSTEC electronic GmbH 2011 L 1008 07 66 CAN CANopen Extension for IEC 61131 3 Configuration of Heartbeat yes Is Heartbeat Consumer Object no 1016H configured in PLC Is Heartbeat Producer Object 1017H configured in node nein Configure Heartbeat Producer in node with standard value 1000 ms as well as Heartbeat Consumer in PLC with standard value 3000 ms too yes Is Heartbeat Producer Object 1017H configured in node no Configure Heartbeat Producer in node with a third of the Heartbeat Consumer time of the PLC i Configure Heartbeat Consumer in PLC with the treble value of the Heartbeat Producer time of node C Heartbeat configured Figure 18 Heartbeat con
81. n of block CAN_GET_STATE on controls without Master each recognized node state change is forwarded to all the other controls through a Broadcast message Default COBID 50H configuration via Index 3002H see section 5 3 A state request on controls without Master is therefore no longer possible when deactivating the Master PLC e g disabling the PLC program The function block CAN_GET_STATE sends the state UNKNOWN This state is also returned when the respective node supports neither Heartbeat nor Lifeguarding In this case a state request for the respective node is not possible The Master PLC monitors each node in the network in order to enable the PLC program and thus the user to carry out a state request of the nodes However the Master PLC does not react in case of an error this is the user s responsibility SYSTEC electronic GmbH 2011 L 1008 07 12 CAN CANopen Extension for IEC 61131 3 Start Master Node List available in Object The address range for the Network Scan can be adjusted with Object 3001H in the local Object Dictionary of the Master PLC see section 5 available nodes Fill Node List with all node adresses specified in Object 1F81H Get next node address from Node List a ls node available reading Object 1000H successfully yes yes no Is an DCF File available for this node at PLC Node Guarding must be configured in DCF File otherwise there is no guard
82. nfluenced by calling a function block Processing of PDOs and CAN Layer 2 messages via a PLC program thus requires the buffering of the asynchronously received messages in the network layer until function block CAN _PDO_READ8 has been called see section 4 3 2 PLC program relevant messages should be filtered here due to the number of possible CAN messages To achieve this the CAN identifiers COBIDs of the relevant messages are at first registered via function block CAN_REGISTER_COBID see section 0 Reception and therefore access via the function block CAN_PDO_READS is only possible for registered messages The function blocks for PDOs and CAN Layer 2 messages manufacturer specifically extend the functional scope of available CANopen services defined by the CiA Draft Standard 405 SYSTEC electronic GmbH 2011 L 1008 07 40 CAN CANopen Extension for IEC 61131 3 4 3 1 Function Block CAN REGISTER COBID FB for registering or deleting the reception of PDOs and CAN Layer 2 messages via the network layer Prototype of the Function Block CAN_REGISTER_COBID UINT COBID CONF IRM BOOL BOOL REGISTER ERROR WORD BOOL ENABLE USINT NETNUMBER Definition of Operands COBID COBID CAN identifier of the new message to be entered into the registry or to be deleted from the registry 0 for deleting all messages REGISTER TRUE Enter COBID into registry FALSE Delete COBID from registry ERROR Error code
83. ng principle When switching on the operating voltage Reset and after completion of the program download the master PLC checks whether the object 1F81H has been created in its own object dictionary i e whether the object 1F81H is contained in the DCF file of the master PLC If this is the case the nodes specified therein are searched for via a node scan If object 1F81H does not exist the control determines all the available CANopen devices in the network via a network scan which covers the entire range for all node addresses from 1 to 127 as standard if necessary the node range can be limited via index 3001H in the object dictionary of the master PLC see section 5 2 Here it is attempted to read the index 1000H in the object dictionary of the node on each node address device type If the device responds it is checked whether a DCF file on the PLC is available for this node In this case the device s PLC carries out configuration with the parameters specified in the DCF file If no DCF file is available the PLC checks whether the respective device can be monitored via Heartbeat If the node does not support Heartbeat availability of Lifeguarding is tested alternatively Devices which support neither Heartbeat nor Lifeguarding cannot be monitored A state request by the PLC program is thus not possible for the respective nodes see below See Figure 1 for details of the node configuration procedure via CANopen Master And see section 5 5
84. of this input can be skipped since numeric variables have already been set with the initial value O according to IEC61131 Input for enabling or disabling the FB see section 4 1 3 Output for message completed through the FB see section 4 1 3 SYSTEC electronic GmbH 2011 L 1008 07 53 CAN CANopen Extension for IEC 61131 3 Description The function block CAN_NMT is used to control the state of a node DEVICE 1 127 or with DEVICE 0 all nodes in the network With the aid of this block a PLC program can also set the network to the Operational state manually if the CANopen Master has suppressed automatic network start This is e g the case if Bit 3 Do not send NMT Start Remote Node has been set in object 1F80H or if errors occurred during the configuration phase see section 2 2 Table 8 contains the possible states see section 4 1 5 This function block is only available on a control in mode PLC with CANopen Master see section 4 1 2 4 5 3 Function Block CAN_RECV_EMCY_DEV FB for reading emergency messages of a specific node from the receive buffer of the network layer Prototype of the Function Block CAN_RECV_EMCY_DEV USINT DEVICE CONFIRM BOOL BOOL ENABLE ERROR WORD EMCY_ERR_CODE WORD EMCY_ERR_REGISTER BYTE EMCY_ERR_FIELD1 BYTE EMCY_ERR_FIELD2 BYTE EMCY_ERR_FIELD3 BYTE EMCY_ERR_FIELD4 BYTE EMCY_ERR_FIELD5 BYTE USINT NE
85. ompatible Using CANopen network variables Section 3 Network variables are the simplest form of data exchange with other CANopen nodes Access to network variables in a PLC program means the same as accessing internal local variables in the PLC For the PLC programmer it is therefore unimportant whether e g an input variable is assigned to a local input of the control or whether it represents an input of a decentral extensionmodule The application of network variables only requires basic CANopen knowledge In general a CANopen configurator as well as the availability of EDS files for the individual CANopen devices are usually prerequisites for integrating network variables see section 3 1 With the aid of network variables it is possible e To extend PLC inputs and outputs by using CANopen devices e To exchange process data between various controls in order to realize decentral automation projects e To include in addition to SYSTEC modules any other specialized CANopen devices in the project planning in order to design controls for special tasks with the aid of modular standard modules Using CANopen function blocks Section 4 CANopen function blocks enable direct access to specific CANopen services and therefore provide high level application flexibility A CANopen configurator or EDS files are not required for their utilization However the utilization of CANopen function blocks requires detailed knowledge of CANopen
86. on 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN_RECV_EMCY is used for reading emergency messages of any node from the receive buffer of the network layer If output CONFIRM has been set to TRUE when the function SYSTEC electronic GmbH 2011 L 1008 07 55 CAN CANopen Extension for IEC 61131 3 block returns output DEVICE states the node address which received a message The elements EMCY_ERR contain the emergency error information of the node according to the CiA Draft Standard 301 However if output CONFIRM has been set to FALSE the receive buffer of the network layer does not contain any emergency message The function block always returns the emergency message of the respective node which has been entered first in the receive buffer oldest message the message is subsequently deleted from the receive buffer Each emergency message can thus only be read once by the PLC program The function blocks CAN_RECV_EMCY_DEV see section 4 5 3 and CAN _RECV_EMCY both access the same receive buffer This function block is only available on a control in mode PLC with CANopen Master see section 4 1 2 4 5 5 Function Block CAN_WRITE_EMCY FB for sending application specific emergency messages via the network layer Prototype of the Function Block CAN_WRITE_EMCY BOOL ENABLE CONFIRM BOOL ERROR WORD
87. on blocks allow the PLC a flexible data exchange with any devices which are not CANopen capable Note CAN Layer 2 function blocks cannot be used simultaneously with CANopen services on the same CAN Interface CAN Layer 2 function blocks can only be used if the CANopen functionality for the respective CAN Interface has been disabled in advance see section 6 2 1 6 1 1 Overview of CAN Layer 2 Funtion Blocks Table 18 shows an overview about the CAN Layer 2 function blocks for the IEC61131 3 All function blocks are realized as firmware blocks and hence part of the PLC firmware Depending on the CAN controller inside the PLC are not all functionalities available in all cases This especially concerns the filtering of CAN messages REGISTER_CANID UNREGISTER_CANID as well as the use of RTR Frames Availability or restrictions of particular functionalities are listed in the System Manual of the respective control Table 18 Overview of CAN Layer 2 funtion blocks for IEC 61131 3 Function Block Meaning DD _________ Section CANL2_INIT Initializing of the CAN Interface Requires 6 2 STE deactivation of the CANopen functionality for b this interface Status request of the CAN Interface CANL2_DEFINE_CANID Definition of a CAN Object for data transfer CANL2_DEFINE_CANID_ RANGE Definition of an range of CAN Objects for data exchange CANL2_UNDEFINE_CANID Rejection of a previously defined CAN object CAN objects are passed at FB outputs
88. on of Operands CANID_START first lowest CAN Identifier for the range of CAN objects to be defined CANID_END last largest CAN Identifier for the range of CAN objects to be defined EXT_FRAME TRUE the CAN Identifier Range marks Extended Frames 29 Bit FALSE the CAN Identifier Range marks Standard Frames 11 Bit RX_FRAME TRUE the CAN Objects are used for receiving FALSE the CAN Objects are used for sending NETNUMBER Network number ERROR Errorcode relates to data type CANL2_ ERROR see Table 19 section 6 1 3 ENABLE Input for enabling or disabling the FB see section 6 1 2 CONFIRM Output for message completed through the FB see section 6 1 2 Description The function block CANL2_DEFINE_CANID_RANGE serves for the definition of a range of CAN objects for data exchange The input EXT FRAME indicates whether the CAN Identifier range that has been defined through the inputs CANID_START and CANID_END can be construed as 11 Bit Identifier for standard messages CAN 2 0A or as 29 Bit Identifier for extended messages CAN 2 0B The input RX_FRAME defines whether the objects are used for either sending or receiving of data By means of function block CANL2 DEFINE CANID RANGE no RTR objects Remote Transmission Request can be designed Therefor function block CANL2_DEFINE_CANID has to be used and selected several times if needed 6 2 7 Function Block CANL2_UNDEFINE_CANID FB to reject a previously defined CAN Object Pro
89. onic GmbH 2011 L 1008 07 34 CAN CANopen Extension for IEC 61131 3 The function block CAN_GET_STATE can only be indirectly realized on a PLC without CANopen Master The support of a PLC with CANopen Master is required For detailed information please refer to sections 2 2 description of node monitoring and 4 5 1 description of function block CAN_GET_STATE 4 1 3 Synchronization between the CANopen Function Block and PLC Program The majority of CANopen function blocks for IEC113 3 are executed asynchronous to the actual PLC program The process synchronization between CANopen and PLC program occurs via the ENABLE and CONFIRM signals of the function blocks The interaction of both signals is illustrated by Figure 16 a c ENABLE CONFIRM 1 2 3 4 FB Call t t i j t Figure 16 Process synchronization between CANopen and PLC program The complete and successful execution of a CANopen service executed asynchronously to the PLC program occurs in the following steps 1 Once the PLC program has installed all the input variables with valid values it sets the input ENABLE to TRUE and calls the CANopen function block call 1 The function block recognizes a rising edge at input ENABLE and subsequently accepts all the input values and starts the respective CANopen service step a The function block then returns to the PLC program and the initiated CANopen device is executed in the background 2 The function block is called by the PLC
90. ork nodes of the PLC via double click in this example nodes PLC 32 See Figure 13 After being inserted it is possible to adapt the name Name column and type IEC Type column of the network variables in the assignment table for utilization in the PLC program also see the comments below infoteam OpenPCS 2006 D OpenPCS Projects T rafLght TrafLght VAR NetVarAssign PIV 0 x I File Edit View PLC Extras Window 2 sl x B ogieb A BIRRFS SS EEE gt oppaBE ei r Au DoR cea Project E x Connection Typ Name IEC Type Adress Bus Type RO Comment Sc PowerMap 1 CANopen Na vet Na A4C0subt Unsigneds ET SR CANO CANopen 2 CANopen VE WS A00 usint INB_INIS_40H A4COsub2 Unsigned 8 3 CANopen OUTO_OUT7_40H usint OUTO_OUT7_40H A040sub1 Unsigned 8 EI 54 PLC G2 R P Q write O OUTO_OUT7_40H 4040sub1 Read INO_IN7_40H 44COsub1 0 IN8_IN15_40H A4C0sub2 Tr 0 Module 64 B Files SW Resources A Network TS Lib alt Ss E Firmware Ei Library 4 NetVar ssig INTE Figure 13 Inserting network variables in the assignment table 4 To link the newly created assignment table to the active PLC resource change to the Files view in the project browser and then select the menu item Link to Active Resource in the context menu of the assignment table see Figure 14 Project TRAFLGHT Sou
91. ource components in the project browser seseesseeseeseesreeee 29 Figure 16 Process synchronization between CANopen and PLC program 35 Figure 17 SYSTEC CANopen Master Configurator cccccceeceeceeeeeeeeeeeeeeeeaaeeeeneeseeeesaaeeeeeeseneeess 63 Figure 18 Heartbeat configuration Drocess ssesssesssesssetssrtsrtstrrstrnstnnsttnsttnstnnstnnsnnnsrnnsnna snus nnnnn nnne 67 Figure 19 Lifeguarding configuration process 67 SYSTEC electronic GmbH 2011 L 1008 07 6 CAN CANopen Extension for IEC 61131 3 1 Introduction This manual describes in its 1 part the integration of CANopen services in PLC programs according to standard IEC61131 3 This enables the application of network variables and CANopen access through specific function blocks Prerequisite for this is a PLC with a CANopen interface The functionality defined in the CiA Draft Standard 405 by the CiA CAN in Automation e V provides the basis for offering CANopen services for PLC programs according to EC1131 3 SYSTEC enhances this functionality with additional manufacturer specific function blocks e g sending and receiving of PDOs or CAN Layer 2 messages generation of SYNC objects The second part of this manual describes the use of function blocks for processing protocol independent CAN messages CAN layer 2 messages in a PLC program By means of CAN layer 2 function blocks the PLC can also communicate with CAN devices which are not CANopen c
92. pen nodes to send their PDOs Process Data Object once Subsequently the PLC waits until the PDOs have been processed and the received values have been stored in the network image before starting the PLC program This procedure ensures the initial initialization of the network variables see section 2 3 Note The waiting periods can be configured via Index 3003H in the Object Dictionary of the Master PLC see section 5 4 SYSTEC electronic GmbH 2011 L 1008 07 11 CAN CANopen Extension for IEC 61131 3 If Bit 3 Do not send NMT Start Remote Node has been set in object 1F80H or if errors occurred during the configuration phase the PLC does not automatically switch the network into the operational state In the Pre operational state the PLC program can at first carry out further configurations via the SDO function blocks described in section 4 4 and finally set the network compulsory into the Operational state through the NMT function block described in section 4 5 2 When exiting the PLC program the Master PLC sends the NMT command Enter Pre Operational State to show each CANopen node that PDO processing has been deactivated With Heartbeat as well as with Lifeguarding the node sends its current state monitoring period at regular intervals to the PLC with CANopen Master This state is internally evaluated in the network layer and transferred to the PLC program when calling function block CAN_GET_STATE To also enable the applicatio
93. put BUS_STATUS provides information on the Bus Status of the control The output ERROR_FIELD informs about current status events within the CAN driver Thereby an own bit is assigned to each event within the status mask at the output ERROR_FIELD Several events can occur in parallel in one point in time in this case several bits are set simultaneously within the status mask or linking 6 2 5 Function Block CANL2_DEFINE_CANID FB for the definition of a CAN Object for data exchange Prototype of the function block CANL2_DEFINE_CANID UDINT CANTD CHANNEL USINT BOOL EXT_FRAME BOOL RX_FRAME BOOL RTR_FRAME USINT NETNUMBER CONFIRM BOOL BOOL ENABLE ERROR USINT SYSTEC electronic GmbH 2011 L 1008 07 74 CAN CANopen Extension for IEC 61131 3 Definition of Operands CANID CAN Identifier the CAN object has to be defined for EXT_FRAME TRUE the CAN Identifier marks an Extended Frame 29 Bit FALSE the CAN Identifier marks a Standard Frame 11 Bit RX_FRAME TRUE the CAN Object is used for receiving FALSE the CAN Object is used for sending RTR_FRAME TRUE CAN Object is used for RTR FALSE CAN Object is not used for RTR CHANNEL Returns the channel number for the CAN Object assigned by the CAN driver NETNUMBER Network number ERROR Error code according to data type CANL2_ ERROR see Table 19 section 6 1 3 ENABLE Input for enabling or disabling the
94. rce IL Trafl_EU poe ly Trafl_US poe Vv NetVar ssign PlY Link To Active Resource Export Print Print Preview Create Directory Exclude From Project Network LA Lib Help Figure 14 Linking the assignment table to the active PLC resource SYSTEC electronic GmbH 2011 L 1008 07 28 CAN CANopen Extension for IEC 61131 3 5 Inthe Files view in the project browser it is possible to check whether the components required for a PLC program with network variables are linked to the active PLC resource see Figure 15 PLC program here TrafL_US Network CANO for creation see section 3 3 Assignment table NetVarAssign H B Configuration F Resource TRAFL_US M Netvarassion I CANO E Fies TA Resources Figure 15 Presentation of the resource components in the project browser 6 Declaration of the required network variables in the PLC program within the VAR_EXTERNAL END_VAR section the name Name column and type IEC Type column have to correspond exactly to the definition of the network variables in the assignment table e g VAR_EXTERNAL NetVarl BYTE NetVar2 UINT END_VAR The following points have to be considered for the declaration of the network variables e The names of the network variables have to correspond exactly between the PLC program and the assignment table The variable name is the mutual reference point between IEC61131 and CANopen e A compatib
95. re 9 By CANO CANopen Figure 9 Presentation of the imported network nodes in the OpenPCS project browser 6 If necessary the name of the network and the imported nodes can be changed The menu item Rename Network or Rename Node in the context menu is used for this task see Figure 10 SYSTEC electronic GmbH 2011 L 1008 07 25 CAN CANopen Extension for IEC 61131 3 Zil CANO CANopen Figure 10 Presentation of the network after changing names 7 To link the network created from the manually imported DCF files to the active PLC resource select the menu item Link to Active Resource in the context menu of the network see Figure 11 r CANO CANo pa Add Node Delete Network Rename Network Load File Printing Configuration Figure 11 Linking the manually created network project to the active PLC resource See section 3 4 for the next required steps to use the network variables defined in the network project in the PLC program SYSTEC electronic GmbH 2011 L 1008 07 26 CAN CANopen Extension for IEC 61131 3 3 4 Using Network Variables in the PLC Program Network variables are declared in a PLC program within the key words VAR_EXTERNAL END_VAR This means they are marked as outside of the program and thus also as outside of the PLC The actual declaration of the network variables does not differ from the declaration of the local variables VAR_EXTERNAL NetVarl BYTE NetV
96. red DCF Files i S Program POE for systems without CANopen Configuration Tools 8 i i Ga executeable i PLC Program i with DCF Files 1 NW Ny Dow nload l l X PLC u Wf IEC 61131 Test amp Program d a Compiler Commissioning Figure 2 CANopen node configuration The DCF files generated as result of the network configuration are assigned to the control resource in the IEC61131 programming system The DCF file for the PLC is used for resolving the network variable declared as VAR_EXTERNAL as well as for configuring the object dictionaries of the PLC The DCF files of the remaining IO modules are also transferred to the control and stored there during PLC program download The CANopen Master contained in the PLC uses these DCF files to configure the IO modules accordingly in the field layer during system start However prerequisite for this is the activation of the master functionality of the PLC module e g through DIP switch or configuration file see the respective control manual for details Alternatively it is also possible to configure the CANopen IO modules via the PLC program It is possible to write the required parameters into the Object Dictionary of the IO modules via the SDO function blocks described in section 4 4 Storing the EDS files for SYSTEC devices The EDS files for various SYSTEC devices are stored in directory EDS DCF within the OpenPCS path e g C OpenPCS EDS DCF The EDS files for CANope
97. rm to SYS TEC electronic GmbH August Bebel Str 29 D 07973 Greiz Germany Fax 49 3661 6279 99 SYSTEC electronic GmbH 2011 L 1008 07 86
98. rogram in order to process the initial PDOs and to store the received values in the network image If object 3003H is not in the Object Dictionary the specified default values apply 5 5 Configuration of Heartbeat Lifeguarding of the CANopen Devices The CANopen Master uses Heartbeat or Lifeguarding to monitor the CANopen devices Monitoring of the node is primarily determined by the respective entries in the DCF file of the respective node If there is no DCF file available for the respective node selection of the monitoring method as well as configuration of the monitoring time occurs via the DCF file of the PLC which has to be operated in Master mode If neither Heartbeat nor Lifeguarding has been configured as monitoring methods in the DCF file the Master uses the optimum method i e Heartbeat If Heartbeat is not available for the device Lifeguarding is used Configuration of Heartbeat Configuration of Heartbeat occurs with object entry 1016H Heartbeat Consumer also see CiA DS301 V4 x A free subindex entry has to be carried out for each device to be monitored The subindex can be selected freely The entry has the following structure Data type UNSIGNED32 Table 16 Configuration of Heartbeat Bis 31 24 28 16 rr sn Reserved 00H Node ID Heartbeat Time Encoded as UNSIGNEDS UNSIGNED16 Example 00h 40H OBB8H Subindex 1 In the example the Heartbeat Consumer is set to 3000ms for the dev
99. rtetnnstnuntnnntnnnntnntnnnsnnnnnnnsnnnnnsnnnrnnnnnnt 66 Table 18 Overview of CAN Layer 2 funtion blocks for IEC 61131 3 69 Table 19 Constants for data type CANL2_ERROR ire 70 Table 20 Constants for Data Type CANL2_BUS STATUS 70 Table 21 Constants for Data Type CANL2_CDRV_ STATUS 71 List of Illustrations Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Node configuration procedure via CANopen Master sseeseesseesseeeseesietseersnrererrrerrnneren 13 GANGpeninode ei te e EE 18 Importing networks into OpenPCS iii 22 Presentation of the imported network in the OpenPCS project browser 22 Linking the imported network project to the active PLC resource sssssesssessressrssrrseseees 23 Creating a network in OpenPCS iii 24 Creating a network ENI y EE 24 Adding a new network node sise 25 Figure 9 Presentation of the imported network nodes in the OpenPCS project browser 25 Figure 10 Presentation of the network after changing names eesssssseseeisssisssrrssrrssrssrrssrissrresrn 26 Figure 11 Linking the manually created network project to the active PLC resource 26 Figure 12 Creating a new assignment table 27 Figure 13 Inserting network variables in the assignment table 28 Figure 14 Linking the assignment table to the active PLC resource 28 Figure 15 Presentation of the res
100. sics of CANopen Integration of a PLC 2 1 Differences between a PLC with and without CANopen Master The CANopen extension of a PLC and particularly the CANopen function blocks for IEC61131 are based on various CANopen services some of which can be active on several nodes simultaneously e g PDO and SDO transfer while others can only be exclusively executed by one node e g NMT Master services This separation is also underlined by the terms PLC with CANopen Master and PLC without CANopen Master On a PLC without CANopen Master only the non exclusive services are available while on a PLC with CANopen Master the exclusive services can be used additionally See Table 1 for an overview Depending on the available services a varying amount of CANopen function blocks exists for the PLC program See Table 7 in section 4 1 2 for a detailed list Table 1 Availability of services on the PLC with and without CANopen Master PDO X EE ee l Master mM En o EEA SYNC Producer b o o K Legend X Functionality available Functionality not available With SYSTEC controls the differentiation between PLC with CANopen Master and PLC without CANopen Master occurs model dependently either through a configuration user interface operating elements e g DIP switch or the node address Since each node within a CANopen network has to be assigned with a unique address it is also ensured while linking to the node address that the master fun
101. skipped the resource remains permanently locked and is no longer available for the PLC The local Object Dictionary of the PLC can be accessed by calling the function block with DEVICE 0 This way it is also possible to write values in your own OD 4 4 5 Function Block CAN SDO READ BIN FB for reading binary data from the Object Dictionary of a node via SDO transfer Prototype of the Function Block CAN_SDO_READ_BIN USINT DEVICE CONFIRM BOOL WORD gt gt INDEX BYTE SUBINDEX ERROR WORD USINT SDOTYPE ERRORINFO DWORD BOOL ENABLE POINTER PTR_RXDATA INT MAXLENGTH RXLENGTH INT USINT NETNUMBER SYSTEC electronic GmbH 2011 L 1008 07 49 CAN CANopen Extension for IEC 61131 3 Definition of Operands DEVICE Address of the node to be read 1 127 or 0 for local OD INDEX Number of the index entry to be read SUBINDEX Number of the subindex entry to be read SDOTYPE Type of the SDO transfer mode to be used according to data type CAN_SDO_TYPE see Table 11 in section 4 1 5 Note If no value is assigned explicitly to this input input open or not used the function block uses mode SDO_TYPE_AUTO_BEST_CASE The network layer individually selects the best suitable SDO transfer mode based on the amount of data to be transferred PTR_RXDATA Address of an object for receiving the read data bytes
102. starting the SDO transfer by setting ENABLE to TRUE the respective SDO channel is locked and cannot be used by other blocks The lock state remains until the SDO function block has been recalled with the input ENABLE set to FALSE see section 4 1 3 If calling through ENABLE FALSE is skipped the resource remains permanently locked and is no longer available for the PLC The local Object Dictionary of the PLC can be accessed by calling the function block with DEVICE 0 This way it is also possible to write values in your own OD SYSTEC electronic GmbH 2011 L 1008 07 46 CAN CANopen Extension for IEC 61131 3 4 4 3 Function Block CAN SDO READ STR FB for reading character strings from the Object Dictionary of a node via SDO transfer Prototype of the Function Block USINT WORD BYTE USINT BOOL STRING INT USINT CAN_SDO_READ_STR DEVICE CONFIRM BOOL INDEX SUBINDEX ERROR WORD SDOTYPE ERRORINFO DWORD ENABLE RXDATA RXDATA STRING MAXLENGTH RXLENGTH INT NETNUMBER Definition of Operands DEVICE INDEX SUBINDEX SDOTYPE RXDATA MAXLENGTH RXLENGTH ERROR ERRORINFO NETNUMBER ENABLE CONFIRM Description Address of the node to be read 1 127 or 0 for local OD Number of the index entry to be read Number of the subindex entry to be read Type of the SDO transfer mode to be used according to data type CAN_SDO_TYPE see Table 11 section 4 1 5
103. t Typ Attr Meaning index Value e 3002H 0 Number of entries 3 u8 ro 1 COBID node state 50H u32 rw COBID of the node state message message which is sent by the Master PLC when a monitored node changes its state If object 3002H is not in the Object Dictionary the specified default values apply 5 4 Definition of Waiting Periods When starting the PLC program the Master PLC sends the NMT command Enter Pre Operational State followed by Start Remote Node for all nodes node address 0 This prompts the CANopen nodes to send their PDOs once Subsequently the PLC waits until the PDOs have been processed and the received values have been stored in the network image before starting the PLC program This ensures the initial initialization of the network variables The respective waiting periods can be configured via object 3003H in the Object Dictionary of the Master PLC see Table 15 SYSTEC electronic GmbH 2011 L 1008 07 64 CAN CANopen Extension for IEC 61131 3 Table 15 Object Dictionary entries for defining waiting periods Index Sub Name Default Typ Attr Meaning index Value e 3003H 0 Number of entries 1 u8 ro 1 Boot Network Delay 50 ul6 rw_ Waiting period in ms between sending the NMT commands EnterPreOperational and EnterOperational when starting the PLC program 2 PLC Start Delay 100 U16 rw Waiting period in ms between the NMT command EnterOperational and the start of the PLC p
104. t on the functionality of the PLC program but more memory space is occupied on the PLC and the administration tasks within the network layer increase which finally leads to longer program run times Variables of the predefined DCF files When declaring the network variables in the PLC program the symbolic names for the process data objects specified in the DCF file have to be used In the predefined DCF files the network variables specified in Table 4 are defined for the CANopen devices with the node addresses 40H 44H Table 4 Network variables of the predefined DCF files SYSTEC electronic GmbH 2011 L 1008 07 20 CAN CANopen Extension for IEC 61131 3 The symbolic character string xx in the variable name is replaced by the respective node number of the supported CANopen device Thus the file DISLAVE DCF contains e g the definition for the variable INO_IN7_40H and the file D3SLAVE DCF defines the variables INO_IN7_40H INO_IN7 41H and NO_IN7 42H See the respective device documentation for the actual number of usable inputs and outputs of each CANopen IO module Special features when using predefined DCF files e While digital inputs and outputs are immediately functional after the integration of predefined DCF files and without any additional configuration work analog systems usually have to be activated See the manual of the respective CANopen device for more information Activation can e g occur during program s
105. ta transfer takes place in confirmation mode to ensure that communication errors can be recognized reliably Since the complete SDO transfer always consists of several CAN messages it has to take place asynchronously in the background in order not to block the PLC program The function blocks for SDOs immediately return after the transfer has been initialized The procedure described in section 4 1 3 is used to synchronize between the CANopen function block and the PLC program using the parameters ENABLE and CONFIRM The network layer provides an SDO channel to be used by the PLC program This ensures that only one SDO function block can be active at a time Upon successful initialization of the SDO transfer the SDO channel is locked and cannot be used by other blocks This lock state remains until the active SDO function block is recalled with input ENABLE set to FALSE after completion of the data transfer see section 4 1 3 4 4 1 Function Block CAN SDO READ8 FB for reading object entries of a node via SDO transfer Prototype of the Function Block CAN_SDO_READ8 USINT DEVICE CONFIRM BOOL WORD INDEX BYTE SUBINDEX ERROR WORD ERRORINFO DWORD BOOL ENABLE DATAO BYTE DATA1 BYTE DATA2 BYTE DATA3 BYTE DATA4 BYTE DATA5 BYTE DATA6 BYTE DATA7 BYTE DATALENGTH USINT USINT NETNUMBER Definition of
106. tart up via the SDO function blocks described in section 4 4 e Maximal configurations have been created for each PDO in the predefined DCF files e g AINO AIN3 for RPDO1 The individual devices usually support less objects in one PDO e g only AINO and AIN1 As a result emergency messages with error code 16 8210 PDO not processed due to length error or error code 16 8220 PDO length exceeded can appear 3 3 Integrating DCF Files into the PLC Project There are several ways to integrate DCF files into the PLC project Since a CANopen configurator which combines all DCF files in a joint project is usually used to create the DCF files this network should if possible also be imported into the OpenPCS programming environment as a consistent entity See section 3 3 1 for a description of the procedure Alternatively there is also the option to create network nodes in OpenPCS and to manually assign them to already existing DCF files This is e g necessary when working with predefined DCF files see section 3 2 3 or when OpenPCS does not recognize the format of the project file generated by the CANopen configurator See section 3 5 for the necessary steps 3 3 1 Integrating Complete Network Projects When integrating complete network projects all DCF files of a CANopen network are transferred into the OpenPCS programming environment as a consistent entity This is the easiest and also safest way of importing DCF files into the IEC
107. tes from DATAO The network layer only supports a limited number of SDO transfers via the PLC program at a time Standard max 5 transfers if there is no deviating entry in the manual of the PLC After starting the SDO transfer by setting ENABLE to TRUE the respective SDO channel is locked and cannot be used by other blocks The lock state remains until the SDO function block has been recalled with input ENABLE set to FALSE see section 4 1 3 If calling through ENABLE FALSE is skipped the resource remains permanently locked and is no longer available for the PLC The local Object Dictionary of the PLC can be accessed by calling the function block with DEVICE 0 This way it is also possible to read values from your own OD 4 4 2 Function Block CAN_SDO_WRITE8 FB for writing object entries of a node via SDO transfer Prototype of the Function Block CAN_SDO_WRITE8 USINT DEVICE CONFIRM BOOL WORD INDEX BYTE SUBINDEX ERROR WORD ERRORINFO DWORD BOOL ENABLE BYTE DATAO BYTE DATA BYTE DATA2 BYTE DATA3 BYTE DATA4 BYTE DATAS BYTE DATA6 BYTE DATA7 USINT DATALENGTH USINT NETNUMBER SYSTEC electronic GmbH 2011 L 1008 07 45 CAN CANopen Extension for IEC 61131 3 Definition of Operands DEVICE Address of the node to be written 1 127 or 0 for local OD INDEX Number of the
108. the CAN Interface In case no error occurs message could be stored properly in the send buffer the module returns with the output CONFIRM which is set to TRUE However there is no feedback signal to the PLC program whether the message could be sent successfully 6 2 12 Function Block CANL2_MESSAGE_WRITE_BIN FB for sending a CAN Message transfer of data within the object addressed by pointer Prototype of the function block CANL2_MESSAGE_WRITE_BIN UDINT gt CANID BOOL EXT_FRAME BOOL gt RTR_FRAME USINT CHANNEL POINTER PTR_TXDATA USINT DATALENGTH USINT NETNUMBER CONFIRM BOOL BOOL ENABLE ERROR USINT Definition of Operands CANID CAN Identifier of the CAN message to be sent EXT_FRAME TRUE the CAN Identifier marks an Extended Frame 29 Bit FALSE the CAN Identifier marks a Standard Frame 11 Bit RTR_FRAME TRUE CAN Object is passed as RTR Frame FALSE CAN Object is not passed as RTR Frame CHANNEL If the CAN Object has been defined by means of function block CANL2 DEFINE_CANID then the channel number returned from this function block for the CAN object has to be passed If the CAN object has been defined by means of function block CANL2 DEFINE CANID RANGE then 0 has to be passed Note a CAN object defined through CANL2_ DEFINE_CANID_ RANGE cannot be used for RTR messages PTR_TXDAT
109. the PLC program layer the data exchange occurs through network variables which are declared as VAR EXTERNAL according to standard IEC61131 3 and are thus marked as outside of the control The PLC administers a copy of these variables locally whereby the network layer is responsible for synchronizing this copy with the real value of the CANopen device The initial initialization of the network variable described in section 2 3 is also of particular importance CANopen describe the PLC is a common IO module whose inputs and outputs are not led out at terminals but are mapped into the process image as network variables Depending on the number and scope of network variables used in the PLC program the appearance of the PLC changes in regard to network sided inputs and outputs so that the same PLC can be represented differently to the CANopen network when executing different programs To achieve this the PLC uses a dynamic Object Dictionary database similar structure for the administration of variables as well as communication and mapping parameters CANopen IO modules on the other hand usually have a static Object Dictionary According to the specifications in the CiA Draft Standard 405 the network variables of a PLC are created in the Object Dictionary in the range of Index A000h AFFFh The following terms play a central role for further explanations of linking controls to decentral extension units CANopen IO module The CANopen IO module
110. tion block CANL2_UNDEFINE_CANID_RANGE UDINT CANID_START UDINT CANID_END BOOL EXT_FRAME BOOL RX_FRAME USINT NETNUMBER CONFIRM BOOL BOOL ENABLE ERROR USINT Definition of Operands CANID_START Here the same parameters used previously have to be specified CANID_END to define the range of CAN objects by means of the function blocks EXT_FRAME CANL2_DEFINE_CANID_RANGE RX_FRAME NETNUMBER Network number ERROR Errorcode according to data type CANL2_ERROR see Table 19 section 6 1 3 ENABLE Input for enabling or disabling the FB see section 6 1 2 CONFIRM Output for message completed through the FB see section 6 1 2 Description The function block CANL2_UNDEFINE_CANID_RANGE serves for rejection of a previously defined range of CAN objects by means of function block CANL2_DEFINE_CANID RANGE To identify the range of CAN objects to reject the same parameters used for the definition of the CAN object by means of function block CANL2 DEFINE CANID RANGE CANID START CANID_END EXT_FRAME and RX_FRAME are to specify SYSTEC electronic GmbH 2011 L 1008 07 77 CAN CANopen Extension for IEC 61131 3 6 2 9 Function Block CANL2_MESSAGE_READ8 FB to read received CAN messages transfer of data at FB outputs Prototype of the function block 4 E ANT CANL2_MESSAGE_READ8 CANID UD T EXT_FRAME
111. ton on PLC OR INO_IN7_40H 0 button on I O module ST FB_StartCondition CLK The following command sequence is responsible for setting both outputs at the CANopen IO module ProgExit copy pedestrian data into network variables for I O module LD PedGreen ST OUTO_OUT7_40H 0 LD PedRed ST OUTO_OUT7_40H 1 This ensures that the two local bit variables are copied into the output variable of the CANopen IO module of type BYTE SYSTEC electronic GmbH 2011 L 1008 07 32 CAN CANopen Extension for IEC 61131 3 4 1 amp C61131 Function Blocks for CANopen 4 1 Basics of CANopen Function Blocks There are various manufacturer specific function blocks within the IEC61131 3 to access CANopen These contain as a subset the functionality defined by CiA CAN in Automation e V in CiA Draft Standard 405 Furthermore there are additional function blocks for sending and receiving PDOs or CAN Layer 2 messages as well as for generating SYNC objects 4 1 1 Overview of the CANopen Function Blocks Table 6 displays an overview of the CANopen function blocks for the IEC61131 3 All the blocks have been realized as manufacturer specific function blocks and are thus an integral part of the PLC firmware The availability of blocks depends on the operational mode of a control For detailed information please refer to section 4 1 2 Table 6 Overview of the CANopen function blocks for IEC61131 3 Function Block DS 405 Meaning
112. totype of the function block CANL2_UNDEFINE_CANID UDINT CANID BOOL EXT_FRAME BOOL gt RX FRAME BOOL RIR FRAME USINT CHANNEL USINT NETNUMBER CONFIRM BOOL BOOL ENABLE ERROR USINT Definition of Operands CANID Here the same parameters that have been used previously are to specify EXT_FRAME for the definition of the CAN object by means of function block RX_FRAME CANL2_DEFINE_CANID RTR_FRAME CHANNEL The channel number returned by function block CANL2_DEFINE_CANID SYSTEC electronic GmbH 2011 L 1008 07 76 CAN CANopen Extension for IEC 61131 3 NETNUMBER Network number ERROR Errorcode according to data type CANL2 ERROR see Table 19 section 6 1 3 ENABLE Input for enabling or disabling the FB see section 6 1 2 CONFIRM Output for message completed through the FB see section 6 1 2 Description The function block CANL2 UNDEFINE_CANID serves for the rejection of a CAN object defined previously by means of function block CANL2_DEFINE_CANID To clearly identify the CAN object to be rejected the same parameters used previously for the definition of the CAN object by means of function block CANL2 DEFINE_CANID have to be specified at the inputs CANID EXT FRAME RX_FRAME und RTR_FRAME 6 2 8 Function Block CANL2_UNDEFINE_CANID_RANGE FB for rejection of a previously defined range of CAN objects Prototype of the func
113. turn of the function block the elements DATAO to DATA7 contain the single bytes of the message The output DATALENGTH shows the number of valid data bytes from DATAO Though the output CONFIRM is set to FALSE the receive buffer of the CAN Interface does not contain a message With the help of CONFIRM it can be distinguished whether a valid message with a length of 0 bytes or no message has been received If there is no message available it is indicated through the error code NO MESSAGE at the output ERROR see Table 19 section 6 1 3 SYSTEC electronic GmbH 2011 L 1008 07 78 CAN CANopen Extension for IEC 61131 3 6 2 10 Function Block CANL2_MESSAGE_READ_BIN FB for reading a received CAN message transfer of data within the object addressed by pointer Prototype of the function block CANL2_MESSAGE_READ_BIN CANID UDINT EXT_FRAME BOOL RTR_FRAME BOOL POINTER PTR_RXDATA USINT MAXLENGTH DATALENGTH USINT USINT NETNUMBER CONFIRM BOOL BOOL ENABLE ERROR USINT Definition of Operands PTR_RXDATA Address of an object the data of the received CAN message are stored in MAX_LENGTH Limitation of the number of stored bytes at 0 the size of the object addressed via PTR_RXDATA is determined and as a limitation the number of stored bytes is used the number of stored bytes does not exceed the number of bytes the object is able to store DATALENGTH Number of stored bytes CANID CAN Identifi
114. twork variables The process data usually inputs and outputs of the IO modules is assigned here with symbolic names in order to reference them as network variables in the PLC program at a later date The interface between the CANopen configurator and the OpenPCS programming environment is the DCF file of the PLC This has to be assigned to the respective hardware as a configuration file The control thus receives all the network information required for the exchange of process data with CANopen IO modules 3 2 3 Predefined DCF Files In order to also write PLC programs without a CANopen configurator for simple network topologies a few decentral IO modules SYSTEC supplies predefined DCF files with the programming environment OpenPCS which enable the integration of up to 5 decentral SYSTEC IO modules Overall support of third party devices cannot be guaranteed since the modules sometimes possess individual and specific features The PLC programmer is limited to the default configuration identifier mapping of the IO modules as well as the variable names for inputs and outputs specified in the DCF file when using predefined DCF files but the costs and time required for the procurement and familiarization with such a configuration tool no longer apply By using predefined DCF files it is possible to extend a PLC by the inputs and outputs of up to 5 CANopen IO modules without a CANopen configurator Prerequisite for the application of predefined
115. y PowerMap Network as the File Type and the entry CANopen Network as the Template Enter a name for the network which is to be created in the field Name Finally close the dialog via OK Create a new file X File Type Template zus ze KA Pou M Declarations E Resources CANopen Network Projects Other ke PowerMap Network Hr Powerlink network H a CANopen Network Name CANO Location D50 penPCS Projects Tra obt So OK Cancel Figure 7 Creating a network entry SYSTEC electronic GmbH 2011 L 1008 07 24 CAN CANopen Extension for IEC 61131 3 4 Click on the icon for the previously created network and select the menu item Load File gt Import DCF File in the context menu of the network see Figure 8 SECANO CANG pen Paste Link to Active Resource Add Node Delete Network Rename Network Load File Reload DCF File Printing EDS File Configuration Import DCF File Import ProCANopen network Figure 8 Adding a new network node 5 Select the DCF file to be imported in the file dialog which appears and click on the Ok button to confirm the selection This creates a new network node to which the respective DCF file is assigned This process has to be repeated for each DCF file to be imported Once the manual import of all the DCF files has been completed the corresponding CANopen nodes are displayed in the Network view of the project browser see Figu
116. ystem manual of the respective control If the PLC supports the configuration through a WEB Frontend usually the Enable State of the interface concerned can be set to Disabled Thereby the interface is not initialized automatically for CANopen and is available for free use through the PLC program At the input BITRATE the value for the Bitrate has to be specified in Bit s e g 125000 for 125 kBit s The values of both inputs AMR Acceptance Mask Register and ACR Acceptance Code Register are immediately transferred to the AMR or ACR register of the CAN Controller The result of a combination of both values is a receive filter which can only be passed by CAN messages whose CAN Identifiers observe the filter criteria Through appropriate settings of AMR and ACR all non relevant CAN messages can be excluded from reception already in the CAN Controller that in turn reduces the CPU load of the control and can prevent an overflow of the receive buffer The exact relevance of AMR and ACR as well as the realized filter values therewith can be taken from the data sheet of the respective CAN Controller Normally the filters are set in a way the CAN Controller receives all CAN messages For this purpose AMR and ACR have to be reserved as follows AMR ACR 16 FFFFFFFF 16 00000000 6 2 2 Function Block CANL2 SHUTDOWN FB for Deactivation of the CAN Interface Prototype of the function block CANL2_SHUTDOWN USINT NETNUMBER C
117. ytes The network layer only supports a limited number of SDO transfers via the PLC program at a time Standard max 5 transfers if there is no deviating entry in the manual of the PLC After starting the SDO transfer by setting ENABLE to TRUE the respective SDO channel is locked and cannot be used by other blocks The lock state remains until the SDO function block has been recalled with input ENABLE set to FALSE see section 4 1 3 If calling through ENABLE FALSE is skipped the resource remains permanently locked and is no longer available for the PLC The local Object Dictionary of the PLC can be accessed by calling the function block with DEVICE 0 This way it is also possible to read values from your own OD SYSTEC electronic GmbH 2011 L 1008 07 50 CAN CANopen Extension for IEC 61131 3 4 4 6 Function Block CAN SDO WRITE BIN FB for writing binary data into the Object Dictionary of a node via SDO transfer Prototype of the Function Block US WORD BYTE USINT BOOL POINTER INT US CAN_SDO_WRITE_BIN DEVICE CONFIRM BOOL INDEX SUBINDEX ERROR WORD SDOTYPE ERRORINFO DWORD ENABLE PTR_TXDATA TXLENGTH NETNUMBER 4 Definition of Operands DEVICE INDEX SUBINDEX SDOTYPE PTR_TXDATA TXLENGTH ERROR ERRORINFO NETNUMBER ENABLE CONFIRM Description Address of the
118. ytes of the CAN message to be sent DATALENGTH Length of the CAN message to be sent ERROR Error code according to data type CIA405_CANOPEN_KERNEL_ ERROR see Table 8 section 4 1 5 ERRORINFO Reserved for additional error information NETNUMBER Network number Note If the PLC only supports one CANopen interface setting of this input can be skipped since numeric variables have already been set with the initial value O according to IEC61131 ENABLE Input for enabling or disabling the FB see section 4 1 3 CONFIRM Output for message completed through the FB see section 4 1 3 Description The function block CAN_PDO_WRITE8 is used for sending PDOs and CAN Layer 2 messages via the network layer The individual bytes of the message to be sent have to be transferred to the elements DATAO to DATA7 Output DATALENGTH states the number of valid data bytes from DATAO When calling the function block CAN_PDO_WRITE8 the message to be sent is stored in the send buffer of the CANopen kernel If no error occurs during this phase message could be successfully stored in the send buffer the block whose output CONFIRM has been set to TRUE returns However there is no feedback to the PLC program stating whether the message has been sent successfully or not SYSTEC electronic GmbH 2011 L 1008 07 43 CAN CANopen Extension for IEC 61131 3 4 4 Function Blocks for SDOs A PLC can write or read entries in the Object Dictionary of a node via SDOs Da

Download Pdf Manuals

image

Related Search

Related Contents

各 位 アーカイブ技術を活用した電子キャビネット  NEC Express5800/R120d-2E SR Installation Guide  INSTALLATION INSTRUCTIONS  Ironman Fitness Aeros User's Manual  3Com 43506 Dishwasher User Manual  Automatic injection device with torsional spring  IS HLF07  STEINEL L 810  DeLOCK FireWire B/A, 1m  Informações Técnicas Xerox ColorQube 8880  

Copyright © All rights reserved.
Failed to retrieve file