Test and fix auto start
This commit is contained in:
@@ -235,7 +235,7 @@ void ecmcGrbl::parseConfigStr(char *configStr) {
|
||||
}
|
||||
}
|
||||
|
||||
// Main program for writing configs and g-code to grbl
|
||||
// Main program for grbl client (interaction with grbl, configs and g-code)
|
||||
void ecmcGrbl::doWriteWorker() {
|
||||
// simulate serial connection here (need mutex)
|
||||
std::string reply = "";
|
||||
@@ -267,8 +267,8 @@ void ecmcGrbl::doWriteWorker() {
|
||||
delay_ms(2);
|
||||
}
|
||||
delay_ms(2);
|
||||
|
||||
// Blocks until written
|
||||
|
||||
// Write configs (blocks)
|
||||
if(cfgDbgMode_){
|
||||
printf("GRBL: INFO: Configuration start\n");
|
||||
}
|
||||
@@ -278,6 +278,12 @@ void ecmcGrbl::doWriteWorker() {
|
||||
|
||||
// All configs done above
|
||||
writerBusy_ = false;
|
||||
|
||||
if(cfgAutoStart_) {
|
||||
setExecute(0);
|
||||
setExecute(1);
|
||||
}
|
||||
|
||||
for(;;) {
|
||||
|
||||
// wait for execute
|
||||
|
||||
@@ -84,7 +84,7 @@ epicsEnvSet("PLUGIN_VER" ,"develop")
|
||||
require ecmc_plugin_grbl $(PLUGIN_VER)
|
||||
|
||||
epicsEnvSet(ECMC_PLUGIN_FILNAME,"/home/pi/epics/base-7.0.5/require/${E3_REQUIRE_VERSION}/siteMods/ecmc_plugin_grbl/$(PLUGIN_VER)/lib/${EPICS_HOST_ARCH=linux-x86_64}/libecmc_plugin_grbl.so")
|
||||
epicsEnvSet(ECMC_PLUGIN_CONFIG,"DBG_PRINT=1;X_AXIS=1;Y_AXIS=2;SPINDLE_AXIS=3;AUTO_ENABLE=1;AUTO_START=0;") # Only one option implemented in this plugin
|
||||
epicsEnvSet(ECMC_PLUGIN_CONFIG,"DBG_PRINT=1;X_AXIS=1;Y_AXIS=2;SPINDLE_AXIS=3;AUTO_ENABLE=1;AUTO_START=1;") # Only one option implemented in this plugin
|
||||
${SCRIPTEXEC} ${ecmccfg_DIR}loadPlugin.cmd, "PLUGIN_ID=0,FILE=${ECMC_PLUGIN_FILNAME},CONFIG='${ECMC_PLUGIN_CONFIG}', REPORT=1"
|
||||
epicsEnvUnset(ECMC_PLUGIN_FILNAME)
|
||||
epicsEnvUnset(ECMC_PLUGIN_CONFIG)
|
||||
@@ -117,7 +117,7 @@ ecmcGrblLoadGCodeFile("./plc/gcode.nc",0)
|
||||
|
||||
##############################################################################
|
||||
## PLC 0
|
||||
$(SCRIPTEXEC) $(ecmccfg_DIR)loadPLCFile.cmd, "PLC_ID=0, SAMPLE_RATE_MS=1000,FILE=./plc/grbl.plc")
|
||||
#$(SCRIPTEXEC) $(ecmccfg_DIR)loadPLCFile.cmd, "PLC_ID=0, SAMPLE_RATE_MS=1000,FILE=./plc/grbl.plc")
|
||||
|
||||
##############################################################################
|
||||
############# Configure diagnostics:
|
||||
|
||||
Reference in New Issue
Block a user