[go: up one dir, main page]

0% found this document useful (0 votes)
291 views7 pages

How To Read or Write A Single Parameter Using FB287

FB287 is a function block for reading and writing single drive parameters via acyclic communication. It handles the communication internally using RDREC and WRREC blocks. To use it, configure the hardware in TIA Portal, insert FB287 into a program OB, assign terminals including the parameter number and address, and execute reads or writes by toggling the Start input. This allows easily reading parameter values like p1130 and modifying them like setting p1130 to 0.5 seconds. FB287 works across various Siemens controllers and drives communicating via PROFINET or PROFIBUS.

Uploaded by

MiguelGonzalez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
291 views7 pages

How To Read or Write A Single Parameter Using FB287

FB287 is a function block for reading and writing single drive parameters via acyclic communication. It handles the communication internally using RDREC and WRREC blocks. To use it, configure the hardware in TIA Portal, insert FB287 into a program OB, assign terminals including the parameter number and address, and execute reads or writes by toggling the Start input. This allows easily reading parameter values like p1130 and modifying them like setting p1130 to 0.5 seconds. FB287 works across various Siemens controllers and drives communicating via PROFINET or PROFIBUS.

Uploaded by

MiguelGonzalez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

FAQ-04EP6Z7Q 04/2015

How to read or write a single


parameter using FB287
SINAMICS G120, FB287, read or write a single parameter, TIA Portal,
PROFINET, PROFIBUS, Acyclic communication

https://support.industry.siemens.com/cs/ww/en/view/109475970
1 Read or write a single parameter using
FB287
FB287 is a function block for single parameter access, which calls the acyclic
communication blocks RDREC/SFB52 and WRREC/SFB53 internally. FB287 is
integrated in the libraries of the TIA Portal software.

1.1.1 Configure hardware in TIA Portal.

Before the utilization of FB287, make sure the configuration is completed in TIA
Portal and the communication between the controller and the drive is established.
This example includes a CPU1513-1 PN (V1.5) and a G120 with CU250S-2 PN
(V4.6).

Figure 01 Communication configuration

2
1.1.2 Insert FB287 in the main program (OB1) or cyclic interrupt OB (e.g.
OB32).

FB287 can be found as SINA_PARA_S in the libraries. There are different libraries
for different PLCs (S7-300/S7-400, S7-1200, S7-1500).

Figure 02 Drive libraries

3
The following picture shows the FB287 with terminals assigned.

Figure 03 FB287

4
The following table shows the definition for each terminal of the block.

Table 01 Terminal definition for FB287


Terminal Type Description
Start BOOL Start of the job
ReadWrite BOOL Type of job: 0=read, 1=write
Hardware ID of the actual value telegram slot or
LAddr HW-IO/INT
diagnostics address of the axis or drive
Parameter INT Parameter number
Index INT Parameter index
ValueWrite REAL Parameter value to be written
Axis number for multi-axis system
AxisNo INT
For G120 inverters, AxisNo=1
Error BOOL Group error active: Error=1
ErrorId DWORD Error ID
Busy BOOL Job being processed: Busy=1
Job completed without error: edge change from 0
Done BOOL
to 1
Extended communication error: error during SFB
DiagId WORD
call
ValueRead REAL Actual value of read parameter
Format INT Format of read parameter
ErrorNo INT Error number according to PROFIdrive profile
For terminal LAddr, hardware ID of the actual value telegram slot or diagnostics
address of the axis or drive can be assigned to it.

Figure 04 Hardware ID selection for terminal LAddr

1.1.3 Read the value of p1130 (Ramp function generator initial rounding-off
time).

Use a watch table to read a single parameter after compiling and downloading the
project to the PLC. According to the parameter view of Startdrive, the original value
of p1130 is 0.0s.

Figure 05 The original value of p1130

Set the following values to the tags on FB287’s terminals:

5
ReadWrite=0, reading request
Parameter=1130, specify the parameter number
Index=0, specify the index for the parameter
A rising edge on terminal Start starts the reading task. After the reading task is
finished, the Done bit is set. And the parameter value is shown in ValueRead.

Figure 06 Watch table for reading p1130

1.1.4 Modify the value of p1130 to 0.5s.

Use a watch table to write a single parameter.


Set the following values to the tags on FB287’s terminals:
ReadWrite=1, writing request
Parameter=1130, specify the parameter number
Index=0, specify the index for the parameter
ValueWrite=0.5, specify the value to be written

Figure 07 Watch table for writing p1130

A rising edge on terminal Start starts the writing task. After the writing task is
finished, the Done bit is set. And the modified parameter value can be seen from
the parameter view of Startdrive.

Figure 08 The modified value of p1130

6
NOTE 1. FB287 is available for S7-300/400, S7-1200 and S7-1500 PLCs.
2. FB287 is available for both PROFINET and PROFIBUS.
3. FB287 is available for both SINAMICS S and SINAMICS G inverters.
4. The parameter value is handled in the format of floating-point number. For
example, if p1000=6 (setpoint selection, integer 16), 6.0 will be the result of a
reading request. For a writing request, 1.0 for the ValueWrite can change
p1000 to 1.

You might also like