User Manual - Flexx CNC

Table of Contents

Product Overview

Product Description

The Flexx CNC provides a full interface to allow a Universal Robot to bi-directionally communicate with a CNC machine. It utilizes pre-defined connections from the Flexx Machine Interface (hardware) to connect with the machine's ethernet port, cycle start button, and peripherals such as a vise, chuck, or door. Flexx CNC also provides out-of-the-box Polyscope Program Nodes to assist in programming your robot via a URCap interface. 

Key Terms and Definitions

Term

Definition / Description

Flexx Machine Interface

A hardware interface between the robot and the machine.

Flexx CNC URCap

Software that runs on the robot to communicate to the Flexx Machine Interface.

Okuma Main_Server

Software that runs on the machine to communicate to the Flexx Machine Interface.

Functional Diagram

 

Flexx Machine Interface

Bill of Materials

Confirm that the following materials were received in Flexx CNC package:

  • (1x) Flexx Machine Interface Enclosure

  • (14x) M12 Digital I/O Cables

  • (2x) Ethernet Cables

  • (1x) AC Power Cable

  • (1x) USB w/ all required software

Flexx Machine Interface Hardware Setup

  • Connect the Machine Ethernet cable from the RJ45 connector labeled MACHINE to the RJ45 connector on the machine.

  • Connect the Cycle Start cable M12 connector to the machine interface CYCLE START Output.

  • Okuma Mill: Connect the Vise cable M12 connector to the machine interface VISE Output.

  • Okuma Lathe: Connect the Lathe cable M12 connector to the machine interface CHUCK Output.

  • Connect other general digital output and inputs to the labeled M12 connectors on the Flexx Machine Interface. For all M12 connectors: White is positive lead, black is negative lead. Blue and brown are not used. Signal voltage is 24V.

  • If using Ethernet to the Robot

    • Connect the Robot Ethernet cable from the RJ45 connector labeled ROBOT to the RJ45 connector inside the robot controller cabinet. 

    • Toggle the ETHERNET / DIO switch to the ETHERNET side. 

  • If using Digital I/O to the Robot

    • Connect the robot side Digital Output connectors to the Digital Outputs inside the robot controller cabinet. Connect the Flexx Machine Interface side M12 connector to the 12-pin ROBOT IN connector.  

    • Connect the robot side Digital Input connectors to the Digital Inputs inside the robot controller cabinet. Connect the Flexx Machine Interface side M12 connector to the 4-pin ROBOT OUT connector.  

    • Toggle the ETHERNET / DIO switch to the DIO side. 

  • Plug in AC Power to the unit.

  • Power on and verify that the power LED displays green.

Okuma Controllers

Okuma Hardware Setup

  • Open the front panel of the machine behind the display

  • Plug in the ETHERNET CABLE from the Flexx Machine Interface MACHINE slot to the board on the back of the panel. 

  • Wire the CYCLE START digital output from the Flexx Machine Interface M12 connector into a relay that is connected to the rear of the cycle start button.

  • Okuma Mill: Wire the VISE digital output from the Flexx Machine Interface M12 connector into the digital input on the vise actuation control

NOTE: For setups with more than one vise, utilize the additional general purpose OUTPUTS on the Flexx Machine Interface. 

  • Okuma Lathe: Wire the CHUCK digital output from the Flexx Machine Interface M12 connector into the clamp foot pedal connected to the machine to close the chuck. Wire a general purpose OUTPUT on the Flexx Machine Interface to the unclamp chuck foot pedal to open the chuck.  

Okuma Software Setup

  • Plug the Flexxbotics usb stick into the front panel of the machine. 

  • Click CTRL + the button below to open the windows system. 

  • Navigate to the file explorer via the start menu and click on the inserted USB drive.

  • Select the Server_Startup_Setup file and run it. This will install necessary software and move files to the appropriate locations to enable the Main_Server software to run on boot

