How to use 200SMART high-speed pulse to realize track following motion

Track following: refers to a moving object following another actively moving object to achieve real-time position, speed and direction movement. It is widely used in transformer enameled wire winding machine, disposable chopsticks packaging machine, CNC machine tool hand wheel and other machinery. The working principle is introduced below.

First of all, there must be an abbreviation for the axis of active movement: the main axis. The spindle usually moves irregularly. The encoder detects the time when the spindle rotates one circle, and then calculates the following speed according to the distance that the follower axis needs to travel for one circle, and uses the pulse command that can modify the frequency in real time to send pulses to drive stepper or servo. sports.

Example: The main shaft is driven by a frequency converter, a 600-line encoder is installed on the main shaft, and the follower shaft is driven by a stepper motor, and it takes 3200 pulses to rotate once. When the encoder is required to rotate one circle, the stepper motor also rotates one circle, and the direction will also change with the spindle.

The main program needs to write a high-speed counter to read the count value every 20ms, as shown below:

High-speed pulse output program, the motion wizard configuration is omitted here.

The interrupt program that measures the frequency of the stepper motor every 20ms is as follows:

Since the direction needs to be changed in real time according to the rotation direction of the encoder, there is no configuration direction in the wizard, and the high-speed count direction change interrupt needs to be used to switch the direction. The program is as follows:

4G Industrial Router

4G Industrial Router,Sim Router Industrial,Industrial Lan Router,4G Modem Router Industrial

Shenzhen MovingComm Technology Co., Ltd. , https://www.movingcommiot.com