#COMINT

Syntax:Other
Operands:none
Burn:not burnable

Communication interrupt automatic subroutine

Hardware: DMC40x0 DMC41x3 DMC21x3 RIO DMC300x0

Full Description

#COMINT is an automatic subroutine which can be configured by the CI command to run either when any character is received, or when a carriage return is received over the com port. The auxiliary port is used if equipped.

#COMINT runs in thread 0, and an application must be running in thread 0 in order for #COMINT to be enabled. Code running in thread zero will be interrupted by the #COMINT subroutine. Use EN to end the routine


NOTE: An application program must be executing for the automatic subroutine to function, which runs in thread 0. Use EN to end the routine.

Arguments

N/A

Operand Usage

N/A

Usage

Usage and Default Details
UsageValue
While MovingYes
In a ProgramYes
Command LineNo
Controller UsageAll
Default ValueN/A
Default FormatN/A

Related Commands

P2CD - Serial port 2 code
P2CH - Serial port 2 character
P2NM- Serial port 2 number
P2ST - Serial port 2 string
CI - Configure #COMINT
CC - Configure serial port 2
EN - End subroutine

Examples:

#A;                           'Program Label
 CC9600,0,1,0
 CI2;                         'interrupt on any character
#Loop
 MG "Loop";                   'print a message every second
 WT 1000
 JP#Loop
#COMINT
 MG "COMINT:", P2CH{S1};      'print a message and the received character
EN1,1;                        ' End this subroutine, re-arming trip points that 
'                             were running and re-enabling the CI mask