EasyManua.ls Logo

Siemens SIMATIC CP 340 User Manual

Siemens SIMATIC CP 340
200 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #113 background imageLoading...
Page #113 background image
Communication using function blocks
6.4 Using function blocks for the output of message texts to a printer
PtP coupling and configuration of CP 340
Manual, 04/2011, A5E00369892-03
113
6.4 Using function blocks for the output of message texts to a printer
Introduction
The P_PRINT function block (FB 4) is available to you for outputting message texts to a
printer. The P_PRINT function block (FB 4) sends a process message to the CP 340, for
example. The CP 340 logs the process message on the connected printer.
Message texts "outputting"
The P_PRINT FB sends a message text containing up to four variables to the CP 340. You
configure the message texts using CP 340: Point-to-Point Communication, Parameter
Assignment (see sections " Data transmission with the printer driver (Page 56)" and
"Conversion and Control Statements for
Printer Ou
tput (Page 77)"). For the purpose of data
transmission, the P_PRINT function block is called cyclically, or alternatively, statically
(without conditions) in a time-controlled program.
The pointers (to data blocks) for the format string and the four variables can be reached by
means of the DB_NO and DBB_NO parameters. The pointers must be stored without gaps
and in a specific sequence in the configured data block. This is the pointer DB (see Figure
"Pointer DB").
The transmission of the message text is initiated by a positive edge at the REQ input. The
frame starts with the format string of the message text. This is followed by tags 1 to 4.
Depending on the volume of data involved, a data transmission may run over several calls
(program cycles).
The P_PRINT function block can be called cyclically when the signal state at the R
parameter input is "1". This aborts the transmission to the CP 340 and sets the P_PRINT FB
back to its initial state. Data that has already been received by the CP 340 is still sent to the
communication partner. If the signal state at the R input remains static at "1", this means that
sending of print requests is deactivated.
The LADDR parameter specifies the address of the CP 340 to be addressed.

Table of Contents

Other manuals for Siemens SIMATIC CP 340

Question and Answer IconNeed help?

Do you have a question about the Siemens SIMATIC CP 340 and is the answer not in the manual?

Siemens SIMATIC CP 340 Specifications

General IconGeneral
TypeCommunications processor
ModelCP 340
Product type designationCP 340
Supply voltage24 V DC
Power supply24 V DC
Operating temperature0 to 60 °C
Current consumption150 mA
Temperature Range0 to 60 °C
Dimensions40 mm x 120 mm x 120 mm
Weight0.5 kg

Summary

Product Description

CP 340 Uses and Functionality

Explains the purpose, functionality, and module variants of the CP 340 for data exchange.

Hardware and Software Components for PtP Connection

Lists essential hardware and software components required for establishing point-to-point connections.

Serial Interface Properties

Details technical specifications for RS 232C, 20mA-TTY, and X27 (RS 422/485) interfaces.

Basic Principles of Serial Data Transmission

Transmission Integrity

Covers data integrity aspects for Printer, ASCII, and 3964(R) drivers.

Data Transmission with the 3964(R) Procedure

Details control characters, block checksums, sending, receiving, and error handling for 3964(R).

Data Transfer using the ASCII Driver

Explains ASCII driver use, RS 232C signals, flow control, and end criteria.

Starting up the CP 340

Step Sequence for Commissioning

Outlines the order of operations required for commissioning the CP 340.

Installation and Configuration

Describes integrating, configuring via STEP 7, and assigning parameters to the CP 340.

Mounting the CP 340

Installing and Removing the CP 340

Provides step-by-step instructions for mounting and dismounting the CP 340.

Configuring and Parameterizing the CP 340

Parameterization Options

Lists configuration options for CP 340 variants using STEP 7 or the parameter assignment interface.

Parameterizing Communications Protocols

Explains how to supply CP 340 interface with parameters and configure message texts.

Configuring the CP 340

Explains how to inform the programmable controller about the CP 340's presence and its address.

Managing Parameter Data

Covers saving, downloading, and managing configuration and parameterization data.

Download of Firmware Updates

Provides instructions for updating the CP 340 firmware using HW Config.

Communication using function blocks

Communication via Function Blocks

Explains how communication occurs between CPU, CP 340, and communication partners via function blocks.

Overview of Function Blocks

Lists and describes function blocks (P_RCV, P_SEND, P_PRINT, V24_STAT, V24_SET) for CP 340 communication.

Using Function Blocks for Connecting to Communications Processor

Details using P_SEND and P_RCV for sending and receiving data between S7 and partners.

Using Function Blocks for Outputting Message Texts to Printer

Explains the P_PRINT FB for sending message texts and variables to a printer.

Using Function Blocks for RS 232C Signals

Covers V24_STAT for reading and V24_SET for controlling RS 232C signals.

Diagnostics with the CP 340

Connecting Cables

Related product manuals