one job, multiple files, one directory

More
4 months 2 weeks ago #347123 by djdelorie
Is there any way to split a job into multiple files, not including the "designate one directory as a working job directory for everything" ?  I want to keep each job's files in separate directories, but linuxcnc doesn't seem to look in the same directory as the calling file, for subroutine files.
I really just need to do a series of G92 (or G10L2 etc), run file A, G92, run file B, etc.
 

Please Log in to join the conversation.

More
4 months 1 week ago #347254 by tommylight
If those are the same files being called repeatedly, try VCP panel, pretty sure it can run MDI and gcode:
linuxcnc.org/docs/html/gui/pyvcp.html
linuxcnc.org/docs/html/gui/pyvcp-examples.html
in google
Code:
vcp panel run gcodesite:linuxcnc.org

Please Log in to join the conversation.

More
4 months 1 week ago #347283 by djdelorie
No, it's more like I have a production run for a customer and I'd like to batch up 4 jobs at a time on the bed, but each job has its own gcode file.  So I need a script that runs each gcode file with the right work offset for each of the 4 setups.

(in this case, it's two parts for a chair, each part is different on both sides, and each pair of parts is a mirror image of the other, so four gcode files - but two runs produces four finished parts)

I expected to find some easy way of "batching" jobs like this, without mixing files from different jobs together on disk, but didn't.  Also, my memory is not good enough to trust doing any part of this manually, I want all the commands to be in one "project" gcode file that I can just run and it does the right thing.

And yes, I could have each setup be a different G54 et al (assuming few enough jobs that there are enough G5*) but I still need a way to run all four of them without having to go to the machine and remember which one is next.
 

Please Log in to join the conversation.

More
4 months 1 week ago #347284 by MaHa
You can call offsets and subroutines with a variable:
Just some example

;select G54
#<ucs> = 54
G#<ucs>

;select from G54 to G57
#<job> = 0
o100 REPEAT[4]
#<job> = [#<job> + 1]
#<ucs> = [53 + #<job>]
G#<ucs>
o100 ENDREPEAT

and you can call numbered subroutines

#<job> = 1
#1234 = #<job>
o#1234 call

and the subroutine would be
1.ngc

o<1> sub

your code

o<1> endsub
M2

It should be possible to assign offset and call the required subroutines with variables

Please Log in to join the conversation.

More
4 months 1 week ago #347285 by tommylight
There are many ways of doing things in Linux and LinuxCNC, so i'll just throw this out there:
-you can have many configs for the same machine-in your case you can have PyVCP panels for chairs in one config, for beds on another config, etc, etc, as many as you care to make
-each of those configs can have it's own working directory to read files and/or MDI/O calls, etc
-each of those configs can also have it's own limits and/or speeds and/or accelerations and/or ... whatever you need
Any many more options, frankly hard to recall all at once here so i am sure i might find more later.

Please Log in to join the conversation.

Time to create page: 0.204 seconds
Powered by Kunena Forum