Skip to content
Snippets Groups Projects
Commit bdab0258 authored by klang's avatar klang
Browse files

Update to take advantage of changes to ipUnidig and dac128v

parent f6d7060c
No related branches found
No related tags found
No related merge requests found
# BEGIN dac128V.cmd -----------------------------------------------------------
# Initialize Systran DAC
# initDAC128V(char *portName, int carrier, int slot)
# portName = name to give this asyn port
# carrier = IPAC carrier number (0, 1, etc.)
# slot = IPAC slot (0,1,2,3, etc.)
initDAC128V("DAC1", 0, 3)
dbLoadTemplate("substitutions/dac128V.substitutions", "P=$(PREFIX)")
# END dac128V.cmd -------------------------------------------------------------
...@@ -70,18 +70,17 @@ iocshLoad("$(IP)/iocsh/loadSerialComm.iocsh", "PREFIX=$(PREFIX), PORT=serial0:, ...@@ -70,18 +70,17 @@ iocshLoad("$(IP)/iocsh/loadSerialComm.iocsh", "PREFIX=$(PREFIX), PORT=serial0:,
#Loads asyn records for serial2:0 through serial2:7, calls them asyn_9 through asyn_16 for user compatibility #Loads asyn records for serial2:0 through serial2:7, calls them asyn_9 through asyn_16 for user compatibility
#iocshLoad("$(IP)/iocsh/loadSerialComm.iocsh", "PREFIX=$(PREFIX), PORT=serial1:, INSTANCE0=asyn_9, INSTANCE1=asyn_10, INSTANCE2=asyn_11, INSTANCE3=asyn_12, INSTANCE4=asyn_13, INSTANCE5=asyn_14, INSTANCE6=asyn_15, INSTANCE7=asyn_16") #iocshLoad("$(IP)/iocsh/loadSerialComm.iocsh", "PREFIX=$(PREFIX), PORT=serial1:, INSTANCE0=asyn_9, INSTANCE1=asyn_10, INSTANCE2=asyn_11, INSTANCE3=asyn_12, INSTANCE4=asyn_13, INSTANCE5=asyn_14, INSTANCE6=asyn_15, INSTANCE7=asyn_16")
# SBS IpUnidig digital I/O
#iocshLoad("$(IPUNIDIG)/iocsh/ipUnidig.iocsh", "PREFIX=$(PREFIX), PORT=Unidig1, CARRIER=0, SLOT=1, INT_VEC=116, RISE_MASK=0xfffffb, FALL_MASK=0xfffffb, SCAN_POLL=2000, SUB=substitutions/ipUnidig.substitutions")
# user programmable glue electronics (requires Acromag IP-EP20x) # user programmable glue electronics (requires Acromag IP-EP20x)
#< softGlue.iocsh #< softGlue.iocsh
# Systran DAC128V
#< dac128V.cmd
# Analog I/O (Acromag IP330 ADC) # Analog I/O (Acromag IP330 ADC)
#< ip330.cmd #< ip330.cmd
# SBS IpUnidig digital I/O # Systran DAC128V
#< ipUnidig.cmd #iocshLoad("$(DAC128V)/iocsh/dac128V.iocsh", "PREFIX=$(PREFIX), PORT=DAC1, CARRIER=0, SLOT=3, SUB=substitutions/dac128V.substitutions")
# gpib support # gpib support
#< gpib.cmd #< gpib.cmd
......
# BEGIN ipUnidig.cmd ----------------------------------------------------------
# Initialize Greenspring IP-Unidig
# initIpUnidig(char *portName,
# int carrier,
# int slot,
# int msecPoll,
# int intVec,
# int risingMask,
# int fallingMask)
# portName = name to give this asyn port
# carrier = IPAC carrier number (0, 1, etc.)
# slot = IPAC slot (0,1,2,3, etc.)
# msecPoll = polling time for input bits that don't use interrupts in msec.
# intVec = interrupt vector
# risingMask = mask of bits to generate interrupts on low to high (24 bits)
# fallingMask = mask of bits to generate interrupts on high to low (24 bits)
# Note: We have the quadEM connected to channel 3 (starting from 1). Its driver will
# enable interrupts on one edge of the pulses, so we don't need to do it here. All other
# inputs generate interrupts on both rising and falling edge
initIpUnidig("Unidig1", 0, 1, 2000, 116, 0xfffffb, 0xfffffb)
# IP-Unidig binary I/O
dbLoadTemplate("substitutions/ipUnidig.substitutions", "P=$(PREFIX), PORT=Unidig1")
# END ipUnidig.cmd ------------------------------------------------------------
file "$(DAC128V)/dac128VApp/Db/singleDAC.db" file "$(DAC128V)/dac128VApp/Db/singleDAC.db"
{pattern {pattern
{D, N, S, PORT, EGUL, EGUF, DRVL, DRVH, LOPR, HOPR, PREC, LINR, VAL} {N, S, EGUL, EGUF, DRVL, DRVH, LOPR, HOPR, PREC, LINR, VAL}
# Channel 1 is in volts, -10 to 10, with drive limits full range # Channel 1 is in volts, -10 to 10, with drive limits full range
{3, 1, 0, DAC1, -10, 10, -10, 10, -10, 10, 3, "LINEAR", 0} {1, 0, -10, 10, -10, 10, -10, 10, 3, "LINEAR", 0}
# Channel 2 is in volts, -10 to 10, but only allow driving 0 to 10 # Channel 2 is in volts, -10 to 10, but only allow driving 0 to 10
{3, 2, 1, DAC1, -10, 10, 0, 10, 0, 10, 3, "LINEAR", 0} {2, 1, -10, 10, 0, 10, 0, 10, 3, "LINEAR", 0}
# Channel 3 is in percent of full scale, only allow driving 0 to 100% # Channel 3 is in percent of full scale, only allow driving 0 to 100%
{3, 3, 2, DAC1, -100, 100, 0, 100, 0, 100, 3, "LINEAR", 0} {3, 2, -100, 100, 0, 100, 0, 100, 3, "LINEAR", 0}
# Remaing channels are in volts # Remaing channels are in volts
{3, 4, 3, DAC1, -10, 10, -10, 10, -10, 10, 3, "LINEAR", 0} {4, 3, -10, 10, -10, 10, -10, 10, 3, "LINEAR", 0}
{3, 5, 4, DAC1, -10, 10, -10, 10, -10, 10, 3, "LINEAR", 0} {5, 4, -10, 10, -10, 10, -10, 10, 3, "LINEAR", 0}
{3, 6, 5, DAC1, -10, 10, -10, 10, -10, 10, 3, "LINEAR", 0} {6, 5, -10, 10, -10, 10, -10, 10, 3, "LINEAR", 0}
{3, 7, 6, DAC1, -10, 10, -10, 10, -10, 10, 3, "LINEAR", 0} {7, 6, -10, 10, -10, 10, -10, 10, 3, "LINEAR", 0}
{3, 8, 7, DAC1, -10, 10, -10, 10, -10, 10, 3, "LINEAR", 0} {8, 7, -10, 10, -10, 10, -10, 10, 3, "LINEAR", 0}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment