From fce7a37f35ef0dd95dff6d0a54d643c5401d9de5 Mon Sep 17 00:00:00 2001 From: Mark Rivers Date: Thu, 25 Aug 2022 14:53:24 -0500 Subject: [PATCH 1/5] Fix ARCH so it does not change when compiling new ARCH --- iocs/motorSimIOC/iocBoot/iocMotorSim/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iocs/motorSimIOC/iocBoot/iocMotorSim/Makefile b/iocs/motorSimIOC/iocBoot/iocMotorSim/Makefile index e4ee12d..faae1be 100755 --- a/iocs/motorSimIOC/iocBoot/iocMotorSim/Makefile +++ b/iocs/motorSimIOC/iocBoot/iocMotorSim/Makefile @@ -1,8 +1,8 @@ TOP = ../.. include $(TOP)/configure/CONFIG -#ARCH = linux-x86_64 +ARCH = linux-x86_64 #ARCH = vxWorks-ppc32 -ARCH = $(EPICS_HOST_ARCH) +#ARCH = $(EPICS_HOST_ARCH) TARGETS = cdCommands TARGETS += envPaths include $(TOP)/configure/RULES.ioc From 543f755a15d89a02ed6210690048f26035befa95 Mon Sep 17 00:00:00 2001 From: Mark Rivers Date: Thu, 25 Aug 2022 14:53:42 -0500 Subject: [PATCH 2/5] Renamed to st.cmd --- .../iocBoot/iocMotorSim/st.cmd.unix | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 iocs/motorSimIOC/iocBoot/iocMotorSim/st.cmd.unix diff --git a/iocs/motorSimIOC/iocBoot/iocMotorSim/st.cmd.unix b/iocs/motorSimIOC/iocBoot/iocMotorSim/st.cmd.unix deleted file mode 100644 index f7ef9e6..0000000 --- a/iocs/motorSimIOC/iocBoot/iocMotorSim/st.cmd.unix +++ /dev/null @@ -1,26 +0,0 @@ -# The is the ASYN example for communication to 4 simulated motors -# "#!" marks lines that can be uncommented. - -< envPaths - -dbLoadDatabase("$(TOP)/dbd/motorSim.dbd") -motorSim_registerRecordDeviceDriver(pdbbase) - -dbLoadTemplate("motor.substitutions") - -# Create simulated motors: ( start card , start axis , low limit, high limit, home posn, # cards, # axes to setup) -motorSimCreate( 0, 0, -32000, 32000, 0, 1, 4 ) -# Setup the Asyn layer (portname, low-level driver drvet name, card, number of axes on card) -drvAsynMotorConfigure("motorSim1", "motorSim", 0, 4) - -motorSimCreateController("motorSim2", 8) -#asynSetTraceIOMask("motorSim2", 0, 4) -#asynSetTraceMask("motorSim2", 0, 255) - -# motorSimConfigAxis(port, axis, lowLimit, highLimit, home, start) -motorSimConfigAxis("motorSim2", 0, 20000, -20000, 500, 0) -motorSimConfigAxis("motorSim2", 1, 20000, -20000, 1500, 0) -motorSimConfigAxis("motorSim2", 2, 20000, -20000, 2500, 0) -motorSimConfigAxis("motorSim2", 3, 20000, -20000, 3000, 0) - -iocInit From 5c8ffbc6e7fe957efc336194a27587f0d74db62a Mon Sep 17 00:00:00 2001 From: Mark Rivers Date: Thu, 25 Aug 2022 14:54:26 -0500 Subject: [PATCH 3/5] Just one driver instance --- iocs/motorSimIOC/iocBoot/iocMotorSim/motor.substitutions | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/iocs/motorSimIOC/iocBoot/iocMotorSim/motor.substitutions b/iocs/motorSimIOC/iocBoot/iocMotorSim/motor.substitutions index c01e659..9ddebc0 100644 --- a/iocs/motorSimIOC/iocBoot/iocMotorSim/motor.substitutions +++ b/iocs/motorSimIOC/iocBoot/iocMotorSim/motor.substitutions @@ -6,9 +6,8 @@ pattern {IOC:, 2, "m$(N)", "asynMotor", motorSim1, 1, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""} {IOC:, 3, "m$(N)", "asynMotor", motorSim1, 2, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""} {IOC:, 4, "m$(N)", "asynMotor", motorSim1, 3, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""} - -{IOC:, 5, "m$(N)", "asynMotor", motorSim2, 0, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""} -{IOC:, 6, "m$(N)", "asynMotor", motorSim2, 1, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""} -{IOC:, 7, "m$(N)", "asynMotor", motorSim2, 2, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""} -{IOC:, 8, "m$(N)", "asynMotor", motorSim2, 3, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""} +{IOC:, 5, "m$(N)", "asynMotor", motorSim1, 4, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""} +{IOC:, 6, "m$(N)", "asynMotor", motorSim1, 5, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""} +{IOC:, 7, "m$(N)", "asynMotor", motorSim1, 6, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""} +{IOC:, 8, "m$(N)", "asynMotor", motorSim1, 7, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""} } From e69c6d16f394f8206dd3ef4f6237e766d1bc7a35 Mon Sep 17 00:00:00 2001 From: Mark Rivers Date: Thu, 25 Aug 2022 14:54:54 -0500 Subject: [PATCH 4/5] Obsolete --- .../motorSimIOC/iocBoot/iocMotorSim/st.cmd.win32 | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100755 iocs/motorSimIOC/iocBoot/iocMotorSim/st.cmd.win32 diff --git a/iocs/motorSimIOC/iocBoot/iocMotorSim/st.cmd.win32 b/iocs/motorSimIOC/iocBoot/iocMotorSim/st.cmd.win32 deleted file mode 100755 index aae512b..0000000 --- a/iocs/motorSimIOC/iocBoot/iocMotorSim/st.cmd.win32 +++ /dev/null @@ -1,16 +0,0 @@ -# The is the ASYN example for communication to 4 simulated motors -# "#!" marks lines that can be uncommented. - -< envPaths - -dbLoadDatabase("$(TOP)/dbd/motorSim.dbd") -motorSim_registerRecordDeviceDriver(pdbbase) - -dbLoadTemplate("motor.substitutions") - -# Create simulated motors: ( start card , start axis , low limit, high limit, home posn, # cards, # axes to setup) -motorSimCreate( 0, 0, -32000, 32000, 0, 1, 4 ) -# Setup the Asyn layer (portname, low-level driver drvet name, card, number of axes on card) -drvAsynMotorConfigure("motorSim1", "motorSim", 0, 4) - -iocInit From 726d181fb9680d1843c848500a5e4903475374f8 Mon Sep 17 00:00:00 2001 From: Mark Rivers Date: Thu, 25 Aug 2022 14:59:46 -0500 Subject: [PATCH 5/5] Change to model 3 driver --- iocs/motorSimIOC/iocBoot/iocMotorSim/st.cmd | 29 +++++++++++++-------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/iocs/motorSimIOC/iocBoot/iocMotorSim/st.cmd b/iocs/motorSimIOC/iocBoot/iocMotorSim/st.cmd index 824e2b2..25f1b16 100644 --- a/iocs/motorSimIOC/iocBoot/iocMotorSim/st.cmd +++ b/iocs/motorSimIOC/iocBoot/iocMotorSim/st.cmd @@ -1,20 +1,26 @@ -#!../../bin/linux-x86_64/motorSim +# The is the ASYN example for communication to 4 simulated motors +# "#!" marks lines that can be uncommented. < envPaths -cd "${TOP}" +dbLoadDatabase("$(TOP)/dbd/motorSim.dbd") +motorSim_registerRecordDeviceDriver(pdbbase) -## Register all support components -dbLoadDatabase "dbd/motorSim.dbd" -motorSim_registerRecordDeviceDriver pdbbase +dbLoadTemplate("motor.substitutions") -cd "${TOP}/iocBoot/${IOC}" +motorSimCreateController("motorSim1", 8) +#asynSetTraceIOMask("motorSim1", 0, HEX) +#asynSetTraceMask("motorSim1", 0, ERROR|FLOW|DRIVER) - -## motorUtil (allstop & alldone) -dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=motorSim:") - -## +# motorSimConfigAxis(port, axis, lowLimit, highLimit, home, start) +motorSimConfigAxis("motorSim1", 0, 20000, -20000, 500, 0) +motorSimConfigAxis("motorSim1", 1, 20000, -20000, 1500, 0) +motorSimConfigAxis("motorSim1", 2, 20000, -20000, 2500, 0) +motorSimConfigAxis("motorSim1", 3, 20000, -20000, 3000, 0) +motorSimConfigAxis("motorSim1", 4, 20000, -20000, 500, 0) +motorSimConfigAxis("motorSim1", 5, 20000, -20000, 1500, 0) +motorSimConfigAxis("motorSim1", 6, 20000, -20000, 2500, 0) +motorSimConfigAxis("motorSim1", 7, 20000, -20000, 3000, 0) iocInit @@ -22,3 +28,4 @@ iocInit motorUtilInit("motorSim:") # Boot complete +