EM60-changes
This commit is contained in:
@@ -58,6 +58,7 @@ typedef enum {
|
||||
SPINDLE_TYPE_SUNFAR_E300,
|
||||
SPINDLE_TYPE_OMRON_MX2,
|
||||
SPINDLE_TYPE_V70,
|
||||
SPINDLE_TYPE_EM60,
|
||||
} spindle_type_t;
|
||||
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ typedef enum {
|
||||
|
||||
REG_FREQ_SET,
|
||||
REG_FREQ_SIGN_SET,
|
||||
REG_FREQ_SCALED_SET,
|
||||
|
||||
REG_STOP_WRITE,
|
||||
REG_FWD_WRITE,
|
||||
@@ -179,6 +180,17 @@ const vfd_reg_t v70_regs[] PROGMEM = {
|
||||
{REG_DISABLED},
|
||||
};
|
||||
|
||||
const vfd_reg_t em60_regs[] PROGMEM = {
|
||||
{REG_MAX_FREQ_READ, 0x0007, 0}, // Read max frequency
|
||||
{REG_FREQ_SCALED_SET, 0xa001, 10000}, // Set scaled frequency
|
||||
{REG_FREQ_READ, 0x9000, 0}, // Read frequency
|
||||
{REG_FWD_WRITE, 0xa000, 1}, // Run forward
|
||||
{REG_REV_WRITE, 0xa000, 2}, // Run reverse
|
||||
{REG_STOP_WRITE, 0xa000, 5}, // Stop
|
||||
{REG_STATUS_READ, 0xb000, 0}, // Read status
|
||||
{REG_DISABLED},
|
||||
};
|
||||
|
||||
|
||||
static vfd_reg_t regs[VFDREG];
|
||||
static vfd_reg_t custom_regs[VFDREG];
|
||||
@@ -344,6 +356,11 @@ static bool _exec_command() {
|
||||
reg.value = vfd.power * vfd.max_freq;
|
||||
break;
|
||||
|
||||
case REG_FREQ_SCALED_SET:
|
||||
write = true;
|
||||
reg.value = vfd.power * reg.value;
|
||||
break;
|
||||
|
||||
case REG_CONNECT_WRITE:
|
||||
case REG_STOP_WRITE:
|
||||
case REG_FWD_WRITE:
|
||||
@@ -399,6 +416,7 @@ void vfd_spindle_init() {
|
||||
case SPINDLE_TYPE_SUNFAR_E300: _load(sunfar_e300_regs); break;
|
||||
case SPINDLE_TYPE_OMRON_MX2: _load(omron_mx2_regs); break;
|
||||
case SPINDLE_TYPE_V70: _load(v70_regs); break;
|
||||
case SPINDLE_TYPE_EM60: _load(em60_regs); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
||||
@@ -380,3 +380,64 @@ script#tool-view-template(type="text/x-template")
|
||||
|
|
||||
| and spindle type. The VFD must be rebooted after changing
|
||||
| the above settings.
|
||||
|
||||
|
||||
.notes(v-if="tool_type.startsWith('EM60')")
|
||||
h2 Notes
|
||||
p Set the following using the VFD's front panel.
|
||||
table.modbus-regs.fixed-regs
|
||||
tr
|
||||
th Address
|
||||
th Value
|
||||
th Meaning
|
||||
th Description
|
||||
tr
|
||||
td.reg-addr P0.0.03
|
||||
td.reg-value 2
|
||||
td Modbus
|
||||
td Control mode
|
||||
tr
|
||||
td.reg-addr P0.0.04
|
||||
td.reg-value 9
|
||||
td Modbus
|
||||
td Frequency source A
|
||||
tr
|
||||
td.reg-addr P0.1.00
|
||||
td.reg-value 0
|
||||
td Source A
|
||||
td Frequency source
|
||||
tr
|
||||
td.reg-addr P4.1.00
|
||||
td.reg-value 3
|
||||
td 9600 BAUD
|
||||
td Must match #[tt baud] above
|
||||
tr
|
||||
td.reg-addr P4.1.01
|
||||
td.reg-value 0
|
||||
td 8N2
|
||||
td Data format
|
||||
tr
|
||||
td.reg-addr P4.1.02
|
||||
td.reg-value 1
|
||||
td Bus id
|
||||
td Must match #[tt bus-id] above
|
||||
tr
|
||||
td.reg-addr P4.1.03
|
||||
td.reg-value 2
|
||||
td No delay
|
||||
td Communications response delay
|
||||
tr
|
||||
td.reg-addr P4.1.04
|
||||
td.reg-value 0
|
||||
td No timeout
|
||||
td Communications timeout
|
||||
tr
|
||||
td.reg-addr P4.1.05
|
||||
td.reg-value 1
|
||||
td RTU
|
||||
td Modbus format
|
||||
p
|
||||
| Other settings according to the
|
||||
|
|
||||
a(href="https://buildbotics.com/upload/vfd/em60.pdf",
|
||||
target="_blank") EM60 VFD manual
|
||||
@@ -270,7 +270,8 @@
|
||||
"YL600, YL620, YL620-A VFD (Beta)",
|
||||
"FR-D700 (Beta)",
|
||||
"Sunfar E300 (Beta)",
|
||||
"OMRON MX2"
|
||||
"OMRON MX2",
|
||||
"EM60"
|
||||
],
|
||||
"default": "Disabled",
|
||||
"code": "st"
|
||||
@@ -364,6 +365,7 @@
|
||||
"max-freq-fixed",
|
||||
"freq-set",
|
||||
"freq-signed-set",
|
||||
"freq-scaled-set",
|
||||
"stop-write",
|
||||
"forward-write",
|
||||
"reverse-write",
|
||||
|
||||
Reference in New Issue
Block a user