mirror of
https://github.com/Binary-Coalescence/motorDSM.git
synced 2025-08-05 06:05:40 -05:00
Updated example IOC for one axis and to use local serial port.
This commit is contained in:
@@ -6,15 +6,25 @@ dbLoadDatabase("../../dbd/acs.dbd")
|
||||
acs_registerRecordDeviceDriver(pdbbase)
|
||||
|
||||
# Port 2 on a Moxa
|
||||
drvAsynIPPortConfigure("serial1", "192.168.1.16:4002",0,0,0)
|
||||
#!drvAsynIPPortConfigure("serial1", "192.168.1.16:4002",0,0,0)
|
||||
# Local serial port
|
||||
#!drvAsynSerialPortConfigure("serial1", "/dev/ttyS0", 0, 0, 0)
|
||||
drvAsynSerialPortConfigure("serial1", "/tmp/motorport", 0, 0, 0)
|
||||
asynSetOption("serial1", 0, "baud", "115200")
|
||||
asynSetOption("serial1", 0, "bits", "8")
|
||||
asynSetOption("serial1", 0, "parity", "none")
|
||||
asynSetOption("serial1", 0, "stop", "1")
|
||||
|
||||
# not sure if these two are needed or what they should be set to:
|
||||
#!asynSetOption("serial1", 0, "clocal", "Y")
|
||||
#!asynSetOption("serial1", 0, "crtscts", "Y")
|
||||
|
||||
asynOctetSetInputEos("serial1",0,"\r")
|
||||
asynOctetSetOutputEos("serial1",0,"\r")
|
||||
asynSetTraceIOMask("serial1", 0, 2)
|
||||
#asynSetTraceMask("serial1", 0, 255)
|
||||
|
||||
MCB4BCreateController("MCB4B1", "serial1", 4, 100, 5000)
|
||||
MCB4BCreateController("MCB4B1", "serial1", 1, 100, 5000)
|
||||
|
||||
### Motors
|
||||
dbLoadTemplate "motor.substitutions.mcb4b"
|
||||
@@ -26,9 +36,3 @@ iocInit
|
||||
# This IOC does not use save/restore, so set values of some PVs
|
||||
dbpf("IOC:m1.RTRY", "0")
|
||||
dbpf("IOC:m1.TWV", "0.1")
|
||||
dbpf("IOC:m2.RTRY", "0")
|
||||
dbpf("IOC:m2.TWV", "0.1")
|
||||
dbpf("IOC:m3.RTRY", "0")
|
||||
dbpf("IOC:m3.TWV", "0.1")
|
||||
dbpf("IOC:m4.RTRY", "0")
|
||||
dbpf("IOC:m4.TWV", "0.1")
|
||||
|
Reference in New Issue
Block a user