![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I am trying to interface an RS232 controlled device to a CNC mill with a Fanuc 21i control. The object is to send the tool number out the RS232 port via DPRNT command. This method has worked in the past very well in machines with a tool changer macro- just add the DPRNT sequence to the end of the macro. Unfortunately, this machine (and others) doesn't have an ATC macro. My current approach is to create a macro to "hijack" the M06 and add the DPRNT on after- like this: Param 6080=6 (point M06 at macro O9020) Param 6001 #1 =0 (force leading zeros) O9020; M06; POPEN; DPRNT[T#4120[20]]; PCLOS; M99; This works, but ONLY if the T-code is in a block by itself, followed by the M06 in a separtate block: T15; M06; etc; If the M06 follows the T in the same block T15 M06; the control displays an error (something about a T-command- didn't write it down) and stops running. I would like to find a way to execute this DPRNT with any M06 presented in any format the control will accept it; ie, transparent to the user or programmer. Any thoughts? Marc |
|
#3
| |||
| |||
| Dcoupar- Thanks for the quick reply! I have tried something simaler in the past- O9020; M06 T#20; POPEN; etc; But if I recall, this only worked with the format M06 Txx; The "Txx" was passed on as a variable (T= #20) and worked that way. Somehow, the T code is handled in a different way in the ATC logic- ladder, maybe? My last go-round with this issue was with a Robodrill- I wound up using a "stand alone" M function macro that just did the DPRNT function; the programmer had to insert the additional M code after each tool change. PS- Do you happen to know what param 9933 bit 7 does exactly? It seems to affect the operability of the DPRNT command. Thanks again, and appreciate any more info you can provide! Marc |
|
#4
| |||
| |||
| Finally found the solution to my problem! Param 9070 = 6 O9001 M6; POPEN; DPRNT[T#4120[20]]; PCLOS; M99; This seems to work with the Txx M06 in any order that the control accepts. This uses a SUBPROGRAM called by M-function instead of a macro called by M function. Now: Can anyone explain why one approach works while the other one doesn't? The Fanuc books I have access to are "unclear" on this point. Thanks! |
![]() |
| 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 |
| custom macro question | sinha_nsit | G-Code Programing | 28 | 04-18-2009 06:44 AM |
| Macro B Question | Bluetech | Fanuc | 7 | 03-10-2009 12:58 AM |
| Convert Fanuc Macro to Fadal Macro | bfoster59 | Fadal | 1 | 11-08-2007 11:41 PM |
| Noob Drill Grid Pattern Macro Question | KOzOK | Fadal | 8 | 01-08-2007 09:11 AM |