You are on page 1of 65

xNC

Programmer’s
Reference Manual
A block sequencer application
template for Logix processors

10/19/2021 1 of 65 550736879.doc
TABLE OF CONTENTS Page

ABOUT XNC 4

USING XNC – 5

PART BROWSER SCREEN 6


A. Edit Part – PAGE EDIT SCREEN 7
A.1 Edit Block 8
A.1.1 CODE EXPLANATIONS 11
A.1.1.1 Machine Codes (M-Codes) 11
A.1.1.2 Motion Codes (G-Codes) 12
A.1.1.3 Other Codes- Math, Variables, Logical, Program Control 13
A.1.2 Teach Block 14
A1.2 Program Defaults Screen- 15
A.2.1 Variables Table 17
A.2.2 Tool Offset Table 18
A.2.3 Feed Rate Table 19
A..2.4 Fixture Offset Table 20

B. Quick Check 21

C. Run Screen 22
C.1 XY Plot 25
C.2 SETUP Screen 26
C.3 DIAGNOSTICS – 27
C.4 COUNTER & TIMERS Screen – 28
C.5 LARGE READOUT – 29

D. Manual Screen – 30
D.1 FAULT STATUS – 31
D.2 FAULT HISTORY – 32

10/19/2021 2 of 65 550736879.doc
APPENDIX A – XNC CAPABILITES SUMMARY 33
i. SUPPORTED FUNCTIONS 33
ii. FUNCTIONS NOT SUPPORTED 34

APPENDIX B – RULES: SETUP, PROGRAMMING, OPERATIONS 35


i. RULES – Setup/Configuration 35
ii. RULES - Programming 36
iii. RULES – Operations 37

APPENDIX C – CODE REFERENCES 38


i. CODE ADDRESSES- listed in numerical order. 38
700-799 OTHER - Math, Variables, Logical, Program Control 38
800-899 Machine Codes / “M-Functions” 39
900-999 Motion Codes / “G-Codes” 40
ii. PROGRAM CODES – listed by Code field 1-3 41
CODE1 41
CODE2 42
CODE3 43
iii. FUTURE CODES RESERVED 44
iv. PROGRAM CODES - PREBLOCK 45
v. PROGRAM CODES - POSTBLOCK 46
vi. RS274 / CNC G/M CODE COMPATABILITY 47
vii. MODAL CODES 48

APPENDIX D – FREQUENTLY ASKED QUESTIONS 49

APPENDIX E – SAMPLE PROGRAMS 50


PROGRAM 1 – AB LOGO 50
PROGRAM 2 – LOOPING 52
PROGRAM 3 – RECTANGLE WITH RADIUS CORNERS USING VARIABLES 54
PROGRAM 4 – SMALL AB LOGO 57
PROGRAM 5 – REPEATING AB LOGOS USING FIXTURE & TOOL OFFSETS 58
PROGRAM 6 – CONDITIONAL PROGRAM BRANCHING 60

APPENDIX F - REVISION HISTORY 62

APPENDIX G – OTHER REFERENCES 63

10/19/2021 3 of 65 550736879.doc
ABOUT xNC

xNC is a shareware application template for the ControlLogix processor and


PanelView Plus or VersaView running PanelView Plus ME runtime screens.
The template provides the ladder and screen set to execute a block sequencer.
The block sequencer allows the user to develop and store a part program for 2
or 3 axis contoured interpolated motion and control and coordinate machine
functions such as solenoid valves or motor starters.

It is the responsibility of the user of this application template to verify the


capabilities of this application template and discern the appropriateness of
this solution on their machine. No liability is assumed or implied by the
provider of this template. This application template is not intended for
contoured motion metal cutting.

Typical applications include but are not limited to:

glue applicator foam applicator spot welder


shot peening sand blasting punch
water jet deburring drilling / boring robotic palletizer
glass / mirror cutter buffer / polishing CMM
water / laser jet cutter flame cutter pick and place
articulating band saw wire saw XYZ gantry

A ControlLogix L6x processor or CompactLogix L4x processor and the


PanelView Plus 1250 are strongly recommended for this application. 19 part
programs can easily fit in an L60 combo processor. To expand to more program
recipe storage use the L61, L62 or L63 processor accordingly. The xNC template is
set up for 300 blocks per program with 16 character comments allowed for each
block. The necessary storage memory can be adjusted by editing the UDT
“StorePart” to reduce or expand the number of points per program and therefore
reduce or expand proportionately the amount of total processor memory required.

Some of the routines have Source Routine Protection enabled.

10/19/2021 4 of 65 550736879.doc
Using xNC –

Part programs may be created on the PanelView Plus or PanelView Plus CE running the Factory
Talk View ME application. Additionally you may create part programs by using the EXCEL
spreadsheet template which has been created to model the xNC PanelView Plus screen layout.
The part program is then transferred via RSLinx using a DDE poke.

The xNC template provides a block editor to view, create, or edit the part program. The xNC
template as standard provides storage for up to 19 part programs. Each program can be up to 300
blocks and store one 16 character comment for each block. These limits may be expanded by
modifying the template.

Modify these tags in the P04_PV (PanelView program).


BlockNumberMax – set to match UDT StorePart max number of blocks
MaxPartNumber – set to max number of part numbers allowed.

The following sections define the screens found in the xNC application template.

See Appendix E for an explanation of the Sample Programs.

10/19/2021 5 of 65 550736879.doc
Part Browser Screen
The display at the bottom of the Part Browser screen allows the user to index forward and
backwards through the motion paths stored in the part locations. By selecting the up or down
arrows, the part number is indexed up or down displaying the corresponding part name and part
description. In the center of the page, images of the stored parts may be displayed as the parts are
indexed up and down. These images are static .jpeg files loaded onto the operator interface
during the screen design and are not dynamically editable once the operator interface program
has been compiled and downloaded to the operator interface.

The EDIT PART, RUN PROGRAM, ABOUT xNC, QUICK CHECK, DIAGNOSTICS
and MANUAL buttons are used to access the respective screens.

10/19/2021 6 of 65 550736879.doc
A. Edit Part – PAGE EDIT SCREEN
The display shows the selected part program. The top of the screen displays up/down
arrows to index the row/block pointer line by line on the left side or by blocks in multiples of ten
on the right side. Also at the top is the part number, part name, and part description. The line
pointer points to the block selected which is to be edited, inserted or deleted. Use the INSERT
BLOCK and DELETE BLOCK buttons to insert or delete a block at the position indicated by the
row/block pointer.
In the middle of the page, the spread sheet format displays the Block #, Block type,
XYZ, IJK, Code1-3 and Data1-3 block by block. An arrow on the left side shows the line that is
selected for editing. Once the desired line is highlighted with the arrow on the left side of the
screen, the Edit Block xxx button on the bottom left of the screen is used to bring up the Edit
Block screen (where xxx is the block number which will be edited).
Other buttons along the bottom of the screen have the following functions:
Cancel All Edits - Cancel all of the edits and return to the Part Browser screen.
Load Program - Load a program from Excel into the Part Edit screen.
Copy Program - Copy a program from one location to another.
Delete Program - Delete program information from a location
Test As Part #0 - Load the edited program into location 0 of the Part Browser. This allows the
user to test edits without saving and overwriting the original motion path.
Program Defaults - Accesses the Program Defaults screen.
Save Program - Overwrites the old program with the edited motion path and exits to Part
Browser screen.

10/19/2021 7 of 65 550736879.doc
Block Edit Screen - shot showing Codes for Lines or Arcs

A.1 Edit Block


