What's new
What's new

Networking Help Fanuc 21i-TB to PC. Please help.

RevHaus

Plastic
Joined
Oct 31, 2019
Location
Illinois, USA
Good day all,

I am running a Romi M27 lathe.
It's pretty basic, X and Z axis, no turret.
The controller has a port for a memory card, which we use regularly to load and unload programs.
This card port is on the front of the controller, on the left hand side of the display screen.

There is also what appears to be a second port on the side of the controller.
It is a 25 pin port, like one would find on older PCs.

My goal is to network my Fanuc controller to a PC I have near the machine so that I can load and unload programs that way. In looking for the right way to make this happen, I have acquired an adapter device that plugs into the 25 pin port, and adapts it to USB.
I have a cable long enough to reach between the two devices.

I still can't seem to make it work.
It seems like there are some parameters missing from my parameter list, specifically one that would control the Baud Rate, for the information transfer. I think. From what I can gather the parameter would be 103, but it is completely not there. I'm not sure if there is a way I can make it be there, some other parameter that I can change to make it active or not. I guess its possible that I have a port that looks like its real, but doesn't actually have any hardware attached tot he computer inside of the machine controller, thought that seems like a waste of resources.

I'm really not sure how to get this to work, any help would be greatly appreciated.
Thank you in advance for your time and help.
 
There is more to it than just plugging in a RS-232 cable. The pin connections have to be correct. Handshaking between FANUC and PC have to be set.
You may want to talk to Romi or Fanuc and ask them for correct RS-232 pin arrangements. That is the first thing to make sure you have correct.
 
RevHaus -

I have a M17, same control. Here is my experience:

First, I avoid RS-232 wherever possible. You can eventually get it to work but it is always a house of mirrors with cables/switch settings/software settings. USB to RS-232 adapters add another layer of complexity as there is no standard for them and they can introduce other problems. Plugging everything together and you are just beginning... If you've debugged an RS-232 connection this is all annoying but usually solvable, but may require a custom cable, particularly with a USB adapter and a 20 year old UART, you may need to defeat hardware handshaking in the cable, etc. My strategy FWIW is to turn handshaking off (both hardware and software) on both sides, select the slowest BAUD rate like 2400, and see if I can get some bits through. Sometimes it works.

I paid Fanuc to come out and add an Ethernet port (and a memory upgrade.) Wasn't cheap (what is from Fanuc?) but avoided use of the 25 pin cable. Built into the control is support for IP, as well as FTP. The M17 can either be a FTP Server or Client. I share files with the M17 by running a FTP server on the PC (FileZilla) and set the M17 as a client of the PC FTP Server. The M17 can either "get" files or "punch" files to the PC. There are parameters to be set (I/O port, etc.) plus the FTP setup. There are primitive IP tools like "Ping" built into the control so it's not that hard to get an IP connection working.

If you can get the RS-232 port to work, you are likely to need to run FTP as described above (FTP was originally created to run on RS-232.) None of this is required when reading from the memory card.

Hope this makes sense, good luck!

Jon
 
I have a M17, same control. Here is my experience:

First, I avoid RS-232 wherever possible. You can eventually get it to work but it is always a house of mirrors with cables/switch settings/software settings.
Jon

Establishing communication between a Fanuc Control and an external device using RS232 is nowhere near the Black Art you describe it to be. There would be millions of machines world wide using this method.

RevHaus said:
I have acquired an adapter device that plugs into the 25 pin port, and adapts it to USB.
Hello RevHaus,
I assume you have this device connected to the DB25 connector at the control; its not required.

Most PC today aren't supplied with a real Serial Port, only USB and many use a USB to Serial adapter at the PC. This can be a bit problematical as many of these devices don't work with a 64 bit operating system common on PCs today. Accordingly, if your PC doesn't have a real Serial Port, I'd suggest purchase and install an add on Serial Card, for less money than you would likely pay for a USB to Serial adapter.

Once you have a real Serial Port on your PC, the rest is fairly simple.

The quickest method of Handshaking to set up is Software Handshaking and will generally work without a hitch, unless you're contemplating Drip Feeding to the control (DNC). In the majority of cases, Software Handshaking will work without a problem when Drip Feeding, but if there is an issue, changing to Hardware Handshaking will invariably fix the problem.

The cable for Software Handshaking only requires 3 wire. I never trust buying a so called RS232 ready cable off the shelf and any installations I do for clients where they have purchased a cable, I'll remove the Back Shells to ensure that the cable configuration is correct. I always prefer to make my own cable; that way I know the cable configuration is correct. When purchasing cable, specify data cable with a Shield and Trace Wire, containing at least 3 insulated wires.

The cable pin-out for Software Handshaking (Xon Xoff) is as follows:

Machine Side ------------------------------ PC Side
DB25 Male ------------------------------- DB9 Female

1 --- Shield Trace -------------------- Not Connected
2 -------------------------------------------- 2
3 -------------------------------------------- 3
4
| Bridged
5

6
|
8 All Bridged
|
20

7 -------------------------------------------- 5


Control Parameter Settings
Parameter
#0020 =0 (I/O Channel =0)

#0100
Bit 1 = 0

#0101
Bit 0 = 1
Bit 3 = 0
Bit 7 = 1

#0102 = 0 (RS-232C - Use DC1 to DC4 Characters)

#0103 = 11 (9600)(Baud rate)


External Device Software Settings
Handshake Method = Xon Xoff (Software Handshaking)
Data Bits = 7
Stop Bits = 2
Parity = Even
Baud Rate = 9600

Regards,

Bill
 
Keep in mind if you want to do full feature DNC you will want a 5 wire setup instead of the 3 wire used for standard program transfer.
 
Thanks for taking the time to try to help. I really do appreciate it.

SO here you specifically mention one of the main issues I believe that I am having.
The parameter settings you mention is an issue, because I don't seem to have the #0102 & #0103 parameters in the machine.
The baud rate, set by #0103 seems to be the big issue.

That is the confusing part to me. I have a 25 pin port in the machine controller, but those two parameters are not in my parameter page to adjust. Unless they are adjusted or nested in some other parameter and I don't understand that part.

I've included some pictures, to show what I am dealing with.
First the 25 pin port and then the parameter page that has 0100 and the page that comes directly after it that is 0300. M27-1 25 Pin Port.jpgM27-1 Parameter Page 0100.jpgM27-1 Parameter Page 0300.jpg

Are the parameters 0102 and 0103 some of the zero's in that line on the 0100 page?
Is that what I am not understanding?

Thanks again for your help.
 








 
Back
Top