NTDI01 Single-axis operation instruction programming introduction: Stepper motor (servo motor)
NTDI01 motion control is mainly used to control the stepper motor and servo motor, for example, after the control of the stepper motor is run, the sensor is detected, so that the stepper motor has an emergency stop or deceleration stop action, such control must use the single-axis operation instruction in the motion instruction. 【 Control requirements 】https://www.gsplcdcs.com/
Control a stepper motor positive and negative rotation, motor drive subdivision is 2000 (electronic gear ratio is 1:1), control a cylinder.
Press the start switch X0 (without lock switch, press it one time to give a signal), trigger the cylinder to push out, hold for 2s, and the motor is turning forward. When the motor hits inductor X1 during operation, the motor slows down and stops. When the motor stops, the cylinder is triggered back again. 【 Action analysis 】
NTDI01 pressing the start switch is to add a waiting for input instruction, trigger cylinder launch, is to add trigger output instruction, trigger Y0 pass, delay 2s, add delay waiting instruction. The motor is turning forward, because the motor is running in the process of touching the limit switch, so the motor uses an incremental mode, NTDI01 as far as possible to set the maximum displacement value (pulse number), such as 200000, the motor is running forward, touching the sensor X1, that is, waiting for input instructions, waiting for X1 to have signals, electricityhttps://www.gsplcdcs.com/
Machine deceleration stop, add single axis operation, shaft 1 deceleration stop, in order to ensure that the motor has stopped, add a single axis waiting command at the back, wait for the shaft to stop.
After motor stop, trigger cylinder retracted, add trigger output command, trigger Y0 break, delay 3s. Motor reversal, like forward rotation set the maximum displacement value (pulse number), such as 200000, the motor runs in reverse, encounters the sensor X2, that is, add wait for input instructions, wait for X2 to have a signal, the motor emergency stop, add single-axis operation, axis 1 emergency stop. 【 Control Flow chart 】
According to the action analysis, each action is an instruction, and each instruction is connected by a flow chart