The Edit Block screen displays the block number at the top of the screen and provides user
editable fields by clicking on the XYZ, IJK,CODE, Data or Block Comment fields. A pop up
input panel will appear to change the input for these fields. The block TYPE field will toggle
through the seven possible block types (NO MOT [no motion], Line, SHORT arc, LONG arc,
Short0 [short circle], Long0 [long circle] and VIA. Code fields are edited by clicking on the
code field and using the up/down arrows on the right side of the screen to highlight the desired
Code action. You must push the Enter key under the up/down arrows on the right side of the
screen after selecting the desired Code. The selected code is highlighted in aqua.

VIA arc - IJK defines a point the arc goes through to reach the end point.

The following arc types use Center Point programming with the center point defined by IJK.
Three points determine the plane of the arc - the start point, the end point and the center.
SHORT arc - the direction is determined by the shortest path to XYZ.
LONG arc- the direction is determined by the longest path to XYZ.
SHORT0 - a circle is drawn at the current position and the direction is determined by the
shortest path through XYZ.
LONG0 - a circle is drawn at the current position and the direction is determined by the longest
path through XYZ.

10/19/2021 8 of 65 550736879.doc
If a Line type is selected click on the X, Y and Z fields to enter in the end point of the line. If a
ARC types is selected XYZ is entered along with IJK coordinates. For Center Point type arcs
IJK is the center point coordinates, and for VIA arc types, the IJK information is the VIA point
coordinates. A VIA point is the third point defining the arc and is the point the arc passes
through when traveling from the origin to the destination end point.

Teach Block - brings up the teach block screen. See A.1.2 below.

As the block types are toggled the IJK fields will disappear for Line types and NoMot types and
XYZ fields will disappear as well for NoMot types. If NoMot (no motion) is selected then no
XYZ nor IJK information is entered - instead only Code and Data fields are edited. The NoMot
block type has been provided to program ALL available codes. Only select codes are attached
for LINE or ARC blocks.

For LINE and ARC blocks some of the codes are PRE-BLOCK and some of the codes are
POST-BLOCK. PRE-BLOCK codes are executed BEFORE the motion in the block. POST-
BLOCK codes are executed AFTER the motion in the block. The POST-BLOCK codes have
white text. The PRE-BLOCK codes have black text.

There are NO PRE-BLOCK or POST-BLOCK codes in a No Mot (no motion) block as No


Mot block cause motion to stop before execution and by definition there is no motion in a No
Mot block.

PREBLOCK codes – RAPID, FEEDRATE, FEEDRATE TABLE, ACC/DEC,


M-CODE STOP, M-CODE NO STOP.

POST-BLOCK codes – ALL M-CODES, DWELL, PROGRAM END

In all block type cases, any codes displayed and data associated with those codes may be
selected.

10/19/2021 9 of 65 550736879.doc
Block Edit Screen – shot showing Codes for No Motion blocks.

VARIABLES-

In ANY DATA field a VARIABLE number can be entered instead of a static value. The
VARIABLE numbers begin at 10,000 for VARIABLE zero.

EXAMPLE – to use the value of VARIABLE 1 in the DATA1 field enter the value 10001 in the
DATA1 field. This value will show as YELLOW indicating the value of the VARIABLE will
be substituted for the VARIABLE number BEFORE the block is executed. In the screen shot
above the Fixture Offset number would be set equal to the value in variable one when this block
is executed.

Code Help - press to display more information on the codes


By clicking on Code Help and then clicking on the Code 1-3 buttons, a pop-up screen with more
information on each Code type is displayed.

Cancel Edits – aborts block edits and returns to the Part Edit screen.

Save Edits – saves edits and returns to the Part Edit screen.

10/19/2021 10 of 65 550736879.doc
A.1.1 CODE EXPLANATIONS

The program codes can be grouped into three categories – Machine codes (M-Codes or M-
Functions), Motion Codes (G-Codes) and Other codes. The Other codes consist of Math,
Variables, Logical and Program Control. See Appendix C – Code Reference for lists of these
program codes.
A.1.1.1 Machine Codes (M-Codes)

M-CODE=DATA1-3: The M-CODE is defined by the corresponding DATA field.

M70 – M75 with Data: The M-CODE M70-M75 is passed to xNC_PAL with a DATA value
which is defined by the corresponding DATA field.

M3 – Tool 1 ON & Tool 2 OFF


M4 – Tool 2 ON & Tool 1 OFF example – GLUE ON
M5 - Tool 1 OFF & Tool 2 OFF example – GLUE OFF

Program Stop – Stops the part program until the CYCLE START is pressed.

Optional Stop – Stops the part program until the CYCLE START is pressed IF the
OPTIONAL STOP control is toggled to ON on the RUN screen.

Program End – Ends the program at the completion of the block.

Rewind Program – Resets the program to block zero and waits for cycle start after executing
block zero.
Restart Program – Resets the program to block zero and continues running.

The following commands are MODAL which are commands that when executed set a mode that
is maintained until another program command changes it. See Appendix C – COMMAND
REFERNCE for a list of all MODAL commands.
Run Continuous – causes the program to run continuously without stopping between blocks.
Block by Block – causes the program to stop after every block until CYCLE START is pressed.
M-CODE Stop –the program stops at each M-Code until a handshake from xNC_PAL is
returned.
M-CODE No Stop – the program does not stop at M-Codes.

Count Part – the part counter is incremented by one.


Reset Count – the part counter is reset to zero.

Tool Offset – implements the Tool Offset defined by the DATA1 field. The defined tool offset
will be added to the axis positions. Tool Offset 0(zero) resets the tool offsets.

Arc Type – defines the method for Arc definition. 0=VIA, 1=Center, 3=Center Incremental
Note – (2=Radius is NOT allowed as it is only valid in a 2D coordinate system.)

Cancel All Offsets – Cancels Part, Tool and Fixture Offsets.

Seek Machine Home – causes the machine to re-home. i.e. seek the machine home limits.

10/19/2021 11 of 65 550736879.doc
A.1.1.2 Motion Codes (G-Codes)

Rapid – axis will run at Rapid rate defined by Program Defaults. Modal.
Feedrate – axis will run at feedrate defined by Data2 field, 1-100%. Modal.
Dwell – causes dwell delay after motion block. Defined by Data3 field, in secs.
If Data3 =0 then last defined Dwell or Program Default Dwell will be used.

Term Type – termination type where Data2 field defines the termination type.
0 – Actual Position. Close standing error to actual tolerance before continue.
1 – No Settle. Continue as soon as prior block move commanded.
2 – Command Position. Close standing error to command tolerance before continue.
3 – No Decel. Continue next block when decel point is reached. No decel occurs.

Go Home – go to the defined home position. Absolute mode defaults.


Return from Home – return to last position before Go Home. Absolute mode defaults.

Decel – sets decel rate defined by Data 2 field, 1-100%.


Accel – sets Accel rate defined by Data 2 field, 1-100%.
Accel/Decel – sets Accel and Decel rates defined by Data 3 Field, 1-100%.

Fixture Offset – implements the Fixture Offset defined by the Data 1 field. The offsets
defined in the Fixture Offset table will be added to the axis positions. Fixture Offset 0
(zero) resets the fixture offsets.

Go To Fixture - go to the fixture position where Data2 field defines the fixture #.
Absolute mode defaults.

Absolute – implement Absolute mode. Modal. All distances measured from Machine
Home.
Incremental - implement Incremental mode. Modal. All distances measured from the
current axis position.

Feedrate Table – sets the feedrate defined in the Feedrate Table where Data2 defines
the Feedrate Table row #.

Preset X – axis will stop and X will be preset to the position defined by Data1 field.
Preset Y - axis will stop and Y will be preset to the position defined by Data2 field.
Preset Z - axis will stop and Z will be preset to the position defined by Data3 field.

10/19/2021 12 of 65 550736879.doc
A.1.1.3 Other Codes- Math, Variables, Logical, Program Control

Optional Block Skip – select to optionally skip the block if the operator turns on the
Optional Block Skip control on the Run screen.

Skip X Blocks - skip the number of blocks defined by Data field 1.

Go To Block X – go to the block # defined by Data 1 field.

The following 4 codes are used to control program branching. Code1 & Code2 fields
must be set the same except may use “Or Data1 = Data2” for Code2 with “>” or “<” in
Code1. An IF is implied in front of these codes. Data fields may use VARIABLES.
Data1 Not=Data2:IF Data1 Not=Data2 THEN Do Next Block ELSE Skip NEXT Block
Data1>Data2: If Data1 > Data2 THEN Do Next Block ELSE Skip NEXT Block
Data1<Data2: If Data1 < Data2 THEN Do Next Block ELSE Skip NEXT Block
Or Data1=Data2: Or If Data1=Data2 THEN Do Next Block ELSE Skip NEXT Block
This code is used the Code2 field in conjunction with “>” or”<” in the Code1 field.

The following 4 codes provide basic math functions. The result is put in Data3. All data
fields may use VARIABLES. All three codes fields MUST be set the same or the
operation will be ignored.
D3=D1+D2: Data3 = Data1 + Data2
D3=D1-D2: Data3 = Data1 – Data2
D3=D1*D2: Data3 = Data1 * Data2
D3=D1/D2: Data3 = Data1 / Data2

VAR1=DATA1: Variable 1 = Data1 (value defined by Data1 field)


VAR2=DATA2: Variable 2 = Data2 (value defined by Data2 field)
VAR3=DATA3: Variable 3 = Data3 (value defined by Data3 field)
VAR4=DATA4: Variable 4 = Data1 (value defined by Data1 field)
VAR5=DATA5: Variable 5 = Data2 (value defined by Data2 field)
VAR6=DATA6: Variable 6 = Data3 (value defined by Data3 field)

VAR(DATA1)=DATA2 -Set Variable #(defined by Data1) = Data2 (value defined in


Data2 field) Must set the same code selection in Code1 & Code2 fields.

