584,842 active members*
4,551 visitors online*
Register for free
Login
Results 1 to 20 of 20
  1. #1
    Join Date
    Apr 2010
    Posts
    260

    RS232 DNC input not working

    I have set all the parameters on the computer and the cnc to the same values 1200 Baud, Even Parity 8 bit data, 1 stop, software flow control. The machine is listening and the computer transmits but nothing is recieved.

    I hit the MDI DNC button twice and the machine says waiting. I then send the file using Predator CNC editor but nothing has been recieved.

    I use the same rs232 cable for my other machines

    Any ideas would be great
    www.machmachine.com

  2. #2
    Join Date
    Aug 2008
    Posts
    247
    Does the problem travel with the computer and/or cable?

    In other words, if you connect the computer and cable to a different machine does it work?

  3. #3
    Join Date
    Apr 2010
    Posts
    260
    So I made another cable based on the Haas pin outs. The one my other machines use has the TX RX crossed. I can now recieve programs from the Hass but cannot transmit to it. Or atleast it does not recieve my signal. I am going to check the cable now and verify the pin
    www.machmachine.com

  4. #4
    Join Date
    Aug 2008
    Posts
    247
    A null modem cable has more than just the TX/RX pairs crossed. Since there is no modem involved the configuration is considered DTE (data terminal equipment) to DTE. Other pins besides 2 and 3 are used to "handshake" the communication between the devices. Here are some links to help you:

    RS232 serial null modem cable wiring and tutorial

    Serial Port and Modem Cables

    Google: "serial null modem"

    What kind of port is it? 9-pin or 25-pin?

    ~John

  5. #5
    Join Date
    Apr 2010
    Posts
    260
    Im going from a 9computer side to a 25 cnc side. I was able to transmit to the cnc successfully. I am now getting format errors on the CNC which makes me think that the post I am using is not creating the G code in the right format
    www.machmachine.com

  6. #6
    Join Date
    Apr 2010
    Posts
    260
    I get error on the CNC side:

    251 Program Data Struct error
    212 Program integrity error
    www.machmachine.com

  7. #7
    Join Date
    Apr 2010
    Posts
    260
    OK I got it running now. Maybe some one can explain this to me, when I load a program via the rs232 I cannot go through the list Prog button, select all and hit recv232. I get a error message. But when I load via a double press of the MDI/DNC it loads and runs the program
    www.machmachine.com

  8. #8
    Join Date
    Apr 2010
    Posts
    260
    now I am back to it not working at all. Neither tx or rx
    www.machmachine.com

  9. #9
    Join Date
    May 2009
    Posts
    393
    Please refer the attachments & check whether the settings match.

    Surely, you should get the work done.

    Thanks
    Attached Files Attached Files

  10. #10
    Join Date
    Nov 2006
    Posts
    490
    Program integrity error (along with RS-232 abort) are the errors I get when I don't have the RS-232 cable hooked up. So that might be a sign of a bad connection somewhere.
    Do you have a multimeter lying around? You can try testing the pins from one end to the other on your cable to ensure they are still conducting between them. I have found that different serial cables can vary WILDLY from one another, even if they don't have any markings indicating they were made for a special machine.

    I'd suggest making a very brief sample program in order to test the connection (if you haven't been doing it already). Just a few random lines that don't actually do anything will suffice, and it'll load real fast too. You can hammer out the post issues later if there are any.

    We only have one Haas machine and one simulator connected via RS-232, but for those machines we use a very simple bridge to complete the connection.
    (haas 25 pin) (PC 9 pin)
    2--------------2
    3--------------3
    7--------------5

    I cannot tell you if this connection would work in both directions though. I never tried it!
    But the alternate jumpered connection won't hurt anything. We have two-way communication between PCs and Fanuc robots using a connection like this...
    http://tinyurl.com/23m9scv

    When I was originally making the RS-232 adapters for our machines, I tried a few different incarnations and they all worked when downloading from PC to the machine (from the manual, from here on cnczone, and other pinouts too). So I went with the simplest one. I can test out uploading from Haas to PC over the weekend if you haven't figured it out by then. A while back I made a solderless breadboard for testing RS232 adapters, so I can test literally any connection in only a few minutes. But I won't be at the shop until saturday.

  11. #11
    Join Date
    Aug 2008
    Posts
    247
    Sorry for the delay, I was working on some other things.

    I believe your problem lies in one of two places, the cable (90%) or the port settings (10%).

    1. Going from 9-pin to 25-pin can be tricky. Plus it has to be null modem. TX/RX is straightforward, and maybe ground, but the others can be a PITA. If you can find a manufactured cable you are confident in from another machine that would help a lot. 9-25 pin null modem adapters used to be available but are hard to find today. Using a known "good" cable will help you resolve the port settings.

    2. I'm surprised it's using "even" parity. I assume we are trying to send a text g-code file to the machine. Using even parity is a way of error checking the bit stream. In the old days, it was common for terminals to use "NO" parity and use some form of handshaking to throttle the flow to prevent buffer overruns. Haven't seen even parity in a while and I could be wrong.

    Is there a manual available online for this machine? This is an interesting problem and I'd like to help you with it.

    ~John

  12. #12
    Join Date
    Aug 2008
    Posts
    247
    The image posted by Ydna reads like this:

    Do not cross Transmit and Receive. Use pin-to-pin connections. (simple enough)

    Jumper pin 4 to pin 5 on the DB25 side, and pin 7 to pin 8 on the DB9 side. Pin 4 and pin 7 are for Request to Send signals. When they go high they immediately tell "themselves" it's Clear to Send. Both the computer and the machine see this as coming from the other side of the cable when in fact it's their own signal. That's what's known as "faking it."

    Pin 20 on the DB25 side and pin 4 on the DB9 side are both Data Terminal Ready. Both sides fake it the same way. When pin 20 and pin 4 go high (both devices raise their "ready to go" flags by sending voltage to the pin), this sends voltage to pin 8 (pin 1) that used to indicate a carrier signal from the modem on the other side. It also raises pin 6 (pin 6) which used to mean the modem on the other side is ready to receive.

    All this talk of modems is a moot point, but the computer AND the machine still use the protocol because it works.

    Pin 7 to pin 5 is signal ground to signal ground.

    ~John

  13. #13
    Join Date
    Mar 2003
    Posts
    2932
    212 PROG INTEGRITY ERROR - Possible corrupted program. Save all programs to disk, delete all, then reload. Check for a low battery and low battery alarm.

    251 PROG DATA STRUCT ERROR - Possible corrupt program. Save all programs to disk, delete all, and then reload. If the error persists, programs may have to be searched for error on PC, corrected then reloaded. Back up all programs on USB or other device, delete all, and reload. Problem may return when programs are reloaded. Programs should be reloaded one at a time to isolate the corrupted program. If any programs cannot be deleted, please contact your dealer.

    Sounds as if the program you are trying to load is corrupt. Try the solution suggested above.

    Haas only requires 3 wires when using XON/XOFF handshake. Don't bother with any jumpers, or null modem cables. The cable Ydna suggested will work both directions.

  14. #14
    Join Date
    Aug 2008
    Posts
    247
    With all due respect to dcoupar, if the spec calls for jumping the pins, jumper the pins. Regardless of what you've seen, don't make it somebody else's problem later on.

    ~John

  15. #15
    Join Date
    Apr 2010
    Posts
    260
    ok so I have the machine up, running and cutting. I had a few issues. 1; was my other machines use a cross over RS232 cable, Hass requires just the Null cable. I built one last night and got it working. 2; I found that the hardware settings on the PC side can be very tricky and sensitive. I am using an express card to rs 232 which lives on Com8 on my pc. If I modify any of the port values under the hardware manager for the communications port the pc does not transmit or RX. I set the comunications port to com2 and the express card to defaults to com8. All of the other settings such as baud,bit, stop...are set in my DNC software. All works well for now.

    thanks for everyones input
    www.machmachine.com

  16. #16
    Join Date
    Mar 2003
    Posts
    2932
    And with all due respect to johnohara, here's the diagram from the Haas manual. Please note no jumpers required on a Haas.
    Attached Thumbnails Attached Thumbnails Haas RS-232 Cable Diagram.jpg  

  17. #17
    Join Date
    Aug 2008
    Posts
    247
    Thanks for the image dcoupar -- noted. Haas' implementation of a DTE/DTE serial connection is not EIA standard as far as I can tell. But it works and that's what is important.

    However, now that the problem is known (and hopefully solved) I'd like to propose to either you or dingo0772 that we continue by getting this to work with a USB ==> DB9 serial cable. Serial and parallel ports are disappearing and knowing how to transfer files using a usb cable seems like it might be useful.

    ~John

  18. #18
    Join Date
    Mar 2003
    Posts
    2932
    Quote Originally Posted by johnohara View Post
    Thanks for the image dcoupar -- noted. Haas' implementation of a DTE/DTE serial connection is not EIA standard as far as I can tell. But it works and that's what is important.

    However, now that the problem is known (and hopefully solved) I'd like to propose to either you or dingo0772 that we continue by getting this to work with a USB ==> DB9 serial cable. Serial and parallel ports are disappearing and knowing how to transfer files using a usb cable seems like it might be useful.

    ~John
    As far as violating the EIA standard, Fanuc puts 25VDC on pin 25! That could spoil your day.

    I have recently begun testing several USB to Serial convertors. I bought a expensive one from Quatech (SS-USB-100), and when I interrupted the transmission, my PC went blue-screen. Quatech says their USB to Serial adapters aren't as "robust" as their PCMCIA to Serial adapters. My loss.

    I also have one from Keyspan (USA-19HS) that is recommended by Predator Software for DNC use. So far I've not had a problem.

    I also just purchased a Siig (JU-HS2012-S2) 2-port. Also so far, no problem.

    Dave

  19. #19
    Join Date
    Apr 2010
    Posts
    260
    I also have bought a usb to DB9 from US Converters. I bought the top of the line model. When I was doing a buffered input the unit had an error in the transmission and the machine sat overnight, spindle humming with no movement. I will try it again with the Hass and report back. I really hate using the express card in my laptop to load programs. If I restart the computer with out the card in the PC slot the card will not work until I reboot with it in. Can you say annoying?
    www.machmachine.com

  20. #20
    Join Date
    Aug 2008
    Posts
    247
    dingo0772:

    1. What kind of file is being uploaded to the Haas? Is it a text g-code file or is it a Hass proprietary command file?

    2. Is it uploaded all at once or are the command blocks sent one line at a time?

    The reason I ask is because I wrote a program a couple of years ago that controls a board directly through the serial port. It could easily be adapted to sending files or individual lines to the Haas.

    At the very least, it could be used to test communications with the Haas without using programs as test data.

    ~John

Similar Threads

  1. program input/output with RS232 port on Mitsubishi 50L
    By Chuck Reamer in forum Mazak, Mitsubishi, Mazatrol
    Replies: 4
    Last Post: 06-21-2013, 08:56 AM
  2. Can't get the RS232 working
    By borne2fly in forum Milltronics
    Replies: 3
    Last Post: 10-18-2010, 05:05 AM
  3. Working on Design - Looking for Input
    By Jesse B in forum DIY CNC Router Table Machines
    Replies: 68
    Last Post: 03-24-2010, 04:55 AM
  4. Replies: 5
    Last Post: 07-16-2009, 06:18 AM
  5. G540 input not working?
    By stoneyreef in forum Gecko Drives
    Replies: 1
    Last Post: 05-08-2009, 07:52 AM

Posting Permissions

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