## Configuration File for MRS #
## Target: MRS Controller Board


#driver = <driver_name>,<display_name>[,<sample_interval>,<serial_port>,
#                                       <baud>,<serial_cfg>,<power_bit>,
#                                       <record_type>,<daymask>,<timeout>,
#                                       <parm0>,<parm1>,<parm2>
#                                     ]

driver = UserIF

#
# Modbus definitions
#
# modbus = <bus> [,<baud>,<serMode>,<powerBit>]
#
# Default is 57600 baud, N81, RS485, pwr bit equal to serial line, e.g.
# modbus = 1, 57600, N81_RS485, 1
#

modbus = 1
modbus = 2

##############################################################################
# Output assignment (bus id, node id, port id)
##############################################################################

output = stir1, 1, 1, 1, 0, 1.0, 0.0     # stir output chamber1
output = stir2, 2, 1, 1, 2, 1.0, 0.0     # stir output chamber2

output = stir3, 3, 2, 3, 0, 1.0, 0.0     # stir output chamber3
output = stir4, 4, 2, 3, 2, 1.0, 0.0     # stir output chamber4

output = stir5, 5, 1, 2, 0, 1.0, 0.0     # stir output chamber5
output = stir6, 6, 1, 2, 2, 1.0, 0.0     # stir output chamber6

output = stir7, 7, 2, 4, 0, 1.0, 0.0     # stir output chamber7
output = stir8, 8, 2, 4, 2, 1.0, 0.0     # stir output chamber8

output = flush1, 9, 1, 1, 4, 1.0, 0.5     # flush output chamber1
output = flush2, 10, 1, 1, 6, 1.0, 0.5    # flush output chamber2

output = flush3, 11, 2, 3, 4, 1.0, 0.5    # flush output chamber3
output = flush4, 12, 2, 3, 6, 1.0, 0.5    # flush output chamber4

output = flush5, 13, 1, 2, 4, 1.0, 0.5    # flush output chamber5
output = flush6, 14, 1, 2, 6, 1.0, 0.5    # flush output chamber6

output = flush7, 15, 2, 4, 4, 1.0, 0.5    # flush output chamber7
output = flush8, 16, 2, 4, 6, 1.0, 0.5    # flush output chamber8


##############################################################################
# Low voltage reset limit in ADC counts
##############################################################################

lowVoltLimit = 2625

##############################################################################
# Powerup delays for digital outputs
##############################################################################

flushDelay = 3
injectDelay = 1
stirDelay = 1

##############################################################################
# Output mapping for various actuators
##############################################################################
# Note: Chamber ID 0 is unused so first element of output arrays should 
# be set to zero.

array = stirOutput, 0, 1, 2, 3, 4, 5, 6, 7, 8
array = injectOutput, 0, 0, 0, 0, 0, 0, 0, 0, 0
array = flushOutput, 0, 9, 10, 11, 12, 13, 14, 15, 16


##############################################################################
# Injection scheduling and calibration
##############################################################################
# Note: Chamber ID 0 is unused so first element of injectCalValue should 
# be set to zero.

array = injectCalValue, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
array = injectVolume1, 0, 0, 0, 0, 0, 0, 0
array = injectVolume2, 0, 0, 0, 0, 0, 0, 0
array = injectVolume3, 0, 0, 0, 0, 0, 0, 0
array = injectVolume4, 0, 0, 0, 0, 0, 0, 0 


##############################################################################
# Stir driver
##############################################################################

driver = seqStir, stir,41,,,,,,,5

##############################################################################
# Chamber definitions (bus id, node id, port id)
##############################################################################

#####################
# Chamber 1 resources
#####################
serial = 8, 1, 1, 1
power =  8, 1, 1, 1

driver = Optrode, optrode1,60,8,,,8,,,5
driver = chamberFlush, chamber1,0,,,,,,,1200,0

#####################
# Chamber 2 resources
#####################
serial = 9, 1, 1, 2
power =  9, 1, 1, 2
    
driver = Optrode, optrode2,60,9,,,9,,,5
driver = chamberFlush, chamber2,0,,,,,,,1200,0

#####################
# Chamber 3 resources
#####################
serial = 10, 2, 3, 1
power =  10, 2, 3, 1

driver = Optrode, optrode3,60,10,,,10,,,5
driver = chamberFlush, chamber3,0,,,,,,,1200,0

#####################
# Chamber 4 resources
#####################
serial = 11, 2, 3, 2
power =  11, 2, 3, 2
    
driver = Optrode, optrode4,60,11,,,11,,,5
driver = chamberFlush, chamber4,0,,,,,,,1200,0

#####################
# Chamber 5 resources
#####################
serial = 12, 1, 2, 1
power =  12, 1, 2, 1

driver = Optrode, optrode5,60,12,,,12,,,5
driver = chamberFlush, chamber5,0,,,,,,,1200,0

#####################
# Chamber 6 resources
#####################
serial = 13, 1, 2, 2
power =  13, 1, 2, 2
    
driver = Optrode, optrode6,60,13,,,13,,,5
driver = chamberFlush, chamber6,0,,,,,,,1200,0

#####################
# Chamber 7 resources
#####################
serial = 14, 2, 4, 1
power =  14, 2, 4, 1

driver = Optrode, optrode7,60,14,,,14,,,5
driver = chamberFlush, chamber7,0,,,,,,,1200,0

#####################
# Chamber 8 resources
#####################
serial = 15, 2, 4, 2
power =  15, 2, 4, 2
    
driver = Optrode, optrode8,60,15,,,15,,,5
driver = chamberFlush, chamber8,0,,,,,,,1200,0

#####################
# Ambient Optrode
#####################
serial = 16, 2, 5, 1
power =  16, 2, 5, 1
    
driver = Optrode, optrode9,60,16,,,16,,,5

##############################################################################
# Infrared interface
##############################################################################
serial = 17, 2, 5, 2
power =  17, 2, 5, 2

driver = UserIF,userIR,300,17,9600,N81_ECHO_AUTOCR,17,,,60

#####################
# Env Driver
#####################

driver = env, env, 60,,,,,,,,10

##############################################################################
# Global Variables
##############################################################################

TNC = 2010MRS
ascii = true
wakeOnConsoleChar = true


##############################################################################
# Scripts
##############################################################################

script = modlog.scp
