SA International Forum Homepage
Forum Home Forum Home > EnRoute FAMILY > General EnRoute
  New Posts New Posts RSS Feed - adding a command to code
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

adding a command to code

 Post Reply Post Reply
Author
Message
wabmat View Drop Down
Apprentice
Apprentice
Avatar

Joined: 09 November 2016
Location: sydney
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote wabmat Quote  Post ReplyReply Direct Link To This Post Topic: adding a command to code
    Software: Flexi 12  Level: FlexiDESIGNER
    Posted: 20 November 2016 at 11:16pm
Hello All
i would like to know if any of you can guide me in the right direction on adding a line to my code when i do drilling holes machine is for a biessie.
ive highlighted it big and red this must go in all the hole macros and ideas on how ?

BEGIN ID CID3
REL=5.0
END ID

BEGIN MAINDATA
LPX=2400.00
LPY=1200.00
LPZ=18.00
ORLST="1"
SIMMETRY=1
TLCHK=0
TOOLING=""
CUSTSTR=""
FCN=1
XCUT=0
YCUT=0
JIGTH=0
CKOP=0
UNIQUE=0
MATERIAL="wood"
PUTLST=""
OPPWKRS=0
UNICLAMP=0
CHKCOLL=0
WTPIANI=0
COLLTOOL=0
CALCEDTH=0
ENABLELABEL=0
LOCKWASTE=0
LOADEDGEOPT=0
ITLTYPE=0
RUNPAV=0
FLIPEND=0
END MAINDATA

BEGIN MACRO
NAME=BG
PARAM,NAME=THR, VALUE=NO
PARAM,NAME=SIDE,VALUE=0
PARAM,NAME=CRN,VALUE="1"
PARAM,NAME=X,VALUE=2329.7716
PARAM,NAME=Y,VALUE=72.9282
PARAM,NAME=Z,VALUE=0
PARAM,NAME=DP,VALUE=13.00
PARAM,NAME=DIA,VALUE=10.00
PARAM,NAME=WSP,VALUE=6000
PARAM,NAME=RSP,VALUE=18000
PARAM,NAME=IOS,VALUE=0
PARAM,NAME=RSP,VALUE=18000
PARAM,NAME=TTP,VALUE=0
PARAM,NAME=OPT,VALUE=YES
END MACRO
BEGIN VB
VBLINE=""
END VB
Back to Top
paloalto_17 View Drop Down
Admin Group
Admin Group


Joined: 29 October 2012
Location: United States
Points: 191
Post Options Post Options   Thanks (0) Thanks(0)   Quote paloalto_17 Quote  Post ReplyReply Direct Link To This Post Software: Flexi 12  Level: FlexiDESIGNER
    Posted: 21 November 2016 at 10:03am
Wabmat,
 You can't add anything to your code that has to be built into the driver. What driver are you using in Enroute and what is this code that you need changed do? 

Best Regards,
Aaron

Back to Top
wabmat View Drop Down
Apprentice
Apprentice
Avatar

Joined: 09 November 2016
Location: sydney
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote wabmat Quote  Post ReplyReply Direct Link To This Post Software: Flexi 12  Level: FlexiDESIGNER
    Posted: 21 November 2016 at 3:34pm
i am usiging the cix file.
this command disables my through bore command if i dont use this what happens is when i use 12mm board and go 12mm deep it will actually go 24mm because it has through boring enabled so i need to disable at all times. peaklift doesnt work for this i have tried them all.

many thanks
Back to Top
paloalto_17 View Drop Down
Admin Group
Admin Group


Joined: 29 October 2012
Location: United States
Points: 191
Post Options Post Options   Thanks (0) Thanks(0)   Quote paloalto_17 Quote  Post ReplyReply Direct Link To This Post Software: Flexi 12  Level: FlexiDESIGNER
    Posted: 23 November 2016 at 9:50am
Wabmat,
 If you were to output the file from Enroute and then manually add that piece of code to the output file does this work on your machine? 

Best Regards,
Aaron
Back to Top
smitha View Drop Down
Expert
Expert
Avatar

Joined: 14 August 2016
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote smitha Quote  Post ReplyReply Direct Link To This Post Software: Flexi 12  Level: FlexiDESIGNER
    Posted: 23 November 2016 at 8:36pm
Hi Wabmat,

I'm driving Enroute 4...so I can't really help you with how to use enroute to do what you are asking...

My suggestion is to write a bit of computer code or script which opens the text file, reads in each line, then writes a new text file with the "Changes/ inserts/ edits/deletes" that you need...

You've opened the files and can see what you want the text to look like...can you do any programming?

I've used VBA for Excel to write scripts which add and delete lines in cnc programs...if you have Excel press "alt+F11" to get to the VBA interface.

Biesse's can be harder because some of them have a headers section with "the number of characters to the [CONTOURA] paragraph..." ... you'll know what I mean if you've encountered it.

You can use Ruby or probably a number of other scripting languages to do add/subtract the text that you want to...maybe even notepad++ can be scripted to add in the line like you ask.

If you've done no programming like that...on problem! Your local university probably has a supply of computer science undergrads who can write the script for you....if the script is simply:
look thru each line of the text file, until you see one which says "Name=BG" then
insert a line which says "PARAM,NAME=THR, VALUE=NO"...then close up the file...
that ought to take a 3rd year undergrad about 1 hour....

Does what I am saying make sense to you? Is my suggestion clear? or is it confusing?

Regards,
AS
Back to Top
paloalto_17 View Drop Down
Admin Group
Admin Group


Joined: 29 October 2012
Location: United States
Points: 191
Post Options Post Options   Thanks (0) Thanks(0)   Quote paloalto_17 Quote  Post ReplyReply Direct Link To This Post Software: Flexi 12  Level: FlexiDESIGNER
    Posted: 28 November 2016 at 10:02am
Smitha,
 I have all the source code for all the drivers and a script would not be the way to handle this. Unfortunately if you don't have the latest version of Enroute we can't do any driver changes. Is Enroute 4 the only copy of Enroute you have or do you have a newer version of Enroute? 

Best regards,
Aaron
Back to Top
smitha View Drop Down
Expert
Expert
Avatar

Joined: 14 August 2016
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote smitha Quote  Post ReplyReply Direct Link To This Post Software: Flexi 12  Level: FlexiDESIGNER
    Posted: 28 November 2016 at 6:20pm
Hi Paloalto_17,
yeah, I've only got Enroute 4....

so I use a script to add/change stuff...actually I do a heap of stuff...I programmatically estimate the running time of each sheet, I calculate (well, approximate) the yield, copy the program onto the cnc, print out cover sheets and labels, I check my code does not cut into the bed, I send to a home co-ordinate other than [0,0,0], etc etc

 a fair bit of stuff my "closed" post-pro doesn't do.

The post-processors are open in Enroute 5 or 6? Awesome...that would be an easier way

Regards,
AS
Back to Top
paloalto_17 View Drop Down
Admin Group
Admin Group


Joined: 29 October 2012
Location: United States
Points: 191
Post Options Post Options   Thanks (0) Thanks(0)   Quote paloalto_17 Quote  Post ReplyReply Direct Link To This Post Software: Flexi 12  Level: FlexiDESIGNER
    Posted: 28 November 2016 at 6:37pm
Smitha,
 Using a script can accomplish the task for sure but for us we can simply modify the driver instead and that will do the same thing as the scrip except without the extra work. The drivers in Enroute are the PST files in your Ndrivers folder. The PST files cannot be opened by any program or modified, we would need to edit the source code and then compile the PST off of that. 

Best regards,
Aaron
Back to Top
smitha View Drop Down
Expert
Expert
Avatar

Joined: 14 August 2016
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote smitha Quote  Post ReplyReply Direct Link To This Post Software: Flexi 12  Level: FlexiDESIGNER
    Posted: 30 November 2016 at 9:45pm
Hi PaloAlto,
ohh, so you have the post-processors source...and can compile changes, but users can't...bummer.

I understand that the post-pros would be a seriously complex piece of work...especially to try to handle every cnc landguage out there.

But being closed tips the scales over to script writing again in my opinion.

Some computer undergrad can write a script to edit a text file pretty cheaply...plus copy the file to the machine automatically....I keep a list of each file copied to the cnc, and the cnc logs each program it runs...so my script tells me what programs are waiting to be run and how long they will take.

these things a post-pro can't be expected to do.

each to their own of course.

Regards,
AS


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.03
Copyright ©2001-2015 Web Wiz Ltd.