NOTE: During this process, the setup file will automate all clicking of software installation procedures. Do not click the screen or touch the mouse. 

  • Allow the setup to run to completion until the terminal displays the below response. 

  • The OKUMA_OSPX00 server can now be run from the D drive file location, where it may be rerun in a troubleshooting process if necessary.

  • If the OKUMA_OSPX00 does not start after reboot, users are to first press CTRL + the button below to open the windows system.

  • Type and select “Task Scheduler”, then navigate to action, create task:

  • Select Trigger, then new

  • Begin the task “at startup” and tick the “delay start for:” and set the dropdown to “1 minute”. Hit OK

  • Move to Action, select new, Start a program, and enter “D://MD1/OKUMA_OSP200_V1” in Program/Script, then ok

  • In General, name this task “FLEXX”. Hit OK.

  • Restart your CNC, and the FLEXX CNC server will start on boot.

IP Address Configuration

  • Start menu, Control Panel

  • Choose Network and Internet Connections

  • Choose Network Connections

  • Double Click Local Area Connection

  • Double Click TCP/IP, then select Properties

  • Tick “Use the following IP address” and enter the info below. CRITICAL: Record the previous IP address formerly listed here and keep in safe place for future troubleshooting in event of an error.

  • Restart the machine. 

  • The Okuma_OSPXXX_Server flexxbotics software will now automatically run on boot. This will also re-configure the ip address of the machine to be 192.168.1.180 for communication with the Flexx Machine Interface.    

OSP-200 Okuma Schedule Program Setup

  • Navigate back to the Okuma main software. Go through startup routines. 

  • Set up the Schedule Program with the FlexxLoop.sdf:

  • Navigate to Auto

  • Right Arrow Key

  • Select Schedule PRG_OPER

  • Select Program Select

  • Select FLEXXLOOP.SDF

  • Screen should look like below before ready to start running unattended

OSP-300 Okuma Schedule Program Setup

  • Navigate back to the Okuma main software. Go through startup routines. 

  • Set up the Schedule Program with the FlexxLoop.sdf:

  • Select Program Select

  • Select Schedule Sel.

  • Select FLEXXLOOP.sdf then click OK.

  • The following represents a successful setup of the program:

CRITICAL: Runtime Putting FLEXXLOOP.sdf in Memory as Active Program

Anytime the machine is run it needs to be ensured that the above steps are run to load FLEXXLOOP.sdf into memory. This is the main Flexx CNC program that is used to call other programs on the machine when the Select G-Code node is run from the robot.

Okuma G-Code Programs

G-Code File Location

  • All g-code files that will be automated by the robot need to be located in the MD1:/ drive on the machine. This is so the Flexx CNC interface understands where it can expect G-Code programs to be on the machine.

G-Code Program Loading

  • The Flexxbotics software allows the UR to instruct the machine as to which g-code program it needs to run. The selected g-code is automatically loaded and run through the program scheduler on the next cycle start. It is expected that the g-code program that needs to run will be located in MD1:/ and that the main program is loaded into memory as described above.

G-Code Multi-Program Loading

  • This g-code loading feature is useful for when a multi-operation process needs to be run where a part may need to be flipped in between operations. Each step of the operation would be its own individual g-code program that gets loaded to the machine by the UR. The UR program would then call the Flexx CNC Select G-Code Program Node at each time a new operation needs to run. This does require each operation to be saved in its own individual g-code program. 

Cycle End Detection

  • The Flexxbotics software automatically updates the selected g-code with snippets that are used to signal back to the UR. The software looks for the following codes in a selected g-code program to signal back to the robot that it is complete with an operation. 

    • M00 - a defined place in the g-code program to notify the UR that a break in the program is needed to perform a robot action.

    • M30 - a defined place in the program to notify the UR that cycle is completed and to perform a robot action. 

    • VXX - where XX is a macro - a defined place in the g-code program where the user can define a break in the program is needed to perform a robot action. 

Writing Macros

  • The value of a macro can be written from the Flexx CNC URCap Write Macro Program Node. This will add a macro value assignment to the top of the g-code program prior to a cycle starting. The macro value can then be referenced in the g-code. 

Dispatcher Program (Alternative to Multi-Program Loading)

  • An alternative to the program loading method above for multi-operation is to use a single dispatcher program. The single dispatcher program would contain IF statements based on the value of a “selector” macro to perform a given g-code operation. The robot would then write the value of the “selector” macro in between g-code operations. In order to achieve this, at the end of each operations IF statement, an M00 or VXX macro would need to be defined for Cycle End Detection (see Cycle End Detection above). Additionally, the contents of the dispatcher would need to be loaded via the load program node to achieve repeated operation.

