SIMATIC NET - S7 Programming Interface
S7 Programming Interface
Contents
1 The SAPI-S7 Interface
1.1 Advantages of S7 Compared With Other Protocols
1.2 Advantages of the SAPI-S7 Programming Interface
2 Principles of the Programming Interface
2.1 Synchronous and Asynchronous Job Handling
2.2 Advantages of Asynchronous Operation
2.3 Receive Call and Processing Functions
2.4 Handling S7 Connection Management Services
2.5 Error Message Concept
2.6 The Trace
2.7 The Mini-DB
2.8 Multi-CP and Multi-User Operation
2.8.1 Assigning VFDs and the S7 Connection List
2.9 Installation and Requirements for Operation
3 The Programming Interface
3.1 Overview of the Programming Interface
3.1.1 Administrative Services
3.1.2 Receive Service
3.1.3 S7 Connection Management Services
3.1.4 Variable Services
3.1.5 Block-Oriented Services
3.1.6 Message Services
3.1.7 VFD Services
3.1.8 Diagnostic Services for Fault-Tolerant Connections
3.2 Administrative Services
3.2.1 s7_get_device
3.2.2 s7_get_vfd
3.2.3 s7_init
3.2.4 s7_get_cref
3.2.5 s7_get_conn
3.2.6 s7_shut
3.3 Receive service
3.3.1 s7_receive
3.4 S7 connection management services
3.4.1 s7_initiate_req
3.4.2 s7_get_initiate_cnf
3.4.3 s7_await_initiate_req
3.4.4 s7_get_await_initiate_cnf
3.4.5 s7_get_initiate_ind
3.4.6 s7_initiate_rsp
3.4.7 s7_abort
3.4.8 s7_get_abort_ind
3.5 Variable Services
3.5.1 s7_read_req
3.5.2 s7_get_read_cnf
3.5.3 s7_write_req
3.5.4 s7_write_long_req
3.5.5 s7_get_write_cnf
3.5.6 s7_multiple_read_req
3.5.7 s7_get_multiple_read_cnf
3.5.8 s7_multiple_write_req
3.5.9 s7_get_multiple_write_cnf
3.5.10 s7_cycl_read_init_req
3.5.11 s7_get_cycl_read_init_cnf
3.5.12 s7_cycl_read_start_req
3.5.13 s7_get_cycl_read_start_cnf
3.5.14 s7_get_cycl_read_ind
3.5.15 s7_get_cycl_read_abort_ind
3.5.16 s7_cycl_read_stop_req
3.5.17 s7_get_cycl_read_stop_cnf
3.5.18 s7_cycl_read_delete_req
3.5.19 s7_get_cycl_read_delete_cnf
3.5.20 s7_cycl_read
3.6 Block-Oriented Services
3.6.1 s7_bsend_req
3.6.2 s7_get_bsend_cnf
3.6.3 s7_brcv_init
3.6.4 s7_get_brcv_ind
3.6.5 s7_brcv_stop
3.7 Message Services
operating system
3.7.1 s7_msg_initiate_req
3.7.2 s7_get_msg_initiate_cnf
3.7.3 s7_msg_abort_req
3.7.4 s7_get_msg_abort_cnf
3.7.5 s7_get_scan_ind
3.7.6 s7_get_alarm_ind
3.8 VFD Services
3.8.1 s7_vfd_state_req
3.8.2 s7_get_vfd_state_cnf
3.9 Diagnostic Services for Fault-Tolerant Connections
3.9.1 s7_diag_init
3.9.2 s7_get_diag_ind
3.9.3 s7_diag_stop
4 Trace and Mini-DB
4.1 s7_trace
4.2 s7_write_trace_buffer
4.3 s7_mini_db_set
4.4 s7_mini_db_get
4.5 s7_last_iec_err_no
4.6 s7_last_iec_err_msg
4.7 s7_last_detailed_err_no
4.8 s7_last_detailed_err_msg
4.9 s7_discard_msg
5 Configuration
5.1 Significance of Configuration
5.2 Services With Configuration Data
5.3 Configuring with STEP 7 V5
6 SAPI-S7 Under MS-DOS/Windows
6.1 General Information
6.2 Translating and Linking for MS-DOS
6.3 Translating and Linking for Windows 3.x
6.4 Translating and Linking for Windows 95 and Windows NT
6.5 Environment Variables
6.6 The Trace for MS-DOS or Windows
6.7 Special Features for Windows
6.7.1 s7_set_window_handle_msg
7 Appendix
7.1 Range of Functions of SAPI-S7
7.2 Special Notes
7.3 Formulas for Calculating Data Lengths for the Variable Services
7.4 Representation of S7 Variables
7.5 Representation of the Standard Data Types
7.5.1 Representation of the 'Boolean' Data Type
7.5.2 Representation of the Data Type 'Integer'
7.5.3 Representation of the 'Unsigned' Data Type
7.5.4 Representation of the 'Floating Point' Data Type
7.5.5 Representation of the 'Visible String' Data Type
7.5.6 Representation of the 'Octet String' Data Type
7.5.7 Representation of the 'Bit String' Data Type
Glossary
Index