PDA

View Full Version : &FILE = &FILELOC



don
11-28-2009, 09:37 AM
I've tried to add the following input statement:

input "Enter File location and File name" &FILELOC
to use with the RUN_FILE subroutine.

I've been able to make this work if the runner\loop file is in the same directory as the cut file being run.
But if its in a different directory or drive I get an error that it can't find the file ( even if I've copy and pasted the correct path.
I've tried using the ".." "\.." and combination's of.
Is there a way to make a window popup and use windows browse feature?
Thanks in Advance.
Don

'ShopBot Parts file in inches
'Determine whether we are in Preview mode or Move/Cut mode
'&modenow = %(22)
'IF &modenow = 1 THEN GOSUB Changemode

'Load the custom variables file from Custom Cut 90
'C#,90
input "Enter File location and File name" &FILELOC
input "X Park Position" &parkX ' position where X will park during part change
input "Y Park Position" &parkY ' position where Y will park during part change
'input " Enter Number of Reps" &numreps
'=========initialize variables=============
&FILE = &FILELOC
&answer = 0
&park_X = &parkX ' position where X will park during part change
&park_Y = &parkY ' position where Y will park during part change
'&part_location_X = 20
'&part_location_Y = 8
'&xy_move_speed = **fill in**
'&z_move_speed = **fill in**
'&numreps = &num_reps ' number of times the file will run
'
'+++++++++++++++++Program Lines++++++++++
SA 'Set program to absolute coordinate mode
'MS,&xy_move_speed, &z_move_speed

BEGIN:
'SO,1,1 'Turn on router
'PAUSE 2 'Give router time to reach cutting rpm

GOSUB RUN_FILE
SO,1,0
J2,&park_X,&park_Y
INPUT "HIT ENTER TO CONTINUE, [Q] to Quit" &answer
IF &answer = Q THEN GOTO END
GOTO BEGIN

END:
SO,1,0
JH
END


'================Subroutines===============

RUN_FILE:
FP, &FILE
RETURN

'CHANGEMODE:
'Tool won't home in Preview Mode. Quit and change Move/Cut mode ...
'PAUSE
END 'Exit program now

adrianm
11-28-2009, 02:27 PM
Have you tried entering the file path enclosed in double quotes?

don
11-28-2009, 03:16 PM
Yes I have tried to use double quotes.
I get the same error.
I'll keep digging.
Thanks Adrian.
Don

adrianm
11-28-2009, 04:19 PM
Don, I just tried the relevant parts of your routine and it seems to work fine unless I put in a file name that really doesn't exist. I've tried paths with spaces etc and it still works.

I wonder if it's something that works differently in different versions of the software? I'm using 3.6.10.

don
11-28-2009, 04:46 PM
Adrian,
I have a 2004 PRT and am using the latest version for the non 4G Boards which is 3.4.27

srwtlc
11-29-2009, 08:56 PM
Don, I know that there are some programming statements that don't work in the older software, such as the MSGBOX statement, so you may have something that's not compatible with version 3.4.27.

don
11-30-2009, 06:27 PM
I think your right Scott.
Adrian and Scott,Thanks for the help...