13.17.25 FC22: TM_DIR - direction selection for tool managementNOTICEUseBlock FC22 "TM_DIR" may only be used in conjunction with the tool management.FunctionReferred to the location numbers, e.g. a tool magazine or revolver (indexing axis) block FC22"TM_DIR" supplies the shortest path and direction of motion for positioning, based on the targetand current position.Outputs● Input FC22: "Start" = 1 ⇒ the outputs are cyclically updated.● Input FC22: "Start" = 0 ⇒ the outputs are undefined.Special positioningFor direction selection with special positioning (input FC22: "Offset" > 0) a new target positionis calculated from the target position, the offset for special positioning as well as the numberof magazines locations:New_target position = ( target position - ( special position -1 ) ) neg. MODULOnumber_of_magazine locationsThe new target position corresponds to the location number at which the magazine must bepositioned so that the target position requested by the user corresponds to the location numberof the special position.The directional optimization is active both with and without special positioning.CallThe block must be called once with the appropriate parameter settings for each magazine.References● Further PI services for tool management:– FB4: Request PI service (Page 937)– FC7: TM_REV - transfer block for tool change with revolver (Page 997)– FC8: TM_TRANS - transfer block for tool management (Page 1000)● Function Manual, Tool ManagementDeclaration of the functionFUNCTION FC22: VOID// NAME: TM_DIRVAR_INPUTP3: Basic PLC program for SINUMERIK 840D sl13.17 Block descriptionsBasic Functions1044 Function Manual, 01/2015, 6FC5397-0BP40-5BA2