6 free format datalog – Micromod Micro-DCI: 53MC5000 PLC AND PRINTER INTERFACES User Manual
Page 108

9.6 FREE FORMAT DATALOG
Although the DDI-A/B channel options each provide resident standard datalog capabilities and the
standard datalog display, users can write F-TRAN programs to generate datalogs tailored to their
needs. These user written datalogs are called free format datalogs. Like the standard datalog,
free format datalogs can be triggered as a background operation or as part of a display program.
Before attempting to generate a free format datalog, the programmer must have a thorough under-
standing of F-TRAN programming operations and principles, as well as the controller database lay-
out. This information is provided in instruction bulletins 53MC5000 Process Control Station,
53MC5000 Customization Guide, and 53HC3300 Custom Program Interface.
In general, free format programs are a series of PRINT commands which have been directed to a
port device. In fact, creating free format datalogs as part of a user written display program re-
quires selecting the character set that corresponds to the desired output, and PRINTing the charac-
ter strings, print control characters, and datapoints required for the free format datalog. The output
port is selected with the character set selector datapoint, B009 (CHRSEL). When B009 contains
either an 8 or 9, all PRINT command output is directed to the DDI-B or DDI-A channels re-
spectively.
Generating a free format datalog that will be triggered in the background, independent of the cur-
rent display program, requires additional programming considerations:
• Datapoint B008 (BACK) must be set to a 2 to enable datalog background operation, and
datapoint L074 (RUNULOG) must be set to a 1 to trigger the datalog. After the datalog op-
eration is completed (and not before), L074 should be reset to 0 by the program.
• When L074 is set to a 1, the background program calls the subroutine G255; the free format
datalog program should therefore be contained in, or called from, the G255 subroutine. This
subroutine should not contain any code unrelated to the datalog operation.
• For compatibility with display programs, the value of B009 (CHRSEL) should appear to re-
main unchanged between the execution of display programs; this requires the value of B009
to be saved and restored around datalog PRINT operations.
• Because the background and display programs execute at the same task level, to en-
sure timely display refresh updates, a large free format datalog program may have to
be partitioned into smaller code segments which are executed within a cases of struc-
ture controlled by a state variable.
Two free format datalog examples are provided in the sections that follow.
53MC9015 53MC5000 PLC and Printer Interfaces
9-8
PRINTER