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-42x0 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-42x0 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 ▫ 129
DMC-42x0 User Manual
Summary of Contents for DMC-42 0 Series
Page 195: ...ICM 2900 PCB Layout Appendices 191 DMC 42x0 User Manual...
Page 205: ...CB 50 100 Drawings Appendices 201 DMC 42x0 User Manual...
Page 206: ...Appendices 202 DMC 42x0 User Manual...
Page 207: ...Appendices 203 DMC 42x0 User Manual...
Page 208: ...Appendices 204 DMC 42x0 User Manual...
Page 209: ...Appendices 205 DMC 42x0 User Manual...
Page 210: ...Appendices 206 DMC 42x0 User Manual...
Page 211: ...Appendices 207 DMC 42x0 User Manual...
Page 214: ...CB 50 80 Drawing Appendices 210 DMC 42x0 User Manual...