SlideShare a Scribd company logo
1 of 14
Download to read offline
Application on Control Technology
Programming Example in Ladder Logic
Using FBs, FCs, and DBs
www.dienhathe.vn
www.dienhathe.com
Using FBs, FCs, and DBs
Using FBs, FCs, and, DBs
V1.0 2006/08/01 2/14
Copyright©SiemensAG2006Allrightsreserved
23330722_Using_FB_FC_DB.doc
Note The application examples are not binding and do not claim to be
complete regarding the circuits shown, equipping and any eventuality.
The application examples do not represent customer-specific solutions.
They are only intended to pro-vide support for typical applications. You
are responsible in ensuring that the de-scribed products are correctly
used. These application examples do not relieve you of the responsibility
in safely and professionally using, installing, operating and servicing
equipment. When using these application examples, you recognize that
Siemens cannot be made liable for any damage/claims beyond the
liability clause described. We reserve the right to make changes to these
application examples at any time without prior notice. If there are any
deviations between the recommendations provided in these application
examples and other Siemens publications - e.g. Catalogs - then the
contents of the other documents have priority.
Warranty, liability and support
We do not accept any liability for the information contained in this
document.
Any claims against us - based on whatever legal reason - resulting from the
use of the examples, information, programs, engineering and performance
data etc., described in this application example shall be excluded. Such an
exclusion shall not apply in the case of mandatory liability, e.g. under the
German Product Liability Act (“Produkthaftungsgesetz”), in case of intent,
gross negligence, or injury of life, body or health, guarantee for the quality
of a product, fraudulent concealment of a deficiency or breach of a
condition which goes to the root of the contract (“wesentliche
Vertragspflichten”). However, claims arising from a breach of a condition
which goes to the root of the contract shall be limited to the foreseeable
damage which is intrinsic to the contract, unless caused by intent or gross
negligence or based on mandatory liability for injury of life, body or health
The above provisions does not imply a change in the burden of proof to
your detriment.
Copyright© 2006 Siemens A&D. It is not permissible to transfer or
copy these application examples or excerpts of them without first
having prior authorization from Siemens A&D in writing.
For questions about this document please use the following e-mail address:
mailto:csweb@ad.siemens.de
www.dienhathe.vn
www.dienhathe.com
Using FBs, FCs, and DBs
Using FBs, FCs, and, DBs
V1.0 2006/08/01 3/14
Copyright©SiemensAG2006Allrightsreserved
23330722_Using_FB_FC_DB.doc
Table of Contents
Table of Contents .........................................................................................................3
Description ................................................................................................... 4
Objectives ....................................................................................................4
Summary of the Sample Program................................................................ 4
1 Sample Program for Using FBs, FCs, and DBs ........................................... 8
1.1 OB1...................................................................................................................8
Network 1: Set-Reset Flip Flop to Set Automatic Mode............................... 8
Network 2: Switching on the Gasoline Engine ............................................. 8
Network 3: Switching on the Diesel Engine ................................................. 9
Network 4: Controlling the Fan for the Gasoline Engine .............................. 9
Network 5: Controlling the Fan for the Diesel Engine ................................ 10
1.2 FB1 .................................................................................................................10
Network 1: Set-Reset Flip Flop to Switch on an Engine ............................ 11
Network 2: Monitoring the Engine Speed................................................... 12
1.3 FC1.................................................................................................................12
Network 1: Controlling the Engine Fan ...................................................... 12
2 Reference Information..................................................................................13
2.1 Description: Function Block (FB) .................................................................... 13
Application.................................................................................................. 13
Function Blocks and Instance Data Blocks................................................ 13
2.2 Description: Function (FC).............................................................................. 13
Application.................................................................................................. 13
2.3 Description: Data Block (DB) .......................................................................... 14
Shared Data Blocks in the User Program .................................................. 14
Reference to Automation and Drives Service & Support
This entry is from the internet application portal of Automation and Drives
Service & Support. The documentation has the entry ID 23330722. Click
the link below to directly display the download page of this document.
http://support.automation.siemens.com/WW/view/en/23330722
All entries referenced in this document are designated by their entry ID and
addressed via the above path.
www.dienhathe.vn
www.dienhathe.com
Using FBs, FCs, and DBs
Using FBs, FCs, and, DBs
V1.0 2006/08/01 4/14
Copyright©SiemensAG2006Allrightsreserved
23330722_Using_FB_FC_DB.doc
Using FBs, FCs, and DBs
Description
This program controls the operation of a gasoline engine and a diesel
engine. The actual engine operation is controlled in a reusable “Engine”
Function Block (FB) (Networks 2 and 3), with associated Data Blocks (DB)
1 and 2, for the gasoline engine and diesel engine, respectively. An engine
fan operation is controlled in a reusable Function (FC) (Networks 4 and 5),
where DB information is not needed because FCs cannot access DB
information.
Objectives
The sample program provides an example of the following tasks:
• Using Function Blocks (FB) to accomplish specific, repetitive tasks that
require memory for storage of data used and generated by the task.
• Using Data Blocks (DB) for storage of data used and generated by the
FB task.
• Using Functions (FC) to accomplish specific, repetitive tasks that do not
require memory for storage of data used and generated by the task.
Summary of the Sample Program
OB1 contains 2 different calls for FB1, one FB1 call that uses DB1
(gasoline engine) parameters and one FB1 call that uses DB2 (diesel
engine) parameters. There are also two calls for FC1, one for the gasoline
engine fan and one for the diesel engine fan. With the controller in RUN,
the input to the required FB box must be powered for the required gasoline
or diesel engine FB to be executed.
Table 1-1 contains a summary of the gasoline engine program operation:
• OB1 and FB1 interconnections which impact the necessary steps to
bring the motor to a run condition
• Two views of DB1: one containing the gasoline engine initial parameter
values and one containing the gasoline engine initial and actual
parameter values
• DB2 diesel engine parameter values (The diesel engine operates
exactly the same as the gasoline engine.)
• OB1 and FC1 interconnections which impact the necessary steps to
bring the motor fan to a run condition.
Table 1-2 displays the Symbol Table containing all of the global symbols
used in the program.
www.dienhathe.vn
www.dienhathe.com
Using FBs, FCs, and DBs
Using FBs, FCs, and, DBs
V1.0 2006/08/01 5/14
Copyright©SiemensAG2006Allrightsreserved
23330722_Using_FB_FC_DB.doc
Table 1-1 Summary of Gasoline Engine LAD Programming
OB1, Network 1
OB1, Network 2
FB1 (“Engine”), Network 1
FB1 (“Engine”), Network 2
The outputs of the Gasoline Engine instance of FB1 are set as follows:
①#Engine_On output is set to “1.”
②#Preset_Speed_Reached is set to “1” when the following parameters are set as specified:
③"Automatic Mode" is set to “0.”
④#Switch_On is set to “1.”
⑤#Switch_Off is set to “0.”
⑥#Failure is set to “1.”
⑦#Actual_Speed is set to a value greater than the #Preset_Speed.
DB1 (“Gasoline“) - Gasoline Engine Initial Values
DB1 (“Gasoline“) - Gasoline Engine New “Actual_Speed” Value
DB2 (“Diesel“) - Diesel Engine Initial Values
www.dienhathe.vn
www.dienhathe.com
Using FBs, FCs, and DBs
Using FBs, FCs, and, DBs
V1.0 2006/08/01 6/14
Copyright©SiemensAG2006Allrightsreserved
23330722_Using_FB_FC_DB.doc
OB1, Network 4 FC1, Network 1
The #Fan_On output of the Gasoline Engine Fan FC1 is set to “1” when the following
parameters are set as specified:
①#Engine_On is set to “1.”
②#Timer_Function is set to “1.”
When #Engine_On is set to “0,” the #Fan_On output of the Gasoline Engine Fan FC1 is set to
“0” after 4 seconds have elapsed.
Table 1-2: FB_FC_DB Program Symbol Table
www.dienhathe.vn
www.dienhathe.com
Using FBs, FCs, and DBs
Using FBs, FCs, and, DBs
V1.0 2006/08/01 7/14
Copyright©SiemensAG2006Allrightsreserved
23330722_Using_FB_FC_DB.doc
Note Global symbols appear in quotation marks ("name") and are valid in the
entire program. "Block-specific" symbols are represented with a hash
symbol before the name (#name) and are only valid within the FB or FC.
www.dienhathe.vn
www.dienhathe.com
Using FBs, FCs, and DBs
Using FBs, FCs, and, DBs
V1.0 2006/08/01 8/14
Copyright©SiemensAG2006Allrightsreserved
23330722_Using_FB_FC_DB.doc
1 Sample Program for Using FBs, FCs, and DBs
1.1 OB1
Network 1: Set-Reset Flip Flop to Set Automatic Mode
Figure 1-1: OB1 - Network 1
In this example, the Set-Reset is used to control "Automatic Mode" (Q 4.2).
If the signal state is "1" at the "Automatic On" (I 0.5 ) input and "0" at
"Manual On" (I 0.6), memory bit "Automatic Mode" (Q 4.2) is set (signal
state is “1”). Otherwise, if the signal state at the "Automatic On" (I 0.5 )
input is "0" and at "Manual On" (I 0.6) is "1", memory bit "Automatic Mode"
(Q 4.2) is reset (signal state is “0”). If both signal states are "0", nothing is
changed. If both signal states change to "1" at exactly the same time, the
reset instruction dominates because of the order; "Automatic Mode" (Q 4.2)
is reset (signal state is “0”).
Network 2: Switching on the Gasoline Engine
Figure 1-2: OB1 - Network 2
This is the call for the function block FB1 ("Engine") with the data for a
gasoline engine (data block "Gasoline" DB1).
www.dienhathe.vn
www.dienhathe.com
Using FBs, FCs, and DBs
Using FBs, FCs, and, DBs
V1.0 2006/08/01 9/14
Copyright©SiemensAG2006Allrightsreserved
23330722_Using_FB_FC_DB.doc
Network 3: Switching on the Diesel Engine
Figure 1-3: OB1 - Network 3
This is the call for the function block FB1 ("Engine") with the data for a
diesel engine (data block "Diesel" DB2).
Network 4: Controlling the Fan for the Gasoline Engine
Figure 1-4: OB1 - Network 4
This is the call for the function FC1 to control the gasoline engine fan.
When the gasoline engine is turned off, FC1 causes a 4-second time delay
before the gasoline engine fan is turned off.
www.dienhathe.vn
www.dienhathe.com
Using FBs, FCs, and DBs
Using FBs, FCs, and, DBs
V1.0 2006/08/01 10/14
Copyright©SiemensAG2006Allrightsreserved
23330722_Using_FB_FC_DB.doc
Network 5: Controlling the Fan for the Diesel Engine
Figure 1-5: OB1 - Network 5
This is the call for the function FC1 to control the diesel engine fan. When
the diesel engine is turned off, FC1 causes a 4-second time delay before
the diesel engine fan is turned off.
1.2 FB1
This function block contains a memory function for controlling the engine
and a comparator for monitoring the speed.
We want to use the same function block to control two different engines.
We therefore want to assign all the "engine-specific" signals as function
block parameters. The signals that are scanned are the inputs of the
function block ("in" declaration); the signals that are modified are the
outputs ("out" declaration). One of the local variables, #Preset_Speed, is
engine-specific, but because it is a fixed value, it can be stored as static
data in the engine data ("stat" declaration). This is known as a "static local
variable".
Figure 1-6: Function Block Variable Detail View
When the function block is processed (block call) in the organization block
OB1, we will assign the function block parameters the specific signals for
each engine.
www.dienhathe.vn
www.dienhathe.com
Using FBs, FCs, and DBs
Using FBs, FCs, and, DBs
V1.0 2006/08/01 11/14
Copyright©SiemensAG2006Allrightsreserved
23330722_Using_FB_FC_DB.doc
The operating mode (here "automatic mode") is not engine-specific; it is
valid for the entire control program. This signal is therefore not one of the
function block parameters; it is scanned directly into the function block.
Network 1: Set-Reset Flip Flop to Switch on an Engine
Figure 1-7: FB1 – Network 1
In this example, the Set-Reset is used to switch on an Engine.
If the signal state is "1" at the #Switch_On input and "0" at
"Automatic_Mode", the output variable #Engine_On is set (signal state is
“1”).
Note The signal "Automatic_Mode" is negated; this is represented by a
normally closed contact (a normally closed contact is "closed" when the
relevant signal state is "0").
Otherwise, if the signal state at the #Switch_Off input is "1" or at the
#Failure input is "0", memory bit #Engine_On is reset (signal state is “0”).
Note #Failure is a "zero-active" signal, which usually has the signal state "1" (if
there is no error) and signal state "0" when an error occurs. The required
function is obtained if we program a normally closed contact for the signal
#Failure.
If both the set and reset signal states are "0", nothing is changed. If both
signal states change to "1" at exactly the same time, the reset instruction
dominates because of the order; #Engine_On is reset (signal state is “0”).
www.dienhathe.vn
www.dienhathe.com
Using FBs, FCs, and DBs
Using FBs, FCs, and, DBs
V1.0 2006/08/01 12/14
Copyright©SiemensAG2006Allrightsreserved
23330722_Using_FB_FC_DB.doc
Network 2: Monitoring the Engine Speed
Figure 1-8: FB1 – Network 2
A comparator monitors the engine speed. It checks whether the actual
speed is greater than or equal to the preset speed. If this is the case, the
comparator sets the variable #Preset_Speed_Reached to "1".
1.3 FC1
You can program a function (FC) when the algorithm (the control function)
does not have to store any of its own data. In contrast to a function block
(FB), a function has no instance data block.
This example shows a simple function: a fan starts when the engine is
switched on. When the engine is switched off again, the fan continues to
run for another 4 seconds and then stops.
Network 1: Controlling the Engine Fan
Figure 1-9: FC1 – Network 1
The box "S_OFFDT" is taken from the Program Elements catalog and
labeled #Timer_Function. The variable #Timer_Function is started with the
input parameter #Engine_On. This variable #Timer_Function with the data
type TIMER stands for a timer function which is assigned a timer address
(for example, T1) later on when it is called in OB1.
The timer function provides a switch-off delay, with a timer delay of 4
seconds. You can also assign the time delay as an input parameter with the
data type S5TIME so that a different follow-on time can be configured for
the fan in each engine.
www.dienhathe.vn
www.dienhathe.com
Using FBs, FCs, and DBs
Using FBs, FCs, and, DBs
V1.0 2006/08/01 13/14
Copyright©SiemensAG2006Allrightsreserved
23330722_Using_FB_FC_DB.doc
2 Reference Information
2.1 Description: Function Block (FB)
FBs belong to the blocks that you program yourself. A function block is a
block ”with memory." It is assigned a data block as its memory (instance
data block). The parameters that are transferred to the FB and the static
variables are saved in the instance DB. Temporary variables are saved in
the local data stack.
Data saved in the instance DB are not lost when execution of the FB is
complete. Data saved in the local data stack are, however, lost when
execution of the FB is completed.
Application
An FB contains a program that is always executed when the FB is called by
a different logic block. Function blocks make it much easier to program
frequently occurring, complex functions.
Function Blocks and Instance Data Blocks
An instance data block is assigned to every function block call that transfers
parameters.
2.2 Description: Function (FC)
FCs belong to the blocks that you program yourself. An FC is a logic block
”without memory." Temporary variables belonging to the FC are saved in
the local data stack. This data is then lost when the FC has been executed.
To save data permanently, functions can also use shared data blocks.
Since an FC does not have any memory of its own, you must always
specify actual parameters for it. You cannot assign initial values for the
local data of an FC.
Application
An FC contains a program section that is always executed when the FC is
called by a different logic block. You can use functions for the following
purposes:
• To return a function value to the calling block (example: math functions)
• To execute a technological function (example: single control function
with a bit logic operation).
www.dienhathe.vn
www.dienhathe.com
Using FBs, FCs, and DBs
Using FBs, FCs, and, DBs
V1.0 2006/08/01 14/14
Copyright©SiemensAG2006Allrightsreserved
23330722_Using_FB_FC_DB.doc
2.3 Description: Data Block (DB)
In contrast to logic blocks (FBs or FCs), Data Blocks (DBs) do not contain
STEP 7 instructions. They are used to store user data, in other words, data
blocks contain variable data with which the user program works. Shared
data blocks are used to store user data that can be accessed by all other
blocks. Instance data blocks are assigned to a specific FB for its storage
memory.
The size of DBs can vary. Refer to the description of your CPU for the
maximum possible size.
You can structure shared data blocks in any way to suit your particular
requirements.
Shared Data Blocks in the User Program
If a logic block (FC, FB, or OB) is called, it can occupy space in the local
data area (L stack) temporarily. In addition to this local data area, a logic
block can open a memory area in the form of a DB. In contrast to the data
in the local data area, the data in a DB are not deleted when the DB is
closed (in other words, after the corresponding logic block has been
executed).
Each FB, FC, or OB can read the data from a shared DB or write data to a
shared DB. This data remains in the DB after the DB is exited.
An FB can open and use a shared DB and an instance DB at the same
time. Figure 2-1 shows the different methods of access to data blocks.
Figure 2-1 Shared and Instance DBs
www.dienhathe.vn
www.dienhathe.com

More Related Content

Similar to Siemens catalog tong hop using f bs, fcs, and dbs

Upgrade to V2.5 Plan and Tech Actions.pdf
Upgrade to V2.5 Plan and Tech Actions.pdfUpgrade to V2.5 Plan and Tech Actions.pdf
Upgrade to V2.5 Plan and Tech Actions.pdfMarna Walle
 
Intel Management Mode Firmware Runtime Update - OS Interface, revision 1.00
Intel Management Mode Firmware Runtime Update - OS Interface, revision 1.00Intel Management Mode Firmware Runtime Update - OS Interface, revision 1.00
Intel Management Mode Firmware Runtime Update - OS Interface, revision 1.00itsummaitsumma
 
Suse service virtualization_image_set up_guide_140214
Suse service virtualization_image_set up_guide_140214Suse service virtualization_image_set up_guide_140214
Suse service virtualization_image_set up_guide_140214Darrel Rader
 
UGUIDE-007-1D Sharepoint User Guide
UGUIDE-007-1D Sharepoint User GuideUGUIDE-007-1D Sharepoint User Guide
UGUIDE-007-1D Sharepoint User GuidePaul Rouse
 
ECU Flashing: Flash Bootloaders that Facilitate ECU Reprogramming
ECU Flashing: Flash Bootloaders that Facilitate ECU ReprogrammingECU Flashing: Flash Bootloaders that Facilitate ECU Reprogramming
ECU Flashing: Flash Bootloaders that Facilitate ECU ReprogrammingEmbitel Technologies (I) PVT LTD
 