FANUC Controllers

FANUC Hardware Setup

  • Open the front panel of the machine behind the display

  • Plug in the ETHERNET CABLE from the Flexx Machine Interface MACHINE into the ATA card mounted in the yellow housing. 

  • Wire the CYCLE START digital output from the Flexx Machine Interface M12 connector into the relay on the rear of the cycle start button.

  • Mill: Wire the VISE digital output from the Flexx Machine Interface M12 connector into the digital input on the vise actuation control

NOTE: For setups with more than one vise, utilize the additional general purpose OUTPUTS on the Flexx Machine Interface. 

  • Lathe: Wire the CHUCK digital output from the Flexx Machine Interface M12 connector into the clamp foot pedal connected to the machine to close the chuck. Wire a general purpose OUTPUT on the Flexx Machine Interface to the unclamp chuck foot pedal to open the chuck.  

FANUC Software Setup

  • Switch to MDI mode using this key:

  • Press the following button until Setting (Handy)  is on screen.

  • Change the Parameter Write Field from 0 to 1 by pressing “1” then “input” with the field highlighted.

  • Plug in the USB provided by Flexxbotics to the port near the controller screen. Hit the green OPRT key. Hit the Change Device soft key. Hit the USB soft key.

  •  Use the arrow keys to highlight O8000. Hit the green OPRT key. Advance witht the right arrow soft key until F INPUT is present. Hit F INPUT, then F GET, the F SET, then EXEC.

  • Return to Settings (handy) and change the I/O channel to 4 by pressing “4” and then input with the field highlighted.

  • Hit the Parameter key, and enter “6019” then the No. SRH softkey in the bottom left corner. The below field should be highlighted. Hit the right arrow key until the OFN field is highlighted. Press “1” then “input”.

  • Return to the Setting (Handy) screen using the same key as above. Highlight the Parameter Write field, type “0” and then “input”.

  • Press the Reset key to clear the alarm before continuing.

  • Press the green OPRT key, then Change Device to CNC Mem. Use the arrow keys to highlight O8000. Press the green OPRT key. Advance witht the right arrow soft key until F OUTPUT is present. Hit F OUTPUT, then F GET, the F SET, then EXEC.

  • Press the System key below.

  • Advance with the right soft key as shown until EMBED PORT appears on the softkey options.

  • Press the Embed Port Soft Key and then Common. Input the IP to 192.168.1.180 as shown.

  • Return to the previous menu using the left soft key. Select the Ethernet Soft Key and the Common. Verify that this IP address is also 192.168.1.180

  • Press the Data Server soft key, hit down error until CONNECT 2 is on screen, make the host name 192.168.1.175, and set the user name as FTP as shown below.

  • Press Host Select soft key and verify the CONNECT 2 is highlighted.

  • Switch to Edit Mode.

  • Press the Program Key

  • Press the green OPRT key.

  • Press the Change Device soft key.

  • Press the DTSVR soft key.

  • All programs need to be stored within this folder location, in the DTSVR tab so that the Flexx CNC can access your programs for loading.

  • Press the green OPRT key and set O8000 as your Main Program using the Main Program soft key. A small ampersand should appear next to the program.

  • At this point, the CNC can be set into Memory mode , and program unattended.

CRITICAL: Runtime Putting O8000 in Memory as Active Program

Anytime the machine is run it needs to be ensured that O8000 is loaded into memory by clicking the Memory button. This is the main Flexx CNC program that is used to call other programs on the machine when the Select G-Code node is run from the robot.

FANUC G-Code Programs

