diff --git a/iocBoot/iocWithAsyn/motor.substitutions.sim b/iocBoot/iocWithAsyn/motor.substitutions.sim new file mode 100644 index 00000000..98e78713 --- /dev/null +++ b/iocBoot/iocWithAsyn/motor.substitutions.sim @@ -0,0 +1,9 @@ +file "../../db/basic_asyn_motor.db" +{ +pattern +{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} +{IOC:, 1, "m$(N)", "asynMotor", motorSim1, 0, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""} +{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, ""} +} diff --git a/iocBoot/iocWithAsyn/st.cmd.sim b/iocBoot/iocWithAsyn/st.cmd.sim new file mode 100644 index 00000000..91ff22c7 --- /dev/null +++ b/iocBoot/iocWithAsyn/st.cmd.sim @@ -0,0 +1,19 @@ +# The is the ASYN example for communication to 4 simulated motors +# "#!" marks lines that can be uncommented. + +< envPaths + +dbLoadDatabase("$(TOP)/dbd/WithAsyn.dbd") +WithAsyn_registerRecordDeviceDriver(pdbbase) +dbLoadTemplate("motor.substitutions.sim") + +motorSimCreateController("motorSim1", 4) +#asynSetTraceIOMask("motorSim1", 0, 4) +#asynSetTraceMask("motorSim1", 0, 255) + +# 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) +iocInit