Guia HAP para LG MultiV
Guia HAP para LG MultiVGuia HAP para LG MultiV
Guia HAP para LG MultiVfranco5190
 
Drives Software Programming – using PLC or Drive bespoke programming?
Drives Software Programming – using PLC or Drive bespoke programming?Drives Software Programming – using PLC or Drive bespoke programming?
Drives Software Programming – using PLC or Drive bespoke programming?Optima Control Solutions
 
IBM iSeries Terminal Based Performance Testing with Rational Performance Tester
IBM iSeries Terminal Based Performance Testing with Rational Performance TesterIBM iSeries Terminal Based Performance Testing with Rational Performance Tester
IBM iSeries Terminal Based Performance Testing with Rational Performance TesterWinton Winton
 
Automationcontrol7
Automationcontrol7Automationcontrol7
Automationcontrol7liyanagek
 
STATUS UPDATE OF COLO PROJECT XIAOWEI YANG, HUAWEI AND WILL AULD, INTEL
STATUS UPDATE OF COLO PROJECT XIAOWEI YANG, HUAWEI AND WILL AULD, INTELSTATUS UPDATE OF COLO PROJECT XIAOWEI YANG, HUAWEI AND WILL AULD, INTEL
STATUS UPDATE OF COLO PROJECT XIAOWEI YANG, HUAWEI AND WILL AULD, INTELThe Linux Foundation
 
DUG'20: 01 - Welcome & DAOS Update
DUG'20: 01 - Welcome & DAOS UpdateDUG'20: 01 - Welcome & DAOS Update
DUG'20: 01 - Welcome & DAOS UpdateAndrey Kudryavtsev
 
Autel j2534 maxiflash pro for maxisys ms908 manual
Autel j2534 maxiflash pro for maxisys ms908 manualAutel j2534 maxiflash pro for maxisys ms908 manual
Autel j2534 maxiflash pro for maxisys ms908 manualOBD365
 
Autel MaxiFlash Elite J2534 ECU Programming Tool User Manual
Autel MaxiFlash Elite J2534 ECU Programming Tool User ManualAutel MaxiFlash Elite J2534 ECU Programming Tool User Manual
Autel MaxiFlash Elite J2534 ECU Programming Tool User ManualBuyobdtoolShop
 
Accel_Series_2022Spring_En.pptx
Accel_Series_2022Spring_En.pptxAccel_Series_2022Spring_En.pptx
Accel_Series_2022Spring_En.pptxNTTDATA INTRAMART
 
vdocuments.net_modbus-slave-modbus-master-in-s7.ppt
vdocuments.net_modbus-slave-modbus-master-in-s7.pptvdocuments.net_modbus-slave-modbus-master-in-s7.ppt
vdocuments.net_modbus-slave-modbus-master-in-s7.pptAhmedAhmed974840
 
Zero Cost Base Budgeting
Zero Cost Base BudgetingZero Cost Base Budgeting
Zero Cost Base Budgetingchestertrybus
 
IBM ODM Rules Compiler support in IBM Streams V4.2.
IBM ODM Rules Compiler support in IBM Streams V4.2.IBM ODM Rules Compiler support in IBM Streams V4.2.
IBM ODM Rules Compiler support in IBM Streams V4.2.lisanl
 

Similar to Siemens catalog tong hop using f bs, fcs, and dbs (20)

Upgrade to V2.5 Plan and Tech Actions.pdf
Upgrade to V2.5 Plan and Tech Actions.pdfUpgrade to V2.5 Plan and Tech Actions.pdf
Upgrade to V2.5 Plan and Tech Actions.pdf
 
Pv elite v8
Pv elite v8 Pv elite v8
Pv elite v8
 
Intel Management Mode Firmware Runtime Update - OS Interface, revision 1.00
Intel Management Mode Firmware Runtime Update - OS Interface, revision 1.00Intel Management Mode Firmware Runtime Update - OS Interface, revision 1.00
Intel Management Mode Firmware Runtime Update - OS Interface, revision 1.00
 
OPEN CABSTER PROJECT DOC
OPEN CABSTER PROJECT DOCOPEN CABSTER PROJECT DOC
OPEN CABSTER PROJECT DOC
 
Suse service virtualization_image_set up_guide_140214
Suse service virtualization_image_set up_guide_140214Suse service virtualization_image_set up_guide_140214
Suse service virtualization_image_set up_guide_140214
 
UGUIDE-007-1D Sharepoint User Guide
UGUIDE-007-1D Sharepoint User GuideUGUIDE-007-1D Sharepoint User Guide
UGUIDE-007-1D Sharepoint User Guide
 
ECU Flashing: Flash Bootloaders that Facilitate ECU Reprogramming
ECU Flashing: Flash Bootloaders that Facilitate ECU ReprogrammingECU Flashing: Flash Bootloaders that Facilitate ECU Reprogramming
ECU Flashing: Flash Bootloaders that Facilitate ECU Reprogramming
 
Guia HAP para LG MultiV
Guia HAP para LG MultiVGuia HAP para LG MultiV
Guia HAP para LG MultiV
 
Drives Software Programming – using PLC or Drive bespoke programming?
Drives Software Programming – using PLC or Drive bespoke programming?Drives Software Programming – using PLC or Drive bespoke programming?
Drives Software Programming – using PLC or Drive bespoke programming?
 
IBM iSeries Terminal Based Performance Testing with Rational Performance Tester
IBM iSeries Terminal Based Performance Testing with Rational Performance TesterIBM iSeries Terminal Based Performance Testing with Rational Performance Tester
IBM iSeries Terminal Based Performance Testing with Rational Performance Tester
 
Automationcontrol7
Automationcontrol7Automationcontrol7
Automationcontrol7
 
STATUS UPDATE OF COLO PROJECT XIAOWEI YANG, HUAWEI AND WILL AULD, INTEL
STATUS UPDATE OF COLO PROJECT XIAOWEI YANG, HUAWEI AND WILL AULD, INTELSTATUS UPDATE OF COLO PROJECT XIAOWEI YANG, HUAWEI AND WILL AULD, INTEL
STATUS UPDATE OF COLO PROJECT XIAOWEI YANG, HUAWEI AND WILL AULD, INTEL
 
DUG'20: 01 - Welcome & DAOS Update
DUG'20: 01 - Welcome & DAOS UpdateDUG'20: 01 - Welcome & DAOS Update
DUG'20: 01 - Welcome & DAOS Update
 
Autel j2534 maxiflash pro for maxisys ms908 manual
Autel j2534 maxiflash pro for maxisys ms908 manualAutel j2534 maxiflash pro for maxisys ms908 manual
Autel j2534 maxiflash pro for maxisys ms908 manual
 
Autel MaxiFlash Elite J2534 ECU Programming Tool User Manual
Autel MaxiFlash Elite J2534 ECU Programming Tool User ManualAutel MaxiFlash Elite J2534 ECU Programming Tool User Manual
Autel MaxiFlash Elite J2534 ECU Programming Tool User Manual
 
Accel_Series_2022Spring_En.pptx
Accel_Series_2022Spring_En.pptxAccel_Series_2022Spring_En.pptx
Accel_Series_2022Spring_En.pptx
 
vdocuments.net_modbus-slave-modbus-master-in-s7.ppt
vdocuments.net_modbus-slave-modbus-master-in-s7.pptvdocuments.net_modbus-slave-modbus-master-in-s7.ppt
vdocuments.net_modbus-slave-modbus-master-in-s7.ppt
 
Zero Cost Base Budgeting
Zero Cost Base BudgetingZero Cost Base Budgeting
Zero Cost Base Budgeting
 
Proton ds userguide
Proton ds userguideProton ds userguide
Proton ds userguide
 
IBM ODM Rules Compiler support in IBM Streams V4.2.
IBM ODM Rules Compiler support in IBM Streams V4.2.IBM ODM Rules Compiler support in IBM Streams V4.2.
IBM ODM Rules Compiler support in IBM Streams V4.2.
 

More from Dien Ha The

Vnd feb 2020 price list schneider (1)
Vnd feb 2020 price list schneider (1)Vnd feb 2020 price list schneider (1)
Vnd feb 2020 price list schneider (1)Dien Ha The
 