CRITICAL: DO NOT USE DPRNT STATEMENTS IN G-CODE THAT IS BEING AUTOMATED BY THE ROBOT. DPRNT is part of the cycle end detection methodology. Unforeseen DPRNTs will cause the Select G-Code node to timeout. 

  • G-Code Program Storage

    • All G-Code programs need to be stored within the folder location specified above, in the DTSVR tab so that the Flexx CNC can access your programs for loading.

  • Cycle End Detection

    • The Flexxbotics software automatically updates the selected g-code with snippets that are used to signal back to the UR. The software looks for the following codes in a selected g-code program to signal back to the robot that it is complete with an operation. 

    • M00 - a defined place in the g-code program to notify the UR that a break in the program is needed to perform a robot action. 

    • M30 - a defined place in the program to notify the UR that cycle is completed and to perform a robot action. 

    • #XX - where XX is a macro - a defined place in the g-code program where the user can define a break in the program is needed to perform a robot action. It can also be used in g-code calculations or IF statements.

    • M99 - Used to signal the end of a subprogram call. When a program is called by a main program or sub program using M98, the program continues until reading M99. Implemented in a Main program, it will loop the program back to its start.

  • Writing Macros

The value of a macro can be written from the Flexx CNC URCap Write Macro Program Node. This will add a macro value assignment to the top of the g-code program prior to a cycle starting. The macro value can then be referenced in the g-code. 

  • Dispatcher Program (Alternative to Multi-Program Loading)

An alternative to the program loading method above for multi-operation is to use a single dispatcher program. The single dispatcher program would contain IF statements based on the value of a “selector” macro to perform a given g-code operation. The robot would then write the value of the “selector” macro in between g-code operations. In order to achieve this, at the end of each operations IF statement, an #XX macro would need to be defined for Cycle End Detection (see Cycle End Detection above).  

Haas Controllers

Haas Hardware Setup

  • Plug in the ETHERNET CABLE from the Flexx Machine Interface MACHINE slot to the RJ45 port on the back right side of the machine. 

  • Open the front panel of the machine behind the display

  • Wire the CYCLE START digital output from the Flexx Machine Interface M12 connector into the relay on the rear of the cycle start button.

  • Haas Mill: Wire the VISE digital output from the Flexx Machine Interface M12 connector into the digital input on the vise actuation control

NOTE: For setups with more than one vise, utilize the additional general purpose OUTPUTS on the Flexx Machine Interface. 

  • Haas Lathe: Wire the CHUCK digital output from the Flexx Machine Interface M12 connector into the clamp foot pedal connected to the machine to close the chuck. Wire a general purpose OUTPUT on the Flexx Machine Interface to the unclamp chuck foot pedal to open the chuck. 

Haas Software Setup

  • Click Setting button on machine.

  • Arrow up on machine until in the on-screen tabs. Tab over to Network. Tab down into second layer of tabs into Wired Connection. Set the following settings:

    • Wired Network Enabled = On

    • Obtain Address Automatically = Off

    • IP Address = 192.168.1.180

    • Subnet Mask = 255.255.255.0

    • Default Gateway / DNS Server can be left blank

  • Press F4 to save. Verify Wired Connection Initialized appears on the screen.

  • Arrow key up to tabs. Arrow key right to Net Share. Set the following settings:

    • Cnc Network Name: HAASCONN

    • Remote Netshare Enabled: Off

    • Local Netshare Enabled: On

    • Local Netshare Security: On

    • Local User Name: haas

    • Local Password: FLEXXCNC2022

    • Enable SMBv1 Support: On

  • Press F4 to Save. Verify that Configuring Netshare and then Completed appear on the screen.

  • Click Setting button on machine.

  • Arrow to the Settings tab then Select Program.

 

  • Type 261 then click F1. For Entry 261 - DPRNT Store Location Set to File then click Enter.

 

At Run-Time:

CRITICAL: The first time the Flexx CNC Select Machine Nodes runs it will auto-create the FLEXX folder location and populate it with O08000 and O08001.nc. The user must go in and set the DPRNT settings as follows (this only has to be done once per machine):

  • Click List Program on the machine

  • Arrow up to User Data tab. Navigate to the FLEXX directory and Click F3.

  • Arrow down to Setting 262 DPRNT then Click Enter.

CRITICAL: Runtime Putting O08000 in Memory as Active Program

Anytime the machine is run it needs to be ensured that O08000 is loaded into memory by clicking the Memory button. This is the main Flexx CNC program that is used to call other programs on the machine when the Select G-Code node is run from the robot.

Haas G-Code Programs

