![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Parametric Programing (custom macro b, fadal macro, okuma user task) |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| ||||
| ||||
I have a macro I wrote in Fanuc Macro B (& converted to okuma) and need to convert it to a Hiedenhain TNC426 control now. I see the use of the FN0: to FN?: to declare the variables or math operation. Is it possible to combine different math operations ?. FN0: Q20=-8.5;CENTER OF PORT ON X-AXIS FROM TOUCH OFF POINT FN1: Q29=Q29+Q26;STEP DOWN COUNTER FN?: Q38=Q22/2-Q30-Q35 FN?: Q32=Q25-[.5*Q25] IF [[Q38]GT[Q23/2-Q30]] GOTO N1000 ??????? Also where can I find more info on Q parameter programming, the manuals from the machine are rather basic. Thanks, Ed |
|
#2
| ||||
| ||||
| As I recall the older controls were pretty basic 'one function at a time' affairs (but the ANG and LEN functions made applying trig easier). The newer controls (white screen display, qwerty keypad, don't know the numbers) are a lot better, being able to write whole formulas out on one line. I think you GOTO a LBL rather than a line number, and that's where it may get confusing, I don't know whether there a need to close the LBLs or not... DP |
|
#3
| |||
| |||
| actually you don't need to use FN (functions) to declare vairable or math functions . using FN to do these things is to prevent mistakes in syntax so if you use FN1 noboby can make a change to multiply. So you can write your code like this Q20=-8.5;CENTER OF PORT ON X-AXIS FROM TOUCH OFF POINT Q29=Q29+Q26;STEP DOWN COUNTER Q38=Q22/2-Q30-Q35 Q32=Q25-(.5*Q25) Q33= Q23/2-Q30 ; FN 11: IF Q38 GT Q33 GOTO LBL 10 in your code you would need to put LBL 10 as the jump to location I'm assuming you're looking at the Heidenhain control manuals. If you have other questions ask... |
|
#4
| |||
| |||
| Hey Ed, Just a question, and not intending to confuse you, but is your heidenhain file in ISO or conversational format? if you're in ISO then your code would look like this: Q20=-8.5;CENTER OF PORT ON X-AXIS FROM TOUCH OFF POINT G98L10;or where ever you want this line label to be... Q29=Q29+Q26;STEP DOWN COUNTER Q38=Q22/2-Q30-Q35 Q32=Q25-(.5*Q25) Q33= Q23/2-Q30 ; D11 P01+Q38 P02+Q33 P03+10 Personally I always found macro easier in ISO mode, but whatever suits your fancy... If you'd like a few examples of a bit more advanced macro's in ISO, I can send you some files I've used at work... Let me know. Al. |
|
#5
| |||
| |||
| Another thought, if you'd like email me your file to be converted and I'll do it for you, with side notes etc. so you can see the changes and how the occur. Some times this can be a good way to learn. I have a 426 at work, and I do the converting back and forth between the 426, a fanuc15m and a fanuc18m. Not to bad to do, once you get the hang of it... I've got a large NPT milling file I use on both the 426 and fanuc's. Same mathematical functions, perform the same on 426 and fanuc's, interested? Al |
| Sponsored Links |
|
#6
| ||||
| ||||
| Thanks guys, I loaded the program & tried to run it & had a few errors. IF [[Q38]GT[Q23/2-Q30]] GOTO N1000 had to change the calc in the if loop to a variable Q41=Q23/2-Q30 ; FN 11: IF Q38 GT Q41 GOTO LBL 10 to get the loop to work. Thanks Hansdie I was wondering about the FN? commands whether they were required or not. The machine manual shows them & I found a couple of very basic examples on the net that did not use them, so wasn't sure. Hi Al, we're running the controls in conversational a 426 & a 530 control. I understand they can be ran in ISO also but I haven't had time to sit down & read the manuals let alone mess around on the controls, far to busy on the floor, earn while learn. Is it possible to mix & match the two ?. Ya I'd love some examples in ISO or EIA & the NPT macro, that would be great. I've wrote some Macro B programs in the past (fairly basic prog's) for family of parts with the help of Peter Smids book "Fanuc Custom Macros" excellent resource. So why is there not a forum for the Heidenhain controls like Fanuc, etc. I'm new to these controls, but am liking them the more I get in to it. Thanks for your info gents, Ed |
|
#7
| |||
| |||
| you can't mix g-code with Heidenhain clear-code within the same program but you can use PGM CALL to call a g-code pgm or Heidenhain pgm. also unless you have a good reason to use g-code just use Heidenhain code it's more powerful than the g-code, especially if you're using tables and touch probe cycles. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Parameter for: HEIDENHAIN TNC 407 B | elhosseiny | G-Code Programing | 2 | 08-22-2009 02:49 AM |
| g65 macro parameter | firecat69 | General Metal Working Machines | 0 | 05-24-2007 08:50 AM |