EXE Version
Ver: 1.22.2.425
EXE Date
7/13/2009 3:14:46 PM
Units
Inches
Fourth Axis
Disabled
Machine Info
Not Connected
Turbo
Unknown
System Info
Platform : Windows NT/2000/XP
Version : 5.1
Build : 2600
OS Info : Service Pack 3
Processor : 586 Mask : 1
Level : 6 OEMid :0
EXE INI: C:\Program Files\Denford\VRTurning\VRTurn.ini
[directories]
machine list file=C:\Program Files\Denford\VRTurning\machine list.ini
XNC Folder=C:\Program Files\Denford\VRTurning\Data\
Last Tooling=C:\Program Files\Denford\VRTurning\Tooling Files\
FNL Folder=C:\Program Files\Denford\VRTurning\CNC Files\
GNC Folder=C:\Program Files\Denford\VRTurning\Data\
[Default Settings]
Active Machine=NovaTurn
Metric=0
Help File=Turn.hlp
Help Reference=Help.ini
Billet X=19.05
Billet Z=63.5
Billet X Pos=0
Billet Z Pos=0
Expanded Cycles=1
Warn ON Play=0
Cutter Comp=0
PrimaryLanguage=1
SubLanguage=0
ScreenUpDate=200
Last Input=2
MintDebug=False
Support IP=62.49.128.243
[source]
File=1
Editor=2
Compiled=3
Fanuc21i=4
FanucOT=6
[Tooling]
Tool File name=C:\Program Files\Denford\VRTurning\Tooling Files\Default.tft
last tool=1
Show All Offsets=0
[RS232]
com port=0
Baud Rate=5
Data Bits=2
Parity=2
Hand Shaking=3
Stop Bits=0
[Jog Keys]
X+=37
X-=39
Y+=40
Y-=38
Z+=33
Z-=34
Trv=101
[readOut]
Font size=8
Font name=MS Sans Serif
Font Style=0
[MainForm]
Top=-4
Left=-4
Width=1032
Height=748
[EditorForm]
Top=24
Left=30
Width=300
Height=464
[screen]
Top=20
Left=39
Show Buttons=1
Left Side=0
[EditForm]
padding=SPACE
LineEnd=;
NumberString=N
numberstart=10
numberInc=10
NumberSize=3
formatting=0
Font size=8
Font name=MS Sans Serif
background colour=16777215
Token G Colour=32896
Token G BackColour=16777215
Token G Style=1
Token M Colour=0
Token M BackColour=16777215
Token M Style=0
Token T Colour=0
Token T BackColour=16777215
Token T Style=0
Token F Colour=0
Token F BackColour=16777215
Token F Style=0
Token S Colour=0
Token S BackColour=16777215
Token S Style=0
Token X Colour=0
Token X BackColour=65408
Token X Style=0
Token Y Colour=0
Token Y BackColour=16777215
Token Y Style=0
Token Z Colour=0
Token Z BackColour=16776960
Token Z Style=0
Token I Colour=0
Token I BackColour=65535
Token I Style=0
Token J Colour=0
Token J BackColour=8421631
Token J Style=0
Token ( Colour=0
Token ( BackColour=16777215
Token ( Style=0
Token [ Colour=0
Token [ BackColour=16777215
Token [ Style=0
Font Style=0
Token K Colour=0
Token K BackColour=16777215
Token K Style=0
FormatFile=C:\Program Files\Denford\VRTurning\VRTurn.ini
[Menu Tools]
[Button Map]
;FanucBut_O
0=$4F,$50
;FanucBut_N
1=$4E,$51
;FanucBut_G
2=$47,$52
;FanucBut_7
3=$37,$41
;FanucBut_8
4=$38,$42
;FanucBut_9
5=$39,$44
;FanucBut_X
6=$58,$43
;FanucBut_Z
7=90,89
;FanucBut_F
8=70,76
;FanucBut_4
9=$34,91
;FanucBut_5
10=$35,93
;FanucBut_6
11=$36,$20
;FanucBut_M
12=$4D,73
;FanucBut_S
13=$53,75
;FanucBut_T
14=$54,74
;FanucBut_1
15=$31,44
;FanucBut_2
16=50,35
;FanucBut_3
17=$33,61
;FanucBut_U
18=85,72
;FanucBut_W
19=87,86
;FanucBut_EOB
20=186,69
;FanucBut_-
21=189,43
;FanucBut_0
22=48,42
;FanucBut_.
23=190,47
;FanucBut_POS
24=24,24
;FanucBut_PROG
25=25,25
;FanucBut_OFFSET
26=26,26
;FanucBut_SHIFT
27=$10,$10
;FanucBut_Can
28=$08,$08
;FanucBut_INPUT
29=29,29
;FanucBut_GRAPH
32=232,232
;FanucBut_ALTER
33=233,233
;FanucBut_INSERT
34=234,234
;FanucBut_DELETE
35=235,$235
;FanucButPageUp
36=$21,$21
;FanucButPageDown
37=$22,$22
;FanucButCursorLeft
38=$25,$25
;FanucButCursorRight
39=$27,$27
;FanucButCursorUp
40=$26,$26
;FanucButCursorDown
41=$28,$28
;FanucButHelp
42=42,42
;FanucButReset
43=43,43
[Turn2DForm]
Top=18
Left=322
Width=647
Height=477
[Control Panel]
Docked=0
LeftSide=0
Display=2
[CaracelAndOffsets]
Top=41
Left=31
Width=338
Height=494
[ToolLib]
Top=182
Left=36
[WorkOffsetForm]
Top=359
Left=27
[VRT_form_turn]
Top=7
Left=218
Width=272
Height=261
[Compiled Input]
Top=52
Left=33
[Draw2D]
Top=254
Left=324
Width=375
Height=199
[Editor1]
Top=6
Left=6
Width=194
Height=338
[FileInputForm]
Top=76
Left=72
[Toolbar_File_Control]
Rev=2
Visible=1
DockedTo=DockBottom
DockRow=0
DockPos=458
FloatLeft=0
FloatTop=0
IconSize=0
ShowCaption=0
FloatRightX=0
[Toolbar_machine]
Rev=2
Visible=1
DockedTo=DockRight
DockRow=0
DockPos=387
FloatLeft=0
FloatTop=0
IconSize=0
ShowCaption=1
FloatRightX=0
[Toolbar_output]
Rev=2
Visible=1
DockedTo=DockRight
DockRow=0
DockPos=36
FloatLeft=0
FloatTop=0
IconSize=0
ShowCaption=1
FloatRightX=0
[toolbar_modal]
Rev=2
Visible=1
DockedTo=DockBottom
DockRow=0
DockPos=0
FloatLeft=0
FloatTop=0
IconSize=0
ShowCaption=1
FloatRightX=0
[dataInfo]
Rev=2
Visible=0
DockedTo=DockTop
DockRow=0
DockPos=0
FloatLeft=0
FloatTop=0
IconSize=0
ShowCaption=0
FloatRightX=0
[ControlPanel]
Top=36
Left=504
[VRT_form_turn_1]
Top=44
Left=44
Width=835
Height=402
[Draw3D]
Top=54
Left=141
Width=269
Height=250
[3DGraphics]
Auto Save Bmp=1
Billet Material=6
rapid colour=255
linear colour=65280
circular colour=4227327
thread colour=65535
plastic colour=16711680
background colour=8421440
move history amount=50
use plastic=1
show linears=1
show Rapids=1
show Arcs=1
show Threads=1
show cutter=1
use Offsets=0
show move history=1
bitmap width=320
bitmap height=240
[Graphics]
Auto Save Bmp=1
rapid colour=255
linear colour=65280
circular colour=33023
thread colour=65535
material colour=16711680
centre colour=0
background colour=8421376
hi lite colour=16777215
use tool colour=0
show linears=1
show Rapids=1
show Arcs=1
show Threads=1
show cutter=1
Shaded Material=1
Show Section=1
Use Offsets=0
Zoom In=1
Zoom Out=1
[Toolbar_ProgControl]
Rev=2
Visible=1
DockedTo=DockBottom
DockRow=0
DockPos=301
FloatLeft=600
FloatTop=318
IconSize=0
ShowCaption=1
FloatRightX=0
[ToolButtons Hidden]
0_11=Modal11
0_12=Modal12
0_13=Modal13
0_14=Modal14
0_15=Modal15
0_16=Modal16
0_17=Modal17
0_18=Modal18
0_19=Modal19
0_20=Modal20
0_21=Modal21
0_22=Modal22
0_23=Modal23
0_24=Modal24
0_25=Modal25
[Main ToolBars]
ImageSize1=1
CaptionV1=1
ImageSize2=1
CaptionV2=1
ImageSize3=1
CaptionV3=1
ImageSize4=0
CaptionV4=0
C:\Program Files\Denford\VRTurning\Config\NovaTurn.ini
[Material]
Default X=20
Default Z=100
Maximum X=140.0000
Maximum Z=176.0000
Position X=0.0000
Position Z=0.0000
[Home]
X=0.0000
Z=0.0000
Feed=1000.0000
Negative X=TRUE
Negative Z=TRUE
Negative 3=FALSE
Negative 4=FALSE
[Feed]
Default=100.0000
Maximum Rate X=1400.0000
Maximum Rate Z=1400.0000
Maximum Rate 3=500.0000
Minimum Rate=0.0010
Steps per mill X=160.0000
Steps per mill Z=160.0000
Steps per mill F=160.0000
Motor Direction X=1
Motor Direction Z=1
Max Contour Feed=10.0000
Max Contour Angle=25.0000
Jog Rapid Feed=1000
Shortest Move=0.0000
Shortest Time=0.0000
Maximum Rate 4=0.0000
[Spindle]
Maximum Speed=3000
Minimum Speed=10
Manual=FALSE
Encoder Count=4000
Encoder Fitted=TRUE
[Machine Capability]
Maximum Cut Depth=12.0000
Travel X+=0.0000
Travel Z+=0.0000
Travel X-=-140.0000
Travel Z-=-430.0000
Cutter Compensation=FALSE
High Speed Machining=FALSE
Table Size X=50.0000
Table Size Z=50.0000
Under Inspection=FALSE
Feed Pot=TRUE
Speed Pot=TRUE
Radius Programming=FALSE
[Tool Change]
Auto Changer=1
Maximum number=8
Turret number=8
X=0.0000
Z=0.0000
Change Pos X=0.0000
Change Pos Z=0.0000
Tool In Turret=1
[Communications]
Control Type=0
Baud rate=19200
Com Port=1
Mint File=NovaTurn.mnt
Polling Delay=50
M Code TimeOut=10000
T Code TimeOut=60000
Stop Bits=2
Hardware Handshaking=FALSE
[Post Process]
Library=C:\Program Files\Denford\Milling\LIBS\FANUCM.SLB
;first item=In or Out or Wait
;second item=Port Number
;third item=Is the IO + or -
;fourth item=Timeout time in seconds
;fifth item=Message to show
;sixth item=ErrorMessage
File Extension=Undefined
Denford Directives=FALSE
Add Comments=FALSE
Add Percents=FALSE
Force Points=FALSE
[MCode Description]
M3=Spindle Forward
M4=Spindle Reverse
M5=Spindle Stop
M10=Chuck Open
M11=Chuck Close
M38=Door Open
M39=Door Close
M62=Output 1 On
M63=Output 2 On
M64=Output 1 Off
M65=Output 2 Off
M66=Wait for Input 1 Activate
M67=Wait for Input 2 Activate
M76=Wait for Input 1 DeActivate
M77=Wait for Input 2 DeActivate
[MCode TimeOut]
M3=10000
M4=3000
M5=10000
M10=0
M11=0
M38=0
M39=0
M62=0
M63=0
M64=0
M65=0
M66=0
M67=0
M76=0
M77=0
[MCode Enabled]
M3=TRUE
M4=FALSE
M5=TRUE
M10=FALSE
M11=FALSE
M38=FALSE
M39=FALSE
M62=FALSE
M63=FALSE
M64=FALSE
M65=FALSE
M66=FALSE
M67=FALSE
M76=FALSE
M77=FALSE
[Input/Output Devices]
Tutor File=VRTurningTutor.keys
Com Port=0
Virtual World=NovaTurn.xvr
CIM RS232 Input=FALSE
CIM DDE Input=FALSE
Jog X plus key=VK38
Jog X minus key=VK40
Jog Z plus key=VK39
Jog Z minus key=VK37
Feed up key=VK116
Feed down key=VK117
Speed up key=VK118
Speed down key=VK119
[Miscellaneous]
Background Bitmap=default
Background Enabled=TRUE
Background Tiled=TRUE
C:\Program Files\Denford\VRTurning\NovaTurn.mnt
PON : REM Turn prompt on
CON : REM Change to configuration
NEW : REM Clear out previous conf
RELEASE : REM Clear all user variables
LOAD 2
AUTO : REM AutoRun the program
| : REM Send a CTRL-Z blank line (to quit edit mode)
PROG : REM Change to program
NEW : REM Clear out previous prog
RELEASE : REM Clear all user variables
REM : EDIT : REM Enter edit mode
REM ~~~~~~~~ Main Program Body Starts Here ~~~~~~~~~~
REM comms (2) = Current mode from PC
REM comms(21) 0=feed/min 1=feed/rev
REM comms(22) 0=RPM 1=CSS
REM comms(23) = FeedRate / Rev
REM comms(24) = Actual Spindle Speed
REM comms(25) = Setup Diameter for CSS (in motor steps)
REM comms(26) = Spindle Speed for CSS (in steps per min / 1000)
LOAD 1
COMMSON : REM (NovaTurn) Initiate the comms array
MINT328 = 1 : REM Initiate MINT/3.28
comms(1) = 0 : REM Use as Command register
comms(3) = 100 : REM Default Feedrate
comms(4) = 500 : REM default spindle speed
comms(5) = 100 : REM Default % feed override
comms(6) = 100 : REM default % Spindle overide
comms(10) = 0 : REM Manual Tool Post Fitted
comms(14) = 4000 : REM default max feed (Feed * (200/60))
comms(15) = 2500 : REM default max speed
comms(21) = 0 : REM Default to feed/min
comms(22) = 0 : REM Defualt to RPMs
comms(23) = 0 : REM Initialise feed per rev value
comms(31)= 14 : REM Mint file Version (Software)
comms(32)= 20 : REM Machine ID number
comms(33) = 0 : REM Machine problems
REM 1 is door open
REM 2 is low lube
REM 4 is low air pressure
REM eg 3 is door open and low lube
comms(34) = 0 : REM CIM Mode on (1) off (0)
DIM GreyCodes(8) = 7,3,2,0,1,5,4,6
SampleCounter = 1
SampleSize = 6
sumSpeed = 0
newSpeed = 0
LastAnal1 = -1
LastAnal2 = -1
feedOverride = 100
speedOverride = 100
OldSpeed = 100
FeedLast = 0
FeedPerRevLast = 0
SpeedLast = 0
FOverLast = 0
SOverLast = 0
Paused = 0
CSSDiameter = 0
CSSCentreLine = 0
FeedPerRev =0
lastspeed = 0 : REM remembers last actual speed so we can tell VR to look at comms 24
M62Mode = 0
M64Mode = 0
M63Mode = 0
M65Mode = 0
M10Mode = 0
JustPoweredOn=1
POKE 3, 50
POKE 3, 116
POKE 3, 176
POKE 0, 0
POKE 0, 32
POKE 1, 0
POKE 1, 255
POKE 0, 1
POKE 0, 0
WRAP = 4000 : REM Spindle Encoder Edge Count
SafetyFeed = 150 * 200 / 60 : REM convert 150mm/min into steps/second
CONFIG = 2, 2, 2
DISLIMIT
SCALE = 1, 1, 1
RAMP = 1, 1, 1
ACCEL = 10000, 10000, 10000
EV=1 : REM Enable Events
COMMS(19) = 0 : REM safety bit
X3.0 =1
X4.0 =1 :REM Turn off door sol when open
Time=0
HasChanged=0
PRINT "Novaturn Mint v1.2 (c) Denford Ltd"
LOOP
command = comms(1)
if comms(2) <> 2 THEN comms(21) = 0 :REM Feed/Min if not Auto
if comms(2) <> 2 THEN comms(22) = 0 :REM CSS Off if not Auto
if comms(21)=0 AND comms(3) <> FeedLast THEN GOSUB NewFeed
if comms(22)=0 AND comms(4) <> SpeedLast THEN GOSUB NewSpindle
if comms(5) <> FOverLast THEN GOSUB NewFeedOverride
if comms(6) <> SOverLast THEN GOSUB NewSpinOverride
command = comms(1)
IF command = 7 THEN GOSUB toolChange
command = comms(1)
IF command = 17 THEN GOSUB Poker
command = comms(1)
IF command = 18 THEN GOSUB mcode
command = comms(1)
IF Command = 20 THEN GOSUB NewBufferSize
IF comms(25) <> CSSDiameter THEN GOSUB CSSSetupCentreLine
GOSUB SafetyCheck
GOSUB CheckPot
GOSUB CheckSpindleSpeed
if comms(21) =1 THEN GOSUB CheckFeedPerRev
IF !comms(34)=0 DO :REM If in CIM mode
GOSUB CIMMcodeCheck
GOSUB ChuckCheck
ENDIF
ENDL
REM This SubRoutine is defined but never called !
#Non_Volatile
Pocket = 1 : REM Define Pocket non-volatile variable
RETURN
#STOP : REM Interupt Routine called by the STOP input activating
REM : GOSUB SpindleStop
RETURN
#NewFeed
IF comms(21) = 0 AND (comms(3) * feedOverride / 100.1 < comms(14)) DO
SPEED = comms(3) * feedOverride / 100;
FeedLast = comms(3)
ENDIF
IF comms(21) = 0 AND (comms(3) * feedOverride / 100 > comms(14)) DO
SPEED = comms(14);
FeedLast = comms(14)
ENDIF
IF comms(21) = 1 AND (FeedPerRev * feedOverride / 100.1 < comms(14)) DO
SPEED = FeedPerRev * feedOverride / 100;
ENDIF
IF comms(21) = 1 AND (FeedPerRev * feedOverride / 100 > comms(14)) DO
SPEED = comms(14);
ENDIF
RETURN
#NewSpindle
IF comms(4) * speedOverride / 100 < comms(15) DO
spindle = comms(4) * speedOverride / 100
ELSE
spindle = comms(15)
ENDIF
spinValue = 222 * (spindle / comms(15))
POKE 0,1
POKE 0, int (spinValue)
SpeedLast = comms(4)
RETURN
#NewFeedOverride
IF comms(8) = 0 THEN feedOverride = comms(5)
IF !Paused THEN GOSUB NewFeed :REM SPEED = comms(3) * feedOverride / 100;
IF comms(5) <> feedOverride DO
comms(5) = feedOverride
comms(99) = 5
ENDIF
FOverLast = comms(5)
RETURN
#NewSpinOverride
IF comms(9) = 0 THEN speedOverride = comms(6)
GOSUB NewSpindle
IF comms (6) <> speedOverride DO
comms(6) = speedOverride
comms(99) = 6
ENDIF
SoverLast = comms(6)
RETURN
#ChangeGreyTool
REM Check for a valid tool number
IF (comms(7) < 1) OR (comms(7) >

THEN RETURN
GreyCode = GreyCodes(comms(7)) * 8
REM Check to see if we are already there
IF (IN & 00111000) = GreyCode THEN RETURN
NextTool = comms(7) + 1
IF NextTool > 8 THEN NextTool = 1
NextGreyCode = GreyCodes(NextTool) * 8
REM Switch the tool post motor Forward
OUT5 = 1
REM Look for the Requested Tool Position
REPEAT
UNTIL ((IN & 00111000) = GreyCode) OR STOPSW
REM Look for the Next Tool Position
REPEAT
UNTIL ((IN & 00111000) = NextGreyCode) OR STOPSW
REM Switch the tool post motor Reverse
OUT5 = 0
REM Look for the Requested Tool Position
REPEAT
UNTIL ((IN & 00111000) = GreyCode) OR STOPSW
WAIT = 250
RETURN
#toolChange
IF comms(10) = 1 DO
GOSUB ChangeGreyTool
WAIT = 250
ENDIF
comms(1) = 0
pocket=comms(7)
RETURN
#Poker
POKE comms(17), comms(16)
comms(1) = 0
RETURN
#mcode
IF comms(18)=3 then GOSUB SpindleStart
IF comms(18)=4 then GOSUB SpindleStart
IF comms(18)=13 then GOSUB SpindleStart
IF comms(18)=5 then GOSUB SpindleStop
IF comms(18)=30 then GOSUB SpindleStop
IF comms(18)=0 then GOSUB SpindleStop
IF comms(18)=10 DO
M10Mode = 1
GOSUB ChuckOpen
ENDIF
IF comms(18)=11 DO
M10Mode = 0
GOSUB ChuckClose
ENDIF
IF comms(18)=38 THEN GOSUB DoorOpen
IF comms(18)=39 THEN GOSUB DoorClose
IF comms(18)=62 AND comms(34)=0 then GOSUB Mcode62 :REM outputs on/off only if not in CIM mode
IF comms(18)=64 AND comms(34)=0 then GOSUB Mcode64
IF comms(18)=63 AND comms(34)=0 then GOSUB Mcode63
IF comms(18)=65 AND comms(34)=0 then GOSUB Mcode65
IF comms(18)=62 AND !comms(34)=0 do
M62MODE = 1 :REM outputs on/off if IN CIM mode
comms(62)=1 :REM for debugging
ENDIF
IF comms(18)=64 AND !comms(34)=0 do
M64MODE = 1
comms(64)=1 :REM for debugging
ENDIF
IF comms(18)=63 AND !comms(34)=0 do
M63MODE = 1
comms(63)=1 :REM for debugging
ENDIF
IF comms(18)=65 AND !comms(34)=0 do
M65MODE = 1
comms(65)=1 :REM for debugging
ENDIF
WAIT = 250
IF comms(18)=66 then GOSUB Mcode66 :REM wait inputs
IF comms(18)=76 then GOSUB Mcode76
IF comms(18)=67 then GOSUB Mcode67
IF comms(18)=77 then GOSUB Mcode77
comms(1) = 0
RETURN
#SafetyCheck
IF JustPoweredOn DO
JustPoweredOn = 0
comms(7) = Pocket : REM read comms 7 1st to remember last tool on machine
ENDIF
IF STOPSW DO
stop[0,1] : REM AT added 5/4/2004 to stop axes carrying on homing if ESTOP released
GOSUB SpindleStop : REM Stop the Spindle
ENDIF
IF IN0 DO : REM If the door is open...
IF (OUT & 1 = 1) THEN GOSUB SpindleStop : REM Stop the Spindle
IF (comms(2) = 2) AND !IDLE DO : REM If in Auto mode...
REM : STOP[0,1,2] : REM stop the Axes
Paused = 1
OldSpeed = SPEED : REM rememeber the original feedrate
SPEED = 0; : REM Set the Feedrate to 0
ENDIF
IF (comms(2) < 2) AND (SPEED > SafetyFeed) DO : REM If not in Auto then
comms(3) = SafetyFeed : REM limit the feed to a safe feedrate
GOSUB NewFeed
REM SPEED = SafetyFeed; *** removed to stop juddery jogging
ENDIF
ENDIF
IF !IN0 and Paused DO
SPEED = OldSpeed;
Paused = 0
ENDIF
REM machine safe = door closed AND not low lube AND air pressure ok
MachSafe = (IN0=0) : REM AND (IN1=0) : REM AND (IN2=0)
IF Comms(34)=0 DO :REM if NOT in CIM MODE then
IF comms(19) <> MachSafe DO
comms(33) =0
IF (IN0=1) THEN comms(33) = comms(33) OR 1 : REM Tell PC what problem is
IF (IN1=1) THEN comms(33) = comms(33) OR 2 : REM Low Lube
IF (IN2=1) THEN comms(33) = comms(33) OR 4 : REM Low Air
comms(99) = 19 : REM Tell host the door has just moved
ENDIF
Comms(19) = MachSafe : REM Set the Safety flag
ENDIF
IF Comms(34)=1 DO :REM if in CIM MODE then
IF comms(19) <> MachSafe DO
comms(33) =0
IF (IN0=1) THEN comms(33) = comms(33) OR 1 : REM Tell PC what problem is
IF (IN1=1) THEN comms(33) = comms(33) OR 2 : REM Low Lube
IF (IN2=1) THEN comms(33) = comms(33) OR 4 : REM Low Air
comms(99) = 19 : REM Tell host the door has just moved
ENDIF
Comms(19) = 1 : REM If CIM mode set it to Door OK all the time
ENDIF
RETURN
#SpindleStart
GOSUB SafetyCheck
IF Comms(19) THEN OUT0 = 1 : REM Only if safe
RETURN
#SpindleStop
OUT0 = 0
Gosub WaitZeroSpeed
RETURN
#CSSSetupCentreLine
CSSDiameter = comms(25)
CSSCentreLine = ABS(POS[0]) + (CSSDiameter / 2)
RETURN
#CheckPot
Anal1 = (A1 / 1024) * 75 : REM Spindle Override Pot
ScanPots = 0
IF Time > 2000 DO : REM look at pots every so often
ScanPots = 1
Time = 0
ENDIF
IF (ABS (Anal1 - lastAnal1) > 2) OR Scanpots DO : REM 2% hysterisis
NewA1 = INT (Anal1 / 5) * 5 + 50
IF newA1 > 120 THEN newA1 = 120
speedOverride = newA1
GOSUB NewSpinOverride
LastAnal1 = Anal1
ENDIF
Anal2 = (A2 / 1024) * 155 : REM Feed Override Pot
IF (ABS (Anal2 - lastAnal2) > 2) OR Scanpots DO
NewA2 = INT (Anal2 / 5) * 5
IF newA2 > 150 THEN newA2 = 150
feedOverride = newA2
GOSUB NewFeedOverride
LastAnal2 = Anal2
ENDIF
RETURN
#NewBufferSize
MBFULL = comms(20)
MBHALF = int (comms(20) / 2 + 0.5)
comms(1) = 0
RETURN
#CheckFeedPerRev
REM ~~~ feed/min = feed/rev * actual spindle speed
FeedPerRev = comms(23) * lastspeed: REM comms(24)
If FeedPerRev > comms(14) THEN FeedPerRev = comms(14) : REM clamp too big a feedrate
GOSUB NewFeed
FeedLast = 0
RETURN
#CheckSpindleSpeed
REM Average and update the current spindle speed data
SampleCounter = SampleCounter + 1
sumSpeed = sumSpeed + -PULSEVEL / WRAP * 60
if SampleCounter > SampleSize DO
newSpeed = sumSpeed / SampleSize
sumSpeed = 0
SampleCounter = 1
ENDIF
comms(24) = newSpeed
IF ABS (newSpeed - lastSpeed) > 20 DO
comms(99) = 24
lastSpeed = newSpeed
ENDIF
REM Check for CSS
IF comms(22) = 0 THEN RETURN
REM ~~~ RPM Spindle Speed = CSS / Pi*D
LastSpeed = -PULSEVEL / WRAP * 60
CurrentDiameter = 2 * ABS(CSSCentreLine - ABS(POS[0]))
comms(4) = comms(26) / (3.142 * CurrentDiameter / 1000)
GOSUB NewSpindle
RETURN
#WaitZeroSpeed
REPEAT
Gosub CheckSpindleSpeed
UNTIL (LastSpeed<30) OR STOPSW
Wait=400
RETURN
#ChuckCheck
:REM Checks for Chuck commands from CIM Device Driver
IF X1.0 THEN GOSUB ChuckOpen
IF !X1.0 AND !M10Mode THEN GOSUB ChuckClose
RETURN
#ChuckOpen
GOSUB SpindleStop :REM just in case !
OUT3 =1
IF !comms(34)=0 THEN X1.0 =1 :REM Chuck status output OUT2
RETURN
#ChuckClose
REM Gosub SpindleStop
OUT3 =0
IF !comms(34)=0 THEN X1.0 =0 :REM Chuck status output
RETURN
#DoorOpen
Gosub SpindleStop
X3.0 =0
X4.0 =1
REPEAT
UNTIL X4.0 OR STOPSW
WAIT = 250
X3.0 =1
X4.0 =1 :REM Turn off door sol when open
RETURN
#DoorClose
X3.0 =1
X4.0 =0
REPEAT
UNTIL !IN0 OR STOPSW
WAIT = 250
X3.0 =1
X4.0 =1 :REM Turn off door sol when open
RETURN
#CIMMcodeCheck
:REM If in CIM mode, checks for M62 M64 and allows them if door is OK
IF M62Mode AND !IN0 DO
X0.0=1 :REM Turn auxiliary output OUT1 on if door closed
M62Mode=0
comms(62)=0
ENDIF
IF M64Mode AND X4.0 DO
X0.0=0 :REM Turn auxiliary output OUT1 off if door open
M64Mode=0
comms(64)=0
ENDIF
IF M63Mode AND !IN0 DO
X1.0=1 :REM Turn auxiliary output OUT2 on if door closed
M63Mode=0
comms(63)=0
ENDIF
IF M65Mode AND X4.0 DO
X1.0=0 :REM Turn auxiliary output OUT2 off if door open
M65Mode=0
comms(65)=0
ENDIF
RETURN
#Mcode62
REM: Turn auxiliary output OUT1 on
X0.0=1
RETURN
#Mcode64
REM: Turn auxiliary output OUT1 off
X0.0=0
RETURN
#Mcode63
REM: Turn auxiliary output OUT2 on
X1.0=1
RETURN
#Mcode65
REM: Turn auxiliary output OUT2 on
X1.0=0
RETURN
#Mcode66
REM: Wait for AUX input 1
REPEAT
GOSUB SafetyCheck
UNTIL X0.0 OR STOPSW
RETURN
#Mcode76
REM: Wait for not AUX input 1
REPEAT
GOSUB SafetyCheck
UNTIL !X0.0 OR STOPSW
RETURN
#Mcode67
REM: Wait for AUX input 2
REPEAT
GOSUB SafetyCheck
UNTIL X1.0 OR STOPSW
RETURN
#Mcode77
REM: Wait for NOT AUX input 2
REPEAT
GOSUB SafetyCheck
UNTIL !X1.0 OR STOPSW
RETURN
| : REM Send a CTRL-Z blank line (to quit edit mode)
C:\Program Files\Denford\VRTurning\Tooling Files\Default.tft
[1]
X=0
Z=0
Radius=0
[2]
X=-36.51
Z=35.98
Radius=0
[3]
X=-0.87
Z=-20.29
Radius=0
[4]
X=-31.83
Z=35.98
Radius=0
[5]
X=0.81
Z=-4.91
Radius=0
[6]
X=-31.83
Z=14.66
Radius=0
[7]
X=-0.64
Z=-3.81
Radius=0
[8]
X=-31.83
Z=36.45
Radius=0
[Global]
Current Tool=1
[Tool1]
Tool Name=Roughing Tool
[Tool2]
Tool Name=Boring Bar
[Tool3]
Tool Name=Finishing Tool
[Tool5]
Tool Name=External Thread
[Tool7]
Tool Name=Parting Off Tool
[Tool4]
Tool Name=Drill 2
[Tool6]
Tool Name=Center Drill
[Tool8]
Tool Name=Drill
C:\Program Files\Denford\VRTurning\VRTurn.TTD
[Roughing Tool]
Type=0
Class=0
Tool Orientation=8
Tip Orientation=3
Colour=255
Nose Radius=0.4
Maximum Tool Life=50
Current Tool Life=-1
Tip Angle=60
Tip Clearance=-10
Tip Size=12
Length=60
Width Diameter=12
[Grooving Tool]
Type=2
Class=0
Tool Orientation=8
Tip Orientation=3
Colour=16711808
Nose Radius=45
Maximum Tool Life=50
Current Tool Life=0
Tip Angle=6
Tip Clearance=-45
Tip Size=2.2
Length=60
Width Diameter=12
[Internal Thread]
Type=1
Class=1
Tool Orientation=7
Tip Orientation=6
Colour=16384
Nose Radius=0
Maximum Tool Life=0
Current Tool Life=0
Tip Angle=60
Tip Clearance=0
Tip Size=9
Length=60
Width Diameter=12
[Boring Bar]
Type=0
Class=1
Tool Orientation=7
Tip Orientation=2
Colour=16744576
Nose Radius=0.4
Maximum Tool Life=0
Current Tool Life=0
Tip Angle=60
Tip Clearance=0
Tip Size=6.35
Length=40
Width Diameter=8
[Center Drill]
Type=4
Class=1
Tool Orientation=7
Tip Orientation=7
Colour=65535
Nose Radius=0
Maximum Tool Life=0
Current Tool Life=0
Tip Angle=54
Tip Clearance=-45
Tip Size=3
Length=20
Width Diameter=5
[External Thread]
Type=1
Class=0
Tool Orientation=8
Tip Orientation=3
Colour=16711680
Nose Radius=0
Maximum Tool Life=50
Current Tool Life=0
Tip Angle=60
Tip Clearance=-45
Tip Size=7
Length=60
Width Diameter=12
[Finishing Tool]
Type=0
Class=0
Tool Orientation=8
Tip Orientation=3
Colour=4227327
Nose Radius=0.4
Maximum Tool Life=50
Current Tool Life=0
Tip Angle=60
Tip Clearance=-15
Tip Size=12
Length=60
Width Diameter=12
[Drill]
Type=3
Class=1
Tool Orientation=7
Tip Orientation=7
Colour=32768
Nose Radius=0
Maximum Tool Life=50
Current Tool Life=0
Tip Angle=90
Tip Clearance=0
Tip Size=15
Length=40
Width Diameter=5
[Parting Off Tool]
Type=2
Class=0
Tool Orientation=8
Tip Orientation=3
Colour=8421376
Nose Radius=0
Maximum Tool Life=50
Current Tool Life=0
Tip Angle=60
Tip Clearance=-45
Tip Size=2.2
Length=60
Width Diameter=12
[Pusher]
Type=5
Class=1
Tool Orientation=7
Tip Orientation=7
Colour=4259584
Nose Radius=0
Maximum Tool Life=50
Current Tool Life=0
Tip Angle=60
Tip Clearance=0
Tip Size=15
Length=60
Width Diameter=12
TipIndex=18
Attach_X=34
Attach_Y=22
0_X=23
0_Y=35
1_X=23
1_Y=30
2_X=23
2_Y=30
3_X=32
3_Y=30
4_X=32
4_Y=30
5_X=32
5_Y=27
6_X=32
6_Y=27
7_X=32
7_Y=27
8_X=32
8_Y=27
9_X=29
9_Y=27
10_X=29
10_Y=27
11_X=29
11_Y=22
12_X=40
12_Y=22
13_X=40
13_Y=27
14_X=37
14_Y=27
15_X=37
15_Y=30
16_X=45
16_Y=30
17_X=45
17_Y=35
18_X=34
18_Y=35
[Drill 2]
Type=3
Class=1
Tool Orientation=7
Tip Orientation=7
Colour=16777215
Nose Radius=0
Maximum Tool Life=50
Current Tool Life=0
Tip Angle=60
Tip Clearance=0
Tip Size=15
Length=40
Width Diameter=10
C:\Program Files\Denford\VRTurning\VRTurn.TOL
[Offset 1]
X=-97.75444
Z=-132.17906
Current=1
[Offset 2]
X=0
Z=0
Current=0
[Offset 3]
X=0
Z=0
Current=0
[Offset 4]
X=0
Z=0
Current=0
[Offset 5]
X=0
Z=0
Current=0
[Settings]
Use Machine Only=0
********** END OF SUPPORT DATA ****************