584,871 active members*
5,503 visitors online*
Register for free
Login
Page 2 of 2 12
Results 21 to 37 of 37
  1. #21
    Join Date
    Jun 2008
    Posts
    226
    Quote Originally Posted by stevo1 View Post
    Pinman if this works why would someone want to use the USB-RS232 if it causes problems. This seems much easier. I have always been running the 9pin from PC to 25pin CNC with the ethernet. I never new that you could just plug the ethernet in the PC. Saves me on wiring plugs.

    Stevo
    Stevo:
    You must mean: "I have always been running the 9pin from PC to 25pin CNC with the RS232 Cable".

    Remeber, PinMan did not say that he runs straight on Ethernet. He says that he use an "RS232 Adapter Kit". I have also asked him to describe this kit better than the dealer do on his website. Lets wait for PinMan's feedback.


    I believe that most of us think:

    If it works, why would computer manufacturers bother installing RS232 interface in computers that already have network (Ethernet) interface.

    Any network experts out there? - Tell us how it works!!

  2. #22
    Join Date
    Jun 2008
    Posts
    1511
    I agree viking. Thats why I was asking.

    What I got out of it is that you can connect a ethernet cable to the standard LAN plug on the PC then run it to a RJ45-DB25 that connects to the CNC. Thats kind of why I was trying to understand why someone would use the RJ45-DB9 or the USB on the PC if they can just plug in the ethernet cable. Pinman said that you just have to make sure that you assign the COM1 to your LAN plug .

    I have always used the 9pin at my PC but if I don't have to that would be great.

    Stevo

  3. #23
    Join Date
    Aug 2006
    Posts
    38
    Quote Originally Posted by CNC Viking View Post
    Tell us how it works!!
    OK, I am not a network expert but since you asked I might be able to explain

    RS232 and ethernet are fundamentally different. You cannot simply wire one into the other.

    RS232 came along years before ethernet, it is a simple point to point connection for sending data from A to B, it works by converting a byte of data e.g. the letter 'A' to an ASCII code, in this case 65 and that is expressed as a binary sequence of 1s and 0s (the "data bits") thay are sent as high and low voltages to the transmit pin. The receiving end needs to convert this back to a byte of data so it watches the changing voltage and interprets what it sees. Now you can imagine that there needs to be a mechanism for the receiver to work out from this string of 1s and 0s where the start and end of each byte is (this is what "stop bits" are for) and it also needs to know the speed that the binary data is being sent at otherwise it can't tell if a high voltage means a 1 or several consequtive 1s (the clock speed or "baud rate").

    Additionally there is an error check that counts the received bits and adds them up and compares with an expected result to check if any have got lost (this is "parity" checking).

    Protocols can be layered on top of this, e.g. XMODEM. This adds error checking and recovery capabilities by having a well defined conversation structure. The sender sends a packet of data, the receiver does an error check and then replies with either a positive or negative acknowledgement.

    Now then, ethernet on the other hand is a much more modern system, for a start you can plug lots of devices together so it needs to be able to address its data to a particular destination (IP Address) and it can have more than one conversation at once (email, file transfer, web surfing) using different "ports" on one IP address. Ethernet also uses protocols (TCP/IP & UDP) These protocols consist of a packet of data containing source IP, destination IP, port numbers, the actual data, some check values etc.

    ...Which is why you cannot simply wire one into the other, they are speaking different languages.

    With an ethernet to serial adapter, you send data to its IP address, the adapter receives it, reads the packet and sends the data to its serial port, which is what your CNC is waiting for.

    Now most CNC communication software doesn't know how to talk to an IP address, only a COM port - so typically the ethernet to serial adapters are bundled with some COM port emulation software which you also need to load, this masquerades on your computer as COMx and that is what you configure your DNC program to use. The emulation software then intercepts all calls to COMx and redirects them to IP x.x.x.x.

    Does that make sense?

    ...So, after typing all that I think its only fair to mention that I wrote some CNC file transfer software and I'd like as many people to use it as possible - that is what keeps me interested in developing it. And in this software I have spent some time adding the ability to talk direct to the IP address of an adapter, so it takes away the need to load emulator software. You might want to take a look and give it a try: www.iworkshop.co.uk

    Hope this helps
    Andrew Carter

  4. #24
    Join Date
    Feb 2008
    Posts
    123
    Quote Originally Posted by stevo1 View Post
    Pinman said that you just have to make sure that you assign the COM1 to your LAN plug .
    I want to express my DEEPEST apologies to you guys for the mix-up. I was mistaken about plugging directly into the LAN port. COM1, COM2, etc. are specifically assigned to serial ports.

    The adapter that I use is just a plastic housing with loose pin wiring. You can get them in any serial port that you need, DB9, DB25, HD26, etc. You set the pinout yourself based on the PC and the Control that you have.

    Again, sorry for the confusion.

  5. #25
    Join Date
    Jun 2008
    Posts
    1511
    Quote Originally Posted by PinMan View Post
    I want to express my DEEPEST apologies to you guys for the mix-up. I was mistaken about plugging directly into the LAN port. COM1, COM2, etc. are specifically assigned to serial ports.

    The adapter that I use is just a plastic housing with loose pin wiring. You can get them in any serial port that you need, DB9, DB25, HD26, etc. You set the pinout yourself based on the PC and the Control that you have.

    Again, sorry for the confusion.
    No worries PinMan I am done trying to figure out how to assign COM1 to the LAN(nuts). Oh just messing with you. You just got me excited when I thought I could get rid of my DB9 connection at the PC.

    Ok to the USB issue. How is the cable set? Is it a USB at the computer then a Ethernet at the other end that you can plug into the DB25 pin that goes to the CNC? Basically is it like what I have now except the other end is a USB plug?

    Thanks again,
    Stevo

  6. #26
    Join Date
    Apr 2005
    Posts
    124
    mine is usb to 9 pin, that is all I have had, but I'm sure there are 25 pin flavors.

  7. #27
    Join Date
    Feb 2008
    Posts
    123
    most likely, this is what you will be looking for.

    USB to DB25M Cable

  8. #28
    Join Date
    Jun 2008
    Posts
    226
    Quote Originally Posted by PinMan View Post
    I want to express my DEEPEST apologies to you guys for the mix-up. I was mistaken about plugging directly into the LAN port. COM1, COM2, etc. are specifically assigned to serial ports.

    The adapter that I use is just a plastic housing with loose pin wiring. You can get them in any serial port that you need, DB9, DB25, HD26, etc. You set the pinout yourself based on the PC and the Control that you have.

    Again, sorry for the confusion.
    PinMan,

    Like stevo1 said: No worries!
    Everyone really benefits from this type of in-depth info/discussion by different members. Instead we should thank you for bringing it up!

    And Andy's last masterpiece is really worth saving for future reference.


    The proposed USB-RS232 Adapter looks the part for those who do not have an RS232 9-pin D-sub on their computer (some of the laptops etc.), and do not want to buy the more expensive Ethernet-RS232 products. I,for one, am not so keen on any type of USB, but that's just my own opinion of course. Also, I more and more look for galvanic isolation between the PC and the CNC. The last thing I would want to do is frying the CNC mainboard.

  9. #29
    Join Date
    Jun 2008
    Posts
    1511
    Viking I could not agree more. I think I started a pretty good thread that people have a lot of questions to (group). The main reason I started this thread was because of what you said. Some computers do not have the 9pin searial port. I do have one now and have had them in the past. I have a straight wire DB9-DB25 and the RJ45 jacks DB9-DB25 with ethernet. I just wanted to see if the USB was possible just incase I had to borrow a laptop that did not have the 9pin serial. Better to have yourself covered.

    :cheers:
    Stevo

  10. #30
    Join Date
    Jun 2007
    Posts
    3757

    Question DNC protcols.

    andycarter

    Would you you please mind explaining some typical preamble and postamble strings that get put with the text g-code.
    It may help to explain to some users the start/stop mechanism used in dnc communication, why it used.
    For a given type of CNC (BOSCH CC-12) controller, I figured the correct codes to use at each end of the file and used hyperlink to do some transfers to a machine after someone destroyed/lost the original DNC program and interface. This allowed me to make a new backup of all the machine parameters, custom cycles, message string etc, and restore some lost programs before they were forever lost to the inevitable dead battery.
    I was able to use a simple batch
    copy preamble.txt+gcode.nc+postamble.txt gcode.dnc to create the handshake sequence.

    Thanks.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  11. #31
    Join Date
    Aug 2006
    Posts
    38
    Neil

    My knowledge of preamble and postamble strings is limited to the few controllers that I have had first hand dealings with.

    As you say, it can be a real pain and a lot of trial and error trying to figure them out, I guess that this issue mostly applies just to older controls that were designed to work with punch tape, since the HAAS & FANUC that I've seen don't require anything other than a carefully placed "%".

    In no particular order...

    Philips 3000
    pre: "%PM" for program memory, "%MM" for macro memory and "%TM" for tool memory
    post: ASCII #4 (EOT)

    Fagor 8025
    pre: None
    post: ASCII #27 (ESC)

    GE Mark Century 2000
    pre: None
    post: ASCII #4#4#4#4#4... (at least one, preferably many EOT chars for best results)
    NB seems most reliable with first line blank and the program "N10 (ID, PROG, 123, NAME)" starting on the second line

    Bosch Alpha 3
    pre: ASCII #18#2 (DC2 followed by STX)
    post: ASCII #4

    If anyone knows any others then it would be great to have them posted here for record.

    Andy

  12. #32
    Join Date
    Jun 2007
    Posts
    3757

    DNC list continues...

    Philips 3000
    pre: "%PM" for program memory, "%MM" for macro memory and "%TM" for tool memory
    post: ASCII #4 (EOT)

    Fagor 8025
    pre: None
    post: ASCII #27 (ESC)

    GE Mark Century 2000
    pre: None
    post: ASCII #4#4#4#4#4... (at least one, preferably many EOT chars for best results)
    NB seems most reliable with first line blank and the program "N10 (ID, PROG, 123, NAME)" starting on the second line

    Bosch Alpha 3
    pre: ASCII #18#2 (DC2 followed by STX)
    post: ASCII #4

    Bosch CC-120
    Pre: ASCII #18#2 (DC2 STX )
    Post: ASCII 9 bytes...
    #3 ( ETX )
    #13#10 ( CR LF )
    #4 ( EOT )
    #13#10 ( CR LF )
    #13#10 ( CR LF )
    #20 ( DC4 )

    Add more here. This looks like it will become a useful list.

  13. #33
    Join Date
    Oct 2005
    Posts
    672
    I am using Andy Carter's software and it works very well. Thanks Andy! :wave:

    For electrical isolation like CNC Viking is describing, I am using Betatronics I232 devices which allow me to keep both my VMCs connected to my PC without fear of ground loops and noise. For those unfamiliar with the potential danger to sensitive components, I shall try to elaborate. Two VMCs sitting next to each other may not necessarily be at the same earth gound potential. This can be for numerous reasons such as poor wiring back to the main electrical supply and poor conductivity to the floor the machine sits on. Some machines also tend to "leak" more voltage to their chassis/frame than others. The result is a problem in two ways. The obvious problem is that when using a shielded cable for RS-232, that tiny foil wrapper will ground the chassis of your PC to the chassis of the CNC. If the big CNC is not grounded well to mother Earth or to the electrical supply panel, it will try to ground itself through the RS-232 port of your PC. A few millivolts is tolerable but I have seen machines with 30+VAC between the machine frame and earth ground even when the machine is sitting directly on a concrete floor due to a poor earth ground path. If two machines are connected simulateously to the PC's serial ports, it is possible one machine will get better grounding through the second machine via the PC. Yeesh.

    The second potential issue is even with a non-damaging ground difference, there can be sufficient noise to interfere with the RS-232 signals and corrupt data. Corrupt data can result in bad code and machines that accidentally mill through the vise or table.

    I have tried one of the USB to serial adapters. I could get data from the CNC to the PC, but was never able to send data from the PC to the CNC.

  14. #34
    Join Date
    Aug 2011
    Posts
    11

    Re: USB to RS232 connection

    Hello,

    I need transfer the parameters and programs from the BOSCH CC120 to/from a PC.
    Can anyone help me ?

    Regards, Patxi.

  15. #35
    Join Date
    Jun 2007
    Posts
    3757

    Re: USB to RS232 connection

    Send me PM and I will give you my email. I have page numbers in manual where the information is. All control and cable wiring info is there. It works, albeit at a slow baud rate.
    You need a DOS transfer program in the PC. I can send you one (if you are not using gmail - gmail will delete the file before you get it.
    I am sure there are windows programs too.
    File format is a bit fiddly. Needs a blank line at start and end.
    My PM box has a few slots now. Only 20 max limit sucks, in this day and age.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  16. #36
    Join Date
    Aug 2011
    Posts
    11

    Re: USB to RS232 connection

    Thanks,

    my email is [email protected].
    What is PM?
    Regards, Patxi.

  17. #37
    Join Date
    Feb 2020
    Posts
    58
    Quote Originally Posted by CNC Viking View Post
    Stevo:
    You must mean: "I have always been running the 9pin from PC to 25pin CNC with the RS232 Cable".

    Remeber, PinMan did not say that he runs straight on Ethernet. He says that he use an "RS232 Adapter Kit". I have also asked him to describe this kit better than the dealer do on his website. Lets wait for PinMan's feedback.


    I believe that most of us think:

    If it works, why would computer manufacturers bother installing RS232 interface in computers that already have network (Ethernet) interface.

    Any network experts out there? - Tell us how it works!!

    not an expert, but Ralink makes a chipped interface that converts ethernet to serial. DO NOT plug ethernet into an serial port, not only are signals different, the VOLTage difference would fry something...

Page 2 of 2 12

Similar Threads

  1. Replies: 10
    Last Post: 07-19-2019, 11:58 AM
  2. RS232 connection
    By mamehdi2000 in forum DynaCNC
    Replies: 3
    Last Post: 04-21-2014, 07:43 PM
  3. pc-2100 rs232 connection
    By blues_12 in forum DNC Problems and Solutions
    Replies: 1
    Last Post: 12-05-2013, 10:56 PM
  4. RS232 connection
    By ramsey321 in forum Tree
    Replies: 2
    Last Post: 02-05-2011, 09:15 PM
  5. fidia rs232 connection
    By digitallan in forum Uncategorised MetalWorking Machines
    Replies: 0
    Last Post: 09-27-2008, 10:28 PM

Posting Permissions

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