YL600, YL620, YL620-A support
authorJoseph Coffland <joseph@cauldrondevelopment.com>
Thu, 26 Sep 2019 02:30:28 +0000 (19:30 -0700)
committerJoseph Coffland <joseph@cauldrondevelopment.com>
Thu, 26 Sep 2019 02:30:28 +0000 (19:30 -0700)
CHANGELOG.md
src/avr/src/vfd_spindle.c
src/pug/templates/tool-view.pug
src/resources/config-template.json

index 8d8944f459f4880c5588e30d8dcb44faa2cbd43d..bee4016bdf3d3e53219f63839c517677b47e70e5 100644 (file)
@@ -7,6 +7,7 @@ Buildbotics CNC Controller Firmware Changelog
  - Report spindle status codes from Modbus.
  - Save more log files in bug report.
  - Fixed indicators low-side units.
+ - Support for YL600, YL620 & YL620-A VFDs.
 
 ## v0.4.10
  - Fix demo password check
index 6d0fb74a0f59ac121d8e02c7f60e95339aab8d53..6e603bd67b601dc81ac7cbcaa294e64dab7bc1c2 100644 (file)
@@ -116,16 +116,14 @@ const vfd_reg_t delta_vfd015m21a_regs[] PROGMEM = {
 
 
 const vfd_reg_t yl600_regs[] PROGMEM = {
-  {REG_CONNECT_WRITE,    P(7, 8), 1}, // P07_08_FREQ_SOURCE_1
-  {REG_CONNECT_WRITE,    P(0, 1), 1}, // P00_01_START_STOP_SOURCE
-  {REG_MAX_FREQ_READ,    P(0, 4), 0}, // P00_04_HIGEST_OUTPUT_FREQ
-  {REG_FREQ_SET,         P(7, 0), 0}, // P07_00_FREQ_1
-//  {REG_STOP_WRITE,       P(?, ?), ?}, //
-//  {REG_FWD_WRITE,        P(1, 0), ?}, // P01_00_DIRECTION
-//  {REG_REV_WRITE,        P(?, ?), ?}, //
-  {REG_FREQ_READ,        P(0, 0), 0}, // P00_00_MAIN_FREQ
-  {REG_DISCONNECT_WRITE, P(0, 1), 0}, // P00_01_START_STOP_SOURCE
-  {REG_DISCONNECT_WRITE, P(7, 8), 0}, // P07_08_FREQ_SOURCE_1
+  {REG_CONNECT_WRITE, 0x2000, 128}, // Reset all errors
+  {REG_MAX_FREQ_READ, 0x0004,   0}, // Max frequency
+  {REG_FREQ_SET,      0x2001,   0}, // Frequency
+  {REG_STOP_WRITE,    0x2000,   1}, // Stop drive
+  {REG_FWD_WRITE,     0x2000,  18}, // Forward
+  {REG_REV_WRITE,     0x2000,  34}, // Reverse
+  {REG_FREQ_READ,     0x200b,   0}, // Output freq
+  {REG_STATUS_READ,   0x2008,   0}, // Status
   {REG_DISABLED},
 };
 
index 640d9700e56840d33a971205692eb4983fefbaec..3840732e9f1d929fb39a0def0559ecf1e1dea845 100644 (file)
@@ -233,3 +233,51 @@ script#tool-view-template(type="text/x-template")
             target="_blank") Delta VFD015M21A VFD manual
           |
           | and spindle type.
+
+      .notes(v-if="tool_type.startsWith('YL600')")
+        h2 Notes
+        p Set the following using the VFD's frontpanel.
+        table.modbus-regs.fixed-regs
+          tr
+            th Address
+            th Value
+            th Meaning
+            th Description
+          tr
+            td.reg-addr P00.01
+            td.reg-value 3
+            td Modbus RS-485
+            td Start / stop command source
+          tr
+            td.reg-addr P03.00
+            td.reg-value 3
+            td 9600 baud
+            td Must match #[tt baud] above
+          tr
+            td.reg-addr P03.01
+            td.reg-value 1
+            td Modbus ID
+            td Must match #[tt bus-id] above
+          tr
+            td.reg-addr P03.02
+            td.reg-value 5
+            td 8 bit, no parity, 2 stop
+            td Must match #[tt parity] above
+          tr
+            td.reg-addr P03.04
+            td.reg-value 500
+            td RS-485 max delay
+            td Time in milliseconds
+          tr
+            td.reg-addr P07.15
+            td.reg-value 5
+            td RS-485
+            td Frequency source
+
+        p
+          | Other settings according to the
+          |
+          a(href="https://buildbotics.com/upload/vfd/YL620-A.pdf",
+            target="_blank") YL600 VFD manual
+          |
+          | and spindle type.
index 0b988b5a570629dcacb598bee198d1aca86ba745..1bc4a6a1103eab4d9ab2a0ad1586e25913450292 100644 (file)
       "type": "enum",
       "values": ["Disabled", "PWM Spindle", "Huanyang VFD", "Custom Modbus VFD",
                  "AC-Tech VFD", "Nowforever VFD", "Delta VFD015M21A (Beta)",
-                 "YL600 VFD (Beta)", "FR-D700 (Beta)"],
+                 "YL600, YL620, YL620-A VFD (Beta)", "FR-D700 (Beta)"],
       "default": "Disabled",
       "code": "st"
     },