WT3x209 ReadINdata
WT3x209 ReadINdata
WT3x
209 Read Input Data: _WT3x209_ReadINdata
Basic Reads slave input data.
function
Symbol Start trigger _WT3x209_ReadINdata
↑ (BOOL) (BOOL)
EN ENO
Unit selection (INT) (BOOL) Busy Flag
Busy Flag UnitSelect FB_BUSY
Serial Port No. (INT) (BOOL) Normal end
PortNo FB_OK
Master unit No. (INT) (BOOL) Error end
WTM_UnitNo FB_NG
(INT)
First slave node No. to read
WTS_StartNodeNo
(INT)
Number of slave nodes to read
ReadNum
(WORD)
Input data storage area type
AreaID
(UINT)
Input data first storage word address AreaNo
Input data
EN input Connect EN to an OR between an upwardly differentiated condition for the start trigger and the FB_BUSY
condition output from the FB.
Restrictions • Always use an upwardly differentiated condition for EN.
Input • If the input variables are out of range, the ENO Flag will turn OFF and the FB will not be processed.
variables
Output • The Input data storage area is set when the Normal End flag turns ON.
variables • This FB requires multiple cycles to process. Always connect an OR including the FB_BUSY output
variable to the EN input variable to ensure that the FB is processed to completion (see Symbol).
• Do not turn the FB_BUSY output variable ON or OFF outside the FB.
_WT3x209_ReadINdata (2/4)
Application A WT30 FA Wireless SS Terminal is connected to serial port 1 on a Serial Communications Board (SCB).
example When the bit A turns ON, the input data for slaves 1 to 3 connected to master 0 is read.
WT30 Master
Unit 0
Start trigger
_WT3x209_ReadINdata
Bit A (BOOL) (BOOL)
↑ EN ENO
Unit selection (INT) (BOOL) Busy Flag
Busy Flag #BBBB UnitSelect FB_BUSY Bit B
Bit B Serial Port No. (INT) (BOOL) Normal end
&1 PortNo FB_OK Bit C
Master unit No. (INT) (BOOL) Error end
&0 WTM_UnitNo FB_NG Bit D
First slave node No. to read (INT)
&1 WTS_StartNodeNo
Number of slave nodes to read (INT)
&3 ReadNum
Input data storage area type (WORD)
P_DM AreaID
Input data first storage word address (UINT)
&100 AreaNo
Normal end
Bit C
Processing after reading Input data
Input 1 ON/OFF
Input 15 ON/OFF
_WT3x209_ReadINdata (3/4)
Variable Tables
Input Variables
Name Variable name Data type Default Range Description
EN EN BOOL ON: FB started
OFF: FB not started.
Unit selection UnitSelect INT &0 At right. Specify the connected Unit and serial port.
Serial Port No. PortNo INT &1 &1 to &2 Connected to CPU Unit
Unit Selection #FFFF
(UnitSelect)
Serial Port No. Not accessed
(PortNo) (recommended: &1).
Connected to SCB
Unit Selection #BBBB
(UnitSelect)
Serial Port No. &1: Port 1
(PortNo) &2: Port 2
Connected to SCU
Unit Selection Unit No. (&0 to &15)
(UnitSelect)
Serial Port No. &1: Port 1
(PortNo) &2: Port 2
Master unit No. WTM_UnitNo INT &0 &0 to &99 Specify the unit number of the master.
First slave node WTS_StartNodeNo INT &1 &1 to &64 Specify the node number of the first slave for
No. to read which the input data is to be read.
Number of slave ReadNum INT &0 &0 to &16 Specify the number of slave nodes for which
nodes to read the input data is to be read.
Input data storage AreaID WORD #0082 At right. P_CIO (#00B0): CIO Area
area type P_WR (#00B1): Work Area
P_HR (#00B2): Holding Area
P_DM (#0082): DM Area
P_EM0 (#0050) to P_EMC (#005C):
EM Area bank 0 to C
Input data first AreaNo INT &0
storage word
address
Output Variables
Name Variable name Data type Range Description
ENO ENO BOOL ON: FB processed normally.
(May be omitted.) OFF: FB not processed or ended in an error.
Busy Flag FB_BUSY BOOL Automatically turns OFF when processing is
completed.
Normal end FB_OK BOOL Turns ON for one cycle when processing ends
normally.
Error end FB_NG BOOL Turns ON for one cycle when processing ends in an
error.
Bit 15 1 0
Input 0 OFF/ON
Input 1 OFF/ON
Input 15 OFF/ON
_WT3x209_ReadINdata (4/4)
Internal Variables
Internal variables are not output from the FB.
If the NG Flag from the FB turns ON, the following internal variables can be monitored to obtain information on the error.
Name Variable name Data type Range Description
FINS error code FINS_ErrorCode WORD The FINS error code is output. A code of #0000 is
output for a normal end. Refer to the Related Manuals
for details on the error codes.
CompoWay/F CompowayF_Error WORD Outputs the CompoWay/F error code. A code of #0000
error code Code is output for a normal end. See below for details on
errors.
Version History
Version Date Contents
1.00 2004.12. Original production
Precautions
This Guide describes function of OMRON Function Block.
This Guide does not include limiting of usage unit/control component, or combination of them. Please read user’s/operation
manual of product for the actual application.