Resize bientanfuji-dienhathe.com
Resize bientanfuji-dienhathe.comResize bientanfuji-dienhathe.com
Resize bientanfuji-dienhathe.comDien Ha The
 
Fed e-quick-start-up-guide-bientanfuji-dienhathe.com
Fed e-quick-start-up-guide-bientanfuji-dienhathe.comFed e-quick-start-up-guide-bientanfuji-dienhathe.com
Fed e-quick-start-up-guide-bientanfuji-dienhathe.comDien Ha The
 
Fed e-quick-start-manual-bientanfuji-dienhathe.com
Fed e-quick-start-manual-bientanfuji-dienhathe.comFed e-quick-start-manual-bientanfuji-dienhathe.com
Fed e-quick-start-manual-bientanfuji-dienhathe.comDien Ha The
 
Ls bang gia ls ap dung 20 04-2019
Ls bang gia ls ap dung 20 04-2019Ls bang gia ls ap dung 20 04-2019
Ls bang gia ls ap dung 20 04-2019Dien Ha The
 
Mitsubishi graphic operation terminal got2000 series parts library book
Mitsubishi graphic operation terminal got2000 series parts library bookMitsubishi graphic operation terminal got2000 series parts library book
Mitsubishi graphic operation terminal got2000 series parts library bookDien Ha The
 
Mitsubishi inverter fr-a700-instruction-manualbasic-160425031653
Mitsubishi inverter fr-a700-instruction-manualbasic-160425031653Mitsubishi inverter fr-a700-instruction-manualbasic-160425031653
Mitsubishi inverter fr-a700-instruction-manualbasic-160425031653Dien Ha The
 
Mitsubishi graphic operation terminal got2000 series gt2103 new product release
Mitsubishi graphic operation terminal got2000 series gt2103 new product releaseMitsubishi graphic operation terminal got2000 series gt2103 new product release
Mitsubishi graphic operation terminal got2000 series gt2103 new product releaseDien Ha The
 
Mitsubishi graphic operation terminal got2000 series got mobile function quic...
Mitsubishi graphic operation terminal got2000 series got mobile function quic...Mitsubishi graphic operation terminal got2000 series got mobile function quic...
Mitsubishi graphic operation terminal got2000 series got mobile function quic...Dien Ha The
 
Mitsubishi graphic operation terminal got2000 series drive control interactiv...
Mitsubishi graphic operation terminal got2000 series drive control interactiv...Mitsubishi graphic operation terminal got2000 series drive control interactiv...
Mitsubishi graphic operation terminal got2000 series drive control interactiv...Dien Ha The
 
Mitsubishi inverter option catalog
Mitsubishi inverter option catalogMitsubishi inverter option catalog
Mitsubishi inverter option catalogDien Ha The
 
Mitsubishi low voltage ws-v series mccb and elcb
Mitsubishi low voltage ws-v series mccb and elcbMitsubishi low voltage ws-v series mccb and elcb
Mitsubishi low voltage ws-v series mccb and elcbDien Ha The
 
Mitsubishi graphic operation terminal got2000 series (concise)
Mitsubishi graphic operation terminal got2000 series (concise)Mitsubishi graphic operation terminal got2000 series (concise)
Mitsubishi graphic operation terminal got2000 series (concise)Dien Ha The
 
Mitsubishi low voltage ws-v series comparison of previous and new models
Mitsubishi low voltage ws-v series comparison of previous and new modelsMitsubishi low voltage ws-v series comparison of previous and new models
Mitsubishi low voltage ws-v series comparison of previous and new modelsDien Ha The
 
Mitsubishi inverter inverter family
Mitsubishi inverter inverter familyMitsubishi inverter inverter family
Mitsubishi inverter inverter familyDien Ha The
 
Mitsubishi low voltage miniature circuit breakers din series
Mitsubishi low voltage miniature circuit breakers din seriesMitsubishi low voltage miniature circuit breakers din series
Mitsubishi low voltage miniature circuit breakers din seriesDien Ha The
 
Mitsubishi inverter freqrol-hc2 series
Mitsubishi inverter freqrol-hc2 seriesMitsubishi inverter freqrol-hc2 series
Mitsubishi inverter freqrol-hc2 seriesDien Ha The
 
Mitsubishi low voltage mccb and elcb(ws-v series) y0720-version 1-mitsu
Mitsubishi low voltage mccb and elcb(ws-v series) y0720-version 1-mitsuMitsubishi low voltage mccb and elcb(ws-v series) y0720-version 1-mitsu
Mitsubishi low voltage mccb and elcb(ws-v series) y0720-version 1-mitsuDien Ha The
 
Mitsubishi inverter freqrol-f700 pj series
Mitsubishi inverter freqrol-f700 pj seriesMitsubishi inverter freqrol-f700 pj series
Mitsubishi inverter freqrol-f700 pj seriesDien Ha The
 
Mitsubishi inverter catalog-mitsubishi-inverter-option-160426021125
Mitsubishi inverter catalog-mitsubishi-inverter-option-160426021125Mitsubishi inverter catalog-mitsubishi-inverter-option-160426021125
Mitsubishi inverter catalog-mitsubishi-inverter-option-160426021125Dien Ha The
 

More from Dien Ha The (20)

Vnd feb 2020 price list schneider (1)
Vnd feb 2020 price list schneider (1)Vnd feb 2020 price list schneider (1)
Vnd feb 2020 price list schneider (1)
 
Resize bientanfuji-dienhathe.com
Resize bientanfuji-dienhathe.comResize bientanfuji-dienhathe.com
Resize bientanfuji-dienhathe.com
 
Fed e-quick-start-up-guide-bientanfuji-dienhathe.com
Fed e-quick-start-up-guide-bientanfuji-dienhathe.comFed e-quick-start-up-guide-bientanfuji-dienhathe.com
Fed e-quick-start-up-guide-bientanfuji-dienhathe.com
 
Fed e-quick-start-manual-bientanfuji-dienhathe.com
Fed e-quick-start-manual-bientanfuji-dienhathe.comFed e-quick-start-manual-bientanfuji-dienhathe.com
Fed e-quick-start-manual-bientanfuji-dienhathe.com
 
Ls bang gia ls ap dung 20 04-2019
Ls bang gia ls ap dung 20 04-2019Ls bang gia ls ap dung 20 04-2019
Ls bang gia ls ap dung 20 04-2019
 
Mitsubishi graphic operation terminal got2000 series parts library book
Mitsubishi graphic operation terminal got2000 series parts library bookMitsubishi graphic operation terminal got2000 series parts library book
Mitsubishi graphic operation terminal got2000 series parts library book
 
Mitsubishi inverter fr-a700-instruction-manualbasic-160425031653
Mitsubishi inverter fr-a700-instruction-manualbasic-160425031653Mitsubishi inverter fr-a700-instruction-manualbasic-160425031653
Mitsubishi inverter fr-a700-instruction-manualbasic-160425031653
 
