With the FN 20: WAIT FOR function, you can synchronize the NC and the PLC during program run. The control stops program run until the condition you specified in the FN 20: WAIT FOR- block has been met.
Application
Description of function
Notice
Danger of collision!
Changes to the PLC can result in undesired behavior and serious errors (e.g., the control becomes inoperable). For this reason, access to the PLC is password-protected. This function allows HEIDENHAIN, the machine manufacturer, and third-party providers to communicate with the PLC from within an NC program. It is not recommended that machine operators or NC programmers use this function. There is risk of collision during the execution of the function and during the subsequent machining!
- Only use the function in consultation after checking with HEIDENHAIN, the machine manufacturer, or the third-party provider.
- Comply with the documentation from HEIDENHAIN, the machine manufacturer, and third-party providers
The SYNC function is used whenever you read system data (e.g., with FN 18: SYSREAD). The system data need to be synchronized with the current date and time. Use the FN 20: WAIT FOR to stop the look-ahead calculation. When the control encounters FN 20, it will only calculate the NC block after it has executed the NC block that contains FN 20.
Application example
11 FN 20: WAIT FOR SYNC | ; Stop internal look-ahead calculation with FN 20 |
12 FN 18: SYSREAD Q1 = ID270 NR1 IDX1 | ; Determine the position of the X axis with FN 18 |
In this example, you stop the internal pre-calculation of the control in order to determine the current position of the X axis.