10 Application of G-codes
Step 2: Designate registers for commanding recipe and setting recipe group number in Screen
Editor. The designated registers correspond to the registers on the DVP-20PM series
motion controller. As the diagram below, the DVP-20PM series motion controller sends
recipe commands, such as read /write recipe, by sending values to the control register D65.
Sending value to D65 will change the recipe group number.
2. Designing a program
The special module K255 is used to converting G-codes. Users can convert G-code and monitor the
result gotten by means of reading K255 and writing data to K255. Registers related to the
conversion of G-codes are described below.
CR number Function Data type Length
0 Initializing the conversion of G-codes Word 1
1 Result of converting G-codes Word 1
2 Carrying out the conversion of G-codes Word n
Descriptions of control registers
CR#0: Initializing the conversion of G-codes
[Description]
Before a DVP-20PM series motion controller received G-codes form a human-machine interface
or another device, they can use the control register to initialize the conversion of codes.
CR#1: Result of converting G-codes
[Description]
If no G-code needs to be sent by a human-machine interface, data will be written into the control
register, and the conversion of G-codes will end. After To K255 k1 k0 k1 is used, 0xffff will
appear in position 1 and the number of the line where an error occurs will appear in position 2 in
the control register if the error occurs. After To K255 k1 k0 k1 is used, the values starting from
the value in position 2 in CR#2 to the last G-code will be ASCII codes if the conversion of
G-codes is correct.
DVP-20PM Application Manual
10-10