10/19/2021 13 of 65 550736879.doc
A.1.2 Teach Block

On the teach block screen, the user can jog the XYZ axis to a location and select Teach XYZ or
Teach IJK if the block type is set to an ARC type.

TEACH XYZ - The TEACH XYZ button will move the coordinate information into the XYZ
registers for the block.

TEACH IJK - the Teach IJK button will move the coordinate information into the IJK field.

These TEACH buttons give the user the ability to manually line up the motion path with
physical locations on the machine instead of programming measurements.

RETURN – returns to the Edit Block screen.

10/19/2021 14 of 65 550736879.doc
A1.2 Program Defaults Screen-
The Program Defaults Table contains parameters which determine the starting default settings
for the program. These are the settings which will be used in the program unless they are
changed by the program itself in a block of code. Each program stores it’s own unique defaults.

Arc Type - contains the default arc type that will be used by the part program. The Arc Type
may be changed from the part program using the Arc Type code.
Valid arc types are - VIA, CENTER (absolute), CENTER INCR (Incremental).
[ RADIUS arc type is only available on a 2D coordinate system and therefore is not supported in
the xNC application template which is 3D.]
VIA – the arc is determined by 3 points – the start, the end point [XYZ] and the VIA point (3rd
point)[ IJK].
CENTER (absolute) – IJK defines the center of the arc in absolute coordinates.
CENTER INCR (Incremental) – IJK defines the center of the arc in incremental coordinates.

Term Type - displays the termination type that will be used by the part program to end each
block motion. Term Type may be changed from the part program using the Term Type code.
Valid Term Types are – Absolute, Command, No Settle and No Decel.
Absolute – the absolute tolerance of the coordinate system must be satisfied before the next
move is executed.
Command – the command tolerance of the coordinate system must be satisfied before the next
move is executed.
No Settle – the next move is executed as soon as the last move has been commanded.
No Decel – the next move is occurs at the decel point of the prior move. No deceleration occurs.

10/19/2021 15 of 65 550736879.doc
ABS/INC - defines default motion as Absolute or Incremental positioning. This mode may be
changed from the part program using the ABSOLUTE and INCREMENTAL codes.

M-Stop - toggles between two states. Stop on M-Code inhibits motion when an M-Code is
executed. The motion path will stop at the coordinate location until it has completed the M-Code
and the xNC PAL ladder has returned the M-Code Complete handshake bit. Once the M-Code
is finished, the motion path will resume. No Stop on M-Code will continue the program without
stopping for an M-Code’s execution.

The default rates are defined in percent 0-100% for :


Accel – the acceleration rate used for moves. This rate may be changed from the part program
using the ACCEL code.

Decel – the deceleration rate used for moves. This rate may be changed from the part program
using the DECEL code.

Feedrate – the feedrate used for moves. This rate may be changed from the part program using
the FEEDRATE code.

Rapid Rate – the rapid rate used for moves. This rate may be changed from the part program
using the RAPID code.

Dwell Time – the default dwell time used if a Dwell of zero is programmed in the part program.
When the part program block uses a Dwell code and the Data is zero then the last programmed
dwell time is used OR the default dwell time is used if there has not been another dwell time in
the program.

ADDITONAL TABLES-

There are four tables in additional to the Program Defaults screen. These additional tables are
accessed from the Program Defaults screen as shown above.
Variables – press this button to access the Variables screen. There are 30 variables.
Tool Offset – press this button to access the Tool Offset screen. There are 10 tool offsets.
Feedrate Table - press this button to access the Feedrate Table screen. There are 10 feedrates.
Fixture Offset – press to access the Fixture Offset screen. There are 6 fixture offsets.

RETURN – press to return to the PART EDIT screen.

10/19/2021 16 of 65 550736879.doc
A.2.1 Variables Table
The Variables Table shows the 30 variables along with the variable comment. Each variable
may have a descriptive comment of up to 16 characters. Click on the variable field or variable
comment field to edit the stored value. Variables may be used in any data field in the part
program. Variables begin at #10,000.

Example – Reference block #5 of example part program #3, “Rectangle” “with radius corners”
To use Variable 1 in the part program for the length of side x the value 10001 would be put in
the “X” data field in the part program. In this case the value 10.000 would be substituted for
Variable 1 (100001) Pre-Block. Variables are designated in the part program automatically with
a yellow highlight as shown below.

RETURN – press to return to the Program Defaults Screen.

10/19/2021 17 of 65 550736879.doc
A.2.2 Tool Offset Table
The tool offset table provides 10 tool offsets to offset the part zero in X, Y and Z. Tool 0 is used
to CANCEL the tool offsets. Click on a data field to edit the stored value.

Example – Reference sample part program #5, “Repeating AB Logos……”


In this part program the tool offset is used to offset Y by 2 inches each time the tool number is
incremented by the part program using a Math addition instruction. This is used to create the
rows of AB Logos 2” apart in Y.

RETURN – press to return to the Program Defaults Screen.

10/19/2021 18 of 65 550736879.doc
A.2.3 FeedRate Table
The FeedRate table contains 10 feedrates. F0 is the Program Default FeedRate and is the same
as the Default FeedRate on the Program Defaults screen. The other 9 feedrates F1-F9 can be
referenced by using the FeedRate Table block code in the motion path program. This is
provided as a programming convenience so the programmer can edit the feedrate in one place,
the FeedRate Table instead of having to make multiple edits in the part program.
Click on a data field to edit the stored value.

RETURN – press to return to the Program Defaults screen.

10/19/2021 19 of 65 550736879.doc
A..2.4 Fixture Offset Table
The fixture offset table contains 6 fixture offsets to offset part zero in X, Y and Z. Fixture 0 is
used to CANCEL the fixture offsets. Click on a data field to edit the stored value. The fixture
positions may also be taught by jogging the axis to the desired position, selecting the fixture
number to teach with the pointer, and pressing the TEACH POSITION button.
Click on a data field to edit the stored value.

Example – Reference example program #5, “Repeating AB Logos…………”


In this program a new column of AB Logos is created by incrementing the fixture number using
a MATH addition instruction after each column is finished. The column rows are created by
incrementing the Tool number. Here the fixture number adds 2” to X with each increase in
Fixture number.

TEACH POSITON - The current position of the axis will be stored in the fixture position
currently pointed at when the TEACH POSTION button is pressed.

JOG – press to go to the MANUAL screen to manually jog the axis to the teach position.

RETURN – press to return to the Program Defaults screen.

10/19/2021 20 of 65 550736879.doc
B. Quick Check
The quick check screen uses imaginary XYZ axis to run a preview path. The path is displayed
using an XY plot trend. The Quick Check screen is used to preview a motion path without
actually moving the machine’s servo motors. Any programming errors can be detected before a
motion path is actually run because the Quick Check runs the same code that is to be executed
on the machine,. The following features or PROGRAM CODES are NOT implemented in
Quick Check and are ignored : Optional Block Skip, Optional Stop, Reset Block, M-
Functions, M-Function Stop, Seek Machine Home, Part Count, Reset Count.