Mitsubishi graphic operation terminal got2000 series gt2103 new product release
Mitsubishi graphic operation terminal got2000 series gt2103 new product releaseMitsubishi graphic operation terminal got2000 series gt2103 new product release
Mitsubishi graphic operation terminal got2000 series gt2103 new product release
 
Mitsubishi graphic operation terminal got2000 series got mobile function quic...
Mitsubishi graphic operation terminal got2000 series got mobile function quic...Mitsubishi graphic operation terminal got2000 series got mobile function quic...
Mitsubishi graphic operation terminal got2000 series got mobile function quic...
 
Mitsubishi graphic operation terminal got2000 series drive control interactiv...
Mitsubishi graphic operation terminal got2000 series drive control interactiv...Mitsubishi graphic operation terminal got2000 series drive control interactiv...
Mitsubishi graphic operation terminal got2000 series drive control interactiv...
 
Mitsubishi inverter option catalog
Mitsubishi inverter option catalogMitsubishi inverter option catalog
Mitsubishi inverter option catalog
 
Mitsubishi low voltage ws-v series mccb and elcb
Mitsubishi low voltage ws-v series mccb and elcbMitsubishi low voltage ws-v series mccb and elcb
Mitsubishi low voltage ws-v series mccb and elcb
 
Mitsubishi graphic operation terminal got2000 series (concise)
Mitsubishi graphic operation terminal got2000 series (concise)Mitsubishi graphic operation terminal got2000 series (concise)
Mitsubishi graphic operation terminal got2000 series (concise)
 
Mitsubishi low voltage ws-v series comparison of previous and new models
Mitsubishi low voltage ws-v series comparison of previous and new modelsMitsubishi low voltage ws-v series comparison of previous and new models
Mitsubishi low voltage ws-v series comparison of previous and new models
 
Mitsubishi inverter inverter family
Mitsubishi inverter inverter familyMitsubishi inverter inverter family
Mitsubishi inverter inverter family
 
Mitsubishi low voltage miniature circuit breakers din series
Mitsubishi low voltage miniature circuit breakers din seriesMitsubishi low voltage miniature circuit breakers din series
Mitsubishi low voltage miniature circuit breakers din series
 
Mitsubishi inverter freqrol-hc2 series
Mitsubishi inverter freqrol-hc2 seriesMitsubishi inverter freqrol-hc2 series
Mitsubishi inverter freqrol-hc2 series
 
Mitsubishi low voltage mccb and elcb(ws-v series) y0720-version 1-mitsu
Mitsubishi low voltage mccb and elcb(ws-v series) y0720-version 1-mitsuMitsubishi low voltage mccb and elcb(ws-v series) y0720-version 1-mitsu
Mitsubishi low voltage mccb and elcb(ws-v series) y0720-version 1-mitsu
 
Mitsubishi inverter freqrol-f700 pj series
Mitsubishi inverter freqrol-f700 pj seriesMitsubishi inverter freqrol-f700 pj series
Mitsubishi inverter freqrol-f700 pj series
 
Mitsubishi inverter catalog-mitsubishi-inverter-option-160426021125
Mitsubishi inverter catalog-mitsubishi-inverter-option-160426021125Mitsubishi inverter catalog-mitsubishi-inverter-option-160426021125
Mitsubishi inverter catalog-mitsubishi-inverter-option-160426021125
 

Recently uploaded

Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 

Recently uploaded (20)

Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 

