Operator Data Entry Mode; Communication Interrupt - Galil Motion Control CDS-3310 User Manual

Table of Contents

Advertisement

Operator Data Entry Mode

The Operator Data Entry Mode provides for un-buffered data entry through the RS-232 port. This
mode is entered and exited by the CI command.
NOTE: Operator Data Entry Mode cannot be used for high rate data transfer.
To capture and decode characters in the Operator Data Mode, the controller provides the following
keywords:
Keyword
P1CH
P1ST
P1NM
P1CD
NOTE: The value of P1CD returns to zero after the corresponding string or number is read.
These keywords may be used in an applications program to decode data and they may also be used in
conditional statements with logical operators.
Example

Communication Interrupt

The controller provides a special interrupt for communication allowing the application program to be
interrupted by input from the user. The interrupt is enabled using the CI command. The syntax for the
command is CI n,m:
The #COMINT label is used for the communication interrupt. For example, the controller can be
configured to interrupt on any character received on Port 1. The #COMINT subroutine is entered
when a character is received and the subroutine can decode the characters. At the end of the routine
the EN command is used. EN,1 will re-enable the interrupt and return to the line of the program where
the interrupt was called, EN will just return to the line of the program where it was called without re-
CDS-3310
EN
Function
Contains the last character received
Contains the received string
Contains the received number
Contains the status code:
-1 mode disabled
0 nothing received
1 received character, but not <enter>
2 received string, not a number
3 received number
Instruction
JP #LOOP,P1CD< >3
JP #P,P1CH="V"
PR P1NM
JS #XAXIS,P1ST="X"
n = 0
Don't interrupt Port 1
n = 1
Interrupt on <enter> Port 1
n = 2
Interrupt on any character Port 1
n = -1
Clear any characters in buffer
m = 0
Disable entry mode
m = 1
Enable entry mode
End program
Interpretation
Checks to see if status code is 3 (number received)
Checks if last character received was a V
Assigns received number to position
Checks to see if received string is X
Chapter 7 Application Programming
i
43

Advertisement

Table of Contents
loading

Table of Contents