CRITICAL: DO NOT USE DPRNT STATEMENTS IN G-CODE THAT IS BEING AUTOMATED BY THE ROBOT. DPRNT is part of the cycle end detection methodology. Unforeseen DPRNTs will cause the Select G-Code node to timeout. 

G-Code File Location

  • All g-code files that will be automated by the robot need to be located in the User Data/ folder on the drive on the machine. This is so the Flexx CNC interface understands where it can expect G-Code programs to be on the machine.

G-Code Program Loading

  • The Flexxbotics software allows the UR to instruct the machine as to which g-code program it needs to run. The selected g-code is automatically loaded and run through the program scheduler on the next cycle start. It is expected that the g-code program that needs to run will be located in User Data/ folder and that the main program is loaded into memory as described above.

G-Code Multi-Program Loading

  • This g-code loading feature is useful for when a multi-operation process needs to be run where a part may need to be flipped in between operations. Each step of the operation would be its own individual g-code program that gets loaded to the machine by the UR. The UR program would then call the Flexx CNC Select G-Code Program Node at each time a new operation needs to run. This does require each operation to be saved in its own individual g-code program. 

Cycle End Detection

  • The Flexxbotics software automatically updates the selected g-code with snippets that are used to signal back to the UR. The software looks for the following codes in a selected g-code program to signal back to the robot that it is complete with an operation. 

    • M00 - a defined place in the g-code program to notify the UR that a break in the program is needed to perform a robot action.

    • M30 - a defined place in the program to notify the UR that cycle is completed and to perform a robot action. 

    • VXX - where XX is a macro - a defined place in the g-code program where the user can define a break in the program is needed to perform a robot action. 

Mazak Controllers

Mazak Serial Hardware Setup

  • Plug in the 25-pin to USB cable from the Flexx Machine Interface USB slot to the 25-pin connector on the front of the machine.

  • Open the front panel of the machine containing the cycle start button.

  • Wire the CYCLE START digital output from the Flexx Machine Interface M12 connector into the relay on the rear of the cycle start button.

  • Mazak Mill: Wire the VISE digital output from the Flexx Machine Interface M12 connector into the digital input on the vise actuation control

NOTE: For setups with more than one vise, utilize the additional general purpose OUTPUTS on the Flexx Machine Interface. 

  • Mazak Lathe: Wire the CHUCK digital output from the Flexx Machine Interface M12 connector into the Common screw terminal within the foot pedal connected to the machine. Only the 24V output is required (white wire). No ground is necessary.

Mazak Serial Software Setup

Setting up Serial Connection

  • Press Data In / Out Soft Key

  • Navigate to Setup and click Extended Param.

  • Set the DPRN settings as follows:

  • To exit the PARAM window, click Setup at the top and clear the Extended Param selection.

  • From Data In / Out press the soft key for Tape I/O.

  • Press PARAM. soft key to configure the Data I/O screen.

  • Set the PARAM. settings as follows:

  • Return to the main menu and press the PARAM soft key.

  • Set P65 parameter to 1.

Setting up Cycle End Detection G-Code Program

  • Create program number 8010 on the CNC: Press Program → Press Work No → Create program 8010 → Click Input

  • Set as an EIA / ISO program using the soft key.

  • Type the following g-code into the program body:

  • Click Program Complete

  • Add program 8010 as a subprogram call just before the END statement to the Mazatrol program for the program being automated.

Mazak Serial G-Code Programs

  • Any program that is automated from the robot needs to have the Cycle End Detection G-Code Program outlined above as a subprogram call just before the END statement.

  • Without the subprogram, the Flexx CNC will timeout while waiting for the CNC cycle end detection to complete as there will be no signal sent back through the system.

