10 Application of G-codes
CR#2: Carrying out the conversion of G-codes
[Description]
The control register is used to specify the position in which the data gotten from conversion is
stored. It is described below.
Position Data
Data
type
Description
Length 1
Number of data registers
for a line of G-codes
Integer
Length 2 Number of rows of G-codes Integer
Length 3
~length n
Data gotten from
conversion
Integer
Length of the data gotten from
conversion=(Number of G-codes in a
line×Number of rows)+1
After G-codes are converted, 0xffff will
appear in position 1 and the number of the
line where an error occurs will appear in
position 2 if the error occurs.
After G-codes are converted, the values
starting from the value in position 3 to the
value in position n are data gotten from the
conversion if the conversion of the G-codes
is correct,
Instructions for receiving G-codes
The below example explains the instructions for receiving G-codes. Specify length of recipe with
50 words and groups of recipe with 10. Execute file conversion and check the conversion results.
If the conversion results are correct, the downloaded file will be stored in D3002~D3501. If
errors occur, 0xffff will be recorded in D3000, and the number of error group (row) will be
displayed in D3001. After uploading the program to PMSoft, users can check Ox0 motion
subroutine for the received G-codes.
Step1: Move K1 to D66 to designate the recipe group number. Initialize the file conversion
process and setting the format of recipe according to the recipe setup in Screen Editor.
M0
TO
K255 K0
MOV
K50 D3000
MOV
K10
D3001
Specify Group with 10 groups
Initialize the file
conversion process
Specify length of recipe
with 50 words
K0 K1
MOV
K1 D66
SET
M24
RST
M0
DVP-20PM Application Manual
10-11