1. 2. 3. 4. 5. 6. Adjustment of setting of equipment. 1. Introduction ATV32 is only available in open loop configuration. It means that it is not possible to know the actual position by reading an internal register which contains the position coming from an encoder. It is then not possible to control an ATV32 in position mode. But it is possible to execute simple positioning movements in open loop. If the speed loop is set correctly then the drive is able to follow the speed reference accurately. If the RUN order is removed at the right time it is possible to stop at a desired position, especially when using synchronous motors. The following curves show a basic point-to-point movement: Output frequency Target frequency Acceleration ramp Deceleration ramp Time Position Target position Time RUN order RUN order must be given during this time Time The target is to calculate the RUN order duration. This duration depends on the acceleration/deceleration ramps, on the target frequency and on the target distance. Target velocity unit is Hz Acceleration/deceleration unit is Hz/s (and NOT seconds from 0 Hz to FRS) Target position unit is pole pair (20 pole pairs correspond to 10 turns with a 1500 rpm motor) 2. First case: Trapeze Target frequency is 10 Hz Acceleration/deceleration ramp is 25 Hz/s (corresponds to ACC = DEC = 2 s with FRS = 50 Hz) Target position is 20 pole pairs (corresponds to 10 turns with a 1500 rpm motor) Output frequency Rectangle 10 Hz 25 Hz/s 25 Hz/s Right triangle t2 t1 Time Left triangle Position 20 pole pairs p1 Time t1 = target frequency / acceleration = 10 Hz / 25 Hz/s = 0.4 s p1 = area of the left triangle = t1 * target frequency / 2 = target frequency ² / (2* acceleration) = (10 Hz) ² / (2*25 Hz/s) = 2 pole pairs Trapeze area = target position = left triangle area + rectangle area + right triangle area Because acceleration = deceleration, triangles have the same area. It gives: target position = 2 * triangle area + rectangle area = 2 * p1 + (t2-t1) * target frequency i.e. target position = 2* target frequency ² / (2* acceleration) + (t2-t1)* target frequency i.e. target position = target frequency ² / acceleration + (t2- (target frequency / acceleration)) * target frequency i.e. target position = target frequency *t2 Then t2 = target position / target frequency = 20 pole pairs / 10 Hz = 2 seconds. Conclusion: If the RUN order is given during 2 seconds then the obtained distance will be 20 pole pairs, which corresponds to 10 turns. 3. Second case: Triangle Same inputs but acceleration is now 5 Hz/s (10 s with FRS = 50 Hz) t1 = 10 Hz / 5 Hz/s = 2 s p1 = (10 Hz) ² / (2 * 5 Hz/s) = 10 pole pairs: half of the distance is reached at the end of the acceleration ramp t2 = 20 pole pairs / 10 Hz = 2 seconds: this gives the following profile: Output frequency 10 Hz 5 Hz /s 5 Hz /s t1 = t2 = 2 s Time This is the limit case where deceleration starts when target frequency is reached. The particular value of acceleration is called ACCmin: target frequency = ACCmin * t1 = ACCmin * t2 i.e. target frequency = ACCmin * target position / target frequency i.e. ACCmin = target frequency² / target position If now acceleration ramp is smaller than ACCmin (5 Hz/s), then it will not be possible to reach the target frequency. V1 value is then smaller than 10 Hz: Output frequency V1 3 Hz /s 3 Hz /s t3 target position = left triangle + right triangle i.e. target position = (V1 * t3 / 2) + (V1 * t3 / 2) = V1 * t3 i.e. t3 = target position / V1 i.e. t3 = target position / (t3 * acceleration) i.e. t3² = target position / acceleration i.e. t3 = square root( target position / acceleration ) Here t3 = square root ( 20 / 3 ) = 2.58 seconds Time The previous calculations can be summarized as following: Acceleration > target frequency² / target position ? NO YES Trapeze profile: Trun = target position / target frequency Triangle profile: Trun = square root (target position / acceleration) One major issue is: how to calculate the square root in ATVlogic? No “square root” (or sqrt) block does exist, but there is a way to determine the square root in a recursive way. If the following calculation is executed several times (yprevious is the previous result): y = ( (x / yprevious) + yprevious) / 2 then it will give sqrt(x). Example with x = 6084. At the beginning yprevious = 1: x 6084 6084 6084 6084 6084 6084 6084 6084 6084 yprevious 1 3042 1522 762 384 199 114 83 78 It is OK: 78 * 78 = 6084 It works for x between 1 and 32766. y 3042 1522 762 384 199 114 83 78 78 4. ATVlogic implementation of square root B01 B03 1 B02 1 x B05 41 B04 1 Sqrt(x) It is very important that the function blocks are executed in the right order: B00 then B01, etc…, then B05. Execution order can be modified using “Device -> ATV Logic -> Edition -> Set view execution order”: ATV Logic implementation of Trun calculation (in AUX) The target of this diagram is to calculate the value of TRUN. M03 is FRS M02 is the frequency target (in Hz) ACC (in seconds) and DEC must have the same value. This program only reads ACC. M04 is the target distance (in pole pairs) “TRUN” is then fed to the PRE task: RUN order pulse generation (in PRE) The attached project file also contains a state machine to manage a forward-reverse sequence. LI3 is used to start the sequence. The motor is stopped during 3 seconds then the direction is reversed. 5. ATVlogic monitoring function In the toolbar the following button is used to display the current values on the diagram: For example it is possible to check the behaviour of the square root function: ATVlogic monitoring function It is OK: Square root(240) = 15. The values are not refreshed continuously: pressing this button only reads the values once. 6. Program limitations It is not possible to have target distance larger than acceleration (in Hz/s). This creates an overflow: Because 32761 * 20 / 16 = 40951 and because ATVlogic is programmed with signed 16 bits integers, then 40951 is limited to 32761. This also creates precision problems: Here ACC = 9 s FRS = 150 Hz ATVlogic calculates ACC = 16 Hz/s, but in reality the float value is 16.6667 Hz/s.
© Copyright 2026 Paperzz