- What can be possible root causes in case of sporadic USB errors reported by the controller or software?
USB is generally spoken one of the interface with the highest sensitivity concerning external signal disturbance (so-called "EMI = Electromagnetic interference"). USB interfaces had been originally intended and designed for office applications and devices. Nevertheless USB is partly in use by industrial systems too. Based on the often higher risk of signal disturbance (EMI) within industrial environments (due to motors, relays, power connectors, ...) it gets more important to take care of high quality USB cables, reliable industry-proven USB hubs, and measures to reduce possible EMI impact. If there is an EMI issues present, USB is quite often the interface which reports communication errors before any other bus types are even affected at all.
Possible root causes and chance for improvements:
- Too long USB cables (i.e. longer than 3 meters).
-> Is the problem solved in case a shorter cable is installed (at least for testing)?
- Low quality USB cables.
-> Is the problem solved in case an USB cable of a different supplier is in use?
- USB cable close to motor power cables (or wires of other inductive loads)
-> Is the problem solved in case the USB cable is kept away and not be parallel to motor power cables or motor cables are shielded and tied to Earth?
Cross reference: How to connect a cable's shielding to Earth potential?
- USB hubs(!)
USB hubs are often a root cause of USB communication problems (based on different support cases).
-> Our initial hint is always to use a direct USB line (without a hub) in between the PC and controller. If the communication does not fail anymore then, it is very likely that the hub has been the root cause. The hub should be avoided then or replaced by a hub of a different supplier.
- We have successfully tested the USB hubs by EXSYS (-> http://exsys-shop.ch). There are probably lots of other USB hubs by other suppliers which work well too but we might not be aware of these based on missing own tests or user's feedback up to now. (Typically there is just a support issue present if a hub does not work like expected. So these once are easier to identify.)
- We had some USB communication error states with USB hubs by Keterex and Advantech. If you have one of these USB hubs in use, please check if the problem is solved in case of a direct USB connection in between the PC and controller or by using an USB hub of another supplier.
- If USB is in use in a pure office environment, there is less risk of some impact and signal disturbance by EMI because the USB cables will typically not be close to powerful motors or other inductive loads (like in a machine's cabinet or compact industrial device).
If you compare office and industrial applications there is one main difference by the transmitted type of data and kind of error handling.
Industrial applications typically transmit lots of short messages with a checksum (CRC) to verify the data content. If an industrial controller identifies a mismatching CRC or missing reaction (-> timeout), it will report a communication error state immediately. The application code of the supervisor controller (= master) or even the user can decide how to react then.
Office applications typically transfer a big bunch of data (e.g. by cameras or hard disk) or small data packages (like a mouse) which are updated frequently anyway. Most office applications might not report communication errors immediately because one wrong message or data field is often not critical or the application software might retry transmission without any notice to the user. Such a repeated transmission of data might slow down the system but this might even not be recognized by the user. Delayed reaction times are even not so critical and not so obvious by office applications (compared to industrial applications).
Therefore office applications often seem to run well without any problems from an user's point of view even if industrial devices (based on same USB cables and USB hubs) might report sporadic USB error states.
Please also have a look on the following documents in addition in case of USB communication issues:
- EPOS2 / EPOS4: Serial data frame error messages (USB / RS232)
- EPOS4 / IDX: Action steps in case of failing USB connection