Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NWPRTXPS/NWPRTXPS-IOC-01App/Db/motor.substitutions
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
file $(MOTOR)/motorApp/Db/basic_asyn_motor.db {
pattern {P, M, ADDR, DTYP, PORT, DESC, EGU, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, ERES, PREC, DHLM, DLLM, INIT, DIR}
{"\$(P)", "\$(M)", 0, "asynMotor", "\$(XPS_PORT)", "DESC", "mm", "100", "0", "1", 0, 1, 0, "\$(MRES)", "\$(ERES)", 3, "360", "0", "", "Pos"}
{"\$(P)", "\$(M)", 0, "asynMotor", "\$(XPS_PORT)\$(CARD)", "DESC", "mm", "100", "0", "1", 0, 1, 0, "\$(MRES)", "\$(ERES)", 3, "360", "0", "", "Pos"}
}

file "$(MOTOR)/db/XPS_extra.db"{
Expand Down
2 changes: 0 additions & 2 deletions NWPRTXPS/iocBoot/iocNWPRTXPS-IOC-01/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

<macro name="AXIS1_ID" pattern="^.*[.].*$" description="The ID of the axis as set in the controller, looks like Group1.Axis1. Leave blank for no axis (default: )" defaultValue="" hasDefault="YES" />
<macro name="AXIS2_ID" pattern="^.*[.].*$" description="The ID of the axis as set in the controller, looks like Group1.Axis1. Leave blank for no axis (default: )" defaultValue="" hasDefault="YES" />
<macro name="AXIS3_ID" pattern="^.*[.].*$" description="The ID of the axis as set in the controller, looks like Group1.Axis1. Leave blank for no axis (default: )" defaultValue="" hasDefault="YES" />
<macro name="AXIS4_ID" pattern="^.*[.].*$" description="The ID of the axis as set in the controller, looks like Group1.Axis1. Leave blank for no axis (default: )" defaultValue="" hasDefault="YES" />

</macros>
<pvsets>
Expand Down
13 changes: 10 additions & 3 deletions NWPRTXPS/iocBoot/iocNWPRTXPS-IOC-01/st-common.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ $(IFSIM) drvAsynSerialPortConfigure("$(XPS_PORT)", "NUL", 0, 1)
$(IFSIM) motorSimCreateController("motorSim", $(NAXES))
$(IFSIM) epicsEnvSet("SIMSFX","Sim")

$(IFNOTSIM) XPSSetup(1)
$(IFNOTSIM) XPSSetup(2)
$(IFNOTSIM) XPSConfig(0, "$(IP_ADDRESS)", $(IP_PORT), $(NAXES), $(MOVING_POLL), $(IDLE_POLL))
$(IFNOTSIM) drvAsynMotorConfigure("$(XPS_PORT)", "motorXPS", 0, 1)
$(IFNOTSIM) XPSInterpose("$(XPS_PORT)")
$(IFNOTSIM) XPSConfig(1, "$(IP_ADDRESS)", $(IP_PORT), $(NAXES), $(MOVING_POLL), $(IDLE_POLL))
$(IFNOTSIM) drvAsynMotorConfigure("$(XPS_PORT)00", "motorXPS", 0, 1)
$(IFNOTSIM) drvAsynMotorConfigure("$(XPS_PORT)01", "motorXPS", 1, 1)
$(IFNOTSIM) XPSInterpose("$(XPS_PORT)00")
$(IFNOTSIM) XPSInterpose("$(XPS_PORT)01")

iocshCmdLoop("< st-axes.cmd", "MN=\$(I)", "I", 1, 4)

Expand All @@ -46,6 +49,10 @@ dbLoadRecords("$(MOTOR)/db/motorUtil.db","P=$(MYPVPREFIX)$(IOCNAME):,$(IFIOC)= ,

## per controller PVs
dbLoadRecords("$(MOTOR)/db/motorController.db","P=$(MYPVPREFIX),Q=MOT:MTR$(MTRCTRL):")
#asynSetTraceIOMask("$(XPS_PORT)00", -1, 0x2)
#asynSetTraceMask("$(XPS_PORT)00", -1, 0x9)
#asynSetTraceIOMask("$(XPS_PORT)01", -1, 0x2)
#asynSetTraceMask("$(XPS_PORT)01", -1, 0x9)
Comment on lines +52 to +55
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can readd this very easily if needed - i don't think it should live in source code

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do wonder if we should have such things conditional as in $(TRACE_PORT=#) asynSetTraceIOMask("$(XPS_PORT)00", -1, 0x2) so debugging is easy to turn on when needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


iocInit()

Expand Down
2 changes: 1 addition & 1 deletion NWPRTXPS/iocBoot/iocNWPRTXPS-IOC-01/st-motor.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ $(IFSIM) motorSimConfigAxis("motorSim", $(CARD), 200, -200, -200, 0)
dcalc("ERES", "1.0/$(STEP_NUM)", 1, 12)
dcalc("MRES", "1.0/$(STEP_NUM)", 1, 12)

dbLoadRecords("$(TOP)/db/motor$(SIMSFX=).db", "P=$(MYPVPREFIX),M=$(AMOTORPV),XPS_PORT=$(XPS_PORT),MRES=$(MRES),ERES=$(ERES),CARD=$(CARD)")
dbLoadRecords("$(TOP)/db/motor$(SIMSFX=).db", "P=$(MYPVPREFIX),M=$(AMOTORPV),XPS_PORT=$(XPS_PORT)$(CARD),MRES=$(MRES),ERES=$(ERES),CARD=$(CARD)")
dbLoadRecords("$(MOTOR)/db/motorStatus.db", "P=$(MYPVPREFIX),M=$(AMOTORPV),IOCNAME=$(IOCNAME)")