Serial communicaions

Am having problems connecting to 3 of our CNC machines. Connection is serial and we are using Pathtrace's Edgecomm to communicate. Parameters have been checked as has the wiring but no errors found. The PC providing this service has been replaced with a new one but the problem persists. Edgecomm provides and error 18 unable to connect to device. Other programs tried produce similar errors i.e. cannot connect to device.

Last week we had no problems this week, with no apparent changes having taken place, we have no connectivity.

Two of the machines have Fanuc controllers, one has Heindenhain.

Anyone get any ideas? The only idea I have is that it might be and earthing problem that has possibly developed due to the exceptional warm and dry spell of weather we have had. However, I wouldn't know how to check this - see if there is a voltage difference between the PC's earth and the CNC's???

Any ideas greatfully received since currently I'm stumped!

Steve

Reply to
Steve J
Loading thread data ...

Any lightning storms in the last week?

Get one of those LED dongles that will indicate any activity on the 232 buss and see what's happening. If it was working the odds are that the pc is bad or not set right. Since you have three controls that aren't working the odds are that not all three controls would have gone bad at the same time. It most likely the pc or the common wiring from the pc. You do not mention how you are switching between controls, a/b box or electronic switching but that could also be the source of your problem.

John

Reply to
john

formatting link
There is enough information on the net to write a book about.

Are you using a real serial port? versus a port replictor on your laptop ?

If so try a puter with a real port

Regards Daveb

Reply to
Anonymous

formatting link
Goof Luck Daveb

Reply to
Anonymous

Try isolating the error by trial and elimination: 1) Make a new cable, new ends, clean the connector at the control with a little air or vacuum. If you use electrical cleaner, be sure everything is off, and then dry before turning anything on. 2) try a computer/laptop on the floor near the control with the new cable, verify that it works on another machine before troubleshooting the problem machines. 3) get a breakout box at any electronics supply store, and compare the lights with a control that is verified to the trouble machines. 4) switch the cable ports at the PC, to test your switch box. What are you using for switching? 5) Can a program be sent and not recieved?? Maybe one pin is corroded or tarnished, and can't make a solid connection, this includes th ground pins.

6) Check the parameter settings on the controls, making sure you are using the correct port. 7) With the new PC, make sure the serial port works, and is connected. How did you test this? 8) try different software, something simple for CNC machines, download something like a CNC editor. 3 machines only, sounds like switch box to me. Take it apart, and clean the switch with electrical contact cleaner.

Good luck, let us know what works and what didn't.

samurai.

Reply to
samurai

No lightening - that's this week apparently!

Switching is using a manual switch box. This has been tested and is OK.

Read the Fanuc and Heidenhain links - useful stuff, will be saving them for future reference.

Didn't get around to buying a breakout box but will do to assist with any future problems.

The PC I'm using is one with a multitude of USB ports and no serial so I am using a USB to serial convertor (which is working fine in two other locations in the factory).

With regard to the faulty systemm, I have an identical setup and this is OK. The only difference between the two is that the working setup had surge protection. Added this to my faulty setup and it now works.

Our electrician is sceptical, but the only way I can prove this works is to remove the surge protection and watch another (probably) PC get messed up. Can't see the point in doing this and will therefore be leaving well alone. Whilst I cannot say that this is the definitive solution, it seems likely and at least the overall situation is improved with the PC now having surge protection.

Thank you all for your interest and comments.

Regards, Steve

samurai wrote:

Reply to
Steve J

Ive had a lot of troubles with usb to serial port cables. They seem to be very touchy. I would bet that you have a ground loop in the system and the surge protector is correcting the problem. It doesnt take much of a ground loop current to blow out the inputs or outputs of a pc or control .

They could be AC or DC current so if you test for them use both scales. A large ground loop current can be an indication of other problems in the building electrical system. A bad ground and a leaky appliance, motor or such will give you ground loop currents.

John

Reply to
john

I will be getting our electrician to look into this and will report back.

john wrote:

Reply to
Steve J

I've had troubles with these USB -> Serial, while seemingly easy to install initially, they are a pain to troubleshoot. Check the driver, make sure the settings are correct for the USB, something about the clock cycle if I recall correctly. Be sure to check the web for updated drivers and manuals. Check the actual serial port number Windows uses Control Panel ->

System -> 'Hardware' tab -> Device Manager, under Ports. While there, double check all the little settings compared to the other computers.

Since you changed the computer, and reinstalled the drivers, the virtual COM port may have changed ( because of a registry issue with XP, and number of times installing the driver).

Get a PCMCIA serial card from Qualtech or StarCom, they are very reliable and durable.

This sounds like a driver problem, not an electrical problem.

samurai.

Reply to
samurai

Steve,

Newer Computers, Hardware, Software using USB is more stable now than it use to be communicating with CNC's but it's still not bullet proof.

With my laptop I use a PCMCIA/RS232 card and have not had a problem since.

