586,100 active members*
3,089 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > Trouble Dowloading from PC to FANUC
Page 1 of 2 12
Results 1 to 20 of 35
  1. #1
    Join Date
    Feb 2015
    Posts
    21

    Trouble Dowloading from PC to FANUC

    I recently acquired a knee-mill with a FANUC OM control. I've been working through a few issues with this older machine, and the latest is getting it to accept programs uploaded (downloaded?) from a PC to the controller. Trawling the net there's a lot of information on the topic, but some of it is conflicting. Here's what I have done.

    The parameters which I believe are relevant are as follows:

    TVON = 0
    ISO = 1
    I/0 = 2
    TAPEF = 0

    0002 = 1000 0001
    0050 = 1000 1101
    0038 = 1001 0000
    0552 = 10
    0253 = 0

    I assume that these last two are in base-10, not binary, although how/why the controller makes this distinction is a mystery to me.

    I am using Tera Term with the following settings

    COM1
    4800 baud
    7 bit data
    Even parity
    2 bits stop
    Xon/Xoff flow control.

    To accept a program from the PC, I hit the PRGRM button, then the I/O soft key, then the READ softkey. The CRT flashes LSK, then I go to Tera Term and say "send file...". It continues to flash LSK and nothing seems to happen. The program protect key is turned to off.

    At the moment, I think the most likely source of the problem is my cable. I had a couple of straight-through cables and some prototyping boards, which I wired up like this


    Code:
                 1 - shield     shield - 1
                 2  -------------------  3
    FANUC  ---   3  -------------------  2   --- PC
                 4 -|                |-  4  
                 5 -|                |-  5
                 7  -------------------  7
                 6  -|               |-  6
                 8  -|               |-  8
                 20 -|               |- 20
    To make this clear, pins 4/5 are tied together, as are pins 6/8/20, where each side is tied to itself. That is, the only connections that pass through from the FANUC to the PC are on pins 2, 3 and 7.

    If I want to purchase the correct cable, I think I want a "null modem cable with no handshaking." Correct? In the meantime, is what I've done the correct way to do the cable?


  2. #2
    Join Date
    Dec 2003
    Posts
    24221

    Re: Trouble Dowloading from PC to FANUC

    Quote Originally Posted by rsfairman View Post
    [FONT=courier new]

    To make this clear, pins 4/5 are tied together, as are pins 6/8/20, where each side is tied to itself. That is, the only connections that pass through from the FANUC to the PC are on pins 2, 3 and 7.
    3 wire cable is fine with H.S. jumpered out, Fanuc require to see the H.S. present, but it is not used to communicate, just XON/XOFF.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  3. #3
    Join Date
    Dec 2009
    Posts
    953

    Re: Trouble Dowloading from PC to FANUC

    the cable configuration is wrong
    2---------------2
    3---------------3
    5---------------7
    7---------------5
    8---------------4

    on the 9 pin 1,4,6 are jumpered
    on the 25 pin 6,8,20 are jumpered

  4. #4
    Join Date
    Sep 2010
    Posts
    1230

    Re: Trouble Dowloading from PC to FANUC

    Quote Originally Posted by rsfairman View Post


    At the moment, I think the most likely source of the problem is my cable. I had a couple of straight-through cables and some prototyping boards, which I wired up like this


    Code:
                 1 - shield     shield - 1
                 2  -------------------  3
    FANUC  ---   3  -------------------  2   --- PC
                 4 -|                |-  4  
                 5 -|                |-  5
                 7  -------------------  7
                 6  -|               |-  6
                 8  -|               |-  8
                 20 -|               |- 20
    To make this clear, pins 4/5 are tied together, as are pins 6/8/20, where each side is tied to itself. That is, the only connections that pass through from the FANUC to the PC are on pins 2, 3 and 7.

    If I want to purchase the correct cable, I think I want a "null modem cable with no handshaking." Correct? In the meantime, is what I've done the correct way to do the cable?

    A PC or Laptop is seldom seen today equipped with a DB25 Serial Port (Male) connector. Some mistake the Parallel Port, 25 pin Female, as a Serial Port. If this is what you have done, therein is your problem.

    Whether you buy or make a cable, the cable configuration is for a Loop-back, Null Modem cable. The pin-out is as follows:

    Machine Side ----------------------------------------------- PC Side

    DB25 Male ----------------------------- DB25 Female ------------------ DB9 Female
    1 ---- Shield Trace Wire ---------- Not Connected ---------------- Not Connected
    2 ------------------------------------------------- 3 ------------------------------------ 2
    3 ------------------------------------------------- 2 ------------------------------------ 3

    4
    | Bridged
    5

    6
    |
    8 All Bridged
    |
    20

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

    Although it won't hurt, bridging the RTS with CTS and DSR with CD and DTR at the PC end is not necessary.

    Regards,

    Bill

  5. #5
    Join Date
    Feb 2015
    Posts
    21

    Re: Trouble Dowloading from PC to FANUC

    If I understand what each person has said, we have three conflicting pieces of advice. Maybe someone who understands the big picture can explain why all three approaches are correct...

    I do know that the machine worked with 25 pins (on both sides) at one time. This machine came from a school where I was a student a number of years ago, and it was set up using the 25 pin port on the PC then.

    Incidentally, I'm not interested in DNC (drip feed) just yet. I will want to do this, but getting simple file transfers to work is a first step.

    Update: I followed the instructions of the pdf given by Al_The_Man, and it didn't work. It doesn't matter whether the cable is wired with or without "full handshake" (i.e., whether pins 4 and 5 are jumpered or pass through after swapping). The pdf says to change param 0002 to 0000 0001 (it was 1000 0001), and change I/O to 0 (it was 2). When I did that and tried to receive a program, FANUC gives me alarm 086. When I changed these two values back, the alarm goes away. It still doesn't accept the download, but no alarm.

  6. #6
    Join Date
    Dec 2003
    Posts
    24221

    Re: Trouble Dowloading from PC to FANUC

    The PDF I posted shows the correct hook up, these are posted by Cadem who also have the free RS232 program Cadem Lite.
    I have used the 3 wire hook up this way for around 40yrs on Fanuc and others.
    If you send me a email add via P.M., I can send you the Fanuc RS232 instruction manuals.
    Don't forget to down load your parameters incl. the 900's.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  7. #7
    Join Date
    Feb 2015
    Posts
    21

    Re: Trouble Dowloading from PC to FANUC

    Al, your PM mailbox is full.
    Randall

  8. #8
    Join Date
    Apr 2009
    Posts
    1379

    Re: Trouble Dowloading from PC to FANUC

    Trust Al, he's the MAN!!!
    Most PCs had a 9-pin serial connector and the 25-pin one was for the parallel port.
    As he said, the serial port of the control has to be connected to the serial port of the PC; if it was connected to the PC's parallel port, either side could have been damaged.

  9. #9
    Join Date
    Dec 2003
    Posts
    24221

    Re: Trouble Dowloading from PC to FANUC

    Quote Originally Posted by rsfairman View Post
    Al, your PM mailbox is full.
    Randall
    Try now!
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  10. #10
    Join Date
    Dec 2009
    Posts
    953

    Re: Trouble Dowloading from PC to FANUC

    in these days it is easy to use a usb to serial rs 232 converter cable,very cheap
    Vigor USB to Serial Converter (VUC-2102)
    but this is not enough,you will need also a 9 to 25 pin adapter
    Serial adapter - 25 pin D-Sub (DB-25) - Male - 9 pin D-Sub (DB-9) - Female - Shielded - Beige (02446)

    when you get them ,open the adapter and change the wiires like this:
    2---------------2
    3---------------3
    5---------------7
    7---------------5
    8---------------4

    on the 9 pin 1,4,6 are jumpered
    on the 25 pin 6,8,20 are jumpered

    this will be easy because nowdays the laptops has no more serial connector like in the old days,all have usb so will be easy to connect from anywhere.

    btw rsfairman ,your scheme is for 25 to 25,but in PC i think you have no 25 serial ,that is lpt port so is not the same.
    i think there is your mistake.

    PS:untill 2 years ago i used a classic 9 to 25 serial cable made from network cable but i changed to usb to serial converter and is working great.

  11. #11
    Join Date
    Sep 2010
    Posts
    1230

    Re: Trouble Dowloading from PC to FANUC

    Quote Originally Posted by rsfairman View Post
    If I understand what each person has said, we have three conflicting pieces of advice. Maybe someone who understands the big picture can explain why all three approaches are correct...
    Al's approach and mine are the same. Al and I are suggesting Software Handshaking (Xon Xoff) and the cable configuration is a Loopback Null Modem cable, so named because the Handshaking Outputs are looped back to the corresponding inputs on the same device. The only pins connected from end to end are the Send (TD) Receive (RD) and Signal Ground lines. Al's PDF shows the Handshake lines at both end of the cable bridged (looped back), but as I stated in my previous Post, bridging these pins at the PC end will not hurt, but its optional; it will work just as well with the Handshake Pins at the Control end only bridged.

    I showed Protective Ground, Pin 1 of the DB25 connector at the control end connected to the Shield Trace wire (bare wire in contact with the shield in Shielded Data Cable) only at the Control End. Unless you know for sure that the two devices share the same Ground Source, and are both grounded equally well, connecting the Shield Trace at both ends to the corresponding Protective Ground can result in a Ground Loop where the I/O chip of either, or both devices can be damaged.

    Quote Originally Posted by rsfairman View Post
    I do know that the machine worked with 25 pins (on both sides) at one time. This machine came from a school where I was a student a number of years ago, and it was set up using the 25 pin port on the PC then.
    If you have the same PC from the school that actually has a 25 pin Serial Port, then a DB25 to DB25 connection will work. A 25 pin Serial Port has not been supplied as standard equipment for many years. Accordingly, unless you have a very old computer, or you have one where a 25 Pin Serial Port has been specifically added, then you may be confusing the Parallel Port, a 25 pin Female Connection at the PC, as a Serial Port. If you did connect to the Parallel Port it is extremely unlikely that this would have damage either side.

    Using a USB adapter can be, and often is problematic. It depends on the Operating System being used on the External Device (PC or Laptop). When Windows 7 first hit the market, and was installed as a 64 bit OS, there weren't any USB to Serial adapters that worked. Things have changed and there are many that work, but you need a driver that's suited to a 64 bit OS if such an OS is installed. Personally, if the external device only had a USB and no Serial Port, I would be installing a dedicated Serial Port. You would have to purchase either a USB to Serial adapter, or a Serial Port in any case, and you would be less likely to have issues with the Serial Port.

    Regards,

    Bill

  12. #12
    Join Date
    Feb 2015
    Posts
    21

    Re: Trouble Dowloading from PC to FANUC

    First, I was messed up assuming that the 25 pin parallel port was really a serial port. I knew better, but somehow went barreling on in the wrong direction. Thanks for setting me straight.

    Well, I've tried the ways of wiring the 25 pin to the 9 pin that are suggested above and nothing has worked. For the record, I have a 25 pin cable, a 9 pin cable and a board that lets me swap around the connections.

    The two main things I've tried are

    9 pin ------- 25 pin
    1-4-6 tied .... 8-6-20 tied
    7-8 tied ........ 4-5 tied
    2 -------------- 2
    3 -------------- 3
    5 -------------- 7

    and

    9 pin --------- 25 pin
    1-4-6 tied .... 6-8-20 tied
    2 -------------- 2
    3 -------------- 3
    5 -------------- 7
    7 -------------- 5
    8 -------------- 4

    One reference said that tying 1-4-6 on the DB9 is not necessary, so I tried the two cases above with and without tying those together. I also tried each of these four possibilities with Xon/Xoff, hardware and no handshaking. Just in case I misunderstood something, I also tried swapping lines 2 and 3, for a total of 24 different trials.

    In every case, I hit the I/O softkey, then the read softkey, LSK flashes, I go to Tera Term and say "send file," but nothing happens. The program takes the form

    Code:
    %
    O3333
    G0 X1 Y1 Z1
    M30
    %
    I assume that for a program of only a few lines, the transfer should be almost instantaneous.

    I guess the next thing is to see if two computers can talk to each other without involving the FANUC. Maybe I have a bad serial port.

  13. #13
    Join Date
    Sep 2010
    Posts
    1230

    Re: Trouble Dowloading from PC to FANUC

    Hello rsfairman,
    If you get a p/s086 error when I/O setting is 0, as stated in your Post #5, this indicates that the cable from the DB25 connector (the connector you plug your cable from the PC into) is connected to the alternate channel on the I/O board of the control. You will get the same error if you disconnect the cable at the control that connects to your PC and try transferring a program.

    If you have the I/O on the Setting Page set to 2, Bits 4 and 5 of parameter 0038 should be both set to 0. Accordingly, all bits of Parameter 0038 can be set to 0.

    The other parameters should be:
    0050 = 10000001
    0250 = 10 (4800 Baud Rate – Starting Point)

    The settings of your PC software should be:
    Handshake Method = Xon Xoff (Software)
    Data Bits = 7
    Stop Bits =2
    Parity = Even
    Baud Rate = 4800 (or to match the setting of Baud Rate set in parameter 0250 of the control)

    Use the cable configuration shown below:

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

    1 ---- Shield Trace Wire --------------------------- Not Connected
    2 ---------------------------------------------------------------------- 2
    3 ---------------------------------------------------------------------- 3

    4
    | Bridged
    5

    6
    |
    8 All Bridged
    |
    20

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



    Regards,

    Bill

  14. #14
    Join Date
    Feb 2015
    Posts
    21

    Re: Trouble Dowloading from PC to FANUC

    Still no success.

    Bill, maybe you and I have different versions of the FANUC parameter manual, but the one I have, for series O, OO and O-Mate, says that bits 7&6 of 0038 are RSCMD1 and DEVFL1, then bits 5&4 are RSCMD2 and DEVFL2, where the RSCMD/DEVFL combination should be

    00 for bubble cassette
    01 for floppy cassette
    10 for RS232, PPR
    11 for new interface.

    So I think these two values should be 10 since I'm using (or attempting to use) RS232. So parameter 0038 should be 1010 0000. I did try setting them all to zero though, and it didn't work. Incidentally, these were set to 1001 0000 as I received the machine, and it was being used successfully with a PC a few years ago.

  15. #15
    Join Date
    Sep 2010
    Posts
    1230

    Re: Trouble Dowloading from PC to FANUC

    Quote Originally Posted by rsfairman View Post
    Still no success.

    Bill, maybe you and I have different versions of the FANUC parameter manual, but the one I have, for series O, OO and O-Mate, says that bits 7&6 of 0038 are RSCMD1 and DEVFL1, then bits 5&4 are RSCMD2 and DEVFL2, where the RSCMD/DEVFL combination should be

    00 for bubble cassette
    01 for floppy cassette
    10 for RS232, PPR
    11 for new interface.

    So I think these two values should be 10 since I'm using (or attempting to use) RS232. So parameter 0038 should be 1010 0000. I did try setting them all to zero though, and it didn't work. Incidentally, these were set to 1001 0000 as I received the machine, and it was being used successfully with a PC a few years ago.
    Yes, I've not noticed this before, but it seems that the setting of this parameter is version specific. I've consulted 4 different Series 0 manuals and although the Bit names are the same, the setting of them have different meanings.

    In your earlier Post you had the following parameters set as shown

    0552 = 10
    0253 = 0

    Its my understanding that parameter 0250 applies to I/O 2 for setting baud rate. My information shows:

    0552 being for I/O 0
    0553 being for I/O 1
    0250 being for I/O 2
    0251 being for I/O 3

    However, an incorrect Baud Rate setting of the correct parameter would not stop communication altogether, You should invest in an RS232 test plug to see if there is any activity at all when attempting to Send/Receive data. This is a plug that sits between the DB25 connecter at the control and the cable. It has LEDs that will indicate the state of the Handshake pins, as well and TD and DR when data is being transmitted,

    Regards,

    Bill

  16. #16
    Join Date
    Feb 2015
    Posts
    21

    Re: Trouble Dowloading from PC to FANUC

    Success!

    As is so often the case in situations like this, it was something stupid. There is a key step on the FANUC end of things that I was omitting. The correct series of steps is PGRM, EDIT, then the I/O softkey. Then (this is what I was not doing) you need to type in the program number that you are about to download; e.g., O3333. Then you hit the READ softkey, and send it from the terminal program on the PC. I never would have guessed that you need to tell the controller the program number since it's in the program itself on the first line. Everything else was probably fine all along.

    For the record, to help anyone who has the same problem, the cable is set up as

    9 pin 25 pin
    2---------------2
    3---------------3
    5---------------7
    7---------------5
    8---------------4

    on the 9 pin 1,4,6 are jumpered
    on the 25 pin 6,8,20 are jumpered

    Several other suggestions for the cable setup were mentioned and they may work too, but I know that this one does work, and it's consistent with the standard meaning of the pins.

    Another issue that may trip people up is the fact that you need to set up the terminal so that it transmits using CR+LF.

    Thanks for the help everyone!

    Randall

  17. #17
    Join Date
    Dec 2009
    Posts
    953

    Re: Trouble Dowloading from PC to FANUC

    Quote Originally Posted by rsfairman View Post
    Success!

    As is so often the case in situations like this, it was something stupid. There is a key step on the FANUC end of things that I was omitting. The correct series of steps is PGRM, EDIT, then the I/O softkey. Then (this is what I was not doing) you need to type in the program number that you are about to download; e.g., O3333. Then you hit the READ softkey, and send it from the terminal program on the PC. I never would have guessed that you need to tell the controller the program number since it's in the program itself on the first line. Everything else was probably fine all along.


    For the record, to help anyone who has the same problem, the cable is set up as

    9 pin 25 pin
    2---------------2
    3---------------3
    5---------------7
    7---------------5
    8---------------4

    on the 9 pin 1,4,6 are jumpered
    on the 25 pin 6,8,20 are jumpered

    Several other suggestions for the cable setup were mentioned and they may work too, but I know that this one does work, and it's consistent with the standard meaning of the pins.

    Another issue that may trip people up is the fact that you need to set up the terminal so that it transmits using CR+LF.

    Thanks for the help everyone!

    Randall
    i said from begining your cable is worng but you tryed the long way
    i am glad i could helped you.
    good luck

  18. #18
    Join Date
    Sep 2010
    Posts
    1230

    Re: Trouble Dowloading from PC to FANUC

    Quote Originally Posted by rsfairman View Post

    For the record, to help anyone who has the same problem, the cable is set up as

    9 pin 25 pin
    2---------------2
    3---------------3
    5---------------7
    7---------------5
    8---------------4

    on the 9 pin 1,4,6 are jumpered
    on the 25 pin 6,8,20 are jumpered

    Randall
    Hi Randall,
    To reiterate the comment of Al_The_Man "Fanuc require to see the H.S. present, but it is not used to communicate, just XON/XOFF."

    Although the above cable configuration may work for you, this is not a typical pin out that's used with Xon/Xoff handshaking. The cable pin out you've used is relying on the RTS/CTS of the control being asserted by the corresponding CTS/RTS of the external device. The more fool proof, and conventional method is to bridge pins 4-5 at the control.

    On occasions when the power supply of the control's Uart fails, you will experience a p/s 086 error because the DSR has been turned off, that is, its not asserted by the bridge with pin 20. In this situation a work around is to bridge pins 6-8 at the control and then connect them to pin 4 of a DB9 connector at the PC. What I'm saying is that there are a number of ways that Handshake Pin assertion at the Control end can be accomplished, but the convention when using Xon/Xoff Handshaking is just to bridge the Handshake Pins at the control and run three wires between the control and External Device.

    If you purposely set out to run five wires, your 5/7th of the way to Full Hardware Handshaking, which is more reliable than Software Handshaking, particularly where Drip Feeding is concerned, and is possible with the setting of parameter 0391.6.

    Regards,

    Bill

  19. #19
    Join Date
    Dec 2003
    Posts
    24221

    Re: Trouble Dowloading from PC to FANUC

    I usually use a RS232 trouble shooting program, these vary from just one port, to monitor the data moving in both directions.
    RS232 Monitoring Software, RS232 Monitoring Hardware and RS232 Terminal Software
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  20. #20
    Join Date
    Feb 2015
    Posts
    21

    Re: Trouble Dowloading from PC to FANUC

    Bill, if I understand you correctly, then the cable configuration that uses five wires is the better choice for DNC (i.e., the configuration I am using now), but I should be using hardware handshaking rather than Xon/Xoff.

    After so much time fooling with this I want to make some chips before getting DNC to work, but DNC is high on the to-do list.

    Al, thanks for the pointer on RS232 monitoring. No doubt it will save me some headaches down the road.

    Randall

Page 1 of 2 12

Similar Threads

  1. Dowloading Program to Hurco KM-3P
    By freak_brain in forum HURCO
    Replies: 10
    Last Post: 01-13-2009, 03:44 PM
  2. Fanuc Series O-T Trouble
    By NOVADAVE in forum Fanuc
    Replies: 1
    Last Post: 12-10-2008, 08:01 PM
  3. fanuc 6t trouble
    By ezjn in forum CNC Machining Centers
    Replies: 1
    Last Post: 11-15-2007, 03:52 AM
  4. Keypad trouble, Fanuc 10M
    By the professor in forum Fanuc
    Replies: 0
    Last Post: 09-17-2007, 08:07 PM
  5. fanuc 10m trouble
    By ezjn in forum CNC Machining Centers
    Replies: 4
    Last Post: 09-04-2006, 06:41 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •