Feature Request

NCPlot questions or comments

Feature Request

Postby Matt Hajicek » Tue Jul 25, 2006 6:41 pm

How about a "Renumber Subroutines" function?

-Matt
User avatar
Matt Hajicek
 
Posts: 14
Joined: Tue Jul 25, 2006 5:54 pm
Location: Minneapolis, MN

Postby scottmartinez » Tue Jul 25, 2006 7:36 pm

Matt, you'll need to explain to me how you would want this to work.

Thanks,
Scott
User avatar
scottmartinez
Site Admin
 
Posts: 215
Joined: Sat Mar 11, 2006 8:49 pm

Postby Matt Hajicek » Wed Jul 26, 2006 11:50 am

I've been able to get Mastercam to generate a fair number of subroutines, but I still need to make a few manually. This means that I get out of order subroutine program numbers, which I expect could confuse the machine operator. Also, the auto-generated subs always use O0001 and O1001 as the first sub and nested sub numbers, but I would like to make them start at some arbitrary number so that subs for various programs could be in the same machine at the same time without conflicting or confusing the operator. The solution, I think, would be to have a function which would identify all of the subroutine O numbers and their respective M98 calls, and renumber them according to a set of user-defined rules. Options would include: Starting O#, Increment by#, Order by sub call in main vs. Order by sub listing outside of main vs. Order by run sequence (differs from call in main when subs are nested). Perhaps there would be rules for incrementing a different digit for nested subs as well. This might be a little overkill for most applications, but I like to design for the general case and include as many forseeable options as possible. For my personal purposes it would be sufficient to simply pick a starting number and increment by one in the order in which subs are encountered during run.

Thanks,

-Matt
User avatar
Matt Hajicek
 
Posts: 14
Joined: Tue Jul 25, 2006 5:54 pm
Location: Minneapolis, MN

Postby Matt Hajicek » Wed Jul 26, 2006 11:51 am

P.S.

Scott, you don't have an avatar on your own forum?

-M
User avatar
Matt Hajicek
 
Posts: 14
Joined: Tue Jul 25, 2006 5:54 pm
Location: Minneapolis, MN

Postby scottmartinez » Wed Jul 26, 2006 1:13 pm

OK, I think I understand what you are after. You would like to allow resequencing the progam numbers separately from the block numbers. I will look at this a little more closely to see how difficult this would be.

PS. I haven't had time to make a good avatar yet. I'll make this my top priority. :D

Thanks,
Scott
User avatar
scottmartinez
Site Admin
 
Posts: 215
Joined: Sat Mar 11, 2006 8:49 pm

Postby Matt Hajicek » Wed Jul 26, 2006 1:44 pm

Since you obviousely have so much time on your hands, here are a couple more things to think about:

Color backplot by subroutine - Assign a color to the main and to each sub, possibly adjusting brightness or hue for each itteration of said sub.

External programmable indexer support - I use a lot of these here. The indexer has a program that tells it how far and how fast to rotate in what direction for each line, and it will excecute one line very time the main CNC machine ecounters a specific M code (M70 for one of our machines) While definately not as good as a true 4th axis, they can be added or removed for each setup on just about any machine, even if the machine has no 4th axis controller. This would be a "frosting on the cake" feature, since I can get by with having the corresponding A moves in the code and the commenting them out or deleting them after backplotting.
User avatar
Matt Hajicek
 
Posts: 14
Joined: Tue Jul 25, 2006 5:54 pm
Location: Minneapolis, MN

Postby Matt Hajicek » Wed Jul 26, 2006 2:08 pm

Here's another one (let me know if I'm starting to bug you):

Instead of having the Play and Pause buttons side-by-side, have Play turn into Pause when playing, and back to Play when paused or stopped. This would allow better user control, since the mouse won't have to move between start and stop ckicks.

-M
User avatar
Matt Hajicek
 
Posts: 14
Joined: Tue Jul 25, 2006 5:54 pm
Location: Minneapolis, MN

Postby Matt Hajicek » Wed Jul 26, 2006 3:35 pm

More:

Add more work offsets: G54.1P1, G54.1P2, etc.

Check for when the program file has been changed by another program. Example: I use a program called "Beyond Compare" to merge programs that have overlap. If I switch to my text editor and change one of the files, then when I switch back Beyond Compare pops up a window saying "Files changed on disk. Reload? <YES> <NO>"
User avatar
Matt Hajicek
 
Posts: 14
Joined: Tue Jul 25, 2006 5:54 pm
Location: Minneapolis, MN

Postby scottmartinez » Wed Jul 26, 2006 5:03 pm

Hi Matt,

These are all good suggestions and I will add them to the list.

The good news is that NCPlot already supports extended work offsets G54.1P1 through G54.1P300. There isn't a page on the machine configuration for setting these, the variables must either be set in the program or manually on the expression calculator.

Thanks,
Scott
User avatar
scottmartinez
Site Admin
 
Posts: 215
Joined: Sat Mar 11, 2006 8:49 pm

Postby Matt Hajicek » Wed Jul 26, 2006 5:53 pm

Yup, I added:
G10L20P1X-4.51144Y0Z0A0(SET G54.1P1)
to the start of my code, and it worked perfectly.
User avatar
Matt Hajicek
 
Posts: 14
Joined: Tue Jul 25, 2006 5:54 pm
Location: Minneapolis, MN

Postby Matt Hajicek » Wed Jul 26, 2006 5:56 pm

Or maybe I spoke too soon. How would you do it?
User avatar
Matt Hajicek
 
Posts: 14
Joined: Tue Jul 25, 2006 5:54 pm
Location: Minneapolis, MN

Postby scottmartinez » Wed Jul 26, 2006 7:03 pm

Yep, you spoke too soon. There's currently no support for G10, so you need to set the offset system variables directly:

#7001 - #7948 Extended work offsets P1 - P48
#14001 - #19984 Extended work offsets P1 - P300

#7001=-4.5114 (G54.1 P1 X)
#7002=0 (G54.1 P1 Y)
#7003=0 (G54.1 P1 Z)
#7004=0 (G54.1 P1 4)
#7021=123. (G54.1 P2 X)
etc..

#14001=-4.5114 (G54.1 P1 X)
#14002=0 (G54.1 P1 Y)
#14003=0 (G54.1 P1 Z)
#14004=0 (G54.1 P1 4)
#14021=0 (G54.1 P2 X)
etc..

For offsets P1 to P48 you can assign the variables in either range, above that you must use the #14000 range variables.

Thanks,
Scott
User avatar
scottmartinez
Site Admin
 
Posts: 215
Joined: Sat Mar 11, 2006 8:49 pm

Re: Feature Request

Postby Matt Hajicek » Wed Jul 18, 2012 11:50 am

Scott,

Long time no post, but NcPlot has been serving me well. Could you add a feature to handle G53 work offset shift? The standard where I'm working now is for G53 adjusted machine Z0 in the horizontals to be at the bottom of the stock instead of at the center of tombstone rotation, the latter being what NcPlot is simulating. With G53 I could put in a value for the distance from the center of rotation to the bottom of the stock and make the picture look right.

I'm also wondering if you could implement G10 offset setting. While the current method works fine for many applications, I'm trying to use completely variable controlled inputs:


(CALCULATE FORCE X CENTER)
#197=[#161-[#154/4.]-[#150/2.]]

(CALCULATE FORCE Y CENTER)
#198=[#162+[#154/4.]+[#151/2.]+#164]

(CALCULATE FORCE Z0)
#199=[#155-#159]

(WORKSET FORCE 1)
G10L20P[#160]X[#197]Y[#198]Z[#199]B0

(WORKSET FORCE 2)
G10L20P[[#160]+1.]X[#197]Y[#198]Z[#199]B90.

(WORKSET FORCE 3)
G10L20P[[#160]+2.]X[#197]Y[#198]Z[#199]B180.

(WORKSET FORCE 4)
G10L20P[[#160]+3.]X[#197]Y[#198]Z[#199]B270.

(CALCULATE CAVITY X CENTER)
#197=[#161-[#154/4.]-[#152/2.]]

(CALCULATE CAVITY Y CENTER)
#198=[#163-[#154/4.]-[#153/2.]-#164]

(CALCULATE CAVITY Z0)
#199=[#157-#159]

(WORKSET CAVITY 1)
G10L20P[[#160]+4.]X[#197]Y[#198]Z[#199]B0

(WORKSET CAVITY 2)
G10L20P[[#160]+5.]X[#197]Y[#198]Z[#199]B90.

(WORKSET CAVITY 3)
G10L20P[[#160]+6.]X[#197]Y[#198]Z[#199]B180.

(WORKSET CAVITY 4)
G10L20P[[#160]+7.]X[#197]Y[#198]Z[#199]B270.


Thanks,

-Matt
User avatar
Matt Hajicek
 
Posts: 14
Joined: Tue Jul 25, 2006 5:54 pm
Location: Minneapolis, MN

Re: Feature Request

Postby scottmartinez » Wed Jul 18, 2012 12:08 pm

Matt,

I'll have to look into the G53 shift, but I do have a macro that adds G10 functionality. Just copy/paste this into a file called "G100.PRG" and drop it into your configuration folder. Then go into your machine configuration and add G10 to the g-code macro list.

Thanks,
Scott

(G10 FOR MILL)
(G10 L2 P_ X_ Y_ Z_)
(G10 L#12 P#16 X#24 Y#25 Z#26)

IF [#4203 EQ 90] GOTO 200

N100 (INCREMENTAL SHIFT)
IF [#24 EQ #0] THEN #24=0
IF [#25 EQ #0] THEN #25=0
IF [#26 EQ #0] THEN #26=0

IF [#12 NE 2] GOTO 300
IF [#16 EQ 1] GOTO 110
IF [#16 EQ 2] GOTO 120
IF [#16 EQ 3] GOTO 130
IF [#16 EQ 4] GOTO 140
IF [#16 EQ 5] GOTO 150
IF [#16 EQ 6] GOTO 160
GOTO 400
N110 (G54)
#5221=#5221+#24
#5222=#5222+#25
#5223=#5223+#26
GOTO 300
N120 (G55)
#5241=#5241+#24
#5242=#5242+#25
#5243=#5243+#26
GOTO 300
N130 (G56)
#5261=#5261+#24
#5262=#5262+#25
#5263=#5263+#26
GOTO 300
N140 (G57)
#5281=#5281+#24
#5282=#5282+#25
#5283=#5283+#26
GOTO 300
N150 (G58)
#5301=#5301+#24
#5302=#5302+#25
#5303=#5303+#26
GOTO 300
N160 (G59)
#5321=#5321+#24
#5322=#5322+#25
#5323=#5323+#26
GOTO 300


N200 (ABSOLUTE SHIFT)

IF [#12 NE 2] GOTO 300
IF [#16 EQ 1] GOTO 210
IF [#16 EQ 2] GOTO 220
IF [#16 EQ 3] GOTO 230
IF [#16 EQ 4] GOTO 240
IF [#16 EQ 5] GOTO 250
IF [#16 EQ 6] GOTO 260
GOTO 400
N210 (G54)
IF [#24 NE #0] THEN #5221=#24
IF [#25 NE #0] THEN #5222=#25
IF [#26 NE #0] THEN #5223=#26
GOTO 300
N220 (G55)
IF [#24 NE #0] THEN #5241=#24
IF [#25 NE #0] THEN #5242=#25
IF [#26 NE #0] THEN #5243=#26
GOTO 300
N230 (G56)
IF [#24 NE #0] THEN #5261=#24
IF [#25 NE #0] THEN #5262=#25
IF [#26 NE #0] THEN #5263=#26
GOTO 300
N240 (G57)
IF [#24 NE #0] THEN #5281=#24
IF [#25 NE #0] THEN #5282=#25
IF [#26 NE #0] THEN #5283=#26
GOTO 300
N250 (G58)
IF [#24 NE #0] THEN #5301=#24
IF [#25 NE #0] THEN #5302=#25
IF [#26 NE #0] THEN #5303=#26
GOTO 300
N260 (G59)
IF [#24 NE #0] THEN #5321=#24
IF [#25 NE #0] THEN #5322=#25
IF [#26 NE #0] THEN #5323=#26
GOTO 300
N300 M99

N400 #3000=3000 (WHICH WORK OFFSET DO YOU WISH TO CHANGE)
User avatar
scottmartinez
Site Admin
 
Posts: 215
Joined: Sat Mar 11, 2006 8:49 pm

Re: Feature Request

Postby Matt Hajicek » Wed Jul 18, 2012 12:27 pm

Nice, I'll give it a try!

Thanks!
User avatar
Matt Hajicek
 
Posts: 14
Joined: Tue Jul 25, 2006 5:54 pm
Location: Minneapolis, MN

Next

Return to Questions / Comments

Who is online

Users browsing this forum: Bing [Bot] and 6 guests

cron