Document File Name: SMCU-CNC-Codes Date: 18/9/07 Author: AWD Title: SMCU CNC Command and Programming Codes Introduction: Here are the fixed command codes and signal codes for manual programming of the CASA SMCU based CNC Bridgeport Milling Machine and PC based Controller using the Gecko-G201 (with G209 10x pulse multiplier) and represented in a typical sample programme with a mixture of discrete holes and pocket. Only the currently enabled and used commands are represented. Preamble: Provided that the text-editor used to write/edit a SMCU program is PLAIN-TEXT the commends below may be cut+pasted from this document to build a new programme and edited according to the rules of the SMCU command programme. Initiating Commands: These prepare the SMCU for receiving a NEW programme sequence (_x ( open bracket prefix REQUIRED for all imbedded comments clr ( CLeaR all current instructions in the SMCU p ( begin Program sequence as below g ( Go to the programme beginning q ( Quit Motor Commands: These prepare the motor's performance according to verified practical limits of the application environment. m 1 ( set Motor commends to FULL step mode - 1 pulse = 1 step t_x ( set sTart speed to x steps/sec max x ( set MAXimum motor speed to x steps per sec. a x ( set A-cceleration to x steps/sec/sec de x ( set DE-celeration to x steps/sec/sec k x ( sets step constant to x determined by ratio of screw-pitch : step Switch Commands: These identify the state of strategically placed limit switched variously applied to different axises. The examples below pertain to the "Z" axis of the Bridgeport Mill s 4 1 ( verify the Top-Dead-Centre switch CLOSED ( the quill is in upper position s 2 1 ( check that the Bottom-Dead-Centre switch is CLOSED ( the quill has fully descended Relay / Output Commands: Relays can be energised (opened/closed) to control external/operations including work-clamps, lubrication, spindle motors etc. The examples below pertain to pneumatic solenoids used for Bridgeport milling. o 1 1 ( drive "Z" ram DOWN - output 1 relay is closed o 1 0 ( drive "Z" ram UP - output 1 relay is OPENed o 2 1 ( clamp part - output 2 used to CLOSE relay 2 o 2 0 ( release part - output 2 relay OPENed o 3 1 ( spindle motor ON - output 3 energises relay coil and switched ( external contactor of main motor ON o 3 0 ( spindle motor OFF - de-energises coil of external contactor of ( main motor Example - DSub 9 pin Connector panel fixing: ( CASA DE09Y-FR.3mm - edited 15/9/07 by AWD ( produces the FRONT detail comprising body-hole and 2 fixing holes ( orientation for DE09 connector with long dimension in "Y" axis (vertical) ( DE9 with length 19 mm, width 10.2 mm, 3.35 mm radii and 10 deg angle ( slot towards increasing "Y", with short side on increasing "X" ( origin referenced from TOP mounting hole ( START - press "Start" button on SMCU ( STOP - automatic upon completing the whole fixing - or PAUSE/STOP on SMCU ( . ( Install 3 mm cutter ( Spindle speed set to 2500~3000rpm for alloy ( Spindle speed set to 1000~1500rpm for steel ( max 500~750 'pocket' feed-rate for alloy ( max 15~250 'pocket' feed-rate for steel - depends upon thickness ( 80% Kero+ 20% RTD used as cutting lubricant or flush with Dromus-B for steel ( . clr ( clear all existing programs/commands clr p ( begin programme m 1 ( set motor to FULL step mode t 100 ( set start speed to 200 steps/sec max 500 ( set MAXimum motor speed to steps per sec. i.e. 400 steps/sec a 2000 ( set acceleration to 500 steps/sec/sec de 3000 ( set deceleration to 1500 steps/sec/sec k 100 ( sets step constant to 50 s 4 1 ( TDC switch OPEN o 2 1 ( clamp part o 1 1 ( "Z" ram down - drills/mills the 1st 3mm fixing hole s 2 1 ( check that the BDC switch is closed o 1 0 ( "Z" ram UP s 4 1 ( verify the Top-Dead-Centre switch CLOSED - RAM is UP y 2500 ( move to second 3mm fixing hole o 1 1 ( Z down + mist lubrication on s 2 1 ( BDC switch closed o 1 0 ( "Z" ram UP s 4 1 ( verify the Top-Dead-Centre switch CLOSED - RAM is UP x 340 ( should be 3.60 mm y -608 ( to top of D pocket o 1 1 ( "Z" ram down - penetrates/mills - begins the pocket s 2 1 ( check that the TDC switch is closed - material is penetrated paste here the pocket 'script' from the XLS (or manual) generated hole/pocket requirement o 1 0 ( "Z" up + mist off s 4 1 ( verify the Top-Dead-Centre switch CLOSED - RAM is UP x -360 ( move "X" to start/origin y -1892 ( return "Y" to origin/first hole centre o 2 0 ( release clamp q ( quit/end programme  ( imbedded ASCI carriage-return - NOTE - no further characters are permitted beyond the last carriage return Example - repetitive 2 holes at 40mm centres on "Y" axis: ( CASA 2H-40Y.3m7 - edited 18/9/07 by AWD ( produces 2 drilled fixing holes at 40mm centres in "Y" axis ( orientation "Y" axis (vertical) ( START - cycle begins when quill is moved down to S 4 0 ( cycle repeats indefinitely - press "STOP" or "PAUSE' as required ( . ( Install 3.7 mm stubby drill ( Spindle speed set to 2500~3000rpm for alloy ( Spindle speed set to 1000~1500rpm for steel ( max 2500 slew/feed-rate ( 80% Kero+ 20% RTD used as cutting lubricant or flush with Dromus-B for steel ( . clr ( clear all existing programs/commands clr p ( begin programme m 1 ( set motor to FULL step mode t 100 ( set start speed to 200 steps/sec max 2500 ( set MAXimum motor speed to steps per sec. i.e. 400 steps/sec a 2000 ( set acceleration to 500 steps/sec/sec de 3000 ( set deceleration to 1500 steps/sec/sec k 100 ( sets step constant to 50 s 4 1 ( TDC switch CLOSED - quill is up s 4 0 ( hand operated quill down to begin cycle o 2 1 ( clamp part o 1 1 ( "Z" ram down - drills/mills the 1st 3mm fixing hole s 2 1 ( check that the BDC switch is closed - required depth o 1 0 ( "Z" ram UP s 4 1 ( verify the Top-Dead-Centre switch CLOSED - RAM is UP y 4000 ( move to second 3.7mm fixing hole o 1 1 ( "Z" down + mist lubrication on s 2 1 ( BDC switch closed - required depth achieved o 1 0 ( "Z" ram UP s 4 1 ( verify the Top-Dead-Centre switch CLOSED - RAM is UP o 2 0 ( release clamp - exchange part s 4 0 ( hand operated quill down to begin cycle o 2 1 ( clamp part o 1 1 ( "Z" ram down - drills/mills the 1st 3mm fixing hole s 2 1 ( check that the BDC switch is closed - required depth o 1 0 ( "Z" ram UP s 4 1 ( verify the Top-Dead-Centre switch CLOSED - RAM is UP y -4000 ( move to next 3.7mm fixing hole o 1 1 ( "Z" down + mist lubrication on s 2 1 ( BDC switch closed - required depth achieved o 1 0 ( "Z" ram UP s 4 1 ( verify the Top-Dead-Centre switch CLOSED - RAM is UP o 2 0 ( release clamp - exchange part q ( quit/end programme  12:10 PM 3 18/09/2007