![DFRobot Veyron Скачать руководство пользователя страница 17](http://html1.mh-extra.com/html/dfrobot/veyron/veyron_manual_2491527017.webp)
17
3.9 Reset encoder cumulative number of pulses (ID,CEP,*\r\n)
The instruction specifies a way to reset encoder cumulative number of pulses to zero of one motor.
For example, to reset encoder cumulative number of pulses to zero of M1
* Send: 1,CEP,1\r\n
* Returns: none
3.10 Set encoder line (ID,SER,****,####\r\n)
By setting this directive, it can be applied to two motors (M1/M2) encoder line, note: when you set
the encoder lines, both must be set, you cannot set a certain route alone. The factory default value is
1.
For example,set M1 encoder line to 100, M2 to 200
* Send: 1,SER,100,200\r\n
* Returns: none
3.11 Set reduction ratio (ID,SGR,****,####\r\n)
Two motors gearbox reduction ratio can be set with the instruction (M1/M2), actual controlling and
output speed is the actual load speed. Users may set this to 1 to get the really true speed of motor. In
addition, the drive supports decimal reduction ratio, accurate to 2 decimal digits. The factory default
value is 1.
For example, to set the reduction ratio of the M1 to 12.34 and set reduction ratio of M2 to 23.45
* Send: 1,SGR,12.34,23.45
* Returns: none
3.12 Set direction mode (ID,SDIR,*\r\n)
In most applications, the motor is sometimes required to run in clockwise, but sometimes
anticlockwise, we call it as bidirectional control mode. However, in a number of engineering
applications, it only rotates in one direction, we call it one-way control mode. In fact these modes are
same in the UART interface, but in PPM and Analog mode is rather different, on the one hand, it is
prone to human manipulation errors, on the other hand the precision of the input signal is reduced by
half. This drive can be easily set to one type of orientation mode: configuration parameter of 0
indicates a one-way mode, 1 indicates a two-way control mode. The configuration parameters are
valid only in Analog mode and PPM, the factory default value is 1.
For example, direction of the drive mode is set to one-way mode
* Send: 1,SDIR,0\r\n
* Returns: none