108
•
Chapter 7 Application Programming
DMC-1500
Operator Data Entry Mode
The Operator Data Entry Mode permits data to be entered at anytime. In this mode, the input will not
be interpreted as DMC commands and input such as ST or JG will not be recognized as commands. In
this mode, the DMC-1500 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 either Port 1 or Port 2 or both. The mode may be
exited with the \ or <escape> key.
NOTE: This is not used for high rate data transfer.
For Port 1:
Use the third field of the CI command to set the Data Mode. A 1 specifies Operator
Data Mode, a 0 disables the Data Mode.
For Port 2:
Use the third field of the CC command to set the Data Mode. A 0 configures P2 as a
general port for the Operator Data Mode.
To capture and decode characters in the Operator Data Mode, the DMC-1500 provides four special
keywords for Port 1 (P1) and Port 2 (P2).
Port 1
(Main)
Keyword
Port 2 (Aux)
Keyword
Function
P1CH
P2CH
Contains the last character received
P1ST
P2ST
Contains the received string
P1NM
P2NM
Contains the received number
P1CD
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 P1CD and P2CD returns to zero after the corresponding string or number is read.
These keywords may be used in an applications program to decode data. They may be used in
conditional statements with logical operators.
Examples:
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-1500 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 m,n,o:
m=0
Don't interrupt Port 1
1
Interrupt on <enter> Port 1
2
Interrupt on any character Port 1
-1
Clear any characters in buffer
Содержание DMC-1510
Страница 6: ......
Страница 18: ...6 Chapter 1 Overview DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 88: ...76 Chapter 6 Programming Motion DMC 1500 Figure 6 7 Motion intervals in the Home sequence...
Страница 90: ...78 Chapter 6 Programming Motion DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 137: ...DMC 1500 Chapter 7 Application Programming 125 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 157: ...DMC 1500 Chapter 10 Theory of Operation 145 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 160: ...148 Appendices DMC 1500 Card Level Layout...
Страница 178: ...166 Appendices DMC 1500 ICM 1100 Drawing 1 3 4 0 0 4 4 0 2 4 0 7 0 0 4 5 3 7 0 5 7 0 2 8 5 1 0 0 1 0 1 0 7 0 1 0 0...
Страница 180: ...168 Appendices DMC 1500...
Страница 198: ...186 Appendices DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...