
De-allocating Array Space
Array space may be de-allocated using the DA command followed by the array name. DA*[0] deallocates all the
arrays.
Input of Data (Numeric and String)
Sending Data from a Host
The DMC unit can accept ASCII strings from a host. This is the most common way to send data to the controller
such as setting variables to numbers or strings. Any variable can be stored in a string format up to 6 characters by
simply specifying defining that variable to the string value with quotes, for example:
varS = “STRING”
Will assign the variable 'varS' to a string value of “STRING”.
To assign a variable a numerical value, the direct number is used, for example:
varN = 123456
Will assign the variable 'varN' to a number of 123,456.
All variables on the DMC controller are stored with 4 bytes of integer and 2 bytes of fractional data.
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.
Chapter 7 Application Programming ▫ 144
DMC-40x0 User Manual