10 Application of G-codes
10.2.2 Converting the G-codes in Data Registers
Users can also download G-codes by HMIs other than B-type. Set up the recipe on HMI and design the
user program for receiving G-codes on a DVP-20PM series motion controller. When both sides are
ready, the G-codes can be downloaded through HMI directly.
The G-code download program designed in a DVP-20PM series motion controller should operate in
below steps: 1. initialize download process, 2. design the size of recipe according to the recipe format
set up in HMI, 3. execute the program and the G-codes will be downloaded to designated registers in a
PLC according to the recipe set up in a HMI. Please note that the recipe sets up the total number of
G-codes but the whole G-code file requires several times of transmission for a complete download
process. Therefore, in actual application the G-code file will be separated into many groups, and only
one group will be transmitted by one time. File conversion will be executed every time when one group
of G-code is received. If the conversion results are correct, the filtered G-codes will be displayed in the
designated register. If an error in file conversion, the error code 0xffff and the error row number will be
displayed in designated registers.
After one group are received, the DVP-20PM series motion controller used sends another value to
change the group number and repeats the above process until all groups of G-code file are received,
which is indicated by 20H (K32) in D3002 and D3003. When all G-codes are downloaded, the
conversion results will be checked again. Before the download begins, a blank motion subroutine
should be created for storing the received G-codes. In addition, PEP protection should also be enabled
on O100 main program, so that the original O100 on the PC will not be cleared after uploading the
program from the DVP-20PM series motion controller.
1. Setting up a recipe on HMI
Step 1: Set up the recipe in Screen Editor. The below diagrams indicates the recipe setting in both
Recipe and Screen Editor. The format of Length and Group in Screen Editor is specified
with 500 words and 200 groups corresponding to Recipe size and Max Recipe Count in
Recipe software.
DVP-20PM Application Manual
10-9