From: Joseph Coffland Date: Thu, 26 Sep 2019 02:30:28 +0000 (-0700) Subject: YL600, YL620, YL620-A support X-Git-Url: https://git.buildbotics.com/?a=commitdiff_plain;h=e49c56ef7852c10ca8537ba26963d6ca134f3aca;p=bbctrl-firmware YL600, YL620, YL620-A support --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d8944f..bee4016 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/avr/src/vfd_spindle.c b/src/avr/src/vfd_spindle.c index 6d0fb74..6e603bd 100644 --- a/src/avr/src/vfd_spindle.c +++ b/src/avr/src/vfd_spindle.c @@ -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}, }; diff --git a/src/pug/templates/tool-view.pug b/src/pug/templates/tool-view.pug index 640d970..3840732 100644 --- a/src/pug/templates/tool-view.pug +++ b/src/pug/templates/tool-view.pug @@ -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. diff --git a/src/resources/config-template.json b/src/resources/config-template.json index 0b988b5..1bc4a6a 100644 --- a/src/resources/config-template.json +++ b/src/resources/config-template.json @@ -193,7 +193,7 @@ "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" },