Jump to content


have subs post as seperate files


18 replies to this topic

#1 Jeremy Herron@DBS Solutions™

Jeremy Herron@DBS Solutions™

    Advanced Member

  • Members
  • PipPipPip
  • 781 posts
  • Location:Greenville, SC

Posted 23 February 2012 - 11:27 AM

My current post creates sub-programs propely, but it puts the at end of the main program. When I load them into the contorller it does not break them up. Anyone know how to get a post to output the main file as one program and  the subs as seperate programs?

#2 JParis

JParis

    Advanced Member

  • Moderators
  • 23,612 posts

Posted 23 February 2012 - 11:32 AM

Does the end of your main program have an M30?

If it does, try changing it to an M99, it "should" read them all then

#3 K2csq7

K2csq7

    Advanced Member

  • Members
  • PipPipPip
  • 1,992 posts
  • Location:CT

Posted 23 February 2012 - 11:41 AM

For me the end of the main NEEDS to be M30.
Then end of the subs is M99.

Are you looking to have it actually open up seperate windows in Cimco (or whatever you use) the first having ONLY the main, the subsequent having ONLY a single sub and so on?
When mine post only one window pops up with all programs in that one window. Then I manually seperate them & add the start & end triggers.

#4 JParis

JParis

    Advanced Member

  • Moderators
  • 23,612 posts

Posted 23 February 2012 - 11:58 AM

Keith, yeah the end will need to be an M30 but in my experience when the control reads the M30 at the end even if the subs follow it stops reading as the control recognizes M30 as the end of the program.

I got around that by simply changing it to an M99 on send and M30 once all received.  otherwise multiple programs required multiple sends.

It was also the reason I changed my control def to output the subs before the main

#5 Jeremy Herron@DBS Solutions™

Jeremy Herron@DBS Solutions™

    Advanced Member

  • Members
  • PipPipPip
  • 781 posts
  • Location:Greenville, SC

Posted 23 February 2012 - 01:27 PM

View PostKeith A-1™, on 23 February 2012 - 11:41 AM, said:

For me the end of the main NEEDS to be M30.
Then end of the subs is M99.

Are you looking to have it actually open up seperate windows in Cimco (or whatever you use) the first having ONLY the main, the subsequent having ONLY a single sub and so on?
When mine post only one window pops up with all programs in that one window. Then I manually seperate them & add the start & end triggers.

This is exactly what I need, and what I have to do now, and it is usually not a big deal, but I have some HUGE files with hundreds of subs coming up.

John, they all load just fine in file m99 or m30, but it will not call the sub out of the main file. If I switch to rs 232 communications the contol will automatically break them up upon load, but all my machine are lan or usb loaded.

#6 K2csq7

K2csq7

    Advanced Member

  • Members
  • PipPipPip
  • 1,992 posts
  • Location:CT

Posted 23 February 2012 - 01:50 PM

I have no idea what you could put in the post to say.... OPEN NEW window.

Whats the deal with mpsubrep?

#7 Jeremy Herron@DBS Solutions™

Jeremy Herron@DBS Solutions™

    Advanced Member

  • Members
  • PipPipPip
  • 781 posts
  • Location:Greenville, SC

Posted 23 February 2012 - 01:58 PM

this is my peof$


n$, "M30", e$
      mergesub$
      clearsub$
      mergeaux$
      clearaux$
      if fusion, "%", e$


If i do this

n$, "M30", e$
    # mergesub$
    # clearsub$
    # mergeaux$
    #  clearaux$
      if fusion, "%", e$

Then I get my main as an .eia(.nc) file and ALL my subs in one seperate .sub file

I need each sub to be a file of its own. I can kind of see the logic in my head in my head, but it would take some trial and error.

#8 K2csq7

K2csq7

    Advanced Member

  • Members
  • PipPipPip
  • 1,992 posts
  • Location:CT

Posted 23 February 2012 - 04:25 PM

Jeremy, look into setting the transform operations' (assuming thats how your creating the subs) NC file name differently for each one, I don't know what your dealing with for toolpaths, but this is the only thing I can think of...
(right click on the op in the ops manager, edit selected op, change NC file name)

Doing it in the post is way over my head....

#9 Jeremy Herron@DBS Solutions™

Jeremy Herron@DBS Solutions™

    Advanced Member

  • Members
  • PipPipPip
  • 781 posts
  • Location:Greenville, SC

