DMC-1400 Series Command Reference CI 53
CI
FUNCTION: Communication Interrupt
DESCRIPTION:
The CI command configures a program interrupt based on characters received on either Port
1, the MAIN serial port, or Port 2, the AUX serial port. An interrupt causes program
flow to jump to the #COMINT subroutine label. If multiple program threads are used,
the #COMINT subroutine runs in thread 0 and thread 1 continues to run in the
background without interruption. The characters received on the serial port are stored in
internal variables such as P2CH. See chapter 7 for more detailed information on the
communications interrupt.
ARGUMENTS: CI m,n,o
PARAMETER EXPLANATION
m = 0 Do not interrupt Port 1
m = 1 Interrupt on carriage return character on Port 1
m = 2 Interrupt on any character Port 1
m = -1 Clear interrupt data buffer
n = 0 Do not interrupt Port 2
n = 1 Interrupt on carriage return character on Port 2
n = 2 Interrupt on any character Port 2
n = -1 Clear interrupt data buffer
o = 0 Disable live data mode for Port 1
o = 1 Enable live data mode for Port 1
USAGE:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line No
Can be Interrogated No
Used as an Operand No
Controller Usage DMC-1412/1414
EXAMPLES:
CI 0,1,0 Interrupt on <enter> received on Port 2
CI 0,2,0 Interrupt on a single character received on Port 2
CI 1,2,1 Interrupt on <enter> received on Port 1, interrupt on any character received
on Port 2
NOTE: The third field of the CI command enables or disables live data mode on Port 1. If live data mode
is enabled, then the controller will not respond to commands sent to the main serial port. This setting
is necessary to use the communications interrupt on the main serial port.