Commit cb58e209 authored by kpetersn's avatar kpetersn
Browse files

Improved the example IOC

parent e7b0a7a0
......@@ -5,12 +5,12 @@
# index of the I1AM01 module
################################################################################
file "../../db/Phytron_motor.db"
file "$(TOP)/db/Phytron_motor.db"
{
pattern
{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, VMAX, ACCL, BDST, BVEL, BACC, MRES, ERES, PREC, DHLM, DLLM, INIT}
{PHYIOC:, 1, "m$(N)", "asynMotor", phyMotionPort, 11, "motor $(N)", Deg, Pos, 360, 180, 720, .5, 0, 180, .2, 1.8, 0.18, 5, 1440, -1440, ""}
{PHYIOC:, 2, "m$(N)", "asynMotor", phyMotionPort, 21, "motor $(N)", Deg, Pos, 360, 180, 720, .5, 0, 180, .2, 1.8, 0.18, 5, 1440, -1440, ""}
{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, VMAX, ACCL, BDST, BVEL, BACC, MRES, ERES, PREC, DHLM, DLLM, INIT}
{phytron:, 1, "m$(N)", "asynMotor", phyMotionPort, 11, "motor $(N)", Deg, Pos, 360, 180, 720, .5, 0, 180, .2, 1.8, 0.18, 5, 1440, -1440, ""}
{phytron:, 2, "m$(N)", "asynMotor", phyMotionPort, 21, "motor $(N)", Deg, Pos, 360, 180, 720, .5, 0, 180, .2, 1.8, 0.18, 5, 1440, -1440, ""}
}
......@@ -28,12 +28,12 @@ pattern
# in the macros that follow INIT. If set to NO, records will not be
# initialized - this option is useful if auto save/restore is used
################################################################################
file "../../db/Phytron_I1AM01.db"
file "$(TOP)/db/Phytron_I1AM01.db"
{
pattern
{P, N, M, PORT, ADDR, SCAN, TIMEOUT, INIT, HOMING, MODE, POS_OFFSET, NEG_OFFSET, INIT_TIME, POS_TIME, BOOST, SWITCH_TYP, PWR_STAGE, ENC_TYP, ENC_SFI, ENC_DIR, STOP_CURR, RUN_CURR, BOOST_CURR, CURRENT_DELAY, STEP_RES, PS_MON }
{PHYIOC, 1, ":m$(N)", phyMotionPort, 11, "1 second", 3, YES, 0, 1, 0, 0, 20, 20, 0, 0, 1, 1, 0, 1 20, 400, 500, 20, 0, 1}
{PHYIOC, 2, ":m$(N)", phyMotionPort, 21, "1 second", 3, YES, 0, 1, 0, 0, 20, 20, 0, 0, 1, 1, 0, 1 20, 400, 500, 20, 0, 1}
{P, N, M, PORT, ADDR, SCAN, TIMEOUT, INIT, HOMING, MODE, POS_OFFSET, NEG_OFFSET, INIT_TIME, POS_TIME, BOOST, SWITCH_TYP, PWR_STAGE, ENC_TYP, ENC_SFI, ENC_DIR, STOP_CURR, RUN_CURR, BOOST_CURR, CURRENT_DELAY, STEP_RES, PS_MON }
{phytron, 1, ":m$(N)", phyMotionPort, 11, "1 second", 3, YES, 0, 1, 0, 0, 20, 20, 0, 0, 1, 1, 0, 1 20, 400, 500, 20, 0, 1}
{phytron, 2, ":m$(N)", phyMotionPort, 21, "1 second", 3, YES, 0, 1, 0, 0, 20, 20, 0, 0, 1, 1, 0, 1 20, 400, 500, 20, 0, 1}
}
################################################################################
......@@ -42,9 +42,9 @@ pattern
# ADDR - Arbitrary value between 0 and 255
# TIMEOUT - asyn timeout
################################################################################
file "../../db/Phytron_MCM01.db"
file "$(TOP)/db/Phytron_MCM01.db"
{
pattern
{P, DTYP, PORT, ADDR, TIMEOUT}
{PHYIOC, "asynMotor", phyMotionPort, 0, 10 }
{P, DTYP, PORT, ADDR, TIMEOUT}
{phytron, "asynMotor", phyMotionPort, 0, 10 }
}
#!../../bin/linux-x86_64/phytron
## You may have to change phytron to something else
## everywhere it appears in this file
< envPaths
cd "${TOP}"
......@@ -11,11 +8,16 @@ cd "${TOP}"
dbLoadDatabase "dbd/phytron.dbd"
phytron_registerRecordDeviceDriver pdbbase
## Load record instances
#dbLoadRecords("db/xxx.db","user=kpetersn")
cd "${TOP}/iocBoot/${IOC}"
## motorUtil (allstop & alldone)
dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=phytron:")
##
iocInit
## Start any sequence programs
#seq sncxxx,"user=kpetersn"
## motorUtil (allstop & alldone)
motorUtilInit("phytron:")
# Boot complete
#!../../bin/linux-x86_64/phytronAxis
## You may have to change phytronAxis to something else
## everywhere it appears in this file
#!../../bin/linux-x86_64/phytron
< envPaths
## Register all support components
dbLoadDatabase("../../dbd/WithAsyn.dbd",0,0)
WithAsyn_registerRecordDeviceDriver(pdbbase)
dbLoadDatabase("../../dbd/phytron.dbd",0,0)
phytron_registerRecordDeviceDriver(pdbbase)
#drvAsynIPPortConfigure("testPort","localhost:8000",0,0,1)
drvAsynIPPortConfigure("testRemote","10.5.1.181:22222",0,0,1)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment