1C31219G01 Motion control: PLC combined with touch screen to achieve motion control
【 Setting purpose 】
1C31219G01 Step/servo motor start, stop, emergency stop, manual operation on the touch screen. 【 Control requirements 】
Press the start button, the motor will turn 10000 pulses forward, and then reverse 10000 after the operation is completed
Number of pulses, stop when the operation is complete. As long as there is a signal at the start, the electric machine will keep
Reverse and reverse motion, if disconnected start signal, the action will stop.
Set manual key, forward and reverse, press the forward key when the motor forward 10000 pulse
Impulse, the motor reverses 10000 pulses when the reverse button is pressed.
Set the emergency stop button. When pressing the emergency stop button, all actions will be disconnected and the initial state will be restored.
The motor stops, and the emergency stop has the function of pulse clearing. When the emergency stop key is pressed, the pulse clearing is performed at the same time
Zero.
Note: 1C31219G01 Stepper/servo motor running speed and pulse number can be adjusted. 【 Action analysis 】
All requirements on the touch screen to achieve, then the key switch all borrow auxiliary signs to achieve, such as
M0: start/stop, M1: manual forward, M2: manual reverse, M3: scram.
The startup program can be edited in the 0 ring, add auxiliary instructions to wait, wait for M0 to have a signal, and then add
Plus single-axis motion command, forward running, due to the speed and pulse number (displacement value) needed at any time
So the program to use the register mode: speed ratio with the general register G0 expressed, speed
The degree ratio is 100, the displacement value is represented by W_32-bit register W0, and the displacement value is 10000. Then add the single-axis waiting instruction, for the stop state, and then reverse the program instruction, add the single-axis operation
Move, run in reverse, and add a stop wait command.
1C31219G01 The manual program can be edited in the 1 ring, and the program can be selected by the way of conditional jump. Add two
Frame condition jump instruction, detect when M1 is on, jump forward program instruction, when M2 is on
When, jump to reverse program instruction. Add an absolute jump instruction, and to prevent the program from getting messed up,
Conditions can be added to jump M79 for a broken signal, jump back to the first frame, and automatically detect conditions (PLC mot
Recognize all auxiliary signs as broken signals). The next step is to add the forward program, first add the single
Wait for the axis, 1C31219G01 wait for the axis to stop, and then add the single-axis motion command, and run 10,000 displacement values in the forward direction.
Add auxiliary instructions to wait, wait for M1 to break the signal, add single-axis operation instructions, motor
Emergency stop, and then add the absolute jump M79 break instruction, which is used to indicate that the forward run is finished
After that, the program automatically jumps back to the frame to start detecting the conditional signal. Continue to add inverts
In order, add a single axis to wait for the command, wait for the axis to stop, and then add a single axis motion command, and run in reverse
10000 displacement value, and then add the auxiliary instruction, wait for M2 to break the signal, add the single
Shaft operation command, motor emergency stop.
1C31219G01 The scram program can be edited in 2 loops, add auxiliary instructions to wait, and add frame loops when M3 is on
Control command, control start program and manual program in the ring to stop state, and then trigger the start press
All keys and manual keys are disconnected, single-axis operation is added to control the motor for emergency stop; readd
Frame loop instruction will start the program and manual program all jump back to frame 0, triggering urgent
When M3 is disconnected, add the frame loop control instruction to control the ring where the startup program and manual program are
Running status.