CYCLE START - The CYCLE START button starts the motion path or is used to index the
motion path one step when SINGLE STEP mode is ON.

CYCLE HALT - The CYCLE HALT button stops the motion path until the CYCLE START
button is pushed again.

SINGLE STEP ON/OFF - The SINGLE STEP button toggles between SINGLE STEP and
CONTINUOUS mode. In SINGLE STEP mode, the motion path increments only one step each
time the CYCLE START button is depressed. In CONTINUOUS mode, the motion path runs
until it is complete or encounters a Program Stop or Optional Program Stop in the program.

The M0 and P0 displays show the actual position (M0) [Machine Zero] and the programmed
position (P0) [Part Zero] for each block.

RETURN – press this button to return to the PART BROWSER screen.

10/19/2021 21 of 65 550736879.doc
C. Run Screen
The run screen shows the run time information which includes……….

Inch/Metric mode – indicates whether the coordinates are measured in inch or metric. This is
not switchable and must be set up one way for the entire project.

Term (Termination) Type – This indicates the termination type selected for the block. The
default type is set in the Program Defaults and is also changeable from the part program using
the Term Type code. See A1.2 Program Defaults for definition of the termination types.

Feedrate/Rapid – indicates whether the axis is running at a programmed feedrate or rapid rate.

Arc Type – indicates the arc definition type. The default type is set in the Program Defaults but
may be changed from the part program using the Arc Type code. See A1.2 Program Defaults
for definition of the arc types.

Absolute/Incremental – indicates whether the program distances are referenced in Absolute or


Incremental. Absolute is measured from part zero. Incremental is referenced from the current
positon of the axis.

LAST M-CODE – indicates the last M-Code executed.

10/19/2021 22 of 65 550736879.doc
PART COUNT – increments once for each part program completed. Also may be incremented
from the part program using the PART COUNT code. This value may also be viewed and reset
on the Counters & Timers screen where there is also a totalizer which is NOT resetable. The
part count may also be reset in the part program using the RESET COUNT code.

PART TIME – shows the total elapsed time of the current part program. Also shows the total
elapsed time of the last part when the part is complete and no longer in run cycle. This
information is also shown on the Counters & Timers screen.

RAPID (box) – shows the current RAPID rate in %, 0 – 100%.

FEEDRATE (box) – shows the current programmed federate in %, 0 – 100%.

TOOL – indicates the current tool number. If non-zero then tool offsets are in effect.

FIXTURE – indicates the current fixture number. If non-zero then fixture offsets are in effect.

DWELL PRESET – indicates the programmed dwell preset time for dwell delays.

DWELL TIME – indicates the current accumulated dwell delay time.

AXIS POSITIONS – are shown for XYZ in Machine 0 (zero) and Part 0 (zero) reference.
Machine 0 is measured from the machine home. Part 0 includes (adds) part, tool and fixture
offsets.

PART # - indicates the selected part number to run. Next to the PART # are shown the part
name and part description.

BLOCK # - indicates the next block number which will be executed

BLOCK COMMENT – displays the block comment (if any) for the BLOCK # indicated.

BLOCK TYPE, XYZ, IJK, CODE1-3, DATA1-3 – these fields are displayed according to the
BLOCK # indicated.

SHOW VARIABLE # / SHOW VARIABLE VALUE – this button switches between


displaying the variable number or the value of the variable which will be substituted PRE-
BLOCK.

CYCLE START/ CYCLE RUNNING – press to start the part cycle OR to step the program if
SINGLE STEP ON (BLOCK by BLOCK) mode. Also indicates when the program is in cycle
by turning green and text indicates CYCLE RUNNING.

SINGLE STEP ON/OFF – press to toggle between SINGLE STEP and CONTINUOUS
mode. Also indicates when SINGLE STEP ON by text and turning yellow.

CYCLE HALT/HALTED – press to Halt the program execution. Also indicates when the
program is halted by text and turning red.

10/19/2021 23 of 65 550736879.doc
OPTIONAL STOP ON/OFF – press to toggle Optional Stop feature on and off. When Option
Stop is ON then program will stop at blocks with Optional Stop code and resume when
CYCLE START is pressed. Also indicates state with text in button and turns yellow when
program is stopped on an OPTIONAL STOP block and OPTIONAL STOP is ON.

BLOCK SKIP ON/OFF – press to toggle BLOCK SKIP feature on and off. When BLOCK
SKIP feature is ON then the program will skip blocks with the OPTIONAL SKIP code. Also
indicates state with text in button.

M-STOP ON/OFF – press to toggle the M-STOP feature on and off. When M-STOP is ON
then the program will STOP at M-CODES until a handshake response is received from the
xNC_PAL program. This allows for custom M-CODE processing in the xNC_PAL ladder.
Also indicates state with text in the button and turns yellow when the program is stopped on a
block while the M-STOP is ON and is awaiting a handshake response from the xNC_PAL
ladder.

OPERATOR PROMPTS – the bottom line of the RUN SCREEN is reserved for
OPERATOR PROMPT messages.

EXAMPLES –
SERVO NOT ENABLED – GO TO MANUAL SCREEN
SERVO DRIVES FAULTED – GO TO FAULT SCREEN
SERVO DRIVES NOT HOMED – GO TO MANUAL SCREEN
PART PROGRAMMING ERROR

SETUP – displays the SETUP screen.

DIAGNOSTICS – displays the DIAGNOSTICS screen.

XY PLOT – displays the XY PLOT screen.

PART SELECT – Returns to the PART BROWSER screen.

10/19/2021 24 of 65 550736879.doc
C.1 XY Plot

This screen,, similar to the QUICK CHECK screen, allows a plot of the XY tool path. The XY
plot shows the axis positions as the XY motors are running.

The push buttons, CYCLE START, SINGLE STEP, and CYCLE HALT work as on the RUN
SCREEN.

M0/P0 - The axis positions are shown in Machine 0 and Part 0 references.

BLOCK # - The next block number is displayed.

RETURN – The RETURN button returns to the RUN screen.

10/19/2021 25 of 65 550736879.doc
C.2 SETUP Screen
The SETUP SCREEN provides links to the PROGRAM DEFAULTS, TOOL OFFSETS,
VARIABLES, FEEDRATE TABLE and FIXTURE POSITIONS while in the RUN mode.
Some of these parameters may be edited on these screens and the new value may be saved IF
there is a STORE button on the screen. These new values will be used while the program is
running BUT will only be saved to the part storage if the “STORE” button has been pressed.
This allows the operator to make temporary edits in RUN and choose whether or not to store
them to the part storage.
PROGRAM DEFAULTS – displays the PROGRAM DEFAULTS screen.

TOOL OFFSETS – displays the TOOL OFFSETS screen.

VARIABLES – displays the VARIABLES screen.

FEEDRATE TABLE – displays the FEEDRATE TABLE screen.

FIXTURE POSITIONS – displays the FIXTURE POSITIONS screen.

DIAGNOSTICS – displays the DIAGNOSTICS screen.

RUN SCREEN –return to the RUN screen.

SKIP BLOCK –SKIP the active block.

RESET PROGRAM – Press while in CYCLE HALT to RESET program back to block #0.

10/19/2021 26 of 65 550736879.doc
C.3 DIAGNOSTICS –
The DIAGNOSTICS screen provides links to several other screens with useful diagnostic
information including :

INPUTS & OUTPUTS – This screen displays the status of inputs and outputs

SETUP– This screen provides links to the runtime tables – variables, fixtures offsets, tool offsets
& feedrate. Also allows the operator to skip the current block or reset the program to block zero.

LARGE READOUT – provides a large display of axis positions referenced to Machine 0 (M0)
and Part 0 (P0). Following Error can also be optionally displayed.

FAULTS – provides a link to the FAULT screens - FAULT STATUS and FAULT HISTORY

