This commit is contained in:
Anders Sandstrom
2022-02-08 16:06:37 +01:00
parent 3d16853611
commit fa819a9ea6
4 changed files with 2109 additions and 127 deletions

View File

@@ -249,29 +249,6 @@ struct ecmcPluginData pluginDataDef = {
.funcArg10 = NULL,
.funcGenericObj = NULL,
},
// .funcs[3] =
// { /*----grbl_mc_reset----*/
// // Function name (this is the name you use in ecmc plc-code)
// .funcName = "grbl_mc_reset",
// // Function description
// .funcDesc = "double grbl_mc_reset(<reset>) : Reset grbl at positive edge of <reset>",
// /**
// * 7 different prototypes allowed (only doubles since reg in plc).
// * Only funcArg${argCount} func shall be assigned the rest set to NULL.
// **/
// .funcArg0 = NULL,
// .funcArg1 = grbl_mc_reset,
// .funcArg2 = NULL,
// .funcArg3 = NULL,
// .funcArg4 = NULL,
// .funcArg5 = NULL,
// .funcArg6 = NULL,
// .funcArg7 = NULL,
// .funcArg8 = NULL,
// .funcArg9 = NULL,
// .funcArg10 = NULL,
// .funcGenericObj = NULL,
// },
.funcs[3] =
{ /*----grbl_get_busy----*/
// Function name (this is the name you use in ecmc plc-code)

File diff suppressed because it is too large Load Diff

View File

@@ -13,15 +13,14 @@ ax2.reset:=0;
ax3.reset:=0;
# Enable axis in state 0
#if(static.state==0) {
# if(not(grbl_get_busy()) and not(grbl_get_error())) {
# grbl_set_all_enable(1);
# };
# if(grbl_get_all_enabled()) {
# static.state:=1;
# };
#};
static.state:=1;
if(static.state==0) {
if(not(grbl_get_busy()) and not(grbl_get_error())) {
grbl_set_all_enable(1);
};
if(grbl_get_all_enabled()) {
static.state:=1;
};
};
# Trigg motion
if(static.state == 1) {

View File

@@ -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=1;") # 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=0;AUTO_START=0;")
${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: