What is the use of processing the values as follows in a motor control program? define ScaleQ15 Va

Updated on technology 2024-05-01
3 answers
  1. Anonymous users2024-02-08

    value & 0x3ff) means to keep the lowest 10 bits of the 16-bit binary value and clear the high value to zero.

    5 means to move it 5 bits to the left.

    From the English meaning of the name of the symbol scaleq15 (the fixed decimal place of the 15-digit decimal part is retained), as the name suggests, the author's intention seems to be:

    The lower 10 bits of the original value represent a certain data. The lower 10 digits are equivalent to 0 1023 in decimal system. Take 1024 as the full degree.

    The author wants to treat this range fullness as 1, and the data as a pure decimal less than 1, and use 16-bit binary to represent 1 integer and 15 decimal places. i.e. form.

    scaleq15(value) is to convert the data in the original value into the above 16-bit binary form.

    The second scaleq15neg(value) converts the negative value of the data into the 16-bit binary form mentioned above. Note that this is in the form of a complement, so one digit of the integer part of the obtained fixed-point decimal becomes a sign bit (binary ** is 1).

    Third, it is not easy to be sure of the author's intent when the context is not known. Only a few guesses can be made.

    One possibility is that:

    It is estimated that the value has been expanded to 32 digits at this time, and the decimal part is no longer 15 digits but 16 digits. At this time, if you want to round to the nearest integer, you should add the equivalent ** and then move it to the right by 16 digits.

    And the 0x8000 added here is equivalent to 16 fixed-point decimal places. However, instead of shifting 16 bits to the right, it is 7 bits to the right. It may be that the author had other intentions (e.g., a 9-bit shift to the right somewhere below).

    And because it is only shifted by 7 digits, it is truncated to 16 digits unsigned int, and it is 7 integers and 9 decimal places.

    Another possibility is:

    At this point, the value has been expanded to 32 digits, while the decimal part is still 15 digits. And because of some need to add 1, the 0x8000 here is equivalent to 15 fixed-point decimal places. The purpose of shifting 7 bits to the right is to take the unsigned long type of 17-bit integer and 15-digit decimal place to truncate 8-bit integer 8-digit decimal place, and represent it as a 16-bit unsigned int type.

  2. Anonymous users2024-02-07

    You have to have a context, right.,,So drag out a few sentences alone.,It's hard for others to answer the point.。。。

  3. Anonymous users2024-02-06

    (1) By the question, the rated efficiency of the ant liter =,pn=, the comic is: p1=pn Yamamonoga =, un=110, ian=25a

    2) if=uf/rf=

    3)ea=un-iara=110-25*(4) t=pn/ω=2200/(2*pi*n/60)

Related questions
21 answers2024-05-01

I recommend consulting a professional, you can buy a PLC with technical assistance, because a system does not necessarily have a set of programs to use, and it also involves debugging. I am a mechanical professional on-site commissioning engineer, like you said, if you are a student, just for graduation design or laboratory use, it is easy to do, but if it is used for production use, it involves many situations, such as: Is there a protection requirement? >>>More

24 answers2024-05-01

The speed of the stepper motor depends on the frequency of the input control pulses, and the positioning of the stepper motor depends on the number of input control pulses. >>>More

5 answers2024-05-01

In terms of the theory and technology of integrated motors, the discipline of "Motor and Electrical Appliances" mainly studies stepper motors, brushless DC motors, and synchronous synchronicators. In terms of the power electronic drive technology of the motor, the structure and control strategy of the electric vehicle and the electric return drive system, and the harmonic suppression technology of the variable frequency power supply were studied. In terms of high-environment and high-reliability motors and electrical appliances, the reliability theory and technology of high-environment electrical appliances, the theory and technology of aerospace electrical appliances, and the reliability design of flywheels for satellite attitude control were studied. >>>More

11 answers2024-05-01

If the MAC address **:A is changed to the subnet of A, then B and A are no longer on the same network segment, because there is no gateway, then ping B on A will fail, and B cannot be accessed if it is not the same network segment A. >>>More

6 answers2024-05-01

。Is it necessary to repair spacecraft in space?