diff --git a/example/slit_equations/cfg/axis_main_matrix.plc b/example/slit_equations/cfg/axis_main_matrix.plc deleted file mode 100644 index c503e95..0000000 --- a/example/slit_equations/cfg/axis_main_matrix.plc +++ /dev/null @@ -1,31 +0,0 @@ -/* Forward kinematics to calculate virtual axes from real axes - | CEN | = FWD * | S1_LO | - | GAP | | S2_HI | - - Equations: - ax${AX_CEN}.enc.actpos:=(ax${AX_LO}.enc.actpos+ax${AX_HI}.enc.actpos)/2; - ax${AX_GAP}.enc.actpos:=ax${AX_HI}.enc.actpos-ax${AX_LO}.enc.actpos; -*/ - -var FWD1[2] := {0.5, 0.5}; -var FWD2[2] := { -1, 1 }; - -/* Inverse kinematics to calculate real axes from virtal axes - | S1_LO | = INV * | CEN | - | S2_HI | | GAP | - - Equations: - ax${AX_LO}.traj.extsetpos:=ax${AX_CEN}.traj.setpos-ax${AX_GAP}.traj.setpos/2; - ax${AX_HI}.traj.extsetpos:=ax${AX_CEN}.traj.setpos+ax${AX_GAP}.traj.setpos/2; -*/ - -var INV1[2] := { 1, -0.5}; -var INV2[2] := { 1, 0.5}; - -####### Kinematics for slit system. -# Macros cannot be used in an include. In order to find files, the loadPLCFile.cmd parameter "INC" defines the dirs that MSI will look for the file) -include "axis_kin_2DoF.plc_inc" - -####### State machine -# Macros cannot be used in an include. In order to find files, the loadPLCFile.cmd parameter "INC" defines the dirs that MSI will look for the file) -include "axis_sm.plc_inc" diff --git a/example/slit_equations/startup_matrix.script_ecmc b/example/slit_equations/startup_matrix.script_ecmc deleted file mode 100644 index 96d718b..0000000 --- a/example/slit_equations/startup_matrix.script_ecmc +++ /dev/null @@ -1,85 +0,0 @@ -#- Configuration scripts -require ecmccfg,"ENG_MODE=1,EC_RATE=100" - -#- Components lib -require ecmccomp - -#- Syncronization configs -require ecmc_master_slave sandst_a - -#- Only output errors -asynSetTraceMask(${ECMC_ASYN_PORT}, -1, 0x01) - - -#- ############################################################################ -#- add slaves -#- list of slaves (4 axis test motion box) -# Master0 -# 0 0:0 PREOP + EK1100 EtherCAT-Koppler (2A E-Bus) -# 1 0:1 PREOP + EL9227-5500 �berstromschutz 24V DC, 2K., max. 10A (Summe), eins -# 2 0:2 PREOP + EL5042 2Ch. BiSS-C Encoder -# 3 0:3 PREOP + EL5042 2Ch. BiSS-C Encoder -# 4 0:4 PREOP + EL3204 4K. Ana. Eingang PT100 (RTD) -# 5 0:5 PREOP + EL2008 8K. Dig. Ausgang 24V, 0.5A -# 6 0:6 PREOP + EL1008 8K. Dig. Eingang 24V, 3ms -# 7 0:7 PREOP + EL7041 1Ch. Stepper motor output stage (50V, 5A) -# 8 0:8 PREOP + EL7041 1Ch. Stepper motor output stage (50V, 5A) -# 9 0:9 PREOP + EL7041 1Ch. Stepper motor output stage (50V, 5A) -# 10 0:10 PREOP + EL7041 1Ch. Stepper motor output stage (50V, 5A) -# - -# 0:0 - EK1100 EtherCAT coupler -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EK1100" - -# 0:1 - EL9227-5500 -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL9227-5500" - -# 0:2 - EL5042 2Ch BiSS-C Encoder -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL5042" - -# 0:3 - EL5042 2Ch BiSS-C Encoder -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL5042" - -# 0:4 - EL3204 -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL3204" - -# 0:5 - EL2008 -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL2008" - -# 0:6 - EL1008 8K. Dig. Eingang 24V, 3ms -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL1008" - -# 0:7 - EL7041 1Ch Stepper -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL7041-0052" -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper,MACROS='I_MAX_MA=1000,I_STDBY_MA=500,U_NOM_MV=48000,R_COIL_MOHM=1230'" -${SCRIPTEXEC} ${ecmccfg_DIR}loadYamlAxis.cmd, "FILE=cfg/axis_ax5_LO.yaml, DRV_SLAVE=${ECMC_EC_SLAVE_NUM}, ENC_SLAVE=${ECMC_EC_SLAVE_NUM}, ENC_CHANNEL=01" - -# 0:8 - EL7041 1Ch Stepper -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL7041-0052" -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper,MACROS='I_MAX_MA=1000,I_STDBY_MA=500,U_NOM_MV=48000,R_COIL_MOHM=1230'" -${SCRIPTEXEC} ${ecmccfg_DIR}loadYamlAxis.cmd, "FILE=cfg/axis_ax6_HI.yaml, DRV_SLAVE=${ECMC_EC_SLAVE_NUM}, ENC_SLAVE=${ECMC_EC_SLAVE_NUM}, ENC_CHANNEL=01" - -# 0:9 - EL7041 1Ch Stepper -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL7041-0052" - -# 0:10 - EL7041 1Ch Stepper -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL7041-0052" - -#- ################################################################# -#- Virtual axes -${SCRIPTEXEC} ${ecmccfg_DIR}loadYamlAxis.cmd, "FILE=cfg/axis_vax5_YCEN.yaml, AX_ID=${AX_NUM=12}" -${SCRIPTEXEC} ${ecmccfg_DIR}loadYamlAxis.cmd, "FILE=cfg/axis_vax6_YGAP.yaml, AX_ID=${AX_NUM=13}" - -#- ################################################################# -#- PLCs with inverse kinematics (note the INC var including dirs to search for include files) -#- The group ID:s configured in yaml are stored in GRP__ID -${SCRIPTEXEC} ${ecmccfg_DIR}loadPLCFile.cmd, "FILE=./cfg/axis_main_matrix.plc, PLC_ID=1, INC=.:${ecmc_master_slave_DIR}, PLC_MACROS='PLC_ID=1, AX_M1=12, AX_M2=13, AX_S1=5, AX_S2=6, GRP_ID_RA=${GRP_realAxes_ID}, GRP_ID_VA=${GRP_virtualAxes_ID}'" - -#- ################################################################# -#- go active -${SCRIPTEXEC} ${ecmccfg_DIR}applyConfig.cmd -${SCRIPTEXEC} ${ecmccfg_DIR}setAppMode.cmd - -#- ############################################################################# -#- reset all errors -afterInit("ecmcConfigOrDie 'ControllerErrorReset()'") diff --git a/example/slit_matrix/cfg/axis_main.plc b/example/slit_matrix/cfg/axis_main.plc old mode 100755 new mode 100644 index b241a07..74d1c3a --- a/example/slit_matrix/cfg/axis_main.plc +++ b/example/slit_matrix/cfg/axis_main.plc @@ -1,7 +1,30 @@ +/* Forward kinematics to calculate virtual axes from real axes + | CEN | = FWD * | S1_LO | + | GAP | | S2_HI | + + Equations: + ax{AX_CEN}.enc.actpos:=(ax{AX_LO}.enc.actpos+ax{AX_HI}.enc.actpos)/2; + ax{AX_GAP}.enc.actpos:=ax{AX_HI}.enc.actpos-ax{AX_LO}.enc.actpos; +*/ + +var FWD1[2] := {0.5, 0.5}; +var FWD2[2] := { -1, 1 }; + +/* Inverse kinematics to calculate real axes from virtal axes + | S1_LO | = INV * | CEN | + | S2_HI | | GAP | + + Equations: + ax{AX_LO}.traj.extsetpos:=ax{AX_CEN}.traj.setpos-ax{AX_GAP}.traj.setpos/2; + ax{AX_HI}.traj.extsetpos:=ax{AX_CEN}.traj.setpos+ax{AX_GAP}.traj.setpos/2; +*/ + +var INV1[2] := { 1, -0.5}; +var INV2[2] := { 1, 0.5}; ####### Kinematics for slit system. # Macros cannot be used in an include. In order to find files, the loadPLCFile.cmd parameter "INC" defines the dirs that MSI will look for the file) -include "axis_kin_slit.plc_inc" +include "axis_kin_2DoF.plc_inc" ####### State machine # Macros cannot be used in an include. In order to find files, the loadPLCFile.cmd parameter "INC" defines the dirs that MSI will look for the file) diff --git a/example/slit_matrix/cfg/axis_main_matrix.plc b/example/slit_matrix/cfg/axis_main_matrix.plc deleted file mode 100644 index c503e95..0000000 --- a/example/slit_matrix/cfg/axis_main_matrix.plc +++ /dev/null @@ -1,31 +0,0 @@ -/* Forward kinematics to calculate virtual axes from real axes - | CEN | = FWD * | S1_LO | - | GAP | | S2_HI | - - Equations: - ax${AX_CEN}.enc.actpos:=(ax${AX_LO}.enc.actpos+ax${AX_HI}.enc.actpos)/2; - ax${AX_GAP}.enc.actpos:=ax${AX_HI}.enc.actpos-ax${AX_LO}.enc.actpos; -*/ - -var FWD1[2] := {0.5, 0.5}; -var FWD2[2] := { -1, 1 }; - -/* Inverse kinematics to calculate real axes from virtal axes - | S1_LO | = INV * | CEN | - | S2_HI | | GAP | - - Equations: - ax${AX_LO}.traj.extsetpos:=ax${AX_CEN}.traj.setpos-ax${AX_GAP}.traj.setpos/2; - ax${AX_HI}.traj.extsetpos:=ax${AX_CEN}.traj.setpos+ax${AX_GAP}.traj.setpos/2; -*/ - -var INV1[2] := { 1, -0.5}; -var INV2[2] := { 1, 0.5}; - -####### Kinematics for slit system. -# Macros cannot be used in an include. In order to find files, the loadPLCFile.cmd parameter "INC" defines the dirs that MSI will look for the file) -include "axis_kin_2DoF.plc_inc" - -####### State machine -# Macros cannot be used in an include. In order to find files, the loadPLCFile.cmd parameter "INC" defines the dirs that MSI will look for the file) -include "axis_sm.plc_inc" diff --git a/example/slit_matrix/startup.script_ecmc b/example/slit_matrix/startup.script_ecmc index 2c94811..2cdab38 100644 --- a/example/slit_matrix/startup.script_ecmc +++ b/example/slit_matrix/startup.script_ecmc @@ -5,7 +5,7 @@ require ecmccfg,"ENG_MODE=1,EC_RATE=100" require ecmccomp #- Syncronization configs -require ecmc_master_slave +require ecmc_master_slave sandst_a #- Only output errors asynSetTraceMask(${ECMC_ASYN_PORT}, -1, 0x01) @@ -73,7 +73,7 @@ ${SCRIPTEXEC} ${ecmccfg_DIR}loadYamlAxis.cmd, "FILE=cfg/axis_vax6_YGAP.yaml #- ################################################################# #- PLCs with inverse kinematics (note the INC var including dirs to search for include files) #- The group ID:s configured in yaml are stored in GRP__ID -${SCRIPTEXEC} ${ecmccfg_DIR}loadPLCFile.cmd, "FILE=./cfg/axis_main.plc, PLC_ID=1, INC=.:${ecmc_master_slave_DIR}, PLC_MACROS='PLC_ID=1, AX_CEN=12, AX_GAP=13, AX_LO=5, AX_HI=6, GRP_ID_RA=${GRP_realAxes_ID}, GRP_ID_VA=${GRP_virtualAxes_ID}'" +${SCRIPTEXEC} ${ecmccfg_DIR}loadPLCFile.cmd, "FILE=./cfg/axis_main.plc, PLC_ID=1, INC=.:${ecmc_master_slave_DIR}, PLC_MACROS='PLC_ID=1, AX_M1=12, AX_M2=13, AX_S1=5, AX_S2=6, GRP_ID_RA=${GRP_realAxes_ID}, GRP_ID_VA=${GRP_virtualAxes_ID}'" #- ################################################################# #- go active diff --git a/example/slit_matrix/startup_matrix.script_ecmc b/example/slit_matrix/startup_matrix.script_ecmc deleted file mode 100644 index 96d718b..0000000 --- a/example/slit_matrix/startup_matrix.script_ecmc +++ /dev/null @@ -1,85 +0,0 @@ -#- Configuration scripts -require ecmccfg,"ENG_MODE=1,EC_RATE=100" - -#- Components lib -require ecmccomp - -#- Syncronization configs -require ecmc_master_slave sandst_a - -#- Only output errors -asynSetTraceMask(${ECMC_ASYN_PORT}, -1, 0x01) - - -#- ############################################################################ -#- add slaves -#- list of slaves (4 axis test motion box) -# Master0 -# 0 0:0 PREOP + EK1100 EtherCAT-Koppler (2A E-Bus) -# 1 0:1 PREOP + EL9227-5500 �berstromschutz 24V DC, 2K., max. 10A (Summe), eins -# 2 0:2 PREOP + EL5042 2Ch. BiSS-C Encoder -# 3 0:3 PREOP + EL5042 2Ch. BiSS-C Encoder -# 4 0:4 PREOP + EL3204 4K. Ana. Eingang PT100 (RTD) -# 5 0:5 PREOP + EL2008 8K. Dig. Ausgang 24V, 0.5A -# 6 0:6 PREOP + EL1008 8K. Dig. Eingang 24V, 3ms -# 7 0:7 PREOP + EL7041 1Ch. Stepper motor output stage (50V, 5A) -# 8 0:8 PREOP + EL7041 1Ch. Stepper motor output stage (50V, 5A) -# 9 0:9 PREOP + EL7041 1Ch. Stepper motor output stage (50V, 5A) -# 10 0:10 PREOP + EL7041 1Ch. Stepper motor output stage (50V, 5A) -# - -# 0:0 - EK1100 EtherCAT coupler -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EK1100" - -# 0:1 - EL9227-5500 -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL9227-5500" - -# 0:2 - EL5042 2Ch BiSS-C Encoder -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL5042" - -# 0:3 - EL5042 2Ch BiSS-C Encoder -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL5042" - -# 0:4 - EL3204 -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL3204" - -# 0:5 - EL2008 -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL2008" - -# 0:6 - EL1008 8K. Dig. Eingang 24V, 3ms -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL1008" - -# 0:7 - EL7041 1Ch Stepper -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL7041-0052" -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper,MACROS='I_MAX_MA=1000,I_STDBY_MA=500,U_NOM_MV=48000,R_COIL_MOHM=1230'" -${SCRIPTEXEC} ${ecmccfg_DIR}loadYamlAxis.cmd, "FILE=cfg/axis_ax5_LO.yaml, DRV_SLAVE=${ECMC_EC_SLAVE_NUM}, ENC_SLAVE=${ECMC_EC_SLAVE_NUM}, ENC_CHANNEL=01" - -# 0:8 - EL7041 1Ch Stepper -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL7041-0052" -${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper,MACROS='I_MAX_MA=1000,I_STDBY_MA=500,U_NOM_MV=48000,R_COIL_MOHM=1230'" -${SCRIPTEXEC} ${ecmccfg_DIR}loadYamlAxis.cmd, "FILE=cfg/axis_ax6_HI.yaml, DRV_SLAVE=${ECMC_EC_SLAVE_NUM}, ENC_SLAVE=${ECMC_EC_SLAVE_NUM}, ENC_CHANNEL=01" - -# 0:9 - EL7041 1Ch Stepper -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL7041-0052" - -# 0:10 - EL7041 1Ch Stepper -${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL7041-0052" - -#- ################################################################# -#- Virtual axes -${SCRIPTEXEC} ${ecmccfg_DIR}loadYamlAxis.cmd, "FILE=cfg/axis_vax5_YCEN.yaml, AX_ID=${AX_NUM=12}" -${SCRIPTEXEC} ${ecmccfg_DIR}loadYamlAxis.cmd, "FILE=cfg/axis_vax6_YGAP.yaml, AX_ID=${AX_NUM=13}" - -#- ################################################################# -#- PLCs with inverse kinematics (note the INC var including dirs to search for include files) -#- The group ID:s configured in yaml are stored in GRP__ID -${SCRIPTEXEC} ${ecmccfg_DIR}loadPLCFile.cmd, "FILE=./cfg/axis_main_matrix.plc, PLC_ID=1, INC=.:${ecmc_master_slave_DIR}, PLC_MACROS='PLC_ID=1, AX_M1=12, AX_M2=13, AX_S1=5, AX_S2=6, GRP_ID_RA=${GRP_realAxes_ID}, GRP_ID_VA=${GRP_virtualAxes_ID}'" - -#- ################################################################# -#- go active -${SCRIPTEXEC} ${ecmccfg_DIR}applyConfig.cmd -${SCRIPTEXEC} ${ecmccfg_DIR}setAppMode.cmd - -#- ############################################################################# -#- reset all errors -afterInit("ecmcConfigOrDie 'ControllerErrorReset()'")