62
Function Block Programming
Appendix B
The table below lists the Input and Output variables for the Read function block.
Precautions
EN Input condition
Connect EN to an OR between an upwardly differentiated condition for the start trigger and the
BUSY output from the Function Block.
Restrictions on Input
variables
• Always use an upwardly differentiated condition for the EN.
• If the Input variables are out of range, the ENO flag will turn OFF and the Function Block will not
be processed.
Restrictions on Out-
put variables
• This function block requires multiple cycles to process. Always connect an OR including the
BUSY output variable to the EN input variable to ensure that the function block is processed to
completion (see Symbol)
• Do not turn the BUSY output variable ON or OFF outside the function block.
Application example
Name
Variable name
Data
type
Default
Range
Description
Inpu
t v
a
ri
ab
le
s
EN
EN
BOOL
1 (ON): Function block started
0 (OFF): Function block not started
Start Word
PROFIBUS Out-
put data
StartWordOutput
UINT
3000
Start Word of PROFIBUS Output data in
PROFIBUS Master Output data area.
Start Word
PROFIBUS Input
data
StartWordInput
UINT
3010
Start Word of PROFIBUS Input data in
PROFIBUS Master Input data area.
Unit No of TC
UnitNo
UINT
0
#0 - #63
(0-99)
Unit number of TC
Variable Type
VarType
UINT
0
Variable type in TC
Read Start
address from TC
ReadStartAddress
UINT
0
Specify the Read Start address
Item
Description
Timechart
Start Trigger
ON
OFF
Busy Flag (BUSY)
ON
OFF
FB execution completed.
At normal end: Sending data has been completed.
Start Word Profibus output data
&3200
Start Word Profibus input data
&3300
Unit No of TC
&1
Variable Type
#C0
Read Start address from TC
#0100
Response code from TC
Channel 2
Data read from TC
Channel 2
Busy flag
Bit B
Bit A
(BOOL)
EN
(BOOL)
ENO
(UINT)
StratWordOutput
(WORD)
ResponseCode
(UINT)
StartWordInput
(DWORD)
DataRead
(UINT)
UnitNo
(BOOL)
Busy
(UINT)
VarType
(UINT)
ReadStartAddress
Bit B