This example shows how to use the axes' motion library functions to detect the positive edge of the first Fast InputThe inputs are taken into account at each cycle depending on the system periodicity (for example each millisecond). Under certain circumstances this can be insufficient when more accuracy is needed, or if a quick response is required from the system. To fill the gap, a drive may have some Fast Input connections (generally one or two). When an event happens that triggers a Fast Input (e.g. when a sensor sends a rising edge), the detection of a signal occurs faster (which can be 1000 times more accurate than the system periodicity). Then the timestamp associated with this input can be provided to the IPC to take corrective action in the drive, and read its position. MC_TouchProbe and the Trig_Ref library function are used to accurately perform a homing procedure.

A1_TrigRef.InputID := 0; // configure DriveControl device for regulating the speed, torque and position of a motor Capture Engine Used A1_TrigRef.TrigID := 0; // configure which Drive to capture an input A1_TrigRef.Direction := 1; // configure Signal transition Direction of capture A1_TrigRef.TrigMode := 1; // configure Time or Position Capture
Inst_MC_TouchProbe( True, AxisID, A1_TrigRef, FALSE, 0, 0 );
The position capture can be time-based ( A1_TrigRef.TrigMode := 0 ) or position-based ( A1_TrigRef.TrigMode := 1 ).
Fast HomingThe Homing procedure allows, based on a position measurement, to set a position offset to the motor in order to ensure it is physically at the home position based on the drive's high speed capture mechanism is also supported by the following Kollmorgen KUDFBs in the IDE"Integrated development environment" An integrated development environment is a type of computer software that assists computer programmers in developing software. IDEs normally consist of a source code editor, a compiler and/or interpreter, build-automation tools, and a debugger Function BlockA function block groups an algorithm and a set of private data. It has inputs and outputs. Library MCFB_StepAbsSwitchFastInput and MCFB_StepLimitSwitchFastInput.
|
Copyright © 2015 Kollmorgen™ |
|