Siemens 6AV6651-7KA01-3AA4 - S7-1200 + KTP400 Basic Starter Kit 6AV6651-7KA01-3AA4 用户手册

产品代码
6AV6651-7KA01-3AA4
下载
页码 364
Programming made easy 
 
6.5 Easy to monitor and test your user program 
 
Easy Book 
114
 
Manual, 03/2014, A5E02486774-AF 
Table 6- 23  DataLogOpen and DataLogClose instructions 
LAD/FBD 
SCL 
Description 
 
"DataLogOpen_DB"( 
    req:=_bool_in_, 
    mode:=_uint_in_, 
    done=>_bool_out_, 
    busy=>_bool_out_, 
    error=>_bool_out_, 
    status=>_word_out_, 
    name:=_string_inout_, 
    ID:=_dword_inout_); 
The DataLogOpen instruction opens a pre-existing data log 
file. A data log must be opened before you can write new 
records to the log. Data logs can be opened and closed 
individually. Eight data logs can be open at the same time. 
 
"DataLogClose_DB"( 
    req:=_bool_in_, 
    done=>_bool_out_, 
    busy=>_bool_out_, 
    error=>_bool_out_, 
    status=>_word_out_, 
    ID:=_dword_inout_); 
The DataLogClose instruction closes an open data log file. 
DataLogWrite operations to a closed data log result in an error. 
No write operations are allowed to this data log until another 
DataLogOpen operation is performed. 
A transition to STOP mode closes all open data log files. 
6.5 
Easy to monitor and test your user program 
6.5.1 
Watch tables and force tables 
You use "watch tables" for monitoring and modifying the values of a user program being 
executed by the online CPU. You can create and save different watch tables in your project 
to support a variety of test environments. This allows you to reproduce tests during 
commissioning or for service and maintenance purposes.  
With a watch table, you can monitor and interact with the CPU as it executes the user 
program. You can display or change values not only for the tags of the code blocks and data 
blocks, but also for the memory areas of the CPU, including the inputs and outputs (I and Q), 
peripheral inputs (I:P), bit memory (M), and data blocks (DB).  
With the watch table, you can enable the physical outputs (Q:P) of a CPU in STOP mode. 
For example, you can assign specific values to the outputs when testing the wiring for the 
CPU. 
STEP 7 also provides a force table for "forcing" a tag to a specific value. For more 
information about forcing, see the section on forcing values in the CPU (Page 261) in the 
"Online and Diagnostics" chapter. 
 
 
Note 
The force values are stored in the CPU and not in the watch table.  
You cannot force an input (or "I" address). However, you can force a peripheral input. To 
force a peripheral input, append a ":P" to the address (for example: "On:P").