About using Ormon cp1h plc Speed measurement problem

Source: Internet
Author: User

On the Internet to see the data found that most of the use of CNT (counting instructions) to do the speed, found that the instruction count of the rate of time (or the number of acquisition times) requirements are relatively high and need to write reset signal time program, the error is relatively large, and real-time display speed effect is not good.

The formula for calculating the speed of the CNT instruction: rotational speed = 60/Time point x number of counts

The reason for the error amplification: The number of the number difference one or two, the error amplification 60/time point times.


After several tests, found that the use of CNT instructions can not meet the real-time speed measurement requirements, so change the speed measurement method, the use of measuring a pulse period of time (T), and then use the 60000/pulse period, this method of measurement error is relatively small, the cause of the error, one is the instruction execution cycle, Another count of non-floating-point division caused by the decimal point ellipsis problem, resulting in greater error. When the velocity changes, its pulse period changes.

Speed Calculation formula: Speed = #60000/T

The cause of the error: Time measurement accuracy, non-floating-point division omit the number after the decimal point.


Here are the programs:

' Initialize

Ldnot W2.00
MOV (021) &0 D0
MOV (021) #0 D10
MOV (021) #0 D2
' The duration of a pulse is measured by the duration of the pulse, which is removed by #60000 (1min), which calculates how many pulses a minute has, that is, its speed.
LD W2.00
Out TR0
@AND 0.00
SET 2.00
@++ (590) D0
LD TR0
and 2.00
TMHH (540) 0000 #9999
LD TR0
And= (+) D0 &2
-B (414) #9999 T0 D2
RSET 2.00
/BL (435) #60000 D2 D10
MOV (021) &0 D0



About using Ormon cp1h plc Speed measurement problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.