EN
End program
Operator Data Entry Mode
The Operator Data Entry Mode provides for un-buffered data entry through the auxiliary RS-232 port. In this mode,
the DMC-40x0 provides a buffer for receiving characters. This mode may only be used when executing an
applications program.
The Operator Data Entry Mode may be specified for Port 2 only. This mode may be exited with the \ or <escape>
key.
NOTE
: Operator Data Entry Mode cannot be used for high rate data transfer.
Set the third field of the CC command to one to set the Operator Data Entry Mode.
To capture and decode characters in the Operator Data Mode, the DMC-40x0 provides special the following
keywords:
Keyword
Function
P2CH
Contains the last character received
P2ST
Contains the received string
P2NM
Contains the received number
P2CD
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
NOTE
: The value of P2CD 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
Instruction
Interpretation
JP #LOOP,P2CD< >3
Checks to see if status code is 3 (number received)
JP #P,P1CH="V"
Checks if last character received was a V
PR P2NM
Assigns received number to position
JS #XAXIS,P1ST="X"
Checks to see if received string is X
Using Communication Interrupt
The DMC-40x0 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:
n = 0
Don't interrupt Port 2
n = 1
Interrupt on <enter> Port 2
n = 2
Interrupt on any character Port 2
n = -1
Clear any characters in buffer
The #COMINT label is used for the communication interrupt. For example, the DMC-40x0 can be configured to
interrupt on any character received on Port 2. 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
DMC-40x0 User Manual
Chapter 7 Application Programming
•
158
Summary of Contents for DMC-4040
Page 54: ...Chapter 3 Connecting Hardware 45 DMC 40x0 User Manual...
Page 55: ...DMC 40x0 User Manual Chapter 3 Connecting Hardware 46...
Page 56: ...Chapter 3 Connecting Hardware 47 DMC 40x0 User Manual...
Page 73: ...Figure 4 1 GalilTools DMC 40x0 User Manual Chapter 4 Software Tools and Communication 64...
Page 185: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 40x0 User Manual Chapter 7 Application Programming 176...
Page 205: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 40x0 User Manual Chapter 10 Theory of Operation 196...
Page 222: ...Step 2 Remove ICM s Appendices 213 DMC 40x0 User Manual...
Page 232: ...DMC 4080 Steps 4 and 5 Step 4 Replace ICM s Appendices 223 DMC 40x0 User Manual...