Mazak Smooth Controller Hardware Setup

  • Locate and remove the 4 small plugs on the top and bottom of each side of the Smooth Controller unit. Loosen the screws behind each with an allen key until the unit swings open.

 

  • Locate and remove the plug in the bottom left of the smooth controller. Feed two provided M12 cables, leads first, into the housing such that the connectors are on the outside of the machine.

  • Remove a couple inches of the cables outer black covering on one cable, and strip a quarter inch of colored wire from the white and black leads. This will be your cycle start cable.

  • Remove a quarter inch of colored wire from the other cable’s white lead. This will be your Input 1 cable.

  • CRITICAL: BEFORE PROCEEDING, CUT POWER TO YOUR ENTIRE CNC MACHINE FROM THE DIAL SWITCH ON THE BACK OF THE MACHINE.

  • Solder the white lead of your cycle start cable to the solder bead marked in RED, and insert the black lead under the lug labeled “0V” in the picture below.

  • Solder the white lead of your Input 1 cable to the solder bead marked in YELLOW.

 

 

  • NOTE: IT IS RECCOMENDED THAT YOU APPLY ELECTRICAL TAPE AS NECCESARY TO THE CABLE LEADS TO AC AS STRAIN RELIEF FOR YOUR SOLDER JOINTS.

  • The Smooth unit may now be closed and bolted back together. Your CNC can now run unattended!

Mazak Smooth G-Code Programs

  • There are no special additions to be made to programs running on the Smooth G when setup in the above manner.

  • However, when creating your URP program, note that Input 1 is being used for cycle end detection, and CANNOT be used in URP programs with the Mazak Machine Selection node. Inputs 2, 3, and 4 as still available for use. Mazak Serial Machine Selection URPs do not reserve Input 1 for this purpose, so all 4 inputs can be used.

Flexx CNC URCap 

Minimum Robot Requirements

  • Robot Model: E-Series minimum (all models)

  • Polyscope Version: 5.11.0.108249 + 

Setup

URCap Installation

  • Plug the USB into the Universal Robots teach pendant

  • Navigate to the Settings page within Polyscope.

Activate_Settings.PNG
  • On the left side of the screen, click on the System tab.

  • Click the plus (+) button in the bottom left corner of the screen.

  • Open the USB device folder from the file explorer.

  • Select the Flexx CNC URCap file and click Open.

  • Verify that Flexx CNC now appears in the Active URCaps list with a green check mark.

License Activation

  • Navigate to the Installation Tab within Polyscope.

  • On the left side of the screen, click on the URCaps tab.

  • Select the Flexx CNC urcap. Open the Activate tab. 

  • Click the “Enter a License” text box to launch the keyboard.

  • Enter the license code provided by Flexxbotics and click Submit.

Robot Network Configuration

  • Navigate to the Installation Tab within Polyscope.

  • On the left side of the screen, click on the System tab. In the menu click on Network

  • Configure the network as follows:

    • Select Static Address

    • IP address: 192.168.0.175

    • Subnet Mask: 255.255.255.0

    • Leave all other settings as 0.0.0.0

  • Click Apply.

  • Restart the controller. 



Installation Node

  • Select the type of interface being used as Ethernet or Digital I/O.

  • Ensure that Test Mode is check marked. This will provide the ability to step through the UR program to test that the interface is working correctly. In Test Mode, the program will prompt the user to Continue on every Flexx CNC node as following:

  • Once a program has been verified to be working, uncheck the Test Mode. This will remove the pop ups and allow the program to run continuously without user interaction. 

Overview of Program Nodes

  • Flexx CNC Select Machine: In the Before Start Sequence of the Robot Program to select the type of machine that the robot program is tending. 

  • Flexx Select G-Code: Run the specified g-code program on the CNC on the next cycle start. For Okuma, specify the g-code program name so that it matches EXACTLY the name of the program in the MD1:/ drive. Example if the program name is 123-Op1.min: 

  • Flexx CNC Define Cycle End: Specify a macro that should be used for cycle end detection. This would likely only be used if you are using a dispatcher program to switch between operations. 

  • Flexx CNC Write Macro: Specify a value for a macro prior to the cycle start running. This is used to change variable parameters as well as initiate operation switching when using a dispatcher program. The Write Macro Value can either be specified as a numeric or a UR Script Variable.

  • Flexx CNC Peripherals: Control peripheral devices from the Flexx Machine Interface. This node allows you to select which peripheral to control via a digital output. The list of peripherals coincide with the output labels on the Flexx Machine Interface enclosure. 

  • Flexx Start Cycle: This will trigger the Cycle Start Output on the Flexx Machine Interface to trigger a cycle start on the machine.

 

  • Flexx Wait for CNC: This node will wait for the CNC to complete running the g-code program or complete running an operation. It will wait at the node until a signal from the machine has been received. 

