beckhoff TX1200 TwinCAT 2 COMlibBC — Table of contents

Table of contents Table of contents 1 Foreword.................................................................................................................................................... 5 1.1 Notes on the documentation ............................................................................................................. 5 1.2 Safety instructions............................................................................................................................. 6 1.3 Notes on information security............................................................................................................

7 2 Overview .................................................................................................................................................... 8 3 Supported Hardware................................................................................................................................. 9 4 Communication Principle....................................................................................................................... 10 5 Data Structures .......................................................................................................................................

12 5.1 ComBuffer ....................................................................................................................................... 12 5.2 Data structures for the KL6xxx serial bus terminal in 3-byte mode................................................. 12 5.3 Data structures for the KL6xxx serial bus terminal in 5-byte mode................................................. 12 6 Function Blocks ......................................................................................................................................

14 6.1 ReceiveByte .................................................................................................................................... 14 6.2 SendByte......................................................................................................................................... 14 6.3 ClearComBuffer .............................................................................................................................. 15 6.4 KL6Init .............................................................................................................................................

15 6.5 Background Communication ........................................................................................................... 16 6.5.1 KL6ControlBC .................................................................................................................. 16 6.5.2 KL6Control5B................................................................................................................... 16 7 Linking into a PLC Program...................................................................................................................

18 7.1 Installation ....................................................................................................................................... 18 7.2 Adapting to the 5-Byte Mode........................................................................................................... 18 7.3 Global Variables.............................................................................................................................. 18 7.4 Background Communication ...........................................................................................................

18 7.5 Sending and Receiving ................................................................................................................... 19 8 Example Configuration........................................................................................................................... 21 9 Error Codes ............................................................................................................................................. 22 TX1200 3 Version: 1.1