Back to top
Drive a stepper control by PCMM and AKD
The output AKD X9 interface allows to produce Step/Dir or A/B pulses depending on the Encoder Emulation configuration:
Position values are coming to the interface via EtherCAT (Step Mode = 2). The EtherCAT pdo involved is 0x3499/0 (DRV.EMUESTEPCMD parameter).
The following function set up the configuration of this feature:
This function is written for PLCOpen motion engine and requires a Virtual Axis for generating the trajectory of the stepper motor.
In the picture above iGENERATOR is the Virtual Axis, iAXISX9 is the Servo Axis from which pulses are generated, iEMUEMODE is the type of output (Step/Dir or A/B) , iEMUERS must be set to 65536 and iEMUESTEPCMDPIN/POUT set the scaling (for detailed information search "Stepper Control and EEOs over fieldbus" within the WorkBench help).
Refer to DRV.EMUEPULSEWIDTH parameter for calculating the Pulse Width.
The function output oVALUE must be mapped to the pdo 0x3499/0 inside the PCMM:
After this mapping the Virtual Servo position will generate pulses to X9.
In order that the function works fine the Virtual Servo must have the Rollover Position = 0 and the function must be called every EtherCAT cycle.