Programming a Shared Data Block
9-2
STEP 7 Getting Started
A5E00171228-01
Insert a Data Block (DB) from the
pop-up menu.
In the "Properties – Data Block" dialog
box, accept all the default settings with
OK.
Use the "Help“ Button for further
information.
The data block DB3 has been added to
the Blocks folder.
Double-click to open DB3.
Programming Variables in the Data Block
Enter "PE_Actual_Speed" in the Name
column.
Click with the right mouse button to
select the type using the menu
command Elementary Types > INT
from the pop-up menu.
In the example below, three shared data are defined in DB3. Enter these data
accordingly in the variable declaration table.
Save the shared data block.
Remember: In Section 5.5, you
generated an instance data block by
activating the option "Data block
referencing a function block." In
contrast, using "Data block" you
create a shared data block.
The variables for the actual speeds in the data block
"PE_Actual_Speed" and "DE_Actual_Speed" are treated
in the same way as the memory words MW2
(PE_Actual_Speed) and MW4 (DE_Actual_Speed). This
can be seen in the next chapter.