COUNTERS & TIMERS – display parts counter & totalizer, part cycle timer & time totalizer.

Additionally the following buttons are provided –


PART SELECT – return to the PART BROWSER screen.
RUN SCREEN – return to RUN screen.
RETURN – return to previous screen.

10/19/2021 27 of 65 550736879.doc
C.4 COUNTER & TIMERS Screen –
PART COUNT – displays the number of parts counted. This is incremented once automatically
each time a part program is completed. It may also be incremented by the program code PART
COUNT and can be reset by the program code RESET COUNT. Additionally the PART
COUNT can be reset on this screen by pushing the RESET PART COUNT button.

PART TOTAL – displays the total number of parts counted and is NOT resetable except by
editing the ladder diagram.

LAST PART TIME (SECS.) – displays the elapsed time for the last part cycle.

RUN TIME TOTAL (MINS.) – displays the total elapsed time for all parts.

10/19/2021 28 of 65 550736879.doc
C.5 LARGE READOUT –

This screen is provided to display the XYZ axis positions in a large readout display more
readable from a distance. The axis positions are shown referenced from PART ZERO (P0 –
includes OFFSETS) and MACHINE ZERO (M0 – measured from HOME without offsets).

HIDE FE – toggles FOLLOWING ERROR display on and off. Following Error is the
difference between the Actual and Commanded position.

RUN SCREEN – return to RUN screen.

10/19/2021 29 of 65 550736879.doc
D. Manual Screen –
This screen provides the ability to enable, home and jog the axis.

NO FAULTS – indicates if any axis is faulted. Displays AXIS FAULTED (RED) when any
axis is faulted. Go to FAULT STATUS or FAULT HISTORY to see the detail on axis faults.

ENABLE AXIS – press to toggle between axis enabled (GREEN) or disabled (YELLOW).

HOME AXIS – press to start axis homing. Will display AXIS HOMED (GREEN) when ALL
axis have been homed.

JOG X+ - press to jog X in the positive direction.


JOG X- - press to jog X in the negative direction.
JOG Y+ - press to jog Y in the positive direction.
JOG Y- - press to jog Y in the negative direction
JOG Z+ - press to jog Z in the positive direction.
JOG Z- - press to jog Z in the negative direction
FAULT STATUS – display FAULT STATUS screen.
FAULT HISTORY – display FAULT HISTORY screen.
DIAGNOSTICS – display DIAGNOSTICS screen.
PART SELECT – display PART BROWSER screen.
RETURN – return to previous screen.

10/19/2021 30 of 65 550736879.doc
D.1 FAULT STATUS –

The FAULT STATUS screen displays the current status of the axis faults and the last fault
saved. Also displays the faults on the interpolation instructions MCLM and MCCM. These
instructions cause the interpolated motion in the ladder.

ZERO XYZ – press this button to RE-DEFINE the current position as ZERO for ALL axis.

RESET DRIVES – press this button to reset XYZ drives.

MANUAL – displays the MANUAL screen.

ALARMS – displays the ALARM screen.

FAULT HISTORY – displays the fault histogram screen which records the last 50 XYZ faults.

RETURN – return to the previous screen.

10/19/2021 31 of 65 550736879.doc
D.2 FAULT HISTORY –
This screen displays the last 50 faults for up to 8 axis. Also displays if X, Y or Z is currently
faulted. The time & date of the logged fault is shown in the upper left – FAULT DATA.

Use the arrows on the left bottom to navigate to the axis of interest.
Node 1 is axis X.
Node 2 is axis Y.
Node 3 is axis Z.

Use the arrows on the right bottom to select which fault to display 1-50.
Number one is the last fault recorded.

X AXIS NO FAULTS (GREEN) – X not faulted. X AXIS FAULTED (RED) –X axis is


faulted.

Y AXIS NO FAULTS (GREEN) –Y not faulted. Y AXIS FAULTED (RED) – Y axis is


faulted.

Z AXIS NO FAULTS (GREEN) – Z not faulted. Z AXIS FAULTED (RED) – Z axis is


faulted.

FAULT STATUS – display FAULT STATUS screen.

MANUAL – display MANUAL screen.

10/19/2021 32 of 65 550736879.doc
RETURN – return to previous screen.

10/19/2021 33 of 65 550736879.doc
APPENDIX A – xNC CAPABILITES SUMMARY
i. SUPPORTED FUNCTIONS

Program Storage (19) + Runtime + Edit + Test (expandable)


Program Blocks (300 per program) (expandable)
Program Name (16 characters) (expandable)
Program Description (82 characters) (expandable)
Program Defaults – Arc Type, Term Type, ABS/INCR, Stop on M-Code,
Accel, Decel, Feedrate, Rapid, and Dwell Time Default Values
VARIABLES (30) – Variables may be substituted in ANY data field
VARIABLE DESCRIPTIONS(30) (16 characters each)
FIXTURE OFFSETS (6)
TOOL OFFSETS (10)
FEEDRATE TABLE (10)
M-STOP – Stop at M-Function, selectable on or off
BLOCK STEP
PROGRAM STOP
OPTIONAL PROGRAM STOP
PROGRAM END
PROGRAM REWIND/RETURN TO START
PROGRAM LOOPING
BLOCK SKIP – Skip block, selectable on or off
GOTO BLOCK #
SKIP x BLOCKS
ARC TYPES – VIA, CENTER, RADIUS, CENTER INCREMENTAL
(Radius only in 2D.)
SET Variable = DATA Value
C=A+B, C=A-B, C=A*B, C=A/B
VARIABLE #A = B, VARIABLE 1-6 = Data Field
IF A > B THEN DO NEXT BLOCK ELSE SKIP NEXT BLOCK
IF A >OR= B THEN DO NEXT BLOCK ELSE SKIP NEXT BLOCK
IF A < B THEN DO NEXT BLOCK ELSE SKIP NEXT BLOCK
IF A <OR= B THEN DO NEXT BLOCK ELSE SKIP NEXT BLOCK
IF A = B THEN DO NEXT BLOCK ELSE SKIP NEXT BLOCK
IF A NOT EQUAL B THEN DO NEXT BLOCK ELSE SKIP NEXT BLOCK
PRE-DEFINED M-CODES M70-M75 with DATA
USER DEFINED M-FUNCTIONS (unlimited)
TOOLPATH DISPLAY – both QuickCheck (imaginary) and XY Plot (real)

10/19/2021 34 of 65 550736879.doc
ii. FUNCTIONS NOT SUPPORTED
Tool Life/Wear – (can be developed)
Tool Geometry – (can be addressed in ladder)
Cutter Radius Compensation – (tool path must be recalculated)
Axis Calibration – (can be done in a CAM)
Milling , Lathe or Grinding cycles/features – (can be addressed in ladder)
Mirror Image – (can be developed using Kinematics function)
Rotation – (can be developed with Kinematics function)

10/19/2021 35 of 65 550736879.doc
APPENDIX B – Rules: Setup, Programming, Operations
i. RULES – Setup/Configuration

1) Coarse Update rate must be twice the time schedule for the timed interrupt
PathTask. Example: PathTask schedule = 2.5 msec, Coarse Update Rate
must be 5 msec or greater.
2) AND the Coarse Update rate must be an even multiple of the SERCOS
Ring Update rate. Example: IF the SERCOS Ring Update is 1 msec the
Coarse Update Rate may be set at 5 msec (a multiple of 5 times) and still
meet the requirement of two times the timed interrupt PathTask (set at 2.5
msec). If the SERCOS Ring Update is set at 2 msec than the Coarse
Update Rate should be set at 6 msec (a multiple of 3 times) and therefore
the Coarse Update Rate also meets the requirement of exceeding two times
the timed interrupt PathTask..

10/19/2021 36 of 65 550736879.doc
ii. RULES - Programming

1) No Mot (no motion) blocks will cause the motion path to stop before they
are executed.

2) Program Codes attached to lines or arcs are either Pre-Block or Post-


Block. Pre-Block codes are activated before the motion in an arc or line
block. Post-Block codes are activated after the programmed motion in an
arc or line block. See the lists of Pre-Block and Post-Block Codes in the
Appendix C – Code References.

