User`s manual
http://www.adtechcn.com   27 
downloads the commands from the buffer by batches, it must know the remaining space in the buffer through the 
query command “adt8840a_get_buff_depth()”, so as to avoid the overflow of software cache. In this mode, only 
when the current command is fully executed, can the next command be executed. When this mode is enabled, if 
any hardware buffer commands are downloaded into the control card while the non-hardware buffer commands are 
being executed, the hardware buffer commands will also be saved in the software buffer. Once all non-hardware 
buffer commands are executed, the hardware buffer commands will be saved in the hardware buffer. Please note 
that the hardware buffer commands accumulated in the software buffer should not exceed the capacity of the 
hardware buffer. 
The immediate execution mode refers to a machining method used when the buffer is closed. In this mode, the user 
can only transmit the commands in the way the single command is executed. In other words, when the control card 
is executing the motion commands, the user must judge at the upper PC whether the current motion is completed. 
Only when the completion of motion is detected, can the next command be executed. Otherwise, the motion state 
might become confused. 
In addition to the software buffer mode, ADT-8840 also provides some interpolation functions with hardware 
buffer, such as: 
adt8840a_fifo_inp_move1(), 
adt8840a_fifo_inp_move2(), 
adt8840a_fifo_inp_move3(), 
adt8840a_fifo_inp_move4(), 
Details on interpolation of hardware buffer will be provided in the follow-up chapters of this Manual. 
) Position management 
  Logic-position counter and actual-position counter 
The logic-position counter counts the number of pulses based on the positive/negative direction output. In other 
words, it counts “1” upward when one positive pulse is output, and “1” downward when one negative pulse is 
output. 
The actual-position counter counts the pulses coming from the external encoder. The user can use the commands to 
select the pulse type as phase A/B signal or independent 2 pulses of upward/downward counted signals. The 
counting direction can be set.   
The data of the two counters can be written and read at any time, whose counting ranges between 
-2,147,483,648 ~ +2,147,483,647. 










