What's new
What's new

Fanuc 21i-T: Calling subprogram from PCMCIA card

Jaanyaar

Plastic
Joined
Aug 19, 2016
Hello all!

Due to low capacity of the machine control memory, First, I thought about running programs via DNC (RS232 or PCMCIA).

The machine has no mode/switch for DNC/Remote/Tape and my old topic on it stayed without any answer.

Then, I thought about calling subprograms from the external device, PCMCIA card. But unfortunately I have not had any success so far: What I've done:

I/O channel = 4
138: Bit 7=1
3404: Bit 2 =1
3030 = 3 (3 digit)

Main program:
%
O1000;
M198P2000;
M30;
%


Subprogram:

%
O2000;
T0404;
G0Z100.X100.;
M99;
%

But when I run the main program, control stops without any alarm on the line: M198P2000;

It is a 16 MB CF card that I can read and punch files. And according to my another thread, it seems the control doesn't have Macro B feature. Please help me out.
 
Last edited:

Freedommachine

Stainless
Joined
May 13, 2020
Will the main program run from the card? Or does it need to be stored in machine memory?

How old is the 21-i?
I run a (edit: 31-i) and it's from 2012. I will admit, Fanuc model nomenclature has never made any sense to me. I just run them.

I pull programs from the DNC and store them in machine memory. Mains and subs are always in the same [User] folder.

I have an M code macro for setting TSC coolant pressure (M108). The control quit responding to M108 commands one day.

Turns out during a back up, that (write protected) macro got moved to a different folder. When the control went looking for it, it wasn't there.

I moved it back to the folder with all of the other write protected programs and everything has been great since. Took me forever to figure that out though.
 
Last edited:

Jaanyaar

Plastic
Joined
Aug 19, 2016
Will the main program run from the card? Or does it need to be stored in machine memory?

How old is the 21-i?
I run a 15-i and it's from 2012. I will admit, Fanuc model nomenclature has never made any sense to me. I just run them.

I pull programs from the DNC and store them in machine memory. Mains and subs are always in the same [User] folder.

I have an M code macro for setting TSC coolant pressure (M108). The control quit responding to M108 commands one day.

Turns out during a back up, that (write protected) macro got moved to a different folder. When the control went looking for it, it wasn't there.

I moved it back to the folder with all of the other write protected programs and everything has been great since. Took me forever to figure that out though.
I can't run programs directly from PCMCIA card, so I've to run the main program from the control memory. Suprogram is on the external card.

It is a 2000 year Fanuc 21i-T, on a Tornado A90 lathe.
 
Last edited:

Freedommachine

Stainless
Joined
May 13, 2020
I can't run programs directly from PCMCIA card, so I've to run the main program from the control memory. Suprogram is on the external card.

It is a 2000 year Fanuc 21i-T, on a Tornado A90 lathe.

If the control will not run a main program from the card, it likely won't run the sub from it either.
 

Jaanyaar

Plastic
Joined
Aug 19, 2016
If the control will not run a main program from the card, it likely won't run the sub from it either.
I've been told by @angelw in my other thread that it is possible to run main program from the CNC memory and calling a subprogram stored on the card.

As I told in the OP, control stops on the red line without any error, cycle start button turns on with green color. Nothing continues...
 

Freedommachine

Stainless
Joined
May 13, 2020
Here is a thread that might be helpful to you, that about the best I can offer.


I have all of the books for 150i-M and 31i-model A.

I can look something up if you need me to but idk if any of it would be applicable to your machine.
 

Brian285

Plastic
Joined
Jun 24, 2022
When I’ve done it the syntax for calling the program is :

M198 <Oxxxx.NC>

Letter ‘O’ followed by ‘xxxx’ is a 4 digit number. The file needs to be saved as that name, as a ‘.NC’ extension. The carrots, the ‘<>’, are part of the needed syntax. The file needs to be on the disk and not in a folder. There may be a way to specify the folder, but I personally have never done that.

IIRC, I/O channel is 17, at least for the machines I used.
There were one or two parameters I had to change, but I don’t remember off hand. A google search will help you, that’s how I found the info.
 

sinha

Titanium
Joined
Sep 25, 2010
Location
india
These instructions seem to be valid for 3404: Bit 2 =0

If TAPE mode is not available on MOP, try software operator panel.
 

tomgaasenbeek

Plastic
Joined
Apr 3, 2009
Location
Burlington, Ontario
Hello all!

Due to low capacity of the machine control memory, First, I thought about running programs via DNC (RS232 or PCMCIA).

The machine has no mode/switch for DNC/Remote/Tape and my old topic on it stayed without any answer.

Then, I thought about calling subprograms from the external device, PCMCIA card. But unfortunately I have not had any success so far: What I've done:

I/O channel = 4
138: Bit 7=1
3404: Bit 2 =1
3030 = 3 (3 digit)

Main program:
%
O1000;
M198P2000;
M30;
%


Subprogram:

%
O2000;
T0404;
G0Z100.X100.;
M99;
%

But when I run the main program, control stops without any alarm on the line: M198P2000;

It is a 16 MB CF card that I can read and punch files. And according to my another thread, it seems the control doesn't have Macro B feature. Please help me out.
You need to set the I/O device in P102 from a normal "0" (for RS-232 with DC codes) to a "3" for Fanuc Floppy Cassette - then the M198 subprogram call will work well.

We make a embedded DNC device that has this functionality built in call the the ORiON Production Interface (or OPI) at Nexas (www.nexasnet.com) - so we a trying to promote the use of M198 as it is a great under-utilized feature. The benefit of using our device is that one has network access to the files to be called - so it is perfect for pallet systems, and continous machining operations where you have no time to reload the PCMCIA card.

In your example above make sure the O2000 is on the PCMCIA card, of course. Also check P6030=0 (or 198) & P3404.2 = 1 to allow the M198P to call a filename (rather than a file number). By the way, I like having P100.5 (ND3) on for better throughput in dripfeed mode.

Finally, my manual doesn't have P138 - so I am not sure what you are setting with the one you have mentioned above.
Anyway, I hope this helps - I/O Device set to Floppy Cassette (type "3") is the key to M198.

Cheers,
Tom Gaasenbeek
Nexas Network Inc.
[email protected]
 








 
Top