3) Any code may be programmed in a No Mot (no motion) block and since
there is no motion (by definition) these codes are neither Pre-Block nor
Post-Block.

4) Math Codes must have Code 1-3 set the same or they will be ignored.

5) “IF” (then Else) Compares must have the same code set for Code1 and
Code2 or they will be ignored EXCEPT may set Code1 “>” or “<” AND
Code2 “OR =” . No code is allowed in Code3 when using “IF” commands.

6) GO HOME, GOTO Fixture #, Return from Home - Program Z retract as


required prior to the GOTO block. Position mode will default to
ABSOLUTE.

7) Generally invalid data will be ignored without action or error. Example –


Programming Fixture Offset # 17 will be ignored and cause no action.

8) “Radius” Arc Type is ONLY valid in a two dimensional coordinate system


and therefore is not supported without re-configuring this application ladder.

9) Part Zero Presets, Tool Offsets and Fixture Offsets will occur
immediately and will be active in the next motion block.

10) Program Rewind will reset block number to ZERO AND execute block
zero before stopping.

11) Program Restart will restart from the beginning without stopping.

10/19/2021 37 of 65 550736879.doc
iii. RULES – Operations
1) Pushing the Block/Block button on the Run Screen while running in
Continuous mode will stop the path the block AFTER the current block
displayed. This is because the motion planner is always looking one block
ahead. If you want the path to stop immediately you MUST push the Cycle
Halt button.

2) Restarting in the middle of a path is NOT recommended. Pushing the Cycle


Halt button will stop the path immediately. The path may be restarted on
any linear block if the program mode is ABSOLUTE. If the path is stopped
on a circular arc block the restarted path will not be correct unless the
programming mode for the arc is CENTER (absolute) and the program is
in ABSOLUTE. Restarting with a VIA arc will cause an improper arc if the
path is stopped beyond the VIA point. Restarting when the program mode is
INCREMENTAL will always cause an incorrect path.

3) While in Block/Block – when the Cycle Start pushbutton is depressed and


the current block is Skip Block, Skip X Blocks or Skip to Block X the
indicated next block will execute immediately when the Cycle Start is
pressed.

10/19/2021 38 of 65 550736879.doc
APPENDIX C – CODE REFERENCES
i. CODE ADDRESSES- listed in numerical order.

700-799 OTHER - Math, Variables, Logical, Program Control

720 Optional Block Skip


721 Skip X Blocks (where Data field defines X)
722 Go To Block X (where Data field defines X)

740 Or IF Data1=Data2 THEN DO Next Block ELSE Skip NEXT Block


741 IF Data1 Not= Data2 THEN DO Next Block ELSE Skip NEXT Block
742 IF Data1 > Data2 THEN DO Next Block ELSE Skip NEXT Block
743 IF Data1 < Data2 THEN DO Next Block ELSE Skip NEXT Block

760 Data3 = Data1 + Data2


761 Data3 = Data 1 – Data2
762 Data3 = Data1 * Data2
763 Data3 = Data1 / Data2

781 Variable 1 = Data1 (defined by Data1 field)


782 Variable 2 = Data2 (defined by Data2 field)
783 Variable 3 = Data3 (defined by Data3 field)
784 Variable 4 = Data1 (defined by Data1 field)
785 Variable 5 = Data2 (defined by Data2 field)
786 Variable 6 = Data3 (defined by Data3 field)

790 Define Variable #(defined by Data1) = Data2 (in Data2 Field)


Note- Uses 790 in Code1 & 790 in Code2 in same block.

10/19/2021 39 of 65 550736879.doc
800-899 Machine Codes / “M-Functions”

803 Tool1 On, Tool2 Off


804 Tool1 OFF, Tool2 On [example - Glue On]
805 Tool1 & Tool2 Off [example - Glue Off]

830 Rewind Program – Return to Start block


831 Restart Program – Restart from beginning

870 M70 with Data in Data field


871 M71 with Data in Data field
872 M72 with Data in Data field
873 M73 with Data in Data field
874 M74 with Data in Data field
875 M75 with Data in Data field

880 Run Continuous


881 Run Block by Block
882 Motion Stop at M-Function
883 Motion Continuous at M-Function