For g-code completion, the M30 code is used to signal to the robot at this node that the program has completed (see Cycle End Detection in the  Okuma G-Code Programs section). 

For g-code operation completion (when the program has not completed, but the robot needs to perform a task), an M00 or VXX (defined macro) is used to signal to the robot that the machine has completed. 

Once the signal is received, the robot program will continue. Depending on the cycle time of the program or operation, it is important to adjust the Timeout input to be greater than that cycle time. 

Step by Step Programming Guide

The following step by step explanation provides guidelines as to how to set up the robot to CNC communications. This example does not include how to program robot movements relative to the machine, but may provide some general insight for program architecture. 

  • Step 1: Add the Select Machine Program Node to the Before Start Sequence of the robot program. Select “Okuma” as the machine being used. 

  • Step 2: Create a new SubFolder called RunOp1. In the SubFolder:

    • Add a Select G-Code Program Node and select the g-code that needs to run. 

    • Decision: Is the selected g-code a dispatcher program?

      • Add a Write Macro Program Node and write the value of the macro needed to perform Operation1 within the dispatcher program. 

      • Decision: How are you performing cycle end detection?

        • M00 or M30? Do nothing. 

        • Macro: Add a Define Cycle End Program Node and specify the macro being used for detection. 

    • Decision: Do you need to write a macro value to the machine?

      • Add a Write Macro Program Node to write the value of the macro. 

    • Decision: Are you performing multiple operations on the part? 

      • Repeat Step 2 by creating a new SubFolder for the next operation.

Example of Step 2 (from template)

  • Step 3: Ensure the door and vise / chuck are open in the Robot Program prior to starting any part load routines. 

    • Add a Flexx CNC Peripheral - Door Output LO command (check the polarity of the AutoDoor being used. LO may indicate Door Open or Door Close; switch the Flexx CNC command to match the polarity.) 

    • Okuma Lathe: Add a Flexx CNC Peripheral - Chuck Output LO command (check the polarity of the chuck input being used. LO may indicate Chuck Open or Chuck Close; switch the Flexx CNC command to match the polarity.).

    • Okuma Mill: Add a Flexx CNC Peripheral - Vise Output LO command (check the polarity of the vise input being used. LO may indicate Vise Open or Vise Close; switch the Flexx CNC command to match the polarity.).

 

  • Step 4: Program a routine to retrieve a stock part and load it into the machine.

    • Okuma Lathe: When loading the stock part in the chuck, utilize the Flexx CNC Peripheral - Chuck Output HI command to close the chuck (check the polarity of the chuck input being used. HI may indicate Chuck Open or Chuck Close; switch the Flexx CNC command to match the polarity.).

    • Okuma Mill: When loading the stock part in the vise, utilize the Flexx CNC Peripheral - Vise Output HI command to close the vise (check the polarity of the vise input being used. HI may indicate Vise Open or Vise Close; switch the Flexx CNC command to match the polarity.).

  • Step 5: Call RunOp1 in the Robot Program main loop. 

  • Step 6: Add a Flexx Cycle Start after Call RunOp1 in the Robot Program main loop.

  • Step 7: Add a Wait for CNC after Cycle Start in the Robot Program main loop. 

  • Step 8: If running a multi-operation, it is likely that the part needs to be flipped after the first operation. Write a subprogram that flips the part. When flipping the part:

    • Use the Flexx CNC Peripheral - Door Output to control the Door

    • Okuma Lathe:  Use the Flexx CNC Peripheral - Chuck Output to control the chuck to remove and place the part. 

    • Okuma Mill:  Use the Flexx CNC Peripheral - Vise Output to control the vise to remove and place the part. 

  • Once the part is flipped, repeat Steps 5, 6, and 7 in the Robot Program main loop to call the next operation and start the cycle. See example below: 

  • After the part has been completely machined, write a routine to Unload the part and place it into a finished part outfeed. During that process:

    • Use the Flexx CNC Peripheral - Door Output to control the Door

    • Okuma Lathe:  Use the Flexx CNC Peripheral - Chuck Output to control the chuck to remove and place the part. 

    • Okuma Mill:  Use the Flexx CNC Peripheral - Vise Output to control the vise to remove and place the part.