cominit and comread are intended for use in debugging connections between the stimulus delivery machine and the data logging machine. cominit and comread are run on the data logging machine in place of the actual data logging software, so that problems with event codes can be localised to the sending machine or to the logging software.
cominit configures the serial port for eight data bits, one stop bit, and no parity (8N1), at a baud rate of 19200. If an expansion serial port (COM2) is installed, that port is used. Otherwise the base port (COM1) is used.
comread reads a byte from the serial port, assuming that the port has been configured to match the parameters used by the sending machine. If no data are currently available, comread waits till data do become available.
cominit and comread are useful in a simple script:
echo off cominit :read comread goto read