formatting link
(if you type this in by hand don't forget the "s" on automations or you will be redirected to another site)

This could be an option for your desktop although I cannot recommend it from personal experience.

formatting link
Tom

Reply to
brewertr

You don't say what kind of 'serial' is being used. If using common mode serial, then your problems are expected. Use differential mode types of serial. RS-232 is common mode which is but another reason why the original RS-232 spec was only for connections of 50 feet and less.

Voltage differences can exist AND not be measured by a meter. To see them, an oscilloscope or something equivalent would be necessary.

If surge protector causes a change, then problem is probably a peripheral characteristic of that protector - its parasitic capacitance. That capacitance would shunt out common mode noise - a frequencies that involve things the electrician would not be familiar with.

Aga> No lightening - that's this week apparently!

Reply to
w_tom

How long is the run....I'd imagine a noisy environment.?! Did you build the cable yourself? Is it shielded? What wires are used (Tx,Rx,grnd?...which gnd? chassis or signal?)

We got hit with lightning a couple weeks ago and had a number of things go down (not puffs but certain not working afterwards). If we had've spent the few $'s on isolation we would've been ok!

I'd suggest an opto IC something like the 4n35's. Basically, it's a little IC that will take the hit for you and will protect the computer.

Wiring them up is easy (would suggest putting them in a socket as it would be easier to change them out in the future).

Cheers sb

Steve J wrote:

Reply to
mucker111

Steve, Relatively new to group. I have recently converted some of my RS-232 communications over to Ethernet. This has solved a few problems for me. Now there is no "one dedicated" PC to tie up so multiple users can shoot programs from any computer. And this has done away with any distance problems. And, now I don't have to deal with the port issues and switch boxes of years past. This has saved me from having to take the time to set-up one computer perfectly....only to be replaced or mucked up by someone else. If you are interested in this, let me know. MH

Reply to
Mr.Henderson

In answer to some of the questions raised:

Current wiring is 5 wire - SD-RD crossed RTS-CTS crossed Gnd-Gnd and at the device end, DSR, DTR & CD wired together.

This is all Fanuc standard.

The cable being used is shielded, but the shielding is not connected at either end.

The maximum cable run is of the order of 20m.

The current situation: One installation is working fine after surge protecting the PC's power supply. The second installation (which is surge protected) works fine on boot up but after a minute or two, any attempt to download stops after only few lines of code, say 100 bytes. Re-booting the PC is the current workaround.

Having read all the above, I'm considering using a Nport serial to ethernet converter to provide opto isolation to see if that clears the problem.

I appreciate that this is a kludge solution and, as has been pointed out, RS232 was not intended to be used for such long runs. What would be involved in using RS422 or RS485? Is it possible to simply buy conveters at both ends or would I need to upgrade my Fanuc controllers?

Steve

Reply to
Steve J

First consider whether your problem is noise or involves something larger such as voltage transient variations between two locations. For example, do electronics on both ends of the RS-232 cable get power from different power distribution sources? This latter problem also demands galvanic isolation. If communication crosses 'power source' boundaries (ie connects between two buildings), then galvanic isolation is preferred AND cable must route so as to be 'surge protected less than

10 foot' to the earthing electrode for both power source power panels. More on this later.

RS-485 is a differential mode answer to common mode RS-232. Anything communicating beyond its limited area should be using RS-485; not RS-232. Blackbox is a source of these serial port converters. Also BB Electronics at

formatting link
.

Peripheral cards are sold that work and act like RS-232 ports on the PC but are using RS-485. hardware. Just another and cheaper option if making the upgrade to RS-485 solutions.

If you put a surge protector adjacent to a power supply, well, that is not effective protection. The surge protector is effective when it makes a short connection to earth. The surge protector does not stop or block surges. It is effective when it connects those transients to the protection - earth ground. A protector that completly avoid all discussion of earthing is just not effective. The effective protector has a dedicated wire to make that all so essential 'less than 10 foot' connection to earthing.

There is no short connection to that 'all so essential' common point earthing if located at power supply. Anything that an adjacent protector would do is already inside that supply. Essential and short connection to earthing is same electrode required by NEC; back at the breaker box. That is where a 'whole house' type protector provides effective protection for that computer supply AND all other electronics powered by that same box. Effective protection is about earthing any transient on any incoming utility where that wire enters the building AND to a same 'single point earth ground'.

Also a surge protector is for hundreds of volts. Even tens of volts causes problems to RS-232. Tens of volts is completely ignored by the surge protector. So what would the protector do? Earth transients that would overwhelm protection already inside the electronics.

Shielding should be 'equipment grounded' only at one end of that cable. Trial and error might teach more, but only if you have electronic equipment (ie oscilloscope) to see the noise. Shielding does not work very well for common mode type serial communication; works so much better for differential mode serial such as RS-485.

Apparently you are us> In answer to some of the questions raised:

Reply to
w_tom

Fanuc don't need 5 wire, just 2-3 crossed, and 6,8,20 connected together, while 4-5 are connected together.

20m is not long at all, even at 9600 baud.

I would prove that that your communications is working before trying RS422 or Nport converters.

Have you tried a different cable, or sending CNC to CNC?? Or setup a computer right beside the machine? Have you double checked all the parameter settings, identical to the other machines?

By rebooting the computer, it still sounds like a problem with the computer.

Eliminate the problem, don't work around the problem.

samurai.

Reply to
samurai

Samurai makes an excellent point. Nothing posted previously says the existing hardware is functioning properly. Posted previously were solutions that assumed hardware on both ends was working properly - which was only assumed. Changing cables would not provide useful information. Smarter techs use an oscillscope or equivalent test equipment. A badly distorted communication signal from defective hardware would work most times - fail intermittently - and only be clearly defective on test equipment. Is the Fanuc or data terminal equipment marginal?

Samuai also implies is that the Fanuc already uses an Xon/Xoff protocol or something that makes hardware data throttling (pins 4-5) unnecessary. If you connect 4 to 5 and it works does not mean throttling is unnecessary. Only means that one location does not require data throttling. Connecting 4-5 together must be stated by the manual - else it might be required in some locations and not others.

20 meters is excessive even if is works in some locations. Why? Because 20 meters must work in every location. It does not. But again, little things such as where the AC plugs are connected can affect RS-232 - which is why RS-232 is not for distance communication.

Aga> Fanuc don't need 5 wire, just 2-3 crossed, and 6,8,20 connected

Reply to
w_tom

Reply to
Ivan

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.