Posted 23 February 2012 - 04:42 PM

Thank Keith, I had not thought of that. That might actually work for my current situation, but not for some o the ones coming up. It is an inhouse post. Anyone from inhouse have any thoughts?

#10 K2csq7

K2csq7

    Advanced Member

  • Members
  • PipPipPip
  • 1,992 posts
  • Location:CT

Posted 23 February 2012 - 04:50 PM

Not what your looking for.... but good info that may help.
My link


#11 Guest_CNC Apps Guy 1_*

Guest_CNC Apps Guy 1_*
  • Guests

Posted 23 February 2012 - 11:02 PM

It's not the M30 causing it to stop loading, it's the %
You can only have 2 in your program. One at the beginning and one at the end. Move the 2nd percent sign to after the sub, merge, yadda, yadda, yadda...<div><br></div><div>HTH</div>

#12 Jeremy Herron@DBS Solutions™

Jeremy Herron@DBS Solutions™

    Advanced Member

  • Members
  • PipPipPip
  • 781 posts
  • Location:Greenville, SC

Posted 24 February 2012 - 07:38 AM

James, it does not stop loading it just loads as 1 file. The controller does not break them into seperate files. It is a Variaxis matrix controller so it actually does not out put any percent signs. My biggest problem is probe macros, but that is a topic for another forum. ;)

#13 Tim Johnson

Tim Johnson

    Advanced Member

  • Members
  • PipPipPip
  • 2,337 posts

Posted 24 February 2012 - 08:15 AM

Get the V9 post reference .pdf file and read chapter 17 (File Manipulation).

#14 Jeremy Herron@DBS Solutions™

Jeremy Herron@DBS Solutions™

    Advanced Member

  • Members
  • PipPipPip
  • 781 posts
  • Location:Greenville, SC

Posted 24 February 2012 - 08:35 AM

Anybody know he password?

#15 Alvaro Gil - Cimquest-inc.com

Alvaro Gil - Cimquest-inc.com

    Member

  • Members
  • PipPip
  • 188 posts

Posted 06 June 2012 - 09:32 AM

View PostJeremy Herron ADEX Machining ™, on 23 February 2012 - 11:27 AM, said:

My current post creates sub-programs propely, but it puts the at end of the main program. When I load them into the contorller it does not break them up. Anyone know how to get a post to output the main file as one program and  the subs as seperate programs?


Jeremy, I ran into this issue at a customers. On a Fanuc control there is a parameter that looks for the end of a program, it can either be sent to M30/M99 or the End of Tape (%).  Set it to M30/M99, and the programs will be read by the machine into separate files. so much easier than sending 20 programs via rs232.

#16 htm01

htm01

    Advanced Member

  • Members
  • PipPipPip
  • 1,686 posts

Posted 06 June 2012 - 09:53 AM

i would still put the subs at the front then its on the main program when its done loading.

#17 Grievous74

Grievous74

    Member

  • Members
  • PipPip
  • 51 posts
  • Location:Toronto, ON, Canada

Posted 06 June 2012 - 01:32 PM

So, if it's a Matrix you don't need to split your file.
You can work like this:
..
..
M98 H1000 (H=BLOCK NUMBER TO BE CALLED)
G90G0Z1.M9
M01
M30

N1000(SUB)
G90G0X0Y0
..
..
M99

In conclusion you can have all the subs in the same file but you need to call them with M98 Hxxxx (INSTEAD OF M98 Pxxxx)
and after M30 you can have your subs wich will start with a block number. Something close to what mighty "SINUMERIK" have for years.
Changing your post should not be a big issue for that..

#18 Jeremy Herron@DBS Solutions™

Jeremy Herron@DBS Solutions™

    Advanced Member

  • Members
  • PipPipPip
  • 781 posts
  • Location:Greenville, SC

Posted 08 June 2012 - 11:13 AM

I had not thought of that. Thanks. :thumbsup:

#19 Rob_Bish

Rob_Bish

    Member

  • Members
  • PipPip
  • 90 posts
  • Location:England

Posted 13 June 2012 - 02:15 AM

I to would like to know if this is possible to do. As machine memory is small and we keep the subs on a data server. Accessing when called in running program with a M198. I have already got the subs on the bottom of my main program but this would save a lot of time if I could save the subs to there own files.



Reply to this topic