loading

Optics Lens

Rotary encoder using method

by:HENGXIANG     2020-12-04
Rotary encoder using method using method 1: modify the driver rotary encoder to precision instruments, in the use process need to be issued by the program instructions, can play a certain role, and according to the requirements of different environments, need to set a different driver, so decided to encoder use effect how, it is very important to modify the right driver. Normally as long as directly modifying reg file, registered a table file at the same time, by means of adding rewrite the dynamic linking, in determining the dynamic link have modified a good situation, need to add it to the kernel; Use method 2: hardware interface connection driver changes, the following is the hardware interface connection operation, in the connection, usually with A and B two collector output interface, in order to ensure line bridging, need to be in 3. On the resistance of the 3 v, insert A and B two interfaces to the CPU. After the hardware interface connection is successful, in case one thousand, must do a good job to check the voltage test output high and low voltage value is correct, after press the button, for example, if the P2 port output value is high level, describes the correct; Using three methods: the stream interface driver write stream interface driver program written for the interrupt service routine to prepare below, with body writing records of the step is to create a thread to realize a variable's value, at the same time record in the case of lines, each port number is still high level; Method of use four: the writing of the interrupt service routine rotary encoder instructions 1. Determine the object detection, speed, range, measuring angular displacement or counting, etc. 2. Only used for dynamic process or containing static position or state. 3. Confirm type is choose the incremental rotary encoder or absolute rotary encoder. 4. Determine the scope of the object's movement. 5. Confirmation is to choose the type single ring absolute rotary encoder or ring type absolute rotary encoder. 6. Determine the object's top speed or frequency. 7. To determine the object accuracy requirement. 8. Select the application of rotary encoder parameters. 9. Using the environment, pay attention to the rotary encoder interface mode and level of protection.
Custom message
Chat Online
Chat Online
Leave Your Message inputting...
Hello, this is Liz. If I am not online, please email me at heng@shhxgd.cn, or add my Whatsapp/ Wechat : +86 186-1688-3327, we will reply you as soon as possible~~