884 Tool Offset (where Data defines Tool Offset #)


884 & Data=0 Cancel Tool Offsets

886 Cancel ALL Offsets

887 Set Arc Type (where Data defines Arc Type)


0 = VIA
1 = Center
2 = Radius (not allowed in 3D coordinate system)
3 = Center Incremental

888 Seek Machine Home


889 Reset Part Count
890 Part Count

891 M-Function (defined by Data1 field)


892 M-Function (defined by Data2 field)
893 M-Function (defined by Data3 field)

897 Feedrate Table (row defined by Data2)

10/19/2021 40 of 65 550736879.doc
900-999 Motion Codes / “G-Codes”

900 Rapid (defined by Program Defaults)


901 Feedrate (defined by Data field, 1-100%)

904 Dwell (defined by Data field, in secs.)

909 Termination Types (where Data field defines Termination Type)


0 – Actual Position
1 – No Settle
2 – Command Position
3 – No Decel

928 Go Home
929 Return from Home

935 Set Decel Rate (defined by Data field, 1-100%)


936 Set Accel Rate (defined by Data field, 1-100%)
937 Set Accel AND Decel rate (Defined by Data Field, 1-100%)

954 Apply Fixture Offset (where Data field defines Fixture #)


954 & Data=0 Cancel Fixture Offset

955 Go To Fixture # (where Data field defines Fixture #)

990 Absolute
991 Incremental

9921 Preset X (where Data field defines axis Preset Position)


9922 Preset Y (where Data field defines axis Preset Position)
9923 Preset Z (where Data field defines axis Preset Position)

10,001-10,030 Variables (1-30)

10/19/2021 41 of 65 550736879.doc
ii. PROGRAM CODES – listed by Code field 1-3

CODE1
0 None

990 Absolute
991 Incremental

720 Optional Block Skip


722 Go To Block #
721 Skip X Blocks

790 Define Variable #(defined by Data1) = Data2 (uses 790 in Code2 also)
781 Variable 1 = Data1
784 Variable 4 = Data1

742 IF Data1 > Data2 THEN Do Next Block ELSE Skip NEXT Block
743 IF Data1 < Data2 THEN Do Next Block ELSE Skip NEXT Block
741 IF Data1 Not= Data2 THEN DO NEXT Block ELSE Skip NEXT Block

760 Data3 = Data1 + Data2


761 Data 3 = Data 1 – Data2
762 Data3 = Data1 * Data2
763 Data3 = Data1 / Data2

954 Fixture Offset where Data1 defines Fixture Offset # (0-5)


Fixture 0 = no offsets
884 Tool Offset where Data1 defines Tool Offset # (0-9)
Tool 0 = no offsets

9921 Preset X

891 M-Function defined by Data1 field


870 M70 where Data1 field defines M70 Function data
873 M73 where Data1 field defines M73 Function data

10/19/2021 42 of 65 550736879.doc
CODE2
0 None
900 Rapid
901 Feedrate (Data 2 – 1-100%)
897 Feedrate Table (where Data2 defines row in Feedrate Table)
936 Set Accel Rate
935 Set Decel Rate
887 Set Arc Type, Data2 = 0-3 where:
0 = VIA
1 = Center
2 = Radius (only allowed in 2D coordinate system)
3 = Center Incremental
909 Termination Types, Data2=0-3 where:
0 – Actual Position
1 – No Settle
2 – Command Position
3 – No Decel
790 Define Variable #(defined by Data1) = Data2 (uses 790 in Code1)
782 Variable 2 = Data2
785 Variable 5 = Data2
742 IF Data1 > Data2 THEN Do Next Block ELSE Skip NEXT Block
743 IF Data1 < Data2 THEN Do Next Block ELSE Skip NEXT Block
741 IF Data1 Not= Data2 THEN DO NEXT Block ELSE Skip NEXT Block
740 Or IF Data1=Data2 THEN DO NEXT Block ELSE Skip NEXT Block
760 Data3 = Data1 + Data2
761 Data3 = Data1 – Data2
762 Data3 = Data1 * Data2
763 Data3 = Data1 / Data2
955 Go To Fixture # where Data2 defines Fixture Offset # (0-5)
928 Go Home
929 Return from Home
888 Seek Machine Home
9922 Preset Y
892 M-Function defined by Data2 field
871 M71 where Data2 field defines M71 Function data
874 M74 where Data2 field defines M74 Function data

10/19/2021 43 of 65 550736879.doc
CODE3
0 None

937 Accel/Decel (Set Acc&Dec = Data3, 1-100%)

830 Rewind Program


831 Restart Program
800 Program Stop
801 Optional Stop
904 Dwell
802 Program End

783 Variable 3 = Data3


786 Variable 6 = Data3

880 Run Continuous


881 Run Block by Block
882 Motion Stop at M-Function
883 Motion Continuous at M-Function

760 Data3 = Data1 + Data2


761 Data 3 = Data 1 – Data2
762 Data3 = Data1 * Data2
763 Data3 = Data1 / Data2

9920 Cancel XYZ Presets


886 Cancel ALL Offsets
890 Part Count
889 Reset Part Count
9923 Preset Z
893 M-Function defined by Data3 field
872 M72 where Data3 field defines M72 Function data
875 M75 where Data3 field defines M75 Function data

10/19/2021 44 of 65 550736879.doc
iii. FUTURE CODES RESERVED

848 Overrides Enabled


849 Overrides Disabled
898 Sub-program call
899 Sub-program end & program jump
917 XY Plane Select
918 XZ Plane Select
919 YZ Plane Select
920 Inch
921 Metric
998 Initial Z Return
999 R-Point Z Return

10/19/2021 45 of 65 550736879.doc
iv. PROGRAM CODES - PREBLOCK
INCREMENTAL
ABSOLUTE

RAPID
FEEDRATE

SET FEEDRATE
SET ACCEL
SET DECEL
SET ACCEL/DECEL

TERMINATION TYPES –
ACTUAL
NO SETTLE
COMMAND
NO DECEL

ARC TYPE - Set ARC Type, Data2 = 0-3 where:


0 = VIA, 1 = Center, 2 = Radius (2D ONLY), 3 = Center Incremental

VARIABLE SUBSTITUTION
SET VARIABLE = DATA FIELD

GO HOME
RETURN FROM HOME
GO TO FIXTURE POSITION

TURN ON OPTIONAL PROGRAM STOP


TURN ON STOP ON M FUNCTION

OPTIONAL BLOCK SKIP


GOTO BLOCK #
SKIP X BLOCKS

FIXTURE OFFSET
TOOL OFFSET
CANCEL ALL OFFSETS
CANCEL XYZ PRESETS

COUNT PART
RESET PART COUNT
10/19/2021 46 of 65 550736879.doc
v. PROGRAM CODES - POSTBLOCK
PROGRAM STOP
OPTIONAL STOP
PROGRAM END
PROGRAM REWIND
PROGRAM RESTART

DWELL

M-CODE by DATA
M-CODE 70-75 with DATA
STOP ON M-CODE

SEEK MACHINE HOME

PRESET POSITION X
PRESET POSITION Y
PRESET POSITION Z

10/19/2021 47 of 65 550736879.doc
vi. RS274 / CNC G/M CODE COMPATABILITY

The xNC template is very compatible with CNC RS274 G/M code programs. These programs
are stored as ASCII text files and may be translated and downloaded to the ControlLogix using
EXCEL.

The following is a list of G/M codes implemented in the xNC template.

G01 RAPID
G01 FEEDRATE
G02 Arc (CW)
G03 Arc (CCW)
G04 Dwell
G09 Precise stop / TERMINATION TYPES – (G09.x)
(G09.0) ACTUAL
(G09.1) NO SETTLE
(G09.2) COMMAND
(G09.3) NO DECEL

G28 GO HOME
G29 RETURN FROM HOME
G55 FIXTURE OFFSET
G65 SET VARIABLE = DATA FIELD
G90 ABSOLUTE
G91 INCREMENTAL
G92 PART ZERO PRESETS
G92.0 CANCEL PRESETS
G92.1 PRESET X
G92.2 PRESET Y
G92.3 PRESET Z

F Feedrate
T Tool # OFFSET
O FIXTURE # OFFSET

M0 PROGRAM STOP
M1 OPTIONAL STOP
M2 PROGRAM END
M30 PROGRAM REWIND
M31 PROGRAM RESTART
M88 SEEK MACHINE HOME
M90 COUNT PART
M98 GO TO BLOCK # OR SKIP BLOCKS
10/19/2021 48 of 65 550736879.doc
vii. MODAL CODES

MODAL codes once set maintain a mode until the mode is changed by
another program code. The following program commands are MODAL.

Run Continuous
Run Block by Block

M-Code Stop
M-Code No Stop

Incremental
Absolute

Feedrate
Feedrate from Feedrate Table
Rapid

Dwell preset value (if 0)

Tool Offset
Fixture Offset
Part Zero Offset

Term (termination) Type


Arc Type

Decel Rate
Accel Rate

Optional Program Stop Control


Optional Block Skip Control
M-Code Stop Control

10/19/2021 49 of 65 550736879.doc
APPENDIX D – Frequently Asked Questions
1. How to print out a part program? use EXCEL

2. Adding cutter compensation.


Develop custom structured text code in RSLogix5000.
Develop VB app. to recalculate the tool path.

3. RS-274 programming. –
use EXCEL.

4. Axis calibration –
USE a CAM to linearize.

10/19/2021 50 of 65 550736879.doc
APPENDIX E – Sample Programs
PROGRAM 1 – AB LOGO

This program consists of 171 lines and arcs and was originally drawn in AutoCad and
transferred to the ControlLogix xNC ladder template using a CAD/CAM program. The program
was developed using VIA arc types which means the arcs are defined by a third “VIA” point
which is the IJK point the arc travels through on the way to the end point XYZ.

When this program is run on a pen plotter the “Glue On” and “Glue Off” custom M-Codes
indicate where the pen is lifted to avoid the extra lines which are drawn when the pen is left
down as depicted in the screen shot above. The “Glue On” and “Glue Off” custom M-Codes
shown in this example where added for a glue applicator machine.

10/19/2021 51 of 65 550736879.doc
Here are the first ten blocks of the program:

Here are the last ten blocks of the program:

10/19/2021 52 of 65 550736879.doc
PROGRAM 2 – LOOPING

This programs demonstrates the ability to blend continuous arcs without deceleration.
The Term Type (termination type) is set to NO DECEL in the Program Default parameters.

10/19/2021 53 of 65 550736879.doc
The entire Program 2, “Looping” is shown below.

Blocks 2-4 - arcs are defined using the VIA block type. IJK defines the point that the arc must
travel through on the way to the endpoint XYZ and therefore determines the direction of the arc.

Block 5 – Draws a line back to 0,0,0 and executes the program END.

10/19/2021 54 of 65 550736879.doc
PROGRAM 3 – RECTANGLE WITH RADIUS CORNERS USING VARIABLES

This program demonstrates the use of variables to define dimensions in a “universal” rectangle
program which can be sized prior to running by changing the values of the variables on the
Variables screen. Variable 1 determines the length of side X. Variable 2 determines the length
of side Y. Variable 3 determines the radius of the corner. Notice in the program the corner
radius arcs are defined by center point programming NOT radius programming because radius
programming is only available in 2D coordinate systems and the xNC template is set up for 3D.

10/19/2021 55 of 65 550736879.doc
The values of the variables are shown below for Program 3, “Rectangle with radius….”

Below is shown the first 5 blocks using MATH instruction blocks to calculate the negative
values for side X, side Y and the radius. These values are necessary for use in moving in the
negative direction using the incremental programming method. In block 1 Variable 4 is set equal
to –radius (Variable 3). In block 2 Variable 5 is set equal to –side X (Variable 1). In block 3
Variable 6 is set equal to –side Y (Variable 2).

10/19/2021 56 of 65 550736879.doc
Below is shown the rest of the Program 3 – “Rectangle with radius corners…. “

Block 4 – Incremental programming mode is set – distances are calculated from where the axis
starts from. In this block X is moved the distance of the radius (Variable 3) and Feedrate one is
chosen from the Feedrate Table. The INCREMENTAL mode and feedrate are set Pre-Block.
i.e. Before the motion. The INCREMENTAL mode and FEEDRATE are MODAL meaning
these modes stay as set until changed by the program.

Block 5 – Side x at the bottom is drawn using Variable 1 for the distance in X.

Block 6 – The first radius is drawn using Variable 3 to define the incremental distance in XYZ
and the center point in IJK. The center is defined using the Arc Type of Center Incremental
mode which has been defined on the Program Defaults screen.

Block 7 – The right hand side Y is drawn.


Block 8 – The 2nd radius is drawn. Notice X and I are negative values calculated in Block 1.
Block 9 – The top side X is drawn using the –side X stored in Variable 5 from Block 2.
Block 10 – The third radius is drawn using the –radius stored in Variable 4 from Block 1.
Block 11 – The left side Y is drawn. Notice Y is negative using Variable 6 stored in Block 3.
Block 12 – The last radius is drawn. X is positive. Y is negative. There is a DWELL of 1 sec.
after the move.
Block 13 – Programming mode is set to ABSOLUTE and move to 0,0,0 at a Feedrate of 10%
END the program when 0,0,0 is reached.

10/19/2021 57 of 65 550736879.doc
PROGRAM 4 – SMALL AB LOGO

This program is essentially the same as Program 1 but has been scaled in AutoCad to 1.5” from
12” and imported into xNC using CAD/CAM. This program is included here as a basis for
Program 5 which uses the same coordinate data to create a matrix of small AB Logos in
columns and rows using FIXTURE and TOOL OFFSETS.

10/19/2021 58 of 65 550736879.doc
PROGRAM 5 – REPEATING AB LOGOS USING FIXTURE & TOOL OFFSETS

This program uses the same coordinate data from Program 4 but uses Fixture Offsets and Tool
Offsets to create a matrix of logos by looping the program and incrementing the Fixture Offset
and Tool Offset numbers to offset in X and Y. This allows the program to be repeated here 36
times while the coordinates are only defined once.

10/19/2021 59 of 65 550736879.doc
Block 181 – Add one to the tool number stored in Variable 2. Used to increment Y.
Block 182 – Set the tool #. Implements Tool Offset defined by Variable 2 from Tool Offset
table.
Block 183 – If Variable 2 (Tool Offset #) is less than 7 THEN DO NEXT BLOCK
Block 184 – GO TO Block 2 to start over with next AB Logo.
Block 185 – When done with column of logos (Tool Offset =7) then set Variable 2 = 1
Block 186 – Set Tool Offset # defined by Variable 2
Block 187 – Add one to Fixture Offset # stored in Variable 1. Used to increment X.
Block 188 – Rapid back to logo start position.
Block 189 – Implements Fixture Offset # defined by Variable 1 from Fixture Offset table.
Block 190 – If Variable 1 (Fixture Offset) less than 7 THEN DO NEXT BLOCK

Block 191 – Go To Block 2 and start over with next column.


Block 192 – Set Variable 1 (Fixture Offset) = 1 to start over at beginning.
Block 193 – Restart back at Block 0 without stopping. This is the same as GoTo Block 0. This
program loops forever until CYCLE HALT is pressed.

10/19/2021 60 of 65 550736879.doc
PROGRAM 6 – CONDITIONAL PROGRAM BRANCHING
This programs shows an example of conditional program branching based on the value of
Variable 10. The cut-out in the center of the rectangle is made if Variable 10 =1 otherwise it is
not. This is the same part program as Program 3 with the addition of the cut-out. This
demonstrates how an operator during setup could turn on or off options in the program by
entering values on the VARIABLES screen.

10/19/2021 61 of 65 550736879.doc
Block 13 – A conditional branch is used to control the flow of the program. Here the value of
Variable 10 is used to decide whether to branch or not. The instruction “If D1 ne D2” could be
read “If D1 (Data1) Not Equal D2 (Data2) THEN DO the next block ELSE skip the next block.
Here the value of Data1 is 10001 indicating that the value of Variable 10 will be substituted. If
Variable 10 =1 THEN the next block is executed ELSE the next block is skipped. Notice that
Code 1 and Code 2 are set to the same Code. This is required.

Block 14 – Go to Block 20. This skips over Blocks 15-19 which cause the cut-out.

Block 15-19 – perform the cut-out.

Block 20 – No Motion occurs. This block is providing no purpose and is a placeholder only.

Block 21 – ENDS the program.

10/19/2021 62 of 65 550736879.doc
APPENDIX F - REVISION HISTORY
Revision 2.13 – Re-organized program codes for NoMot vs Lines & Arcs.
All codes available in No Mot blocks. Lines and arcs have M-Codes, Rapid, Feedrate, Feedrate
Table, Program End, ACC/DEC, Dwell. and M-Code Stop/No Stop.
Reversed Block UP/DOWN buttons and Block Page UP/DOWN buttons to coincide with screen
layout and ROW buttons. i.e. Block numbers increase DOWN the page.
Re-arranged sample programs to coincide with this manual. Programs 1-6 are samples.

Revision 2.14 –
Deleted Program Complete rungs PostBlock 1 & 2 (R4) and edited R20 in xNC_Main instead.
Waits for M-Codes and Dwell on last block in xNC_Main before program completion.
Combined R1 & R7 in PV_Main to allow runtime edits of Variables, Offsets and FeedRate
Table. Queued part is not loaded until return to Part Browser screen.
Pre-Block1&2 change R7 .This allows No Mot blocks to have M-Codes and Dwells. Added
not Dwell.DN in R15 xNC_Main for timing.

Revision 2.15- Fix for Feedrate Table code and Conversion to Ver.15/4.0
Fixed error, Pre-Block Rung 62, change 997 to 897 for Feedrate by Table de-code.
Also change rung 45 to >(greater than) 896 jump to Code 3 section.
Update to Rev. 15 RSLogix and Version 4.0 RSView Studio ME

Revision 2.15a- Fixes to insert & delete block only affecting last block #299.
Also limited copy program to number 6 or below for L60 demo.
Screen 40 – Confirm Program Copy – Changed max. copy # to 6 to match demo array
dimension.
P04_PV, R03_EditProg, Rung 20 , Change DelLength=LenRecipe-Blk2Del-3 (was -1 by
mistake). Also Rung 20 added LES to not allow delete of row 299.Also Rung 20 added MOV 6
(No Motion Code) to Edit.BlockInfo(897) which is block 299. Also Rung 20 Added MOV 802
(End of Program Code) to Edit.Code(899) which is block 299 Code 3.
Rung 21 for inserts same routine…. Changed Insert length to -3 from -6 and InsertLengthCom to
-1 from -2. This was because last block #299 was not being copied to from 298. Also added to
Rung 21 that block number must be less than #299 to do insert.

Revisions 2.15b – Added HeartBeat for Excel spreadsheet, Ran L43x


Added interface to Excel spreadsheet xNC215b.xls. Ran xNC on L43x CompactLogix

Revisions 2.15c – Added MaxBlockNum & MaxPartNumber variables


Allows user to change number of blocks per program or number of part numbers.
Set MaxPartNumber equal to the max. number of part programs to store. Edit tag “SR(x)” and
expand the dimension of the array to be equal to the max. number of part programs to store. Also
edit PV+ project Part Browser display to corresponding max limit.
Set MaxBlockNum to the max. number of blocks per part program. Edit UDT “StorePart”
adjusting array lengths to equal 3 times this max. number for elements – “BlockInfo”, “Coord”,
“ArcPath”, “Codes” & “Data” and equal to this max number for “BlockCom”.

10/19/2021 63 of 65 550736879.doc
Revisions 2.16a – converted to Version 16. Deleted CIMLogics references.

10/19/2021 64 of 65 550736879.doc
10/19/2021 65 of 65 550736879.doc

You might also like