laitimes

PLC positioning control delay problem programming skills, dry goods and good articles, hurry up the collection!

author:Jicheng PLC classroom

Guide:

I believe that those who have used Siemens PLC positioning control stepper or servo know that after the PLC positioning of a section of the position is completed, the positioning of the next position needs to be delayed for a certain period of time.

In fact, its principle is nothing more than staggering the scan cycle, and there are two ways to do this:

1. By adding a timer;

2. Stagger the scanning cycle through programming logic.

This article will explore the second method.

01 Case requirements

Case requirements: S7-200SMART PLC is used to control the reciprocating positioning of the stepper motor.

(1) After pressing the start button, the stepper motor runs to the 50mm position at a speed of 10mm/s;

(2) When the stepper motor is positioned to the position of 50mm, it will run to the position of 0mm at a speed of 10mm/s, and the cycle will continue to be repeated.

02Motion control is configured using 200SMART software

Before realizing the positioning control, it is necessary to use 200SMART software to configure the motion control, such as the number of pulses per revolution, the amount of mechanical displacement per revolution, etc., which are not compiled here, and the reader can configure them according to the actual situation.

03 Programming

1. Network segment 1 is to reset V100.0 all the time, and network segment 2 is to call the positioning initialization instruction.

PLC positioning control delay problem programming skills, dry goods and good articles, hurry up the collection!

2. The network segment 3 is to set the current position as the origin, and the reference point command can be called back in the actual project. Here we test, just use this command!

PLC positioning control delay problem programming skills, dry goods and good articles, hurry up the collection!

3. The network segment 3 is the core of the reciprocating positioning function: when the start is pressed, the status step is set to 1, and the position of 50 is given to VD12 when it is equal to 1, and at the same time, the position of V100.0 in this scanning cycle is set to 1, and in the next scanning cycle V100.0 will be reset, so that the state step of "2" is given to VB20 in this scanning cycle, and VB20 will be 2 only when the positioning is completed V0.6 becomes 1. When the state step is equal to 2, the analysis method is the same as when it is equal to 1, so I will not repeat it here.

PLC positioning control delay problem programming skills, dry goods and good articles, hurry up the collection!

4. Invoke the positioning command and fill in the pin parameters.

PLC positioning control delay problem programming skills, dry goods and good articles, hurry up the collection!

Summary:

This case mainly realizes the reciprocating positioning of the stepper motor, and the positioning instruction of the reciprocating positioning and the switching of the status step need to stagger the scanning cycle, and the normal reset instruction can be added in the network segment 1 of the program!

Source: Jicheng Training Network, Author: Jicheng-Guo Biao, may not be reproduced without authorization!

How can I get more information about electrical hot topics?

Here's how to do it!

PLC positioning control delay problem programming skills, dry goods and good articles, hurry up the collection!

Read on