SFA Macro Gcode Class OSAI

advertisement
CFP - Academy
CFP - Academy
SFA Macro / Gcode Class
OSAI
Version
Date
Description of revision
Drawn up by
01.00
3/09/2015
Document draft 1
Jack Faas
Checked by
TABLE OF CONTENTS
Contents
COMMON SUB PROGRAMS USED AND DESCRIPTION............................................................................... 4
COMMON PLC / PLUS VARIABLES.............................................................................................................. 5
COMMON GCODE OR CONDITIONAL COMMANDS IN CMS MACROS ....................................................... 6
COMMON SUB PROGRAMS USED AND DESCRIPTION
CMS over the years has used a number of program names and folder locations. They have tried
to give them names that mean something, so it’s a little easier to find what you are looking for. The
folder CAMBIO is where typically all the programs are placed that are used by the machine or the post.
This is a folder that should not be used for production and files in this directory should not be deleted
unless it is clear a program should not be in there. We will not cover all of the programs because it varies
so much from machine type, to machine type as well as age.
Common Sub Programs Almost All Machines
G300
Tool Change
G351
Dynamic Motion Change Rough
G352
Dynamic Motion Change
G353
Dynamic Motion Change
G354
Dynamic Motion Change
G355
Axis Reset ( Axis Registry Clear )
G356
Dynamic Motion Change Default Smooth
Any program file you see listed as a G### is functionally a subprogram, called as G###. Just like calling
(CLS,G###)
QUOTE
Used by many sub programs usually managing a XYZ distance
QUOTECU
Tool Change Locations
Typically with CMS anything that says Quote has values that are used for setting up the machine, tool
change positions, Offset between heads, Hand tool change locations, undercut saw locations, the list
goes on.
MESSAGGI
Program used to define non-PLC based messages
There are many other subprograms, In new machines Italy has also made use of a folder called
CMS_PRG, however these programs are not intended to be changed.
COMMON PLC / PLUS VARIABLES
These variables are used to interface with the PLC, or are set directly by the PLC. Many reactions
that happen inside of the sub programs are dependent on these.
Boolean variables or either 0 or 1
Short is an integer number
Double is a decimal or real number
Knowing this can give you a good idea of where to look, if you are looking for a Sensor type Variable. It’s
probably a Boolean. If you are looking for a Tool number it’s probably a Short. If you are looking for a
dimension type variable then it is probably a Double.
All the variable we can see from the Utility Pull Down, then Variables. E variables are always real
decimal numbers. SN are like E variables except the machine will remember them from a power down.
SC variables are used for ascii characters.
COMMON GCODE OR CONDITIONAL COMMANDS IN CMS MACROS
Conditional Go To Command
(GTO,ERRORI,@T_CALL<0)
This will go to the label “ERRORI” if the value of @T_CALL is less then 0
Wait On Signal
(WOS,@POSMAGOK=1)
The program will wait on this line till the plus variable @POSMAGOK equal 1
Go To Command
(GTO,FINE)
The program jumps over everything and finds the label “FINE”
Re-Defining Software Over Travel Limits
(SOL,Y,E360,E361)
Sets plus and minis values for the Y axis
IF and Else Conditions
(IF,@ASSE_C=1)
G0 G79 XE207 YE208 C0
(ELSE)
G0 G79 XE207 YE208
(ENDIF)
If @ASSE_C is equal to 1, the machine will run the code with the C axis command, if it is not 1
then it will run the command without. All IF statements must have an (ENDIF).
Sub Program Calls
(CLT,QUOTE)
CLT or CLS, Stands for Call Subprogram, in this case QUOTE
Halt Read Ahead
#
On newer machines you may see a lot of these in the Sub programs, this is an additional way to
make sure the control sees a given line of code.
Display Statment
(DIS,"Taglio bassa pressione ",E284,E281)
Display the text Taglio bassa pressione with the value of the variables E284, and E281
Input Windows
(INP,"INSERIRE NUMERO CODE=",45,@PASSWORD)
Creates an input window with a field that says INSERIRE NUMERO CODE= the open field the
operator manually enters will be written to @Password
Commands Manipulating Tool Measurement
Commands Manipulating Origins
Download