Skip to content

Commit

Permalink
Simplified the newfocus8742 example. Made it easier to copy to a diff…
Browse files Browse the repository at this point in the history
…erent IOC.
  • Loading branch information
kmpeters committed May 5, 2023
1 parent a018e6d commit 952c14b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 72 deletions.

This file was deleted.

This file was deleted.

25 changes: 25 additions & 0 deletions iocs/newFocusIOC/iocBoot/iocNewFocus/newfocus8742.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

epicsEnvSet("PORT", "NF1")
epicsEnvSet("IP_ADDR", "10.28.2.211")

# Setup IP port for 8742
drvAsynIPPortConfigure("$(PORT)_ETH", "$(IP_ADDR):23")
asynOctetSetInputEos("$(PORT)_ETH",0,"\r\n")
asynOctetSetOutputEos("$(PORT)_ETH",0,"\r")

#db asyn debug traces
asynSetTraceMask("$(PORT)_ETH",-1,0x1)
asynSetTraceIOMask("$(PORT)_ETH",-1,0x1)

# New Focus Picomotor Network Controller (model 87xx) configuration parameters:
# (1) Controller asyn port name (string)
# (2) IP asyn port name (string)
# (3) Number of axes
# (4) Moving poll period (ms)
# (5) Idle poll period (ms)
nf874xCreateController("$(PORT)", "$(PORT)_ETH", 3, 200, 1000)

## Load record instances
dbLoadTemplate("newfocus8742.substitutions", "P=$(PREFIX),PORT=$(PORT)")

dbLoadRecords("$(ASYN)/db/asynRecord.db", "P=$(PREFIX),R=asyn_1,PORT=$(PORT),ADDR=,OMAX=80,IMAX=80")
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
file "$(MOTOR)/db/asyn_motor.db"
{
pattern
{M, DTYP, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT}
{"m1", "asynMotor", 1, "m1", counts, Pos, 100, 25, 1, 0, 0, 50, 1, 0, 0, 0, ""}
{"m2", "asynMotor", 2, "m2", counts, Pos, 100, 25, 1, 0, 0, 50, 1, 0, 0, 0, ""}
{"m3", "asynMotor", 3, "m3", counts, Pos, 100, 25, 1, 0, 0, 50, 1, 0, 0, 0, ""}
}
2 changes: 2 additions & 0 deletions iocs/newFocusIOC/iocBoot/iocNewFocus/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=newFocus:")

##
< PMNC87xx.cmd
##
< newfocus8742.cmd

iocInit

Expand Down

0 comments on commit 952c14b

Please sign in to comment.