Author Topic: script  (Read 22140 times)

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 9081
    • View Profile
Re: script
« Reply #15 on: July 22, 2017, 18:05:00 pm »
I might add, Michel, since you're taking a C# class, that an interesting and useful experiment would be to re-write that VB plugin in C#.  When you get that working properly, you'll have accomplished (and learned) a LOT!

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5330
  • Made in England
    • View Profile
Re: script
« Reply #16 on: July 22, 2017, 18:18:47 pm »
Lloyd,

I'm not sure this is the correct version of that plugin but it's already in C# here;http://www.cambam.co.uk/forum/index.php?topic=5567.msg44590#msg44590
Filmed in Supermarionation

Offline michel

  • Wookie
  • ****
  • Posts: 263
    • View Profile
    • het-trappenatelier
Re: script
« Reply #17 on: July 22, 2017, 18:36:09 pm »
Hi Eddy ,

just to be sure . The work I need can be done on the ranc232.vbs file ? so scripting is maybe enough to do it ?

regards
Michel

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5330
  • Made in England
    • View Profile
Re: script
« Reply #18 on: July 22, 2017, 18:54:06 pm »
Hi Eddy ,

just to be sure . The work I need can be done on the ranc232.vbs file ?

Are you asking me or telling me ? if you are asking then I don't know the answer, if you are telling me then scripting is the only way to do it. Use this; https://notepad-plus-plus.org/download/v7.4.2.html
« Last Edit: July 22, 2017, 18:56:08 pm by EddyCurrent »
Filmed in Supermarionation

Offline michel

  • Wookie
  • ****
  • Posts: 263
    • View Profile
    • het-trappenatelier
Re: script
« Reply #19 on: July 22, 2017, 18:56:48 pm »
done

Offline driedeker

  • Storm Trooper
  • ***
  • Posts: 162
    • View Profile
Re: script
« Reply #20 on: July 22, 2017, 19:00:24 pm »
Are you usiong mach3 as your cnc software or something else.
there is a command allready to park you tools in mach3.
so no cambam programing apart from your post processor needing an edit.
or am I missing something.


Hi Eddy ,

just to be sure . The work I need can be done on the ranc232.vbs file ? so scripting is maybe enough to do it ?

regards
Michel
Made in England in 53

Offline michel

  • Wookie
  • ****
  • Posts: 263
    • View Profile
    • het-trappenatelier
Re: script
« Reply #21 on: July 22, 2017, 19:07:17 pm »
Hi ,

no mach 3 :-)

I have an old reichenbacher cnc and cambam is my gcode software is cambam ;-)

Offline driedeker

  • Storm Trooper
  • ***
  • Posts: 162
    • View Profile
Re: script
« Reply #22 on: July 22, 2017, 19:28:48 pm »
So can you not rapid to your park position in your post processor.
ie g0 z+50x+50y+50

Hi ,

no mach 3 :-)

I have an old reichenbacher cnc and cambam is my gcode software is cambam ;-)
Made in England in 53

Offline michel

  • Wookie
  • ****
  • Posts: 263
    • View Profile
    • het-trappenatelier
Re: script
« Reply #23 on: July 22, 2017, 19:33:49 pm »
offcourse I rapid to a park position but i need a dynamic park position . Depending on the type of part I process a different park position is needed .

Offline michel

  • Wookie
  • ****
  • Posts: 263
    • View Profile
    • het-trappenatelier
Re: script
« Reply #24 on: July 22, 2017, 19:55:28 pm »
Hi Lloyd

do you think the code to add could be written right after the coding you add to strip the alpha caracters ?

regards
Michel

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 9081
    • View Profile
Re: script
« Reply #25 on: July 23, 2017, 16:08:42 pm »
Yes, Michel.

I'm on a break from roofing repairs for rain right now (and of course, the area being repaired wasn't water-proofed before the rain began!).  I intended to look at your work this evening, and suggest some 'simple' coding concepts that aren't obvious to a beginner, but are very common (and good) programming practices.

For instance (I can't give you code-specific information right now... not at my machine for coding), it makes very little sense to 'hard-code' values associated with a letter IN the script.  A better approach is to build an array with the letter (or letters...) as the 'index', and an associated cell with an entirely arbitrary parking position of your choice.  You may have as many single letters OR strings in there as you wish, since both the array indices and their parking positions are arbitrary values you input.

This array would be stored external to the script in a comma-delimited text file, so that you needn't EVER change your code to change your parking positions -- you'd simply edit the text file with any ordinary text editor, like notepad or notepad++.  The next time you ran the script, it would use whatever values you put in that text file.

I imagine you're not yet comfortable with such a concept, but I can give you code examples to demonstrate how it should work. 

And yes... the way the corrector code works right now, your new code could be added to that routine, so you wouldn't need yet-another script.


Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"