From c4ced913d5081f90ee0c916578bcf0a9101b320c Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Fri, 5 Nov 2021 14:43:39 +0000 Subject: [PATCH 1/3] adding in auto_power db load --- TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.lua b/TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.lua index ca110ff4f..c9eacf551 100644 --- a/TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.lua +++ b/TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.lua @@ -39,6 +39,8 @@ function twincat_stcommon_main() db_args = string.format("MYPVPREFIX=%s,MOTOR_PV=%s,MOTOR_PORT=%s,ADDR=%s", pv_prefix, motor_pv, motor_port, axis_num-1) iocsh.devMotorCreateAxis(motor_port, axis_num-1, plc_version) iocsh.dbLoadRecords(single_axis_db, db_args) + auto_power_db_args = string.format("P=%s,M=%s,PORT=%s,ADDR=%s", pv_prefix, motor_pv, motor_port, axis_num-1) + iocsh.dbLoadRecords("$(MOTOR)/db/asyn_auto_power.db", auto_power_db_args) autosave_file:write(string.format("file \"motor_settings.req\" P=%s, M=MOT:%s\n", pv_prefix, motor_pv)) end autosave_file:close() From 620f077430ba596dec1e53e2131e7eb174bef678 Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Fri, 5 Nov 2021 14:45:28 +0000 Subject: [PATCH 2/3] add barndoors, sampleChanger, motorExtensions --- TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.cmd | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.cmd b/TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.cmd index 286d261a4..d796b5271 100644 --- a/TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.cmd +++ b/TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.cmd @@ -11,12 +11,21 @@ luash("st-common.lua") ## configure jaws < $(TWINCATCONFIG)/jaws.cmd +## configure barndoors +< $(TWINCATCONFIG)/barndoors.cmd + ## configure axes < $(TWINCATCONFIG)/axes.cmd ## motion set points < $(TWINCATCONFIG)/motionsetpoints.cmd +## sample changer +< $(TWINCATCONFIG)/sampleChanger.cmd + +## motor extensions +< $(TWINCATCONFIG)/motorExtensions.cmd + ##ISIS## Load common DB records < $(IOCSTARTUP)/dbload.cmd From bc379ed3cf59fda9e3e034c9f6aaf31d172b2dfa Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Fri, 5 Nov 2021 14:53:14 +0000 Subject: [PATCH 3/3] missing MOT: before AutoEnable --- TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.lua b/TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.lua index c9eacf551..631347b73 100644 --- a/TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.lua +++ b/TWINCAT/iocBoot/iocTWINCAT-IOC-01/st-common.lua @@ -39,7 +39,7 @@ function twincat_stcommon_main() db_args = string.format("MYPVPREFIX=%s,MOTOR_PV=%s,MOTOR_PORT=%s,ADDR=%s", pv_prefix, motor_pv, motor_port, axis_num-1) iocsh.devMotorCreateAxis(motor_port, axis_num-1, plc_version) iocsh.dbLoadRecords(single_axis_db, db_args) - auto_power_db_args = string.format("P=%s,M=%s,PORT=%s,ADDR=%s", pv_prefix, motor_pv, motor_port, axis_num-1) + auto_power_db_args = string.format("P=%s,M=MOT:%s,PORT=%s,ADDR=%s", pv_prefix, motor_pv, motor_port, axis_num-1) iocsh.dbLoadRecords("$(MOTOR)/db/asyn_auto_power.db", auto_power_db_args) autosave_file:write(string.format("file \"motor_settings.req\" P=%s, M=MOT:%s\n", pv_prefix, motor_pv)) end