|
9Likes
-
04-01-2012, 01:30 AM
#201
 Originally Posted by dicer
I've had a taste of ladder programming, I just wish Mr, Sinha would write another book, one on ladder logic of fanuc, and other aspects of the fanuc control.
Unfortunately, I am not a ladder expert, though I do have some idea about it, which I did describe in my book, along with interface signals, which can be a starting point. For basics of ladder programming, I recommend the book by John R. Hackworth, published by Pearson Education. Use this book with some PLC simulation software.
I would rather request Angelw to think about publishing a book on Fanuc ladder programming. He not only is the most knowledgeable among us, he also explains well with patience.
I do have another book authored by me, on basic CNC programming. This book is in good demand in India, but presently not available in international market.
-
05-23-2012, 02:24 PM
#202
I figure that I could contribute to the macro thread by sharing this macro I wrote to warm the spindle up on my Mori horizontal in the morning before I get there. Make it the last program to run after everything has ran on the pallet system. Instead of shutting the machine off with APF just leave it on and it will be warmed up ready to go when the opperator gets there. My electrician said at idle, the machine takes no more then powering a 100 watt lightbulb. Besides the savings of having to wait for the machine when it could be making parts.
%
O7000(SPECIFIC TIME TO START WARMUP)
G00G17G20G40G80G90
G91G28Z0
G91G28X0.Y0.
M11(UNLOCK)
G91G28B0.
M10(LOCK)
#520=#3012(CAPTURE TIME ON MACHINE)
#521=053000(TIME TO START WARMUP FORMAT HHMMSS)
#522=073000(TIME TO STOP WARMUP FORMAT HHMMSS)
SETVN520[CAPTTIME]
SETVN521[TIMESTRT]
SETVN522[TIMEFIN]
N10000
WHILE[#520LT#521]DO1
IF[#520GT#521]GOTO20000
#520=#3012
END1
N20000
#520=#3012
IF[#520GT#522]GOTO10000
T10M6(SPINDLE WARM UP)
S1000M3
G4X240.
#520=#3012
S5000
G4X240.
#520=#3012
S10000
G4X240.
#520=#3012
S14000
G4X240.
#520=#3012
#523=#3012
M5
G91G28Z0.
G91G28X0.Y0.
M11(UNLOCK)
G91G28B0.
M10(LOCK)
GOTO10000
M02
%
-
05-23-2012, 03:49 PM
#203
What do you do to make it the last program to run? We have two pallet systems. Do you just set up a job with a low priority?
-
05-24-2012, 08:12 AM
#204
 Originally Posted by huskermcdoogle
What do you do to make it the last program to run? We have two pallet systems. Do you just set up a job with a low priority?
The pallet system assigns what program(s) runs on each pallet. I point each pallet to it's own respective program ie: Pallet 1-Program O0001. On the control side program O0001 would look like this;
O0001(PALLET ONE)
M98 P1000;
M98 P1001;
M98 P7000(IF THIS IS THE LAST PALLET TO BE RAN);
M30
If I know what pallet runs last, I insert the M98 P7000 at the end. You could write a macro to run on every main program for each pallet to find out if it is the last to be ran. There are so many ways that it can be done.
-
05-24-2012, 11:12 AM
#205
Do you have a lpp, cpp, or rpp system? I can't really do it that way... I have an LPP LPS System, which is scheduled based on job and not the specific pallet. Anyway, I can think of a few ways to do it just using a very low priority job and a dummy pallet. When the operator goes home at night they just need to run the "warm up job" and it will go in after everything runs out.
Thanks for the idea.
Husker
-
05-29-2012, 09:56 AM
#206
 Originally Posted by huskermcdoogle
Do you have a lpp, cpp, or rpp system? I can't really do it that way... I have an LPP LPS System, which is scheduled based on job and not the specific pallet. Anyway, I can think of a few ways to do it just using a very low priority job and a dummy pallet. When the operator goes home at night they just need to run the "warm up job" and it will go in after everything runs out.
Thanks for the idea.
Husker
We have a CPP. I like the idea of a dummy pallet, if its available.
-
07-11-2012, 11:04 AM
#207
a workaround?
 Originally Posted by dicer
That is the whole problem. I do not want to run a program with in a program.
I know the M98P deal well. It flat will not work for these jobs. As it is far too much trouble. In all Fanuc controls, if it is in a sub program, and you push that friendly RESET button, then you are poof back to the main program. We do mostly castings. And have to add an M00 to stop it, and
CHECK FOR CLEAN UP. Well if it aint cleaned up. Then you hit the friendly reset button. And page or scroll to the starting point of that tool.
Its just too much stinking trouble to hunt through the main program and sub program crap to get to the start point. Especially for some of the people that run the machines.
dicer:
Since you're then at an M00, will the machine allow you to choose Edit mode and search back to the previous process/tool WITHOUT pressing the Reset button? I typically program a "process number" instead of using a sequence number on each line, for example N80 (FACING OPERATION) then follow with toolchange, spindle start etc. If the machine will allow you to choose Edit mode, searching backward to N80, changing the tool offset or workshift a bit, then Auto again...
Now, you're a sharp guy, so likely you've already thought of that (and found the machine won't allow it or you'd be doing just that) but here's another thought... what about a /GOTO80 immediately after the M00? If all is well after the inspection following the M00, turn on block skip, Cycle Start, then maybe turn it back off for the next part... if the part needs more machining in that operation, make the necessary adjustments (assuming that your machine parameters are set to immediately act upon offset changes) start the cycle again with the block skip off and it will immediately branch back to N80 for another run at it and subsequent M00 & inspection...
.
.
N80(FACING OP)
T4M6
M3S1000
.
.
M00
/GOTO80
N90(SOME OTHER OP)
It's a workaround, I know, and I agree with you that it seems like there would be a way to choose a new main program, but I am not aware of it if there is.
-
08-08-2012, 04:30 AM
#208
-
09-01-2012, 01:11 AM
#209
Yeah I know about that stuff. But reset will still be hit at some point. The main thing here is keep it simple. We just do the combine the 2 programs deal. Or a manual change at pallet time. It just seems very stupid for an automatic state of the art control and machine. So how do the Cells do it?
Mazak I ran 3 years ago, got the program deleted and a new one at pallet change time. How does that work? If I win the next powerball, I will have the bucks to have a fancy machine just to play with. And figure stuff like this out. I'm sure its beyond ladder logic, and more operating system stuff.
Maybe a few push, mov, pop,in, out etc.s and you got it. I have not found anyone that knows anything about it.
-
09-01-2012, 08:11 PM
#210
There are a few ways of doing it dicer. The cell controller may remote the machine and load the program. There may be an RFID tag on the pallet that triggers the machine PLC to do it's thing with the NC. There may be a third party controller doing all of it..... it really depends.
-
10-05-2012, 01:53 AM
#211
 Originally Posted by Tonytn36
Now we add our logic and math for multiple passes
N10 G0 X-2. Y-.5
G1 Z#504 F40
G1 X5. F30
G1 Y1
G1 X-1.
G1 Y2.5
G1 X5.
G1 Y3.5
G1 X-1
G0 Z1.
IF [#504 GE #501] GOTO 999 (Here we jump out to end program if our depth is greater than or equal to our desired depth)
#504 = [#504-#503] (Here we subtract our step)
GOTO 10 (Here we jump back to the beginning and make a cut)
N999 M30
Hi
Very new to parametric programs. We have Vertical MC with Siemens 802d sl control. I have done a couple of sub-routine programs with L_ _ _ P_.
With reference to your above nice and simple explanation, I tried to create a simple slot with parametric program as below. But I think, I am missing something very basic in logic. The program runs but in stead of giving each cut depth as 0.67 it gives 2.01...4.02 and so on. It also doesn't come out of loop after z = -6.7.
What am I missing here? I want to go from z=0 to z=-6.7 in each depth of cut as 0.67mm.
Thanks in advance for any help & suggestions.
N10 D0
N20 G0G90G53Z0
N30 T10;END MILL 14MM
N40 D01
N50 M06
N60 M08
N70 G0G90G54X-10Y-59.48M03S2500
N80 R1=-0.67 R2=-6.7
N90 G00Z0
N100 SLOT:
N110 G91G01 Z=R1 F500
N120 G90G01X75F400
N130 G0Y-70.52
N140 G01X-10F400
N150 G0Y-59.48
N160 R1=R1-0.67
N170 IF R1 >= R2 GOTOB SLOT
N180 G00Z100
N190 M09
N200 M05
N210 G75Z0Y0
N220 M30
-
10-05-2012, 02:37 AM
#212
Take out the G91 on N110. You are making R1 more negative at each loop, then incrementing down that ever increasing distance.
-
10-05-2012, 04:58 AM
#213
 Originally Posted by Tonytn36
Take out the G91 on N110.
Bingo.
It worked perfectly. Thank you for your prompt reply. Now , I can think of trying some more like these with increasing complexity.
-
10-17-2012, 09:20 AM
#214
somehow Toyoda is doing it...
 Originally Posted by dicer
Yeah I know about that stuff. But reset will still be hit at some point. The main thing here is keep it simple. We just do the combine the 2 programs deal. Or a manual change at pallet time. It just seems very stupid for an automatic state of the art control and machine. So how do the Cells do it?
Mazak I ran 3 years ago, got the program deleted and a new one at pallet change time. How does that work? If I win the next powerball, I will have the bucks to have a fancy machine just to play with. And figure stuff like this out. I'm sure its beyond ladder logic, and more operating system stuff.
Maybe a few push, mov, pop,in, out etc.s and you got it. I have not found anyone that knows anything about it.
dicer-
We just got a new 630 Toyoda, they have something called Operation Supporter, it has the ability to handle the Pallet Changer, when it is in Auto (not the same as the old Fanuc Auto, it is relabeled Memory now) mode, or Auto-Cycle as we refer to it to avoid confusion, it somehow flags the appropriate program as the main program. I wish I knew how it is doing it, I am currently researching this for you... this machine DOES have the C Language Executor, perhaps it is being done through that. The control is a 31iMA and it is far and away the best Fanuc I have ever used, it is leaps and bounds better than the 30i... But I digress, I will keep on this, you have definitely piqued my interest. Honestly the Op supporter is doing us almost no good because Toyoda set it up such that if you hit the Reset button or even switch out of Auto-Cycle so that you can open the door to clear chips, etc. it interrupts the Auto-Cycle and you have to finish the part out of Auto-Cycle and go through the process of re-initiating it again. The good news is, since it has correctly identified and called the correct MAIN program, you're where you want to be to start again.
If I can figure out how Toyoda is doing this, I will imitate it and create my own version of the Auto-Cycle that will allow us to open the door when at an M0 or M1. Of course, I will let you know how they're doing it... for a nominal fee... Just kidding!! I love that these forums exist, let's strengthen America's manufacturing base by helping each other succeed, shall we?
-Gary
-
11-12-2012, 03:47 PM
#215
Im trying to write my own trochoidal milling macro so i can mill slots in x axis (for now) and thought i'd post my initial (and currently unproven) attempt for others to peruse and comment on.
%
O8010 (TROCHOIDAL SLOT IN X)
#100=20.0 (CUTTER DIAMETER)
#101=34.0 (WIDTH OF SLOT)
#102=-0.1 (ABSOLUTE DEPTH OF SLOT)
#103=0.25 (TOTAL MATERIAL TO LEAVE IN WIDTH OF SLOT)
#104=80.0 (ABS START POS IN X)
#105=0 (ABS FINISH OF SLOT IN X)
#106=-32.5 (ABSOLUTE CENTER OF SLOT IN Y AXIS)
#107=0.25 (CUTTER STEPOVER DURING CYCLE)
#108=#101-#103 (CALCULATE MACHINED WIDTH OF SLOT)
#109=[#108-#100]/2 (CALCULATE RADIAL MOVEMENT TO EXECUTE)
#110=#104+#109 (CALCULATE ACTUAL START POSITION OF SLOT)
#111=#110 (SETS VARIABLE #111 TO INITIALISING POSITION)
N10 G0 G90 X#110. Y-#106
N20 Z#102
N30 WHILE [#111 LT #105] DO END
N40 #111=#111-#107
N50 G1G90X#111 F2000
N60 G1 G91 Y#109
N70 G3 Y-#109*2 R#109
N80 G1Y#109 F10000
N90 END
G0 G90 Z10.
M99
%
-
11-12-2012, 11:02 PM
#216
The syntax of WHILE statement is
WHILE [<a conditional expression>] DO n;
...
...
<program blocks within the loop>
...
...
END n;
where n can be 1, 2 or 3
-
11-13-2012, 03:26 PM
#217
thanks sinha
so is this better ?
(sorry not programmed macro b in about 15 years - im kinda rusty)
N10 G0 G90 X#110. Y-#106
N20 Z#102
N30 WHILE [#111 LT #105] DO 1
N40 #111=#111-#107
N50 G1G90X#111 F2000
N60 G1 G91 Y#109
N70 G3 Y-#109*2 R#109
N80 G1Y#109 F10000
N90 END 1
G0 G90 Z10.
-
11-13-2012, 07:29 PM
#218
There appears to be mistake in logic.
Check the simulation, and see if you get the desired toolpath.
A general suggestion:
1. Make a drawing
2. Show the coordinate system
3. Show dimensions in terms of chosen variables
4. Now trace the toolpath
Jumping directly to step-4 might take more time in debugging
-
11-19-2012, 06:27 PM
#219
Sinha I got your book CNC Programming in the mail started reading it.I have no experience with Macros I need your help with my first one.I drill grease holes 7.7 deep with .100 pecks and rapid out to Z.5 to clear chips and get coolant back in the hole between pecks.Fanuc controller FS Oit/21T.I checked today and it is Macro capable.Puma and Lynx lathes. Thanks rnmmhunter.
-
11-20-2012, 05:35 AM
#220
Use G83. No macro is required.
G90 G83 G99 X_ Y_ Z-7.7 Q.1 R.5 F_; (first hole)
X_ Y_; (next hole)
X_ Y_; etc.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Bookmarks