Delta DVP — 11.1 Elementary Arithmetic for Integer and Floating Point

11. Floating Point Operation Design Examples Control Program: X0 Detecting the number of the pulses received by the proximity switch in 1s. M1000 Calculate the production speed by the equation and store the result into D50, D51 in binary floating point system. (Note: all parameters must be binary floating integers. If not, use FLT instruction to convert the system.) V= D0 X 0.325 Convert the lower speed limit 0.8m/s in binary floating point system. Convert the target speed 1.8m/s in binary floating point system. Present speed Lower speed limit(D31, D30) present speed arget speed (D41, D40), M1=ON. ≤ ≤ Τ Present speed arget speed (D41, D40), M2=ON.

>T In order to show the result onTP04 screen, multiply the value in D50with 1000 then store the integer value in D70. However, the display value in TP04 will remain the value before multiplication. Program Description: z Calculate the motor rotation speed (r/min) by using SPD instruction to detect the pulse frequency (D0) from the proximity switch. Motor rotation speed = the receiving pulses in 1min/10 = (pulse frequency Ч 60)/10 = (D0Ч60)/10. z The following equation is for obtaining the production line speed through D0: V: Production line speed (unit: m/s) N: Motor speed (unit:

r/min) v= 325 .0 60 Ч N = 325 .0 60 10 60 0 Ч Ч D m/s= 325 .0 10 0 Ч D m/s If the detected pulse frequency D0 = K50, the production line speed = 325 .0 10 50 Ч m/s D0: Pulse frequency =1.625m/s by the above equation z The parameter of present production line speed contains decimal points during calculation, therefore the binary floating point operation instruction is needed for performing the calculation. . z DEZCP instruction is used to compare the present speed with the upper/lower speed limits and the comparison results will be stored in M0~M2.

DVP-PLC Application Examples 11-2 SPD X1 K1000 D0 DDIV D0 K10 D10 DFLT D10 D12 DEDIV K315 K1000 D20 DEMUL D12 D20 D50 DEDIV K8 K10 D30 DEDIV K18 K10 D40 DEZCP D30 D40 D50 M0 DEMUL D50 K1000 D60 INT D60 D70