STRATEGY TO BUILD THE NORTE TOOLCHANGER --------------------------------------- At this time (25-05-2013) there is NO off the shelf solution for a tool changer in LinuxCNC. The cause is the various types of solutions that exist for tool changing. #1.Our Norte Tool Changer. -------------------------- It is a complex chain solution which proved to be pretty unreliable under Sinumerik 3. The machine makes the following steps: -Z joint goes to Tool Changer Height. -Y joint goes to Machine Coordinate Y=0 (away from the machine table) -indexing the Spindle -Tool Changer goes out under the Spindle (doors open) -Spindle Air Cleaning Pressure through Spindle on -Unclamping of the Spindle -Z joint goes up to release the Tool to Machine Coordinate Z0 (or higher) -Tool Changer Chain turns to the requested Pocket -Z joint descends to Tool Changer Height -Spindle Air Cleaning Pressure through Spindle off -Clamping of the Spindle -Tool Changer goes in to its Home Position (doors closed) #2.Possible Pitfalls -------------------- #2.1 Mechanically ----------------- Through it's life the Tool Changer has taken a lot of damage. The Cause was poor assemly of the pneumatic indexing Cilinder. The Result is damaged Pockets on the Tool Changer Chain. We realigned the indexing cilinder. #2.2 Software ------------- We installed for the IO's (Inputs & Outputs) two 7I37 Cards. Soon this proved to be too little. So we installed a parallel breakout board on top. #3.Conclusion 01 in getting info out of Builder Blogs ----------------------------------------------------- "For the spindle index i made a pneumatic plunger going into a vee direct on the spindle. I tried doing it electronically using the encoder index but struggled so just went for the plunger in the end." In our case we have a transmission belt between motor encoder and the spindle shaft. This implicates an encoder solution does not work at all. Since Norte has the pneumatic "Index Zylinder" in place we will command an "S15 M03" and detect "IN27 Indexering In". #4.Conclusion 02 in getting info out of Builder Blogs ----------------------------------------------------- "For the toolchange I struggled with classic ladder and comp programming so ended up using a subprogram for each tool number which although not ideal it works well and its biderectional on the turret. So basically instead of going t1 m6 i would write o call to get tool 1. A lot of people wouldnt like that but it works and with the amount of time i have spent on it a solution was needed." It is a valid idea, simple to realise. #5.Conclusion 03 in getting info out of Builder Blogs ----------------------------------------------------- If the rack is somewhere that can be reached with normal axis moves, then you could remap M6 to a g-code sub, there is an example of this config here: git.linuxcnc.org/gitweb?p=linuxcnc.git;a...89d8c917be31f9a1efa6 And remapping docs here: www.linuxcnc.org/docview/devel/html/remap/structure.html You do need to run the "master" ( ie development ) branch of LinuxCNC to get this capability, but that is available as an installable package from builbot.linuxcnc.org It's relatively straightforward, I think. This line in the INI: REMAP=M6 modalgroup=6 prolog=change_prolog ngc=rack_change epilog=change_epilog Means that any "M6" command in the G-code calls the G-code subroutine called "rack_change.ngc" That G-code uses that fact that in the 2.6 version there are predefined parameters called things like #<_tool_selected> which tell the G-code which tool is needed. (There are lots of these, the most useful being things like #<_x> which returns the current X-position. ) It also calls the routines called "change_prolog" before the tool change, and "change_epilog" after the tool change. The first checks that the tool number is valid and raises an error if not, the second actually tells LinuxCNC that the tool change has happened. These routines already exist, so you only need to copy the rack_change.ngc code (and modify it to suit your system) Remapping the M6 is the solution anyway. #6.Conclusion 04 in getting info out of Builder Blogs ----------------------------------------------------- There are a few other settings in the example INI file, to load a GladeVCP control panel for example. However, I think all the hard work has been done. You could try installing 2.6 from the buildbot and having a play around with that simulated tool changer configuration (it's a sim config, so won't actually move hardware) We have version 2.5.2. Haven't played with 2.6 yet. Hoping to find something new in it soon. #7.G53 ------ To move in the machine coordinate system, program G53 on the same line as a linear move. G53 is not modal and must be programmed on each line. G0 or G1 does not have to be programmed on the same line if one is currently active. For example G53 G0 X0 Y0 Z0 will move the axes to the home position even if the currently selected coordinate system has offsets in effect. The line in our case will we something like "G53 G0 Z+20.0" #8.Calling Programs ------------------- To call a separate file with a subroutine name the file the same as your call and include a sub and endsub in the file. The file must be in the directory pointed to by PROGRAM_PREFIX or SUBROUTINE_PATH in the ini file. The file name can include lowercase letters, numbers, dash, and underscore only. A named subroutine file can contain only a single subroutine definition. Named File Example o call Numbered File Example o123 call In the called file you must include the oxxx sub and endsub and the file must be a valid file. Called File Example (filename myfile.ngc) o sub (code here) o endsub M2 (NGC extension in INI file amended; files_ngc deleted) #9.M64-M65 Output Control ------------------------- ( LinuxCNC 15/04/2013) (M64-M65 Output Control) G21 G90 G64 G40 M3 S800 G0 X0 Y0 Z0 M05 M64 P0 (turn on digital out pin 0) G4 P5 (pause for 10 seconds, just so you can see the pin turn on) M65 P0 (turn off digital out pin 0) M64 P1 (turn on digital out pin 1) G4 P5 (pause for 10 seconds, just so you can see the pin turn on) M65 P1 (turn off digital out pin 1) M05 M2 #10.The O01.ngc to this date (25-05-2013) ----------------------------------------- ( LinuxCNC 25-05/2013) (ToolChange T01 Beta Version) M05 G53 G01 Z-74.85 F5000.0 G53 G01 Y-10.0 F5000.0 S30 M03 G4 P1 (wait a sec) M64 P2 (G4 P3) M66 P0 L4 Q7(wait up to 7 seconds for digital input 0 to turn on in wait mode 4) M05 G4 P1 (wait a sec) M65 P2 M2 (motion.digital-in-00- These pins 00 01 02 03 or more if configured) (are controlled by M62-M65) (motion.digital-out-00 These pins 00 01 02 03 or more if configured) (are controlled by M62-M65) (example: M64 P0 (turn on digital out pin 0) (M62 P- - turn on digital output synchronized with motion.) (The P- word specifies the digital output number.) (M63 P- - turn off digital output synchronized with motion.) (The P- word specifies the digital output number.) (M64 P- - turn on digital output immediately.) (The P- word specifies the digital output number.) (M65 P- - turn off digital output immediately.) (The P- word specifies the digital output number.) (M66 WAIT ON INPUT Example Lines) (M66 P0 L3 Q5 wait up to 5 seconds for digital input 0 to turn on in wait mode L3) (Wait Mode 0: IMMEDIATE - no waiting, returns immediately.) (The current value of the input is stored in parameter #5399) (Wait Mode 1: RISE - waits for the selected input to perform a rise event.) (Wait Mode 2: FALL - waits for the selected input to perform a fall event.) (Wait Mode 3: HIGH - waits for the selected input to go to the HIGH state.) (Wait Mode 4: LOW - waits for the selected input to go to the LOW state.) (G4 Example Line) (G4 P0.5 wait for 0.5 seconds before proceeding)