softplc multiprog 11 en

Upload: alcy-blanco-garcia

Post on 19-Feb-2018

360 views

Category:

Documents


11 download

TRANSCRIPT

  • 7/23/2019 Softplc Multiprog 11 En

    1/102

    KUKA.PLC Multiprog 1.1 10.05.01 en 1 of 99

    ROBOT

    KR C ...

    KUKA.PLC Multiprog

    Release 1.1

    Issued: 16 Mar 2006 Version: 01

  • 7/23/2019 Softplc Multiprog 11 En

    2/102

    2 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    eCopyright 2005

    KUKA Roboter GmbHZugspitzstrasse 140D--86165 Augsburg

    This documentation or excerptstherefrommay notbe reproduced or disclosed to third partieswithout theexpress permissionof thepublishers.Other functions not described in this documentation may be operable in the controller. The user has no claim to these functions, however, inthe case of a replacement or service work.We have checked the content of this documentation for conformity with the hardware and software described. Nevertheless, discrepanciescannot be precluded, for which reason we are not able to guarantee total conformity. The information in this documentation is checked on aregular basis, however, and necessary corrections will be incorporated in subsequent editions.Subject to technical alterations without an effect on the function.

  • 7/23/2019 Softplc Multiprog 11 En

    3/102

    3 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    Contents

    1 Introduction 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    1.1 Target group 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    1.2 Safety 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    1.3 Overview of the document 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    1.4 Trademarks 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    2 KUKA.PLC Multiprog 8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    3 Installation 10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    3.1 Preconditions for installation 10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    3.2 Installing KUKA.PLC Multiprog 10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.2.1 Installing on non--KR C controllers under Windows 98, ME, 2000 and XP 11. . . . . . . . . . . . . .

    3.2.2 Installing on a KR C controller or Office Lite 12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    4 Configuration 14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4.1 Configuring a task priority in ProConOS 15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    4.2 Configuring allotment of CPU computing time to tasks 16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    4.3 Configuring the robot controller 17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    4.4 Configuring ProConOS 17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    4.5 Configuring the ProConOS / robot controller interface 18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    4.5.1 Configuring peripheral I/Os 18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4.5.2 Configuring communication I/Os 19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4.5.3 I/O configuration 20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    4.6 Configuring the ProConOS/MULTIPROG interface 22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    4.7 Creating a ProConOS file directory 23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    5 Scheduler 24. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    6 Controlling ProConOS by means of KRL 26. . . . . . . . . . . . . . . . . . . . . . . . . .

    6.1 IOCTL function: Start, stop and call up status of ProConOS 26. . . . . . . . . . . . . . . . . . . . . . . . .

    7 Configurable ProConOS parameters 28. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.1 DEBUG parameter 28. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.2 RESET parameter 28. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.3 RELOAD parameter 28. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.4 PRIOVISOR parameter 29. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.5 PRIOUSER parameter 29. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.6 PRIOSYSTEM parameter 29. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.7 PRIOINTERNAL parameter 30. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  • 7/23/2019 Softplc Multiprog 11 En

    4/102

    KUKA.PLC Multiprog

    4 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    7.8 MINCAPACITY parameter 30. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.9 MAXCAPACITY parameter 30. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.10 DELRETAIN parameter 31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.11 DELRETAINFILE parameter 31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.12 AUTOARCHIVERETAIN parameter 31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.13 RETAINSIZE parameter 32. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.14 RESTOREOUTPUTS parameter 32. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.15 ROOTPATH parameter 32. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.16 BINPATH parameter 32. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.17 LIBPATH parameter 33. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.18 LIBRARIES parameter 33. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.19 CPUASSIGNMENT parameter 34. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.20 SERIAL parameter 35. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.21 COM parameter 35. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.22 BAUDRATE parameter 36. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.23 SIGNALFILES parameter 36. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    7.24 SIGNALFILEREAD parameter 36. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8 Libraries 38. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.1 ExtensionLib library 38. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.1.1 SaveRetain function: save remanent data by program 38. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.1.2 PlcSleep function: provide CPU computing time 39. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.1.3 File services 40. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.1.3.1 FileOpen function: opening a file 41. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.1.3.2 FileClose function: closing a file 42. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.1.3.3 FileWrite function: writing data 43. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.1.3.4 FileRead function: reading data 44. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.1.3.5 FileSeek function: changing the file position 45. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.1.3.6 FileGetInfo function: file information 46. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.1.3.7 FileDelete function: deleting a file 47. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.1.3.8 Example 48. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.1.4 Accessing KR C signals 49. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.1.4.1 KrcSignalRead 49. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.1.4.2 KrcSignalWrite 50. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.2 KrcLib library 51. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.2.1 ReadAxisAct function: reading $AXIS_ACT 51. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.2.2 ReadAxisActEx function: reading $AXIS_ACT 53. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.2.3 ReadBaseAct function: reading $ACT_BASE 55. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.2.4 ReadOvPro function: reading $OV_PRO: 56. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.2.5 WriteOvPro function: writing $OV_PRO 56. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.2.6 ReadPosAct function: reading $POS_ACT 57. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.2.7 ReadSenInt function: reading $SEN_PINT[ ] 58. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.2.8 WriteSenInt function: writing $SEN_PINT[ ] 58. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.2.9 ReadSenReal function: reading $SEN_PREA[ ] 59. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.2.10 WriteSenReal function: writing $SEN_PREA[ ] 59. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  • 7/23/2019 Softplc Multiprog 11 En

    5/102

    5 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.2.11 ReadToolAct function: reading $ACT_TOOL 60. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.2.12 ReadModeOp function: reading $MODE_OP 60. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.2.13 ReadProState function: Reading $PRO_STATE 61. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.2.14 DisplayKCPNotifyMsg function: displaying acknowledgement messages 61. . . . . . . . . . . . . . .8.2.15 DisplayKCPStatusMsg function: displaying status messages 62. . . . . . . . . . . . . . . . . . . . . . . . .

    8.2.16 ClearKCPStatusMsg function: clearing status messages 62. . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.2.17 ClearAllKCPStatusMsg function: clearing all status messages 63. . . . . . . . . . . . . . . . . . . . . . . .

    8.3 KrcExVarLib library 64. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.3.1 ReadPLCBool, ReadPLCInt, ReadPLCReal functions: reading a single value 65. . . . . . . . . .8.3.2 WritePLCBool, WritePCLInt, WritePLCReal functions: writing a single value 66. . . . . . . . . . . .8.3.3 ReadPLCBoolEx, ReadPLCIntEx, ReadPLCRealEx functions: reading multiple values 67. .

    8.3.4 WritePLCBoolEx, WritePCLIntEx, WritePLCRealEx functions: writing multiple values 68. . . .

    8.4 SerialLib library 69. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.4.1 SerialOpen function: opening a channel to a serial device 70. . . . . . . . . . . . . . . . . . . . . . . . . . .8.4.2 SerialClose function: closing a channel to a serial device 73. . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.4.3 SerialReceive function: reading from a serial device 74. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.4.4 SerialSend function: writing to a serial device 75. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.4.5 SerialCommand function: commands for serial channels 76. . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.4.6 SerialGetInfo function: information about a serial channel 77. . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.5 3964Lib library 78. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.5.1 P3964Open function: creating a connection to a 3964(R) device 79. . . . . . . . . . . . . . . . . . . . . .

    8.5.2 P3964Close function: closing a connection to a 3964(R) device 82. . . . . . . . . . . . . . . . . . . . . .

    8.5.3 P3964Receive function: reading from a 3964(R) device 83. . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.5.4 P3964Send function: writing to a 3964(R) device 84. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.6 KcpLib library 85. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.6.1 KcpSetKeys function: supply key information to library 86. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.6.2 KcpSystemKeys function: KCP system keys 86. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.6.3 KcpLeftKeys function: left--hand KCP status keys 87. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.6.4 KcpTopKeys function: KCP menu keys 88. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.6.5 KcpRightKeys function: right--hand KCP status keys 89. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.6.6 KcpBottomKeys function: lower KCP softkeys 90. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.6.7 Example: time switching diagram 91. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.7 AutoExtLib library 92. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.7.1 Function: KRC_AutoExt 93. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    8.7.2 Function: VKRC_AutoExt 95. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    9 Troubleshooting 96. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    9.1 Log file proconos.log 96. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    9.2 Error codes for ExtensionLib library 96. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    9.3 Error codes for library SerialLib 97. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    9.4 Error codes for 3964Lib library 98. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  • 7/23/2019 Softplc Multiprog 11 En

    6/102

    KUKA.PLC Multiprog

    6 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    1 Introduction

    This document describes the software package KUKA.PLC Multiprog and its interactionwith the development environment ProConOS.

    KUKA.PLC Multiprog is a SoftPLC for use in the KR C robot controller.

    1.1 Target group

    This document is intended for robot programmers and personnel with the appropriatetraining. Configuration of KUKA.PLC Multiprog requires advanced specialized knowledgeconcerning the robot system.

    Moreover, this document assumes that the user has knowledge of PLCs.

    Information about Robot Programmer training courses at KUKA College isavailable on the Internet under www.kuka--roboter.de.

    1.2 Safety

    W A R N I N G !

    This document must be kept available at all times either as a hard copy or inelectronic form at the robot system or the development computer. For example, ahard copy can be inserted at the back of the KR C Operating Handbook.

    Observe the safety instructions in the document Safety, General of the KR COperating Handbook.

    In exceptional cases, incorrect configuration or operation can lead to materialdamage and/or personal injury. It is therefore absolutely essential for configurationto be carried out exclusively by trained personnel.

  • 7/23/2019 Softplc Multiprog 11 En

    7/102

    1 Introduction (continued)

    7 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    1.3 Overview of the document

    Chapter 2introduces the functions of the KUKA.PLC Multiprog components.

    Chapter 3provides a step--by--step description of how to install the KUKA.PLC Multiprogcomponents.

    Chapter 4 provides a description of how to configure the KUKA.PLC Multiprog components.

    Chapter 6 provides a description of the options for controlling ProConOS by means of KRL.

    Chapter 7 provides a description of the predefinable parameters of the KUKA.PLC Multiprogcomponents.

    Chapter 8 provides a description of the libraries which can be loaded by means of thepredefinable KUKA.PLC Multiprog component parameters described in Chapter 6.

    Chapter 9provides information for use in troubleshooting.

    1.4 Trademarks

    ProConOS and Multiprog are registered trademarks of KW--Software GmbH.

    GraphWorX32 is a registered trademark of Iconics Inc.

    Adobe and Acrobat are either registered trademarks or trademarks of Adobe Incorporated.

    VxWorks is a trademark of Wind River Systems Inc.

  • 7/23/2019 Softplc Multiprog 11 En

    8/102

    KUKA.PLC Multiprog

    8 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    2 KUKA.PLC Multiprog

    The KUKA.PLC Multiprog software package is a supplement to the existing software of aKR C controller. It extends the range of possible solutions for automation tasks alreadyprovided by KRL (KUKA Robot Language).

    KUKA.PLC Multiprog thus represents an expanded development environment for PLCapplications. KUKA.PLC Multiprog comprises a number of components, which can beinstalled either on the KR C controller itself, or on a development computer.

    In this case, the development computer can be used as a development environment for PLCapplications, which are subsequently executed on the KR C controller.

    The description and operator control of the KUKA.PLC Multiprog components are describedin detail in the corresponding handbooks.

    The KUKA.PLC Multiprog components are:

    G ProConOS runtime system.KUKA.PLCMultiprog uses the ProConOSruntime system to execute PLCapplications.VxWorks real--time operating system. ProConOS is compatible with the IEC standard61131--3, and thus employs standardized syntax and semantics. ProConOS can beconfigured by means of an initialization file, and can be adapted flexibly to therequirements of the robot system.

    G MULTIPROG PLC development environmentMULTIPROG is a PLC development environment which can be used to develop PLCapplications.

    G MULTIPROG sample projectThe sample project demonstrates the capabilities of MULTIPROG.

    KR C controllerWindows operating system

    PLC application development

    VxWorks real--time operating system

    Windows operating systemDevelopment computer

    MULTIPROG

    KUKA Router

    KR C controller

    Fig. 1 Installation on development computer and KR C controller

  • 7/23/2019 Softplc Multiprog 11 En

    9/102

    2 KUKA.PLC Multiprog (continued)

    9 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

  • 7/23/2019 Softplc Multiprog 11 En

    10/102

    KUKA.PLC Multiprog

    10 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    3 Installation

    3.1 Preconditions for installation

    KUKA.PLC Multiprog software license

    A separate valid software license must be present each time KUKA.PLC Multiprog isinstalled.

    3.2 Installing KUKA.PLC Multiprog

    KUKA.PLC Multiprog is installed from theKUKA.PLC Multiprog CD--ROM.

  • 7/23/2019 Softplc Multiprog 11 En

    11/102

    3 Installation (continued)

    11 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    3.2.1 Installing on non--KR C controllers under Windows 98, ME, 2000 and XP

    Hardware and software requirements

    -- Operating systems MS Windows 98, Windows ME, Windows 2000, Windows XP

    -- Administrator access rights

    -- INTEL Pentium processor

    -- At least 64 MB main memory (RAM)

    -- At least 200 MB hard disk space

    -- For remote operation: network connection

    Info

    The termnon--KR C controllers includes development computers, host computers,visualization computers, etc.

    Procedure:

    (1) Insert CD.The Setup program is started automatically. If the Autorun function has beendeactivated in the operating system, the program Setup.exe in the root directory of theCD--ROM must be started manually.

    (2) The license agreement dialog is displayed:

    KUKA.PLC Multiprog -- Install Shield Wizard

    Read the license agreement carefully and confirm by pressing Next.

    (3) Following confirmation, the Setup program analyzes the computer environment (KR Cor non--KR C) and suggests the components to be installed:

    KUKA.PLC Multiprog -- Install Shield WizardSelect Components...

    O ProConOSO ProConOS OPC ServerX Multiprog

    Adapt the suggested selection as required and confirm by pressingNext.

    (4) The next window is displayed:

    KUKA Technology SetupPreparing installation of Multiprog...

    Installing Multiprog...

    (5) Once the installation has been completed, the following is displayed.KUKA.PLC Multiprog -- Install Shield Wizard

    The system needs a cold boot

    The KR C must be rebooted to save the registration entries for the OPC Server. Theinstallation process is now complete.

  • 7/23/2019 Softplc Multiprog 11 En

    12/102

    KUKA.PLC Multiprog

    12 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    3.2.2 Installing on a KR C controller or Office Lite

    Hardware and software requirements

    -- KR C with software version KR C V5.2 or higher

    -- At least 20 MB hard disk space

    -- Operating system Windows XP embedded

    -- Administrator access rights

    -- INTEL Pentium processor

    -- At least 64 MB main memory (RAM)

    -- At least 200 MB hard disk space

    -- For remote operation: network connection

    Procedure:

    (1) InsertCD. The Setup Manager dialog window is displayed. If the Autorun function hasbeen deactivated in the operating system, the program Setup.exein the root directoryof the CD--ROM must be started.

    (2) The license agreement dialog is displayed.

    Read the license agreement carefully and confirm by pressing Next.

    (3) Following confirmation, the Setup program analyzes the computer environment (KR Cor non--KR C) and suggests the components to be installed:

    KUKA.PLC Multiprog -- Install Shield WizardSelect Components...

    X ProConOSO ProConOS OPC ServerO Multiprog

    Adapt the suggested selection as required and confirm by pressingNext.

    (4) The next window is displayed:

    KUKA Technology SetupPreparing installation of ProConOS...

    Installing KUKA Router...Installing OPC Server...Installing ProConOS...

    (5) Once the installation has been completed, the following is displayed.

    KUKA.PLC Multiprog -- Install Shield WizardThe system needs a cold boot

    The KR C must be rebooted to save the registration entries for the OPC Server. Theinstallation process is now complete.

  • 7/23/2019 Softplc Multiprog 11 En

    13/102

    3 Installation (continued)

    13 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

  • 7/23/2019 Softplc Multiprog 11 En

    14/102

    KUKA.PLC Multiprog

    14 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    4 Configuration

    Once the KUKA.PLC Multiprog components have been installed (see Chapter 3), they canthen be configured. As a rule, configuration is not necessary.

    ProConOS is configured by means of an initialization file which can be modified using anASCII--capable text editor.

  • 7/23/2019 Softplc Multiprog 11 En

    15/102

    4 Configuration (continued)

    15 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    4.1 Configuring a task priority in ProConOS

    InfoWhen the Scheduler is active, priorities are assigned automatically.

    The ProConOSprioritymodel describes the fundamental relationships between the prioritiesand the various ProConOS tasks. The priority indicates a precedence in the allocation ofCPU computing time and the use of system resources. The priority of tasks is defined in theinitialization file ...\krc\init\proconos.ini.

    Each task is assigned unambiguously to a task range. This relationship is preset, and cannotbe changed. Each task range is assigned a priority; this priority is assigned to each tasklocated in the task range. Each task range is represented by a parameter in the initializationfile. The value of this parameter defines the priority of the tasks located in this task range.The task ranges are:

    G ProConOS Supervisor tasks (High Level tasks)This task range contains all tasks which have a higher priority than the highest--priorityuser task, for example robot tasks. (PRIOVISOR parameter, see Section 7.4)Default value of Supervisor tasks: 141

    G ProConOS User tasks and the ProConOS Default task (ProConOS Level tasks)This task range contains the PLC tasks and the Default task. (Parameter PRIOUSER,see Section 7.5)Default value of User tasks: 142 to 149

    G ProConOS System tasks (Low Level tasks)Low Level tasks have a lower priority than the Default task (see Section 7.5).(Parameter PRIOSYSTEM, see Section 7.6)

    Default value of System tasks: 218 to 223

    G ProConOS Internal tasks (Parameter PRIOINTERNAL see Section 7.7)Default value of Internal tasks: 200

    Priority

    0

    141

    200

    201

    216

    235

    250

    218

    0 1 2 5 15

    Highest priority (ProConOS Scheduler)

    ProConOS Supervisor task (default PRIOVISOR)

    ProConOS User tasks (default PRIOUSER)

    ProConOS Internal tasks (default PRIOINTERNAL)

    ProConOS Default task (calculated automatically)

    ProConOS System tasks (default PRIOSYSTEM)

    ProConOS User tasks (minimum value PRIOUSER)

    Lowest priority

    Number of tasks

    Fig. 2 Task priorities

  • 7/23/2019 Softplc Multiprog 11 En

    16/102

    KUKA.PLC Multiprog

    16 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    4.2 Configuring allotment of CPU computing time to tasks

    The allotment of CPU computing time to tasks is defined in the initialization file

    ...\krc\init\proconos.ini .

    In order to ensure that low priority tasks will be allotted computing time, ProConOS cyclicallychecks the allocation of CPU computing time between low priority tasks and high prioritytasks.

    A percentage (parameter MINCAPACITY, see Section 7.8) is selected, which is allocatedto the higher--priority group, and another percentage (Parameter MAXCAPACITY, seeSection 7.9), which this group is not allowed to exceed.

    The portion of CPU computing time defined by the parameter MINCAPACITY which is notrequired according to the situation by High Level tasks and ProConOS tasks (not includingthe default task) will be left to execute the default task.

    If, however, the portion of CPU computing time taken by the High Level tasks and theProConOS tasks together exceeds the MAXCAPACITY value, it is assumed that not enoughCPU computing time is available for lower--priority tasks.

    In this case, ProConOS is stopped, and an exception (PLC overload) is initiated.

    If the parameter CPUASSIGNMENT (see Section 7.19) is activated, this function isautomatically executed and the parameters MINCAPACITY and MAXCAPACITY aredeactivated.

    Priority

    0

    250

    Low level

    Ts Ts

    Default

    ProConOS levelT1Te

    DefaultDefault

    High level

    Time

    Te: Program run timeTs: Free time slice

    Fig. 3 Allotment of time to tasks

  • 7/23/2019 Softplc Multiprog 11 En

    17/102

    4 Configuration (continued)

    17 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    Example

    The parameter values in this example are:

    MINCAPACITY=50

    MAXCAPACITY=70

    The situations:

    G If the High Level tasks use 30% of the CPU computing time, and the PLC tasks 10%of the CPU computing time, then 10% of the CPU computing time is allotted to theDefault task. 50% of the CPU computing time will remain for the Low Level tasks(including Windows tasks).

    G If the High Level tasks use 50% of the CPU computing time, and the PLC tasks 20%of the CPU computing time, then no CPU computing time is allotted to the Default task.

    G If the sum of the CPU computing time of the High Level tasks exceeds 70% of the CPU

    computing time, then an exception will be initiated.

    4.3 Configuring the robot controller

    The robot controller is configured automatically during the set--up process by means of thefollowing entries in the file ...\krc\init\iosys.ini:

    [DRIVERS]

    PROCONOS=,pcosInit,pcosdrv.o

    [PROCONOS]

    INB511=0

    4.4 Configuring ProConOS

    Procedure:

    (1) Open the file ...\krc\init\proconos.ini in a text editor and modify the parameter values(parameters, see Chapter 7).

    (2) Depending on which parameter values have been modified, it may be necessary toreboot the KR C or ProConOS.

  • 7/23/2019 Softplc Multiprog 11 En

    18/102

    KUKA.PLC Multiprog

    18 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    4.5 Configuring the ProConOS / robot controller interface

    The interface driver is loaded automatically when ProConOS is started. It is parameterized

    via the I/O configuration of the ProConOS project in Multiprog.

    ProConOScanusethis interface to access4096 inputs and outputs of therobot controller. Inputsand outputs which are used exclusively by means of ProConOS should be defined starting atI/O number 1032. Inputs 1025 and 1026 are already assigned in the robot controller.

    4.5.1 Configuring peripheral I/Os

    ProConOS can access physically existing inputs and outputs (I/Os) of the KR C controller.

    The I/O mapping of the KR C controller is defined in the file c:\krc\init\iosys.ini. Theconfiguration of the peripheral outputs in the iosys.ini file should be divided into blocks whichare as small as possible.

    Start address

    Length

    Start address

    Length

    KRC Byte

    start address

    KRC Byte

    start address

    Inputs Inputs Outputs

    InputsOutputsOutputs

    PeripheryKR CProConOS

    Fig. 4 Configuration of peripheral I/Os

    Access by ProConOS to the KR C I/Os is defined in the Multiprog I/O configuration.

    Thestart addressspecifies the first byte in ProConOS from which I/Os can be transferred.

    Thelengthspecifies the number of bytes transferred.

    TheKRC Byte start address specifies the first byte in the KR C from which I/Os can betransferred.

  • 7/23/2019 Softplc Multiprog 11 En

    19/102

    4 Configuration (continued)

    19 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    4.5.2 Configuring communication I/Os

    The ProConOS/KR C interface can be used by ProConOS to exchange data with the KR C

    by means of I/Os which do not exist physically. Outputs configured in ProConOS aretransferred directly to the input map of the KR C. Read accesses to inputs configured in thisway are redirected to the KR C outputs.

    If a task is to be assigned to the inputs or outputs, this must be declared accordingly.

    Start address

    Start addressLength

    Inputs Inputs

    Outputs Outputs

    ProConOS KR C

    INPUT Length

    KRC Byte

    OUTPUT

    start address

    KRC Bytestart address

    Fig. 5 Configuration of communication I/Os

    Thestart addressspecifies the first byte in ProConOS from which I/Os can be transferred.

    Thelengthspecifies the number of bytes transferred.

    TheKRC Byte start address specifies the first byte in the KR C from which I/Os can betransferred.

  • 7/23/2019 Softplc Multiprog 11 En

    20/102

    KUKA.PLC Multiprog

    20 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    4.5.3 I/O configuration

    Fig. 6 I/O configuration

    Thestart addressspecifies the first byte in ProConOS from which I/Os can be transferred.

    Thelengthspecifies the number of bytes transferred.

    The parameter Refresh must beset to bytask.Ifthetask is selected, the inputswill be read at the beginning of the default task work cycle, and the outputs will be writtenat the end of the default task work cycle.

    If a different task is specified, the inputs will be read at the beginning of the work cycle forthis task, and the outputs will be written at the end of the work cycle for this task.

    The parameterDevicemust be set, in this case, toDriver.

    The driver--specific data can be entered in the KRC I/O dialog, which is called by clicking theDriver Parameterbutton.

    Fig. 7 KRC I/O dialog

    KR C Byte start address:This parameter specifies the byte from which the KR C I/Os willbe accessed.

    Peripheral I/O:Connection with signals from the periphery that physically exist(see Section 4.5.1)

    Communication I/O:Communication between ProConOS and KR C via I/Os(see Section 4.5.2)

    Data type:Number of I/Os transferred in one cycle

  • 7/23/2019 Softplc Multiprog 11 En

    21/102

    4 Configuration (continued)

    21 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    KRC bit address: $IN[9...88] or $OUT[9...88]

    Block--by--block configuration with Interbus

    This kind of configuration in the iosys.ini file is to be preferred.

    [INTERBUS]; ------- Inputs --------INB20=0,x10;--------- Outputs ------OUTB20=0,x10

    Byte--by--byte configuration with Interbus

    In a byte--by--byte configuration of a field bus, only one ProConOS write cycle is requiredwhen one ProConOS output byte is modified.

    [INTERBUS]; ------- Inputs --------INB20=0,x10;--------- Outputs ------OUTB20=0OUTB21=1OUTB22=2OUTB23=3OUTB24=4OUTB25=5OUTB26=6OUTB27=7

    OUTB28=8OUTB29=9

  • 7/23/2019 Softplc Multiprog 11 En

    22/102

    KUKA.PLC Multiprog

    22 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    4.6 Configuring the ProConOS/MULTIPROG interface

    A connection to ProConOS can be made by via a network card in the KR C and an external

    Windows network. This connection can be createdby means of theWindows program KUKARouter: the KUKA Router can route any desired TCP/IP ports. Thus it is also possible toaccess VxWin from a remote computer via Telnet.

    Forinformation about using VxWin via Telnet, see thedocumentation for the KUKA Router.

    KR C controller

    Windows operating system

    TCP/IP address, e.g.: 172.16.0.111

    Windows operating systemTCP/IP address, e.g.: 172.16.0.177

    Development computer

    ProConOSRuntime system

    MULTIPROGPLC application developmentKUKA Router

    KR C controller

    VxWorks real--time operating systemTCP/IP address 192.0.1.1

    Fig. 8 ProConOS/MULTIPROG interface

    The KUKA Router is installed and configured along with ProConOS.

    No settings need to be modified.

  • 7/23/2019 Softplc Multiprog 11 En

    23/102

    4 Configuration (continued)

    23 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    4.7 Creating a ProConOS file directory

    In order to organize the files created by ProConOS more clearly, it is possible to create a

    separate directory for them.

    Procedure:

    (1) Create a directory, e.g. c:\krc\roboter\PlcData.The file services refer to the directory c:\krc\roboter.

    (2) Create a registry key for reading and writing the directory:

    HKEY_LOCAL_MACHINE\SOFTWARE\KUKA Roboter GmbH\Cross3\Interfaces\FTP\local\User\target\Dir\PlcData

    Default character string value: %InstallationDir%\\Roboter\\PlcData

    DWORD value: Rights=dword:00000007

    (Rights= is only required for the cross--integrated FTP server in versions KR C V4.1and VKR C V3.3x.)

  • 7/23/2019 Softplc Multiprog 11 En

    24/102

    KUKA.PLC Multiprog

    24 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    5 Scheduler

    The ProConOS Scheduler can be used to configure the allocation of computing time in theKR C between ProConOS and Windows.

    The Scheduler is activated and configured by means of the CPUASSIGNMENT entry in the[PROCONOS] section of the ProConOS.ini file (see Section 7.19).

    12

    Win

    S_INT

    R_INT

    Ticks1 2 3 4 5 6 7 8 9 1 0 11 12 1

    IPO cycle 1 IPO cycle 2

    ProConOS

    Fig. 9 Allocation of computing time with the Scheduler activated

    When the Scheduler is active, the priorities of the following tasks are calculated automati-cally:

    G Supervisor Task

    G User Task

    G Default Task

    When the Scheduler is active, management of the priority of ProConOS and VxWorks tasksby means of the parametersMINCAPACITYandMAXCAPACITYis deactivated.

    The allocation of computing time to the two interpreters in the KR C, R--INT and S--INT, isnot affected by the Scheduler.

  • 7/23/2019 Softplc Multiprog 11 En

    25/102

    5 Scheduler (continued)

    25 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

  • 7/23/2019 Softplc Multiprog 11 En

    26/102

    KUKA.PLC Multiprog

    26 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    6 Controlling ProConOS by means of KRL

    6.1 IOCTL function: Start, stop and call up status of ProConOS

    ProConOS can be controlled by means of KRL applications using the function IOCTL. Thefollowing functions can be executed:

    G Start ProConOS

    G Stop ProConOS

    G Call up status of ProConOS

    Parameters

    G Driver number (nDrvNum): The driver number can be obtained from the fileiosys.ini(see Section 4.3)

    G Function number (nFunction)

    G Additional parameter (nParameter)

    Action Functionno.

    Parameter Return value

    nFunction nParameter

    Call up statusof ProConOS

    3 0 The value returned by the function isbinary coded. However, at no time willmore than one bit be set.

    Bit 0: POWER ON (ProConOS isrunning, and no PLC program is loaded.)

    Bit 1: RUN (The PLC program isrunning.)

    Bit 2: STOP (The PLC program isloaded and is not running.)

    Bit 3: HALT (The PLC program hasbeen stopped, e.g. by a breakpoint.)

    Bit 5: LOADING (The PLC program isbeing loaded.)

    Start Pro-ConOS

    1000 0: Cold start (allvariable contents

    0: ProConOS is running

    are deleted andre--initialized)

    1: ProConOS could not be started

    1: Warm restart(all variable con-tents are deleted

    0: ProConOS is running

    and re--initialized,except for re-manent data)

    1: ProConOS could not be started

    3: Hot restart (novariable contents

    0: ProConOS is running

    are deleted andre--initialized)

    1: ProConOS could not be started

    Stop Pro- 1001 0 0: ProConOS has been stoppedConOS 1: ProConOS could not be stopped

  • 7/23/2019 Softplc Multiprog 11 En

    27/102

    6 Controlling ProConOS by means of KRL (continued)

    27 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    Syntax

    IOCTL ( INT nDrvNum, INT nFunction, INT nParameter) : INT

    Example

    Call up status of ProConOS PLCSTATE = IOCTL(13,3,0)

    Warm restart ProConOS RESULT = IOCTL(13,1000,1)

    Stop ProConOS RESULT = IOCTL(13,1001,0)

  • 7/23/2019 Softplc Multiprog 11 En

    28/102

    KUKA.PLC Multiprog

    28 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    7 Configurable ProConOS parameters

    This chapter provides detailed descriptions of the parameters in the initialization file...\krc\init\proconos.ini . The parameter values are used to configure ProConOS duringinitialization.

    If a parameter is not present in the initialization file, it can be inserted in the order listed here.

    7.1 DEBUG parameter

    The value of this parameter is used to define whether, in addition to error messages, testoutputs are to be displayed on the Telnet shell or not. The KR C must be restarted after thisparameter is changed.

    Info

    This function is intended for Debug operation only. The test output should not be set innormal operation.

    Range of values

    DEBUG=0 Error messages are displayed on the Telnet shell (default value).

    DEBUG=1 Test outputs and error messages are displayed on the Telnet shell.

    7.2 RESET parameter

    Thevalue of this parameter is used to define theway in which ProConOSis reset. ProConOS

    must be restarted after the value of this parameter is changed.Range of values

    RESET=0 ProConOS is not reset by the action (default value).

    RESET=1 ProConOS is stopped andcoldstarted(all variable contents are deleted and re--initialized).

    RESET=2 ProConOS is stopped andwarmstarted(all variable contents are deleted and re--initialized, except for remanent data).

    RESET=3 ProConOS is stopped andhot started(no variable contents are deleted and re--initialized).

    7.3 RELOAD parameterIfReconfigure I/O systemis carried out on the KR C controller, all of the outputs are reset,the drivers are reloaded and changes in configuration files take effect. This value is used todefine whether or not ProConOS is to be stopped and restarted. ProConOS must berestarted after the value of this parameter is changed.

    Range of values

    RELOAD=0 ProConOS is not affected by the action (default value).

    RELOAD=1 ProConOS is stopped andhot restarted.

  • 7/23/2019 Softplc Multiprog 11 En

    29/102

    7 Configurable ProConOS parameters (continued)

    29 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    7.4 PRIOVISOR parameter

    The value of this parameter specifies the priority of the ProConOS Supervisor task. The

    ProConOS Supervisor task must have the highest priority of all ProConOS tasks. Anexample of a Supervisor task is exception handling. For further information, please refer toChapter 4. The KR C must be restarted after this parameter is changed.

    Range of values

    The parameter valuePRIOVISORmust be larger thanPRIOUSER(see Section 7.5).

    PRIOVISOR=0 Highest priority

    PRIOVISOR=187 Default priority (default value)

    PRIOVISOR=234 Lowest priority

    7.5 PRIOUSER parameterThe value of this parameter specifies the priority of the ProConOS User tasks. MULTIPROGallows the assignment of 15 priority levels, which can be mapped on ProConOS by meansof PRIOUSER. The priority defined via this parameter corresponds to priority 1 inMULTIPROG. The Default task has the lowest priority level of the user tasks. The priorityof the Default task cannot be defined, since it is calculated by ProConOS from the value ofthe PRIOUSER parameter (DEFAULT TASK = PRIOUSER + 15). The Default task receivescomputing time if no other ProConOS task requires computing time.

    Forfurther information, please refer to Chapter4. TheKR C controller must be restarted afterthis parameter is changed.

    Range of values

    The value of thePRIOUSERparameter must be greater than the value of thePRIOVISOR parameter plus 1 (PRIOUSERPRIOVISOR + 1) (see Section 7.4).

    PRIOUSER=0 Highest priority

    PRIOUSER=201 Default priority (default value)

    PRIOUSER=235 Lowest priority

    7.6 PRIOSYSTEM parameter

    The value of this parameter specifies the priority of the ProConOS System task. Thefunctions of the ProConOS System tasks are communication with MULTIPROG, debuggingand memory management. System tasks receive the lowest priority level. For further

    information, please refer to Chapter 4. The KR C controller must be restarted after thisparameter is changed.

    Range of values

    The value of the PRIOSYSTEM parameter is greater than or equal to the value of thePRIOUSERparameter plus 16 (PRIOSYSTEMPRIOUSER + 16) (see Section 7.5).

    PRIOSYSTEM=0 Highest priority

    PRIOSYSTEM=217 Default priority (default value)

    PRIOSYSTEM=250 Lowest priority

  • 7/23/2019 Softplc Multiprog 11 En

    30/102

    KUKA.PLC Multiprog

    30 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    7.7 PRIOINTERNAL parameter

    The value of this parameter defines the priority of two tasks which are used for internal

    management purposes:

    -- one task that initializes and starts the ProConOS runtime system

    -- another task that saves the remanent data to the harddrive inthe event of a powerfailure (Powerfail)

    The KR C must be restarted after this parameter is changed.

    Range of values

    The priority is freely selectable, but should be adjusted to suit the overall system.

    PRIOINTERNAL=0 Highest priority

    PRIOINTERNAL=200 Default priority (default value)

    PRIOINTERNAL=250 Lowest priority

    7.8 MINCAPACITY parameter

    The value of this parameter defines the minimum CPU utilization level, in percent, of theProConOS tasks and the higher--priority tasks, e.g. VxWin.

    If the parameter CPUASSIGNMENT (see Section 7.19) is activated, this parameter isignored. The KR C must be restarted after this parameter is changed.

    Range of values

    MINCAPACITY=0 Minimum CPU utilization 0%

    MINCAPACITY=50 Minimum CPU utilization 50% (default value)MINCAPACITY=100 Minimum CPU utilization 100%

    7.9 MAXCAPACITY parameter

    The value of this parameter defines the maximum CPU utilization level, in percent, of theProConOS tasks and the higher--priority tasks, e.g. VxWin.

    If the parameter CPUASSIGNMENT (see Section 7.19) is activated, this parameter isignored. The KR C must be restarted after this parameter is changed.

    Range of values

    MAXCAPACITY=0 Maximum CPU utilization 0%

    MAXCAPACITY=70 Maximum CPU utilization 70% (default value)

    MAXCAPACITY=100 Maximum CPU utilization 100%

  • 7/23/2019 Softplc Multiprog 11 En

    31/102

    7 Configurable ProConOS parameters (continued)

    31 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    7.10 DELRETAIN parameter

    InfoIf remanent variables are inserted in the variable list, all of the subsequent variables areshifted. Thus with DELRETAIN=1the consistency of the subsequent remanent vari-ables cannot be ensured. Therefore new variables should be inserted only at the end ofthe variable list.

    The value of this parameter defines whether the remanent data are deleted or retained. TheKR C must be restarted after this parameter is changed.

    Range of values

    DELRETAIN=0 Remanent data are retained.

    DELRETAIN=1 Remanent data are set to their initialization values (default value)

    7.11 DELRETAINFILE parameter

    The value of this parameter defines whether the file with the remanent data is deleted afterbeing read in.

    Range of values

    DELRETAINFILE=0 The file with the remanent data is not deleted (default value).

    DELRETAINFILE=1 The file with the remanent data is deleted.

    7.12 AUTOARCHIVERETAIN parameterThe value of this parameter defines whether the remanent data is saved in the file when theKR C is shut down.

    It is generally only necessary to prevent saving if the data are already saved by anotherapplication (see Section 9.2.1).

    Range of values

    AUTOARCHIVERETAIN=0 The remanent data are not saved.

    AUTOARCHIVERETAIN=1 The remanent data are saved (default value).

  • 7/23/2019 Softplc Multiprog 11 En

    32/102

    KUKA.PLC Multiprog

    32 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    7.13 RETAINSIZE parameter

    InfoIf the value of this parameter is changed, these settings must be defined in MULTIPROG.

    The value of this parameter defines the size of the area for the remanent data in bytes. Thissize can be adjusted if necessary.

    If the value of the RETAINSIZE parameter is changed or thesize of the data area is changed,certain settings must be reconfigured in MULTIPROG.

    Range of values

    RETAINSIZE=512 Default size 512 bytes

    7.14 RESTOREOUTPUTS parameterReconfigure I/O systemtriggers the following processes in the KR C:

    G All outputs are reset

    G All drivers are reloaded

    G All modifications in the configuration files take effect

    Range of values

    RESTOREOUTPUTS=0 Do not restore values (default value)

    RESTOREOUTPUTS=1 Restore values

    7.15 ROOTPATH parameter

    The value of this parameter defines the directory in which the ProConOS files (e.g. theremanent data) are kept. The directory must be read-- and write--enabled. The KR C mustbe restarted after this parameter is changed.

    Syntax

    ROOTPATH=c:\program_files\krc\binAbsolute path (default value)

    7.16 BINPATH parameter

    The value of this parameter defines the directory in which the runtime module with the filenameproconos.ois located. The KR C must be restarted after this parameter is changed.

    Syntax

    Either absolute paths or relative paths can be used as the value.

    BINPATH=c:\program_files\krc\bin Absolute path (default value)

    BINPATH=bin Relative path within the root directory

  • 7/23/2019 Softplc Multiprog 11 En

    33/102

    7 Configurable ProConOS parameters (continued)

    33 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    7.17 LIBPATH parameter

    The value of this parameter defines the directory in which the ProConOS libraries are

    located. The default setting is the LIB directory in the KR C directory. The KR C controllermust be restarted after this parameter is changed.

    Syntax

    LIBPATH=c:\program_files\krc\lib Absolute path (default value)

    LIBPATH=bin Relative path within the root directory

    7.18 LIBRARIES parameter

    The value of this parameter defines which modules and libraries can be dynamicallyreloaded. The KR C must be restarted after this parameter is changed.

    Range of values

    LIBRARIES=ExtensionLib.o ExtensionLib library (see Section 8.1)

    LIBRARIES=KrcLib.o KrcLib library (see Section 8.2)

    LIBRARIES=KrcExVarLib.o KrcExVarLib library (see Section 8.3)

    LIBRARIES=SerialLib.o SerialLib library (see Section 8.4)

    LIBRARIES=3964Lib.o 3964Lib library (see Section 8.5)

    LIBRARIES=KcpLib.o KcpLib library (see Section 8.6)

    Multiple values are separated by commas, e.g.:

    LIBRARIES=KrcLib.o,SerialLib.o

  • 7/23/2019 Softplc Multiprog 11 En

    34/102

    KUKA.PLC Multiprog

    34 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    7.19 CPUASSIGNMENT parameter

    InfoThis function may only be used after consultation with the KUKA Roboter Service de-partment. This function can adversely affect the real--time behavior of the robot system.

    The value of this parameter defines the time slice of the CPU computing time in which theProConOS tasks are executed. If this parameter is active or entered in the initialization file,the MINCAPACITY and MAXCAPACITY parameters are deactivated automatically and thepriorities of the Supervisor task, the User task and the Default task are calculatedautomatically.

    The KR C must be restarted after this parameter is changed.

    Syntax

    The value which is represented here by the placeholder [time_slice_x] defines the time sliceduring which ProConOS is allotted exclusive use of the processor time. Multiple values areseparated by commas.

    CPUASSIGNMENT=[time_slice_1],[time_slice_2],[time_slice_n]

    Example:Execution of ProConOS in time slices 3 and 9 (default).

    CPUASSIGNMENT=3,9

  • 7/23/2019 Softplc Multiprog 11 En

    35/102

    7 Configurable ProConOS parameters (continued)

    35 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    7.20 SERIAL parameter

    The value of this parameter defines whether or not a serial interface is available for

    ProConOS. The serial interface between a development computer (MULTIPROG) and theKR C (ProConOS) can be used to transfer programs when no TCP/IP network is available.

    The KR C must be restarted after this parameter is changed.

    In order to configure the activated serial interface, it is also necessary to configure theparameters COM (see Section 7.21) and BAUDRATE(see Section 7.22).

    Range of values

    SERIAL=0 Serial interfaces are deactivated for ProConOS (default value)

    SERIAL=1 Serial interfaces are activated for ProConOS

    7.21 COM parameter

    Info

    If the value of this parameter is changed, the values of the parameters COM1andCOM2must be adapted in the [SERIAL]section of the initialization filec:\krc\robo-ter\init\hw_inf.ini .

    Info

    Please ensure that no conflicts with other devices or applications are created on theserial interface, for example with SerialLib or 3964Lib.

    The value of this parameter defines whether serial interface 1 (COM 1) or serial interface 2(COM 2) is used. This parameter is only active if the parameter SERIALis activated (see

    Section 7.20).

    The KR C must be restarted after this parameter is changed.

    Range of values

    COM=1 Serial interface 1 (COM 1) is used

    In the[SERIAL]section of the file c:\program_files\krc\init\hw_inf.ini:

    COM1=ENABLE

    COM2=DISABLE

    COM=2 Serial interface 2 (COM 2) is used

    In the[SERIAL]section of the file c:\program_files\krc\init\hw_inf.ini:

    COM1=DISABLE

    COM2=ENABLE

  • 7/23/2019 Softplc Multiprog 11 En

    36/102

    KUKA.PLC Multiprog

    36 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    7.22 BAUDRATE parameter

    InfoThe value of this parameter must also be defined in the resource settings in the MULTI-PROG wt project.

    Operator control of MULTIPROG is described in the attached manufacturer documenta-tion.

    The value of this parameter defines the baud rate of the COM interface which has beendefined by means of the COM parameter (see Section 7.21).

    This parameter is only active if the parameter SERIALis activated (see Section 7.20).

    The KR C must be restarted after this parameter is changed.

    Range of values

    BAUDRATE=2400 COM interface with 2,400 baud

    BAUDRATE=4800 COM interface with 4,800 baud

    BAUDRATE=9600 COM interface with 9,600 baud

    BAUDRATE=19200 COM interface with 19,200 baud

    7.23 SIGNALFILES parameter

    The parameter SIGNALFILES serves to signal *.dat files to the ProConOS system that areused to access I/O data symbolically. It is preset during setup with the files C:\KRC\Ro-boter\KRC\R1\System\$Config.dat and C:\KRC\Roboter\KRC\Steu\Mada\$Machine.dat

    and can be expanded as required.

    The functionality is currently used by the AutoExtLib and ExtensionLib libraries.

    7.24 SIGNALFILEREAD parameter

    The signal files referred to in 7.23 are read in accordance with the entrySIGNALFILEREAD.If this entry is set to =BOOT, the signal files are read once when ProConOS or the controlleris started. Otherwise, the signal files are reloaded every time ProConOS program executionis started. If Automatic External interface signals are to be reconfigured, ProConOS mustbe stopped and restarted.

  • 7/23/2019 Softplc Multiprog 11 En

    37/102

    7 Configurable ProConOS parameters (continued)

    37 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

  • 7/23/2019 Softplc Multiprog 11 En

    38/102

    KUKA.PLC Multiprog

    38 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    8 Libraries

    This chapter describes the libraries which can be dynamically loaded by means ofProConOS.

    The libraries are loaded by means of the value of the parameter LIBRARIES (seeSection 7.18) in the initialization file proconos.ini.

    8.1 ExtensionLib library

    This section describes the ProConOS functions of the library ExtensionLib.

    8.1.1 SaveRetain function: save remanent data by program

    This function block can be used to save remanent data via PLC programs. Saving can takeseveral hundreds of milliseconds, depending on the volume of the data. For this reason, thefunction block should be executed either in the SPG2 stop task, or in another task which isnot monitored by the watchdog.

    Fig. 10 SaveRetain function block symbol

    Parameter Datatype

    I/O Description

    Enable BOOL IN A rising edge at this input activates the function-ality of the function module.

    Success BOOL OUT FALSE: An error occurred when saving the re-manent data.

    TRUE: The remanent data were saved success-fully.

  • 7/23/2019 Softplc Multiprog 11 En

    39/102

    8 Libraries (continued)

    39 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.1.2 PlcSleep function: provide CPU computing time

    InfoThis function may only be used after consultation with the KUKA Roboter Service de-partment. This function can adversely affect the real--time behavior of the robot system.

    This function block can be used to provide CPU computing time to lower--priority tasks of thelower--level operating system.

    Fig. 11 PlcSleep function block symbol

    Parameter Datatype

    I/O Description

    SleepTime BOOL IN CPU computing time in milliseconds which is tobe provided.

  • 7/23/2019 Softplc Multiprog 11 En

    40/102

    KUKA.PLC Multiprog

    40 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    8.1.3 File services

    The function blocks listed in this section give ProConOS access to the file system. With this

    function block, a maximum of 31 files can be open at the same time. When ProConOS isstarted, all files which are still open are automatically closed. Since values are saved in eachinstance of the function block, a separate instance must be created for each action.

    Each of these function blocks has the inputEnable and the outputDone. TheEnable inputis used to initiate the file action. For files which were opened by means of ExtLib, the outputDone reports theend of theaction, regardless of whether or not it was successfullyexecuted.

    The input Enableremains set to the value1 until the action has been ended. The outputDoneis reset whenEnableis reset.

    Enable

    Action

    Done

    Time

    Fig. 12 Enable and Done signals

    For information on creating the ProConOS data directory, see also Section 4.7.

  • 7/23/2019 Softplc Multiprog 11 En

    41/102

    8 Libraries (continued)

    41 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.1.3.1 FileOpen function: opening a file

    This function block can be used to open a file for subsequent read or write access.Especially

    with large files, it is important to keep in mind that when the file is opened its entire contentsare read and buffered in VxWORKS. Modifications which are made after opening the file, forexample under Windows, are only recognized when the file is opened again.

    Fig. 13 FileOpen function block symbol

    Parameter Datatype

    I/O Description

    Enable BOOL IN Activation input: A rising edge causes the inputparameters to be transferred and the actionOpen fileto be initiated

    FileName STRING IN The name and path of the file which is to beopened. Directory levels in the path are sepa-rated by two backslashes (e.g.PlcData\\Test.dat).

    Options BYTE IN 0: Read access

    1: Write access

    2: Read and write access

    5: Write access (the file is created if it is not al-ready present)

    7: Read and write access (the file is created if itis not already present)

    Done BOOL OUT This parameter is set to the value1 when theaction has been completed. In order to determinewhether the action was successfully completed,theResultparameter of this function must alsobe evaluated.

    Result INT OUT 0: Action successful

    Otherwise: error (see Section 9.2)

    FileId BYTE OUT The unambiguous reference number for theopened file; must be buffered for use in subse-quent function calls.

  • 7/23/2019 Softplc Multiprog 11 En

    42/102

    KUKA.PLC Multiprog

    42 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    8.1.3.2 FileClose function: closing a file

    This function block can be used to close a file opened by means of the FileOpenfunction

    (see Section 8.1.3.1). Changes to the contents of the file are only written to the file whenit is closed.

    Fig. 14 FileClose function block symbol

    Parameter Datatype

    I/O Description

    Enable BOOL IN Activation input: A rising edge causes the inputparameters to be transferred and the actionClose fileto be initiated

    FileId BYTE IN The unambiguous reference number for anopened file; generated by theFileOpen function(see Section 8.1.3.1).

    Done BOOL OUT This parameter is set to the value1 when theaction has been completed. In order to determinewhether the action was successfully completed,theResultparameter of this function must also

    be evaluated.Result INT OUT 0: successful

    Otherwise: error (see Section 9.2)

  • 7/23/2019 Softplc Multiprog 11 En

    43/102

    8 Libraries (continued)

    43 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.1.3.3 FileWrite function: writing data

    This function module can be used to write data from ProConOS variables to an opened file.

    Changes are only written to the file when it is closed.

    Fig. 15 FileWrite function block symbol

    Parameter Datatype

    I/O Description

    Enable BOOL IN Activation input: A rising edge causes the inputparameters to be transferred and the actionWrite datato be initiated

    FileId BYTE IN The unambiguous reference number for anopened file; generated by theFileOpen function(see Section 8.1.3.1).

    Data ANY IN The variable with data which are to be written tothe file. This variable can be of any data type,e.g. BYTE, INT, STRING, STRUCT, etc.

    Done BOOL OUT This parameter is set to the value1 when theaction has been completed. In order to determinewhether the action was successfully completed,theResultparameter of this function must alsobe evaluated.

    Result INT OUT 0: successful

    1: error (see Section 9.2)

  • 7/23/2019 Softplc Multiprog 11 En

    44/102

    KUKA.PLC Multiprog

    44 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    8.1.3.4 FileRead function: reading data

    This function block can be used to read data of ProConOS variables from an opened file.

    Since when the file is opened its entire contents are read and buffered in VxWORKS, anychanges which are made after it is opened, e.g. under Windows, are only recognized afterthe file is opened again.

    Fig. 16 FileRead function block symbol

    NOTE

    Output parameters of data type ANY are displayed on the left side of the function block.

    Parameter Datatype

    I/O Description

    Enable BOOL IN Activation input: a rising edge causes the inputparameters to be transferred and the Read dataaction to be initiated.

    FileId BYTE IN The unambiguous reference number for anopened file; generated by theFileOpen function(see Section 8.1.3.1).

    Data ANY OUT The variable to which data are to be assignedfrom the file. These variables can be of any datatype, e.g. BYTE, INT, STRING, STRUCT, etc.

    Size INT IN Number of characters to be read

    Done BOOL OUT This parameter is set to the value1 when theaction has been completed. In order to determinewhether the action was successfully completed,theResultparameter of this function must also

    be evaluated.Result INT OUT 0: successful

    Otherwise: error (see Section 9.2)

  • 7/23/2019 Softplc Multiprog 11 En

    45/102

    8 Libraries (continued)

    45 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.1.3.5 FileSeek function: changing the file position

    This function block can be used to change the position in the file where writing or reading is

    carried out.

    Fig. 17 FileSeek function block symbol

    Parameter Datatype

    I/O Description

    Enable BOOL IN Activation input: A rising edge causes the inputparameters to be transferred and the action Fileinformation to be initiated

    FileId BYTE IN An unambiguous reference number for anopened file; generated by theFileOpen function(see Section 8.1.3.1).

    Start BYTE IN The start point within the file and the position

    from which repositioning is to be carried out:0: current file position

    1: beginning of the file (offset must be positive)

    2: end of the file (offset must be negative)

    Offset INT IN The number of bytes by which the file position isto be changed.

    Done BOOL OUT This parameter is set to the value1 when theaction has been completed. In order to determinewhether the action was successfully completed,theResultparameter of this function must alsobe evaluated.

    Result INT OUT 0: successful

    Otherwise: error (see Section 9.2)

  • 7/23/2019 Softplc Multiprog 11 En

    46/102

    KUKA.PLC Multiprog

    46 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    8.1.3.6 FileGetInfo function: file information

    This function block can be used to read information about an opened file. This module does

    not have any Done output, i.e. the values of the output parameters are available immediatelyafter the module is called.

    Fig. 18 FileGetInfo function block symbol

    Parameter Datatype

    I/O Description

    Enable BOOL IN Activation input: A rising edge causes the inputparameters to be transferred and the action Fileinformation to be initiated

    FileId BYTE IN An unambiguous reference number for anopened file; generated by theFileOpen function(see Section 8.1.3.1).

    Result INT OUT 0: successful

    Otherwise: error (see Section 9.3)

    FileName STRING OUT File name

    FilePos DINT OUT The current file position.

    LastError DINT OUT The operating system error number of the lasterror to occur. This information is needed for de-tailed troubleshooting.

  • 7/23/2019 Softplc Multiprog 11 En

    47/102

    8 Libraries (continued)

    47 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.1.3.7 FileDelete function: deleting a file

    This function block can be used to delete a file from the hard disk of the KR C controller.

    Fig. 19 FileDelete function block symbol

    Parameter Datatype

    I/O Description

    Enable BOOL IN Activation input: A rising edge causes the inputparameters to be transferred and the actionDelete fileto be initiated

    FileName STRING INT The file name of the file to be deleted.

    Done BOOL OUT This parameter is set to the value1 when theaction has been completed. In order to determinewhether the action was successfully completed,theResultparameter of this function must alsobe evaluated.

    Result INT OUT 0: successful

    Otherwise: error (see Section 9.2)

  • 7/23/2019 Softplc Multiprog 11 En

    48/102

    KUKA.PLC Multiprog

    48 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    8.1.3.8 Example

    In this example, the file c:\krc\roboter\PlcData\Test.dat is deleted, created again, opened,

    written with aBYTEand aSTRING, and closed, all in MULTIPROG.

    Fig. 20 File operation example

  • 7/23/2019 Softplc Multiprog 11 En

    49/102

    8 Libraries (continued)

    49 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.1.4 Accessing KR C signals

    The function blocks KrcSignalRead and KrcSignalWrite allow symbolical access to the I/Os

    of the KR C controller. This enables I/O assignment without a PLC project and without Multi-prog. The assignment between the symbol and the I/O address is made by means of a KR Csignal declaration. For further information, see Sections 7.23 and 7.24.

    Info

    It must be remembered that accessing I/Os during a PLC cycle violates the PLC princi-ple which stipulates that input data must not be changed at any point in the cycle andthat outputs are written at the end of the cycle.

    Info

    When attempting to write to system outputs, it is possible that a message may be gen-erated cyclically in the message window. This can cause the message buffer to over-

    flow, thereby disabling the controller.

    Info

    It must be borne in mind that the status setting of outputs which are simultaneously be-ing written to from elsewhere, e.g. by KrcloDrv and the KrcSignalWrite function block,will be unpredictable.

    8.1.4.1 KrcSignalRead

    The KrcSignalRead function block allows I/O data to be read symbolically.

    KrcSignalRead_1

    SignalName

    Value

    Error

    KrcSignalRead

    Although the parameter Value appears as an input, the read value is written to the linkedvariable.

    Parameter Datatype

    Description

    SignalName STRING Name of the signal that is to be read

    Value ANY Read value

    Error INT Error code

    Error codes

    Code Meaning

    0 Successful

    --2 Signal not found

    --6 Buffer too small

  • 7/23/2019 Softplc Multiprog 11 En

    50/102

    KUKA.PLC Multiprog

    50 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    8.1.4.2 KrcSignalWrite

    The KrcSignalWrite function block allows I/O data to be written symbolically.

    KrcSignalWrite_1

    SignalName

    Value

    Error

    KrcSignalWrite

    Parameter Datatype

    Description

    SignalName STRING Name of the signal that is to be writtenValue ANY Value to be written

    Error INT Error code

    Error codes

    Code Meaning

    0 Successful

    --2 Signal not found

    --6 Buffer too small

  • 7/23/2019 Softplc Multiprog 11 En

    51/102

    8 Libraries (continued)

    51 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.2 KrcLib library

    This library carries out read and write access to robot data. During installation, this library

    is inserted as a project library in MULTIPROG.

    8.2.1 ReadAxisAct function: reading $AXIS_ACT

    Info

    This function may only be used after consultation with the KUKA Roboter Servicedepartment. This function can adversely affect the real--time behavior of the robotsystem. To prevent this, if allowed by the application, the actual position should be readby a task that is processed a maximum of once every 12 ms.

    This function block can be used to read by means of the variable $AXIS_ACTthe current

    actual robot position values of axes A 1 to A 6.

    Fig. 21 ReadAxisAct function block symbol

    Parameter Datatype

    I/O Element Description

    A1 REAL OUT $AXIS_ACT.A1 Angle A 1

    A2 REAL OUT $AXIS_ACT.A2 Angle A 2

    A3 REAL OUT $AXIS_ACT.A3 Angle A 3

    A4 REAL OUT $AXIS_ACT.A4 Angle A 4

    A5 REAL OUT $AXIS_ACT.A5 Angle A 5A6 REAL OUT $AXIS_ACT.A6 Angle A 6

  • 7/23/2019 Softplc Multiprog 11 En

    52/102

    KUKA.PLC Multiprog

    52 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    Examples

    The example shows a call in the programming language IL:

    CAL ReadAxisAct_1LD ReadAxisAct_1.A1ST AxisAct.A1LD ReadAxisAct_1.A2ST AxisAct.A2

    LD ReadAxisAct_1.A3ST AxisAct.A3LD ReadAxisAct_1.A4ST AxisAct.A4LD ReadAxisAct_1.A5ST AxisAct.A5LD ReadAxisAct_1.A6ST AxisAct.A6

    The example shows a call in the programming language ST:

    ReadAxisAct_1();AxisAct.A1:=ReadAxisAct_1.A1;AxisAct.A2:=ReadAxisAct_1.A2;AxisAct.A3:=ReadAxisAct_1.A3;AxisAct.A4:=ReadAxisAct_1.A4;AxisAct.A5:=ReadAxisAct_1.A5;AxisAct.A6:=ReadAxisAct_1.A6;

  • 7/23/2019 Softplc Multiprog 11 En

    53/102

    8 Libraries (continued)

    53 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.2.2 ReadAxisActEx function: reading $AXIS_ACT

    InfoThis function may only be used after consultation with the KUKA Roboter Servicedepartment. This function can adversely affect the real--time behavior of the robotsystem. To prevent this, if allowed by the application, the actual position should be readby a task that is processed a maximum of once every 12 ms.

    This function block can be used to read by means of the variable $AXIS_ACTthe currentactual values of axes A 1 to A 12.

    Fig. 22 ReadAxisActEx function block symbol

    Parameter Datatype

    I/O Element Description

    A1 REAL OUT $AXIS_ACT.A1 Angle A 1

    A2 REAL OUT $AXIS_ACT.A2 Angle A 2

    A3 REAL OUT $AXIS_ACT.A3 Angle A 3A4 REAL OUT $AXIS_ACT.A4 Angle A 4

    A5 REAL OUT $AXIS_ACT.A5 Angle A 5

    A6 REAL OUT $AXIS_ACT.A6 Angle A 6

    A7 REAL OUT $AXIS_ACT.A7 Angle A 7

    A8 REAL OUT $AXIS_ACT.A8 Angle A 8

    A9 REAL OUT $AXIS_ACT.A9 Angle A 9

    A10 REAL OUT $AXIS_ACT.A10 Angle A 10

    A11 REAL OUT $AXIS_ACT.A11 Angle A 11

    A12 REAL OUT $AXIS_ACT.A12 Angle A 12

  • 7/23/2019 Softplc Multiprog 11 En

    54/102

    KUKA.PLC Multiprog

    54 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    Example

    The example shows a call in the programming language IL:

    CAL ReadAxisActEx_1LD ReadAxisActEx_1.A1ST AxisAct.A1LD ReadAxisActEx_1.A2ST AxisAct.A2

    LD ReadAxisActEx_1.A3ST AxisAct.A3LD ReadAxisActEx_1.A4ST AxisAct.A4LD ReadAxisActEx_1.A5ST AxisAct.A5LD ReadAxisActEX_1.A6ST AxisAct.A6LD ReadAxisActEx_1.A7ST AxisAct.A7LD ReadAxisActEx_1.A8ST AxisAct.A8LD ReadAxisActEx_1.A9ST AxisAct.A9LD ReadAxisActEx_1.A10ST AxisAct.A10LD ReadAxisActEx_1.A11ST AxisAct.A11LD ReadAxisActEx_1.A12ST AxisAct.A12

    The example shows a call in the programming language ST:

    ReadAxisActEx_1();AxisAct.A1:=ReadAxisActEx_1.A1;AxisAct.A2:=ReadAxisActEx_1.A2;AxisAct.A3:=ReadAxisActEx_1.A3;AxisAct.A4:=ReadAxisActEx_1.A4;AxisAct.A5:=ReadAxisActEx_1.A5;AxisAct.A6:=ReadAxisActEx_1.A6;AxisAct.A7:=ReadAxisActEx_1.A7;AxisAct.A8:=ReadAxisActEx_1.A8;

    AxisAct.A9:=ReadAxisActEx_1.A9;AxisAct.A10:=ReadAxisActEx_1.A10;AxisAct.A11:=ReadAxisActEx_1.A11;AxisAct.A12:=ReadAxisActEx_1.A12

  • 7/23/2019 Softplc Multiprog 11 En

    55/102

    8 Libraries (continued)

    55 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.2.3 ReadBaseAct function: reading $ACT_BASE

    This function block can be used to read by means of the variable$ACT_BASEthe current

    position of the base origin.

    Fig. 23 ReadBaseAct function block symbol

    Parameter Datatype

    I/O Element Description

    bValid BOOL OUT FALSE: no tool present

    TRUE: tool present

    X REAL OUT $ACT_BASE.X X coordinate

    Y REAL OUT $ACT_BASE.Y Y coordinate

    Z REAL OUT $ACT_BASE.Z Z coordinate

    A REAL OUT $ACT_BASE.A Orientation A

    B REAL OUT $ACT_BASE.B Orientation B

    C REAL OUT $ACT_BASE.C Orientation C

  • 7/23/2019 Softplc Multiprog 11 En

    56/102

    KUKA.PLC Multiprog

    56 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    8.2.4 ReadOvPro function: reading $OV_PRO:

    This function block can be used to read by means of the variable $OV_PRO the current

    override of the KR C.

    The return value of this function is the override within a value range from 0 to 100.

    Fig. 24 ReadOvPro function block symbol

    8.2.5 WriteOvPro function: writing $OV_PROThis function block can be used to set by means of the variable $OV_PRO the currentoverride of the KR C.

    The input parameter is the override within a value range from 0 to 100.

    Fig. 25 WriteOvPro function block symbol

  • 7/23/2019 Softplc Multiprog 11 En

    57/102

    8 Libraries (continued)

    57 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.2.6 ReadPosAct function: reading $POS_ACT

    InfoThis function can adversely affect the real--time behavior of the robot system. To pre-vent this, if allowed by the application, the actual position should be read by a task thatis processed a maximum of once every 12 ms.

    This function block can be used to read by means of the variable $POS_ACTthe currentactual values of the robot position.

    Fig. 26 ReadPosAct function block symbol

    Parameter Data

    type

    I/O Element Description

    bValid BOOL OUT FALSE: not valid

    TRUE: valid

    X REAL OUT $POS_ACT.X X coordinate

    Y REAL OUT $POS_ACT.Y Y coordinate

    Z REAL OUT $POS_ACT.Z Z coordinate

    A REAL OUT $POS_ACT.A Orientation A

    B REAL OUT $POS_ACT.B Orientation B

    C REAL OUT $POS_ACT.C Orientation C

  • 7/23/2019 Softplc Multiprog 11 En

    58/102

    KUKA.PLC Multiprog

    58 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    8.2.7 ReadSenInt function: reading $SEN_PINT[ ]

    This function block can be used to read 20 KR C variables of the type Integer which are

    available for KRL programming, which contain freely available integer and real values, andwhich can be accessed by means of the sensor interface.

    Fig. 27 ReadSenInt function block symbol

    Parameter Datatype

    I/O Description

    Index BYTE IN Index of the KR C variables from 1 to 20

    Function result DINT OUT Value of variable

    8.2.8 WriteSenInt function: writing $SEN_PINT[ ]

    This function block can be used to write to 20 KR C variables of the type Integer which areavailable for KRL programming, which contain freely available integer and real values, andwhich can be accessed by means of the sensor interface.

    Fig. 28 WriteSenInt function block symbol

    Parameter Datatype

    I/O Description

    Index BYTE IN Index of the KR C variables from 1 to 20

    Value DINT OUT Value of variable

  • 7/23/2019 Softplc Multiprog 11 En

    59/102

    8 Libraries (continued)

    59 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.2.9 ReadSenReal function: reading $SEN_PREA[ ]

    This function block can be used to read 20 KR C variables which are available for KRL

    programming, which contain freely available integer and real values, and which are availableby means of the sensor interface.

    Fig. 29 ReadSenReal function block symbol

    Parameter Datatype

    I/O Description

    Index BYTE IN Index of the KR C variables from 1 to 20

    Function result DINT OUT Value of variable

    8.2.10 WriteSenReal function: writing $SEN_PREA[ ]

    This function block can be used to read 20 KR C variables which are available for KRLprogramming, which contain freely available integer and real values, and which are availableby means of the sensor interface.

    Fig. 30 WriteSenReal function block symbol

    Parameter Datatype

    I/O Description

    Index BYTE IN Index of the KR C variables from 1 to 20

    Value REAL IN Value of variable

  • 7/23/2019 Softplc Multiprog 11 En

    60/102

    KUKA.PLC Multiprog

    60 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    8.2.11 ReadToolAct function: reading $ACT_TOOL

    This function block can be used to read by means of the variable $ACT_TOOL the current

    position of the tool origin.

    Fig. 31 ReadToolAct function block symbol

    Parameter Datatype

    I/O Element Description

    bValid BOOL OUT FALSE: no tool present

    TRUE: tool present

    X REAL OUT $ACT_BASE.X X coordinate

    Y REAL OUT $ACT_BASE.Y Y coordinateZ REAL OUT $ACT_BASE.Z Z coordinate

    A REAL OUT $ACT_BASE.A Orientation A

    B REAL OUT $ACT_BASE.B Orientation B

    C REAL OUT $ACT_BASE.C Orientation C

    8.2.12 ReadModeOp function: reading $MODE_OP

    This function block can be used to read by means of the variable $MODE_OP the currentoperating mode.

    Fig. 32 ReadModeOp function block symbol

    Parameter Datatype

    I/O Description

    Return value BYTE OUT 1: T1

    2: T2

    3: AUT4: EXT

  • 7/23/2019 Softplc Multiprog 11 En

    61/102

    8 Libraries (continued)

    61 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.2.13 ReadProState function: Reading $PRO_STATE

    This function block can be used to read by means of the variable $PRO_STATE the current

    status of the Submit interpreter and robot interpreter.

    Fig. 33 ReadProState function block symbol

    Parameter Datatype

    I/O Description

    Index BYTE IN 0: Submit interpreter

    1: Robot interpreterReturn value BYTE OUT 0: invalid index

    1: no program selected

    2: program selected but not yet started

    3: program is being executed

    4: program stopped

    5: program has been completely executed

    8.2.14 DisplayKCPNotifyMsg function: displaying acknowledgement messagesThis function block can be used to display messages to the user in the PLC application.

    Info

    This function should not be used to display cyclic messages. Otherwise there is a riskthat individual messages can no longer be displayed, or that the KRC message bufferwill overflow.

    Fig. 34 DisplayKCPNotifyMsg function block symbol

    Parameter Datatype

    I/O Description

    Msg STRING IN A message to be displayed (max. 28 characters)

    Enable BOOL IN The trigger for starting the action

  • 7/23/2019 Softplc Multiprog 11 En

    62/102

    KUKA.PLC Multiprog

    62 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    8.2.15 DisplayKCPStatusMsg function: displaying status messages

    This function block can be used to display status messages to the user in the PLC

    application. This function sends back an unambiguous message number which can be usedto clear the message (see Section 8.2.16). Status messages cannot be acknowledged.

    C A U T I O N !

    This function should not be used to display cyclic messages. Otherwise there is a risk thatindividual messages can no longer be displayed, or that the KRC message buffer willoverflow.

    Info

    This function should not be used to display cyclic messages. Otherwise there is a riskthat individual messages can no longer be displayed, or that the KRC message bufferwill overflow.

    Fig. 35 DisplayKCPStatusMsg function block symbol

    Parameter Datatype

    I/O Description

    Msg STRING IN A message to be displayed (max. 28 characters)Enable BOOL IN The trigger for starting the action

    MsgNr DINT OUT The unambiguous message number

    8.2.16 ClearKCPStatusMsg function: clearing status messages

    This function block can be used to have a status message acknowledged by the PLCprogram. Status messages cannot be acknowledged by the user.

    Fig. 36 ReadPosAct function block symbol

    Parameter Datatype

    I/O Description

    MsgNr DINT IN Unambiguous message number from previous call of

    DisplayKCPStatusMsg(see Section 8.2.15).Enable BOOL IN The trigger for starting the action

  • 7/23/2019 Softplc Multiprog 11 En

    63/102

    8 Libraries (continued)

    63 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.2.17 ClearAllKCPStatusMsg function: clearing all status messages

    This function block can be used to clear all active status messages.

    Fig. 37 ClearAllKCPStatusMsg function block symbol

    Parameter Datatype

    I/O Description

    Enable BOOL IN The trigger for starting the action

  • 7/23/2019 Softplc Multiprog 11 En

    64/102

    KUKA.PLC Multiprog

    64 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    8.3 KrcExVarLib library

    This library makes it possible to read and write in an array. The KR C makes available the

    following array variables, which can be used for data exchange between ProConOS and theKR C software:

    G $SOFTPLCBOOL[1 to n]

    G $SOFTPLCINT[1 to n]

    G $SOFTPLCREAL[1 to n]

    Files

    This library comprises the following files:

    File name Path Description

    KrcExVarLib.o ProConOS library directory The executable binary filetmp.o \MWT\PLC\

    FW_LIB\KrcExVarLibThe description of the MULTIPROGlibrary

    KrcExVarLib.fwl \MWT\PLC\FW_LIB\KrcExVarLib

    The description of the MULTIPROGlibrary

    KrcExVarLib.pou \MWT\PLC\FW_LIB\KrcExVarLib

    The description of the MULTIPROGlibrary

  • 7/23/2019 Softplc Multiprog 11 En

    65/102

    8 Libraries (continued)

    65 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.3.1 ReadPLCBool, ReadPLCInt, ReadPLCReal functions: reading a single value

    The function blocksReadPLCBool,ReadPLCIntandReadPLCRealcan each be used to

    read a single value from an array.

    This example shows the function block ReadPLCBool, which reads the value of the KR Cvariable$SOFTPLCBOOL[1]and assigns it to the ProConOS variablebValue1.

    The result is saved in the variablebResult1.

    Fig. 38 ReadPLCBool function block symbol

    Parameter Datatype

    I/O Description

    Index INT IN Index valid from 1 to n

    Value BOOL OUT Value from the array

    DINT OUT

    REAL OUT

    Result BOOL OUT TRUE: error

    FALSE: OK

  • 7/23/2019 Softplc Multiprog 11 En

    66/102

    KUKA.PLC Multiprog

    66 of 99 KUKA.PLC Multiprog 1.1 10.05.01 en

    8.3.2 WritePLCBool, WritePCLInt, WritePLCReal functions: writing a single value

    The function blocksWritePLCBool,WritePLCIntandWritePLCRealcan each be used to

    write a single value to an array.

    This example shows the function block WritePLCBool, which reads the value of the KR Cvariable $SOFTPLCBOOL[99] and assigns it to theProConOS variable nValue1. Theresultis saved in the variable bResult1.

    Fig. 39 WritePCLInt function block symbol

    Parameter Datatype

    I/O Description

    Index INT IN Index valid from 1 to n

    Value BOOL OUT Value from the array

    DINT OUT

    REAL OUT

    Result BOOL OUT TRUE: error

    FALSE: OK

  • 7/23/2019 Softplc Multiprog 11 En

    67/102

    8 Libraries (continued)

    67 of 99KUKA.PLC Multiprog 1.1 10.05.01 en

    8.3.3 ReadPLCBoolEx, ReadPLCIntEx, ReadPLCRealEx functions: reading multiplevalues