Siemens catalog tong hop using f bs, fcs, and dbs

  • 1. Application on Control Technology Programming Example in Ladder Logic Using FBs, FCs, and DBs www.dienhathe.vn www.dienhathe.com
  • 2. Using FBs, FCs, and DBs Using FBs, FCs, and, DBs V1.0 2006/08/01 2/14 Copyright©SiemensAG2006Allrightsreserved 23330722_Using_FB_FC_DB.doc Note The application examples are not binding and do not claim to be complete regarding the circuits shown, equipping and any eventuality. The application examples do not represent customer-specific solutions. They are only intended to pro-vide support for typical applications. You are responsible in ensuring that the de-scribed products are correctly used. These application examples do not relieve you of the responsibility in safely and professionally using, installing, operating and servicing equipment. When using these application examples, you recognize that Siemens cannot be made liable for any damage/claims beyond the liability clause described. We reserve the right to make changes to these application examples at any time without prior notice. If there are any deviations between the recommendations provided in these application examples and other Siemens publications - e.g. Catalogs - then the contents of the other documents have priority. Warranty, liability and support We do not accept any liability for the information contained in this document. Any claims against us - based on whatever legal reason - resulting from the use of the examples, information, programs, engineering and performance data etc., described in this application example shall be excluded. Such an exclusion shall not apply in the case of mandatory liability, e.g. under the German Product Liability Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life, body or health, guarantee for the quality of a product, fraudulent concealment of a deficiency or breach of a condition which goes to the root of the contract (“wesentliche Vertragspflichten”). However, claims arising from a breach of a condition which goes to the root of the contract shall be limited to the foreseeable damage which is intrinsic to the contract, unless caused by intent or gross negligence or based on mandatory liability for injury of life, body or health The above provisions does not imply a change in the burden of proof to your detriment. Copyright© 2006 Siemens A&D. It is not permissible to transfer or copy these application examples or excerpts of them without first having prior authorization from Siemens A&D in writing. For questions about this document please use the following e-mail address: mailto:csweb@ad.siemens.de www.dienhathe.vn www.dienhathe.com
  • 3. Using FBs, FCs, and DBs Using FBs, FCs, and, DBs V1.0 2006/08/01 3/14 Copyright©SiemensAG2006Allrightsreserved 23330722_Using_FB_FC_DB.doc Table of Contents Table of Contents .........................................................................................................3 Description ................................................................................................... 4 Objectives ....................................................................................................4 Summary of the Sample Program................................................................ 4 1 Sample Program for Using FBs, FCs, and DBs ........................................... 8 1.1 OB1...................................................................................................................8 Network 1: Set-Reset Flip Flop to Set Automatic Mode............................... 8 Network 2: Switching on the Gasoline Engine ............................................. 8 Network 3: Switching on the Diesel Engine ................................................. 9 Network 4: Controlling the Fan for the Gasoline Engine .............................. 9 Network 5: Controlling the Fan for the Diesel Engine ................................ 10 1.2 FB1 .................................................................................................................10 Network 1: Set-Reset Flip Flop to Switch on an Engine ............................ 11 Network 2: Monitoring the Engine Speed................................................... 12 1.3 FC1.................................................................................................................12 Network 1: Controlling the Engine Fan ...................................................... 12 2 Reference Information..................................................................................13 2.1 Description: Function Block (FB) .................................................................... 13 Application.................................................................................................. 13 Function Blocks and Instance Data Blocks................................................ 13 2.2 Description: Function (FC).............................................................................. 13 Application.................................................................................................. 13 2.3 Description: Data Block (DB) .......................................................................... 14 Shared Data Blocks in the User Program .................................................. 14 Reference to Automation and Drives Service & Support This entry is from the internet application portal of Automation and Drives Service & Support. The documentation has the entry ID 23330722. Click the link below to directly display the download page of this document. http://support.automation.siemens.com/WW/view/en/23330722 All entries referenced in this document are designated by their entry ID and addressed via the above path. www.dienhathe.vn www.dienhathe.com
  • 4. Using FBs, FCs, and DBs Using FBs, FCs, and, DBs V1.0 2006/08/01 4/14 Copyright©SiemensAG2006Allrightsreserved 23330722_Using_FB_FC_DB.doc Using FBs, FCs, and DBs Description This program controls the operation of a gasoline engine and a diesel engine. The actual engine operation is controlled in a reusable “Engine” Function Block (FB) (Networks 2 and 3), with associated Data Blocks (DB) 1 and 2, for the gasoline engine and diesel engine, respectively. An engine fan operation is controlled in a reusable Function (FC) (Networks 4 and 5), where DB information is not needed because FCs cannot access DB information. Objectives The sample program provides an example of the following tasks: • Using Function Blocks (FB) to accomplish specific, repetitive tasks that require memory for storage of data used and generated by the task. • Using Data Blocks (DB) for storage of data used and generated by the FB task. • Using Functions (FC) to accomplish specific, repetitive tasks that do not require memory for storage of data used and generated by the task. Summary of the Sample Program OB1 contains 2 different calls for FB1, one FB1 call that uses DB1 (gasoline engine) parameters and one FB1 call that uses DB2 (diesel engine) parameters. There are also two calls for FC1, one for the gasoline engine fan and one for the diesel engine fan. With the controller in RUN, the input to the required FB box must be powered for the required gasoline or diesel engine FB to be executed. Table 1-1 contains a summary of the gasoline engine program operation: • OB1 and FB1 interconnections which impact the necessary steps to bring the motor to a run condition • Two views of DB1: one containing the gasoline engine initial parameter values and one containing the gasoline engine initial and actual parameter values • DB2 diesel engine parameter values (The diesel engine operates exactly the same as the gasoline engine.) • OB1 and FC1 interconnections which impact the necessary steps to bring the motor fan to a run condition. Table 1-2 displays the Symbol Table containing all of the global symbols used in the program. www.dienhathe.vn www.dienhathe.com
  • 5. Using FBs, FCs, and DBs Using FBs, FCs, and, DBs V1.0 2006/08/01 5/14 Copyright©SiemensAG2006Allrightsreserved 23330722_Using_FB_FC_DB.doc Table 1-1 Summary of Gasoline Engine LAD Programming OB1, Network 1 OB1, Network 2 FB1 (“Engine”), Network 1 FB1 (“Engine”), Network 2 The outputs of the Gasoline Engine instance of FB1 are set as follows: ①#Engine_On output is set to “1.” ②#Preset_Speed_Reached is set to “1” when the following parameters are set as specified: ③"Automatic Mode" is set to “0.” ④#Switch_On is set to “1.” ⑤#Switch_Off is set to “0.” ⑥#Failure is set to “1.” ⑦#Actual_Speed is set to a value greater than the #Preset_Speed. DB1 (“Gasoline“) - Gasoline Engine Initial Values DB1 (“Gasoline“) - Gasoline Engine New “Actual_Speed” Value DB2 (“Diesel“) - Diesel Engine Initial Values www.dienhathe.vn www.dienhathe.com
  • 6. Using FBs, FCs, and DBs Using FBs, FCs, and, DBs V1.0 2006/08/01 6/14 Copyright©SiemensAG2006Allrightsreserved 23330722_Using_FB_FC_DB.doc OB1, Network 4 FC1, Network 1 The #Fan_On output of the Gasoline Engine Fan FC1 is set to “1” when the following parameters are set as specified: ①#Engine_On is set to “1.” ②#Timer_Function is set to “1.” When #Engine_On is set to “0,” the #Fan_On output of the Gasoline Engine Fan FC1 is set to “0” after 4 seconds have elapsed. Table 1-2: FB_FC_DB Program Symbol Table www.dienhathe.vn www.dienhathe.com
  • 7. Using FBs, FCs, and DBs Using FBs, FCs, and, DBs V1.0 2006/08/01 7/14 Copyright©SiemensAG2006Allrightsreserved 23330722_Using_FB_FC_DB.doc Note Global symbols appear in quotation marks ("name") and are valid in the entire program. "Block-specific" symbols are represented with a hash symbol before the name (#name) and are only valid within the FB or FC. www.dienhathe.vn www.dienhathe.com
  • 8. Using FBs, FCs, and DBs Using FBs, FCs, and, DBs V1.0 2006/08/01 8/14 Copyright©SiemensAG2006Allrightsreserved 23330722_Using_FB_FC_DB.doc 1 Sample Program for Using FBs, FCs, and DBs 1.1 OB1 Network 1: Set-Reset Flip Flop to Set Automatic Mode Figure 1-1: OB1 - Network 1 In this example, the Set-Reset is used to control "Automatic Mode" (Q 4.2). If the signal state is "1" at the "Automatic On" (I 0.5 ) input and "0" at "Manual On" (I 0.6), memory bit "Automatic Mode" (Q 4.2) is set (signal state is “1”). Otherwise, if the signal state at the "Automatic On" (I 0.5 ) input is "0" and at "Manual On" (I 0.6) is "1", memory bit "Automatic Mode" (Q 4.2) is reset (signal state is “0”). If both signal states are "0", nothing is changed. If both signal states change to "1" at exactly the same time, the reset instruction dominates because of the order; "Automatic Mode" (Q 4.2) is reset (signal state is “0”). Network 2: Switching on the Gasoline Engine Figure 1-2: OB1 - Network 2 This is the call for the function block FB1 ("Engine") with the data for a gasoline engine (data block "Gasoline" DB1). www.dienhathe.vn www.dienhathe.com
  • 9. Using FBs, FCs, and DBs Using FBs, FCs, and, DBs V1.0 2006/08/01 9/14 Copyright©SiemensAG2006Allrightsreserved 23330722_Using_FB_FC_DB.doc Network 3: Switching on the Diesel Engine Figure 1-3: OB1 - Network 3 This is the call for the function block FB1 ("Engine") with the data for a diesel engine (data block "Diesel" DB2). Network 4: Controlling the Fan for the Gasoline Engine Figure 1-4: OB1 - Network 4 This is the call for the function FC1 to control the gasoline engine fan. When the gasoline engine is turned off, FC1 causes a 4-second time delay before the gasoline engine fan is turned off. www.dienhathe.vn www.dienhathe.com
  • 10. Using FBs, FCs, and DBs Using FBs, FCs, and, DBs V1.0 2006/08/01 10/14 Copyright©SiemensAG2006Allrightsreserved 23330722_Using_FB_FC_DB.doc Network 5: Controlling the Fan for the Diesel Engine Figure 1-5: OB1 - Network 5 This is the call for the function FC1 to control the diesel engine fan. When the diesel engine is turned off, FC1 causes a 4-second time delay before the diesel engine fan is turned off. 1.2 FB1 This function block contains a memory function for controlling the engine and a comparator for monitoring the speed. We want to use the same function block to control two different engines. We therefore want to assign all the "engine-specific" signals as function block parameters. The signals that are scanned are the inputs of the function block ("in" declaration); the signals that are modified are the outputs ("out" declaration). One of the local variables, #Preset_Speed, is engine-specific, but because it is a fixed value, it can be stored as static data in the engine data ("stat" declaration). This is known as a "static local variable". Figure 1-6: Function Block Variable Detail View When the function block is processed (block call) in the organization block OB1, we will assign the function block parameters the specific signals for each engine. www.dienhathe.vn www.dienhathe.com
  • 11. Using FBs, FCs, and DBs Using FBs, FCs, and, DBs V1.0 2006/08/01 11/14 Copyright©SiemensAG2006Allrightsreserved 23330722_Using_FB_FC_DB.doc The operating mode (here "automatic mode") is not engine-specific; it is valid for the entire control program. This signal is therefore not one of the function block parameters; it is scanned directly into the function block. Network 1: Set-Reset Flip Flop to Switch on an Engine Figure 1-7: FB1 – Network 1 In this example, the Set-Reset is used to switch on an Engine. If the signal state is "1" at the #Switch_On input and "0" at "Automatic_Mode", the output variable #Engine_On is set (signal state is “1”). Note The signal "Automatic_Mode" is negated; this is represented by a normally closed contact (a normally closed contact is "closed" when the relevant signal state is "0"). Otherwise, if the signal state at the #Switch_Off input is "1" or at the #Failure input is "0", memory bit #Engine_On is reset (signal state is “0”). Note #Failure is a "zero-active" signal, which usually has the signal state "1" (if there is no error) and signal state "0" when an error occurs. The required function is obtained if we program a normally closed contact for the signal #Failure. If both the set and reset signal states are "0", nothing is changed. If both signal states change to "1" at exactly the same time, the reset instruction dominates because of the order; #Engine_On is reset (signal state is “0”). www.dienhathe.vn www.dienhathe.com
  • 12. Using FBs, FCs, and DBs Using FBs, FCs, and, DBs V1.0 2006/08/01 12/14 Copyright©SiemensAG2006Allrightsreserved 23330722_Using_FB_FC_DB.doc Network 2: Monitoring the Engine Speed Figure 1-8: FB1 – Network 2 A comparator monitors the engine speed. It checks whether the actual speed is greater than or equal to the preset speed. If this is the case, the comparator sets the variable #Preset_Speed_Reached to "1". 1.3 FC1 You can program a function (FC) when the algorithm (the control function) does not have to store any of its own data. In contrast to a function block (FB), a function has no instance data block. This example shows a simple function: a fan starts when the engine is switched on. When the engine is switched off again, the fan continues to run for another 4 seconds and then stops. Network 1: Controlling the Engine Fan Figure 1-9: FC1 – Network 1 The box "S_OFFDT" is taken from the Program Elements catalog and labeled #Timer_Function. The variable #Timer_Function is started with the input parameter #Engine_On. This variable #Timer_Function with the data type TIMER stands for a timer function which is assigned a timer address (for example, T1) later on when it is called in OB1. The timer function provides a switch-off delay, with a timer delay of 4 seconds. You can also assign the time delay as an input parameter with the data type S5TIME so that a different follow-on time can be configured for the fan in each engine. www.dienhathe.vn www.dienhathe.com
  • 13. Using FBs, FCs, and DBs Using FBs, FCs, and, DBs V1.0 2006/08/01 13/14 Copyright©SiemensAG2006Allrightsreserved 23330722_Using_FB_FC_DB.doc 2 Reference Information 2.1 Description: Function Block (FB) FBs belong to the blocks that you program yourself. A function block is a block ”with memory." It is assigned a data block as its memory (instance data block). The parameters that are transferred to the FB and the static variables are saved in the instance DB. Temporary variables are saved in the local data stack. Data saved in the instance DB are not lost when execution of the FB is complete. Data saved in the local data stack are, however, lost when execution of the FB is completed. Application An FB contains a program that is always executed when the FB is called by a different logic block. Function blocks make it much easier to program frequently occurring, complex functions. Function Blocks and Instance Data Blocks An instance data block is assigned to every function block call that transfers parameters. 2.2 Description: Function (FC) FCs belong to the blocks that you program yourself. An FC is a logic block ”without memory." Temporary variables belonging to the FC are saved in the local data stack. This data is then lost when the FC has been executed. To save data permanently, functions can also use shared data blocks. Since an FC does not have any memory of its own, you must always specify actual parameters for it. You cannot assign initial values for the local data of an FC. Application An FC contains a program section that is always executed when the FC is called by a different logic block. You can use functions for the following purposes: • To return a function value to the calling block (example: math functions) • To execute a technological function (example: single control function with a bit logic operation). www.dienhathe.vn www.dienhathe.com
  • 14. Using FBs, FCs, and DBs Using FBs, FCs, and, DBs V1.0 2006/08/01 14/14 Copyright©SiemensAG2006Allrightsreserved 23330722_Using_FB_FC_DB.doc 2.3 Description: Data Block (DB) In contrast to logic blocks (FBs or FCs), Data Blocks (DBs) do not contain STEP 7 instructions. They are used to store user data, in other words, data blocks contain variable data with which the user program works. Shared data blocks are used to store user data that can be accessed by all other blocks. Instance data blocks are assigned to a specific FB for its storage memory. The size of DBs can vary. Refer to the description of your CPU for the maximum possible size. You can structure shared data blocks in any way to suit your particular requirements. Shared Data Blocks in the User Program If a logic block (FC, FB, or OB) is called, it can occupy space in the local data area (L stack) temporarily. In addition to this local data area, a logic block can open a memory area in the form of a DB. In contrast to the data in the local data area, the data in a DB are not deleted when the DB is closed (in other words, after the corresponding logic block has been executed). Each FB, FC, or OB can read the data from a shared DB or write data to a shared DB. This data remains in the DB after the DB is exited. An FB can open and use a shared DB and an instance DB at the same time. Figure 2-1 shows the different methods of access to data blocks. Figure 2-1 Shared and Instance DBs www.dienhathe.vn www.dienhathe.com