Industry Automation and Drive Technologies - SCE

5.12FB1 Control Program

It is now possible to generate the control program with the completed blocks.

Task:

In our sample program, two command strings with two requests each will be processed.

With the START_SLG1 (I0.0), the command chain of the first reader is executed.

First, the MDS status information will be read, and then a write command is carried out on Reader1. With Reader1, we write 8 bytes that are stored in DB48 starting with DBB0 to the MDS. With the RESET_SLG1 (I0.1), the error is reset if there is an error (LED at Reader1 flashes red) and a “init_run command“ to reset the first reader is executed.

With the RF300_ISO (I02), switching between MDS types (for example RF360T) or ISO transponder (for example, Moby D ISO) is to be carried out on the first reader (RF310R).

With the START_SLG2 (I1.0), the command string of the second reader is executed.

First, the MDS diagnosis information will be read and then a read command will be executed at Reader2. With Reader2, we read 8 bytes from the transponder and then write them to DB48 starting with DBB50.

With RESET_SLG2 (I1.1) the error is reset if there is an error (LED at SLG2 flashes red) and a “init_run command“ is executed to reset the second reader.

In addition, the attendance time of the transponders is to be recorded on the readers.

Supplementing the symbol table

Symbol

Address

 

Data

Comment

 

 

 

Type

 

START_SLG1

I

0.0

BOOL

Command start of Reader1

RESET_SLG1

I

0.1

BOOL

Reset Reader1 error

RF300_ISO

I

0.2

BOOL

Value 0 = RF300, Value 1 = ISO

START_SLG2

I

1.0

BOOL

Command start of SLG2

RESET_SLG2

I

1.1

BOOL

Reset Reader2 error

AWZ_SLG1

MD

40

TIME

Attendance time of transponder at SLG1

AWZ_SLG2

MD

50

TIME

Attendance time of transponder at SLG2

STATUS_SLG_1

VAT

1

 

SLG1 variable table

STATUS_SLG_2

VAT

2

 

SLG2 variable table

Generating FB1

Set up a new FB1.

TIA Training Document

Page 55 of 65

Module E11

 

Status: 01/2010

Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and

RF180C

 

Page 55
Image 55
Siemens S7-300F-2 PN, DP manual Task, Supplementing the symbol table, Generating FB1