©Siemens AG 1
SIWAREX_FTA_SIMATIC_Handling_V20.doc; 01/2011
Using SIWAREX FTA within STEP7
Quick Guide
For modules with order number 7MH4900-2AA01
Contents
1
2
3
4
5
Introduct ion ……………………...………………………………….… ………..
Organisat ion of the mem orie s ………………… …… ……………… ….
Communication concept …………..............................................................
Order t o SIWAREX FTA ………….…… ………...…………… ..……. ..
Reading and writing data’s …………….…………… ………………………..
2
3
4
5
7
©Siemens AG 2
SIWAREX_FTA_SIMATIC_Handling_V20.doc; 01/2011
Introduction
SIWAREX FTA is a calibratable and versatile weighing electronics for SIMATIC S7, C7 and PCS7.
It can be used for automatic and non- automatic wei ghing, e.g. for the production of mixtures, filling,
l oading, monitori ng a nd bag ging.
Purpo se of this document for functional safety
This pr ogra mm ing m an ual c ontai ns im por t ant inf ormation that y ou will requir e to co mm is sion and
us e the de vic e.
I t i s aimed at p ers o ns w h o instal l the devi ce m ec hanica ll y , c onnect it elect ric al ly, par amet erize and
commissio n it , as well as at servi c e and mai nt enance engin eers.
Notes on warranty
Th e contents of this programming ma nual shall not becom e p art of or modi f y any prior or e xi sting
agreement, commi t m ent or le gal relationship. Al l obli g ations on th e part of Si emens AG are
co nt ai ne d in the respect iv e sal es co nt ract , which also cont ains the c omplete and sol ely ap plica bl e
warranty c ondi t ions. Any st at ement s on the dev ice versions d escribed in t he pr ogr amming manual
do not create new warranties or modify the existing warranty.
Th e content refl ects the technical s t at us at the t im e of printing. We reserve the ri ght to mak e
t ech nical changes i n the course of f urt her d ev elopment .
Validation of this document
This doc umentat ion is only valid in co njunction wi th the m anual SIWAREX F TA.
©Siemens AG 3
SIWAREX_FTA_SIMATIC_Handling_V20.doc; 01/2011
2 Organi sation of the memories
Since SIWAREX is working auton omous with a microprocess or, it has it s own memory. A memory
inside th e PLC communicates with a memory of s ame s t ru ctur e i nsi de SIWAREX mo d ule.
All par ameters of this me mory are split into data rec ords (DR). Th e dat a re cords are orga nised
ac cording to process s t eps (t as ks) that y ou hav e to perform during the commis s ionin g ph as e or
during the pr ocess itself.
Par amet er isation of t he SIWA REX module is done by writing data’s into i t s me mor y , Informati on’ s
about the proc ess is done by readin g data’s a nd or der are given to SIWAREX by transferring
specifi c data’s to the FTA.
Dat a Record c ommu nication reduces t he qu a ntity of data's transf erred t o t he mi nimum
©Siemens AG 4
SIWAREX_FTA_SIMATIC_Handling_V20.doc; 01/2011
3 Commu nication concept
Th e nex t pict ure explai ns h ow t he or der s an d the data’s are trans f er r ed to SIWA REX F TA.
To re ad dat a’s , t he user program giv es a co mman d code to the FB SI WA_F TA, t he co mman d for
example “read data recor d 30” has a specif ic number in this cas e 230. R e ceiv ing thi s orde r
S IW ARE X FTA sends the DR30 t o F B -SIWA _ FTA , w h o tr ans f ers t he D R 30 into t h e app r opr iate
location of DB-Scale.
To write data’s t he user pro gram write first thos e dat a’s into DB_S ca le. Then, the us er pr ogr am
giv es a command code to the FB SIWA_FTA, the command for example “write data record 22” has
a sp ecific number in this case 422. FB S IWA_FTA read the D R22 from t he a ppropri at e locati on of
DB-Scale and sends it to SIWAREX FTA.
Th e next screenshot sh ows the c ont ain of t he STEP7 p roject.
©Siemens AG 5
SIWAREX_FTA_SIMATIC_Handling_V20.doc; 01/2011
4 Giving an order to SIWA REX FTA
Fi r st you nee d to know whi ch co mma nds exist. A lis t of all order s is to be foun d i n the chapt er 6 of
the manual:
A command is send thru defined data’s inside the data block DB_Scale.
The function block FC Ex ecute_Command. Manage a group of three command s, CMD1,
CMD2 and CMD3. Those are foreseen to transfer or ders to SIWAR EX. CMD3 is used for
OB35, CMD2 is used for the HMI panel and CMD1 is usually used by the STEP program.
The three command block s are to be found in the DB_Scale at address DBW40 to
DBW50.
The background task of OB35 refresh, every 100ms, the DR30, 31, 34, 35 and the ASCII
weight with crypto data’s for legal for trade applicat ions are also updated.
©Siemens AG 6
SIWAREX_FTA_SIMATIC_Handling_V20.doc; 01/2011
To send a command enter the command code at the address DBW40 as an integer.
Then trigger the command by setting the bi t s_CMD1.bo.CMD1_Trigger to “1” This bit has
to be set with an edge to avoid double triggering of the command. The bit is automatically
resetted to “0”.
Bit s.CMD1.bo.InProgress indicates that the command is running, this can go for several
OB1 cycles.
Bit s.CMD1.bo.FinishedOK indicat es that the comma nd was successfully terminated.
Bit s.CMD1.bo.FinishedError indicates for 1 cycle that the command was not completed.
The cod e of the error is given i n DB_S cale Byte 9 “b_CMD_Err_CODE”
The number that is out put is decoded in the table “Data and Oper ating Error s” in chapter
7.6.
The value remains in the output until the next comma nd is triggered. The evaluation is to
be performed when the bit CMD_ERR:= “DB_SCALE”.bo_CMD_ERR is set.
©Siemens AG 7
SIWAREX_FTA_SIMATIC_Handling_V20.doc; 01/2011
5 Reading and writing Data’s
Th e dat a rec or ds des cribed in Chapter 5 of th e man ual and al so i n SI WA TOO L (see P D F-File
S IW ARE X_FT A_Quick Guid e _SIWATOO L) ma y be read or w r it ten.
Alw ay s a comp lete Data Re c or d can be tr ans f err e d i n one or an ot her way.
Th e order number to read a Data Record is “2x x” where xx is the DR-Nu mber.
Fo r example read “Dat a Record 3 0” which c ontai ns weight and state o f the scale is done with
command “230.
Her e a n example of programmi ng.
Th e order nu mbe r t o wri te a Data Record to SI WA REX is “4xx” where xx i s the DR-Number.
Fo r examp le to defi ne the dosing setpoi nt you need to wri te first the value of the set point i nto DR20
t his i s address DB _Scale. DBD526. Then sen d t he comma n d “420” ( Write DR20).
DB72.DBX 31.4 is the trigger to write the setpoint coming from the S7 program.
©Siemens AG 8
SIWAREX_FTA_SIMATIC_Handling_V20.doc; 01/2011
If you h av e a ny issues or sug ge s t ions regarding the relat ed products or doc ument s, pl eas e feel f ree
to c o ntac t:
Technical support for SIWAREX:
Siemens AG
I ndustry Autom at ion (IA )
Sensors and Communi cation
Pr oc es s Instrume nt at ion
D-76181 Karlsruhe
Germany
Tel: +49 721 595 2811
Fa x: +49 721 595 2 901
E-mail: siwarex.hotline.aud@siemens.com
Website: www.siemens.com/siwarex
Copyright Statement
All rights reserved by Siemens AG
This document is subje ct to change w ithout notice. Under no circumstan ces shall the
content of this document be construed as an express or implied promise, guarantee
(for any method, product or equipment) or implication by or from Siemens AG. Partial
or full replication or translation of this document without written permission from
Si emens A G is ill egal.