RS485 VFD - Spark-Concepts/xPro-V5 GitHub Wiki
-
Placing an Oscilloscope on the RS485 output signal on the xPro
DISCONNECTED from VFD
: -
Measuring RS485 signal at the 220V VFD while connected to the xPro
WITHOUT RS485 isolation
: -
Measuring RS485 signal at the VFD while connected to the xPro
WITH RS485 isolation and twisted pair
:- Lets take a closer look:
** onnect the Huanyang VFD to the xProV5: Using the procedure in the Huanyang manual, set the following register values:
Set PD000 to 0 - unlock parameters Set PD001 to 2 - Command source is RS485 Set PD002 to 2 - Speed source is RS485 Set PD163 to 1 - Communications address 1 Set PD164 to 1 - 9600 b/s (3 - 38400) Set PD165 to 3 - 8 Bit No Parity - RTU Set PD000 to 1 - lock parameters Huanyang-VFD-manual.pdf
Also verify the following settings (based on the values on the motor's nameplate)
PD004 Base frequency as listed on spindle (typically 400) PD005 Maximum frequency Hz (typical value for spindles is 400) PD011 Min speed (Recommended Air-cooled=120 Water=100) PD014 Acceleration time (Test to optimize) PD015 Deceleration time (Test to optimize) PD023 Reverse run enabled (set to 1)
PD141 Spindle max rated voltage (Typically 220) PD142 Max rated motor current (0.8kw=3.7, 1.5kw=7.0, 2.2kw=??) PD143 Motor Poles This parameter is set for the number of the motor’s pole according to the nameplate of the motor - I believe this is only used for the conversion of Hz to RPM (typically 2 or 4) PD144 Rated Motor Revolution at 50Hz (Typically 3000 @ 50Hz and 24000 @ 400Hz)
For debugging, the best route is to use CNCjs and check the start-up/initialization messaging that comes out over USB.
- Power on your VFD, power on xPRO
- Open CNCjs, connect to the Silicon Labs port
- Hit the physical Reset button on the xPRO
This will spit out a bunch of information - you are looking for the spindle information (directly below the trinamic self-tests) If there is an issue with the communication you will see something like this:
While a successful start will look like this:
If still unsuccessful a few things to check:
- One of the RS485 specific firmwares are loaded (CNC_xPRO_V5_....485..)
- The switch to select the EN/PWM or RS485 mode on the xPRO V5 uses a long actuator and will sometimes not fully seat. Flip the switch back to the EN/PWM side then flip it to the RS485 side (use a small driver to make sure the base of the actuator has flipped fully)
All,
Please read below in it's entirety (also for 220V VFD user please see note at the end of this post) - also, if at any point I'm not clear or what I'm saying doesn't make sense, please repost and I will do my best to explain in more detail.
we're seeing a-lot of issues regarding RS485 communication errors.... most all issues regarding this revolve around folks with 220VAC mains and 90% of the issues are related to ground loops, RF coupling and/or faulty wiring or loose/misplaced grounds/neutrals: https://github.com/Spark-Concepts/xPro-V5/issues/116#issuecomment-1154745817, https://github.com/Spark-Concepts/xPro-V5/issues/157#issuecomment-1180644324. These can sometimes be extremely frustrating and often difficult to troubleshoot . Some folks have also used RS485 to USB converters to test communications between the VFD without issue - in this situation your computer's power supply is typically isolated from mains power; in other words you eliminate the potential for ground loop disturbances on the RS485 signal path
RS485 is a differential pair, meaning the differential voltage between RS485A and RS458B and not with referenced to ground); this means common mode noise (noise the the same on both A and B and can dance around in sync if measured with an oscilloscope relative to ground - however if measured differentially (voltage on A - B) you should get a nice clean square wave... again this all falls short when coupled to ground.
- RS485 is also bi-directional, meaning it sends and receives on the same set of wires
A few things to check first:
- ensure your firmware is up-to-date
- RS485 wiring is less than 1 meter in length, twisted, and connected properly (resistors are optional)
- Verify the PWM-RS485 switch(1) is set to RS485
- Verify both the red and green LED's below the PWM-RS485 switch are flashing periodically
- Sometimes the PWM-RS485 switch contacts may be contaminated with flux as received from manufacturing; try using contact cleaner or applying 99% isopropyl alcohol with a dropper to the switch (working it back an forth a few times) ONLY USE (99% IPA - ANYTHING LESS THAT IS DILUTED WITH WATER AND WILL HAVE THE ADVERSE EFFECT)
- verify the spindle type is defined - on the command window send the following:
$Spindle/Type=HUANYANG
if that doesn't work, try$Spindle/Type=H2A
- Verify your VFD is configured properly using the procedure in the Huanyang-VFD-manual PLEASE REFER TO THE MANUAL SPECIFIC TO YOUR MODEL VFD; not all VFD's are the same despite the name on it
Set the following register values via the VFD touchpad (should be the same on most VFD's - VERIFY ON YOUR SPECIFIC MODEL VFD):
Register | Value | Description |
---|---|---|
PD000 | 0 | unlock parameters |
PD001 | 2 | Command source is RS485 |
PD002 | 2 | Speed source is RS485 |
PD163 | 1 | Communications address 1 |
PD164 | 1 | 9600 b/s |
PD165 | 3 | 8 Bit No Parity - RTU |
PD000 | 1 | lock parameters |
Also check the following settings (these will setting will vary based on the values indicated on the motor's nameplate and your mains voltage 110VAC vs 220VAC)
Register | Description |
---|---|
PD004 | Base frequency as listed on spindle (typically 400) |
PD005 | Maximum frequency Hz (typical value for spindles is 400) |
PD011 | Min speed (recommended air-cooled=120 water=100) |
PD014 | Acceleration time (test to optimize) |
PD015 | Deceleration time (test to optimize) |
PD023 | Reverse run enabled (set to 1) |
PD141 | Spindle max rated voltage (typically 220) |
PD142 | Max rated motor current (0.8kw=3.7, 1.5kw=7.0, 2.2kw=??) |
PD143 | Motor poles (typically 2 or 4) |
PD144 | Rated motor revolution at 50Hz (typically 3000 @ 50Hz and 24000 @ 400Hz) |
- If you're still believe your having issues and trying to narrow down ground loop or issues otherwise (partial messages received etc..), load the following RS485 debug firmware: CNC_xPRO_V5_XYYZ_NO_485_debug.bin
- The RS485 Debug bin file is for debugging VFD RS-485 communication issues and requires USB connection and CNCJS or USB serial sender program
- this firmware assumes/requires a NO (normally open) e-stop (unplug estop button after debug firmware is loaded)
- Once connected to the X-Pro using CNCJS will echo commands sent to and from the VFD via RS-485
- The terminal window will display messages from the X-Pro as Tx:....... and messages recieved from the VFD as Rx:........
as a side note, we (Spark Concepts) seldom run into issues with VFD's running on 110V mains. Since we are US based (110V mains), it's impossible to test the 220V 100% representative. Therefore we are in the process of acquiring a 220V voltage converter and 220V VFD since the 220V model VFD is different from the 120V version
- Our to-do plan: reverse engineer the RS485 signal path on the most popular 220V model VFD's and will determine if/where coupling may be occurring and try to reproduce/isolate any potential issues, and provide potential solutions.
as always, if you've tried all the steps above and are at your wits end, please contact us via the "Contact Us" on the Spark-concepts.com website and we will do our best to remedy your situation
The second example is not using a twisted pair or resistors. You are accurate, the twist does improve the signal quality, but not nearly the amount the is1. Placing an Oscilloscope on the RS485 output signal on the xPro DISCONNECTED from VFD
:
- Measuring RS485 signal at the 220V VFD while connected to the xPro
WITHOUT RS485 isolation
: olator does (difference is illustrated between image 2 and image 3 above). Also note, even with the degraded signal quality (image 2), I was still able to communicate with the spindle.
NOTE: The resistors were minimally effective in reducing noise with cable lengths less than 1-meter long. (resistors help eliminate transmission line reflections that may degrade the signal; typically prominent with longer cable lengths
Ultimately, the Huanyang VFD's due to the nature of how they are constructed, share a common ground and can unintentionally create ground loops thus permitting radiated noise to degrade the rs485 signal despite all best efforts. Ultimately to mitigate this scenario I reccomend implementing an RS485 isolator as shown above.
I will post a much more extensive write-up this weekend illustrating the effects of each wiring scheme along with actual pictures showing the configuration of each.
Spindle classes are defined in the firmware (the default firmware on the xProV5 is PWM). The Spindle Type is dynamically selected by entering $Spindle/Type=XXXXX
' in the command line. There are two classes of Spindles with two separate Spindle Types.
For the PWM and Laser Spindle classes:
$Spindle/Type=PWM
$Spindle/Type=LASER
For the RS485 VFD classes: