DPRNT
DPRNT
1. Overview
In addition to standard user macros, the types of macros listed below are provided as external
output commands. These external output macros can be used to output character data or the
numerical data in variables to an external unit via an RS-232C interface. The data are outputted
in a data length of 7 bits with an even-parity bit added.
B. Programming order
13-82
AUXILIARY FUNCTIONS FOR PROGRAMMING 13
4. Data output command BPRNT
Programming format:
BPRNT[1#v1[c1]2#v2[c2]]
Detailed description
- The command BPRNT can be used to output characters or to output variable data in binary
form.
- The designated character string is output directly in the ISO coded format. Alphanumerics (A to
Z, and 0 to 9) and/or special characters (+, –, , /) can be used. Of these characters, only the
asterisk () is output as a space code.
- Since all variables are saved as those having a decimal point, the necessary number of
decimal digits must be enclosed in brackets ([ ]).
All variables are handled as data of four bytes (32 bits), and each byte is output as binary data
in the order of the most significant byte first. Minus data is processed as the complement for
that data.
Example 1: If three digits are specified for 12.3456, then
[12.346 × 103] = 12346 (0000303A)
will be output as binary data.
Example 2: If no digits are specified for –100.0, then
–100 (FFFFFF9C)
will be output as binary data.
- After the specified data has been output, the EOB (End Of Block) code is output in the format of
the appropriate ISO code.
- Variables containing <empty> are interpreted as 0s.
Programming format:
DPRNT[1#v1[d1 c1]2#v2[c2]]
Effective digits below decimal point
Effective digits above decimal point c+d8
Variable number
Character string
Detailed description
- Output of character data or decimal output of variable data is performed in the format of ISO
codes.
- The designated character string is output directly in the ISO coded format.
Alphanumerics (A to Z, and 0 to 9) and/or special characters (+, –, , /) can be used. Of these
characters, only the asterisk () is output as a space code.
- Of the data contained in a variable, the necessary number of digits above the decimal point and
that of digits below the decimal point must each be enclosed in brackets ([ ]). The variable
data will then have its total specified number of digits, including the decimal point, output in the
ISO coded format in the order of the most significant digit first. No trailing zeros will be left out in
that case.
13-83
13 AUXILIARY FUNCTIONS FOR PROGRAMMING
1. Overview
External output macros can also be used to output data in text file format into the predetermined
directory on the hard disk.
2. Related parameters
3. Output file
The text file will be automatically outputted with a particular file name into the predetermined
directory.
Output directory: c:\MC_sdg\print\
Output file name print.txt
(A file of this name will be automatically created, if required, or the text data
will be added to the current contents of the file.)
13-84
AUXILIARY FUNCTIONS FOR PROGRAMMING 13
File contents:
Given below on the right is an example of text file contents created by the execution of the
program shown on the left under the particular parameter settings.
POPEN %
DPRNT[OOOOOOOOOOOO] OOOOOOOOOOOO
DPRNT[XXXXXXXXXXXX] XXXXXXXXXXXX
DPRNT[IIIIIIIIIIII] IIIIIIIIIIII
PCLOS %
G0X100.Y100.Z100.
M30
[Parameter]
DPR14: 4
DPR15: No setting
4. Related alarms
13-85