#!../../bin/linux-x86/simMotor

# Execute soft_pre_st.cmd script
< /afs/slac/g/lcls/epics/iocCommon/All/Dev/soft_pre_st.cmd

< envPaths

## Register all support components
cd "$(TOP)"
dbLoadDatabase("dbd/simMotor.dbd")
simMotor_registerRecordDeviceDriver(pdbbase)

## Loading asyn and stuff

## Create simulated motors: ( start card , start axis , low limit, high limit, home posn, # cards, # axes to setup)
#! motorSimCreate( 0, 0, -32000, 32000, 0, 1, 1)
## Setup the Asyn layer (portname, low-level driver drvet name, card, number of axes on card)
#! drvAsynMotorConfigure("motorSim1", "motorSim", 0, 1)


motorSimCreateController("motorSim1", 1)

## motorSimConfigAxis(port, axis, lowLimit, highLimit, home, start)
motorSimConfigAxis("motorSim1", 0, 20000, -20000,  500, 0)




## Load motor records
#dbLoadRecords("db/motorSimTest.db","DEVICE=MOTR:B034:100")

dbLoadRecords("db/simMotor_db.db")

iocInit()

