0% found this document useful (0 votes)
9 views4 pages

WT3x209 ReadINdata

Uploaded by

lamboferrarigt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views4 pages

WT3x209 ReadINdata

Uploaded by

lamboferrarigt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

_WT3x209_ReadINdata (1/4)

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

File name Lib\FBL\omronlib\WirelessTerminal\WT30\_WT3x\_WT3x209_ReadINdata10.cxf


Applicable Master WT30-M01-FLK
models Slave WT30-SID16/SMD16/SMD16-1
CPU Unit Unit version 3.0 or later
CX-Programmer Version 5.0 or higher
Conditions WT30 FA Wireless SS Terminal
for usage • This function block can be used only in RUN mode. This function block cannot be used in TEST or SET
mode.
Communications Settings
The communications settings of the serial port must be the same as those of the WT30 FA Wireless SS
Terminal.
• The communications settings of the specified serial port can be set to the default WT30 settings using
the Set Communications Port (_WT3x600_SetComm) function block, and the other WT30 settings
using the Set Serial Gateway Mode (_SCx604_SetPortGATEWAY) function block.
• Use Serial Communications Unit (SCU) or Serial Communications Board (SCB) unit version 1.2 or
later.
CPU Unit Settings
PLC Setup: Shared Settings for Communications Instructions in FBs
• Communications Instruction Response Timeout Time (default: 2 s)
• Number of Retries (default: 3)
Shared Resources
• Communications ports (internal logical ports)
Function When the Start Trigger turns ON, the input data of the specified slave is read.
description Up to 16 nodes can be specified.
FB • The FB is processed over multiple cycles. The FB_BUSY output variable can be used to check whether
precautions the FB is being processed.
• FB_OK or FB_NG will be turned ON for one cycle only after processing is completed. Use these flags to
detect the end of FB processing.
 Timing Chart
Start trigger ON
OFF

Busy Flag (FB_BUSY) ON


OFF

Normal End (FB_OK) or ON


Error End (FB_NG) OFF

Input data

↑ Input data stored in the specified area.

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.

Serial Port Unit selection: SCB (#BBBB)


No.: 1
SCB CPU SCU

WT30 Master
Unit 0

Slave Slave Slave

No. 1 No. 2 No. 3

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

D100 Slave 1 input data Bit 15 1 0

D101 Slave 2 input data

D102 Slave 3 input data Input 0 ON/OFF

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.

• Input Data Storage Format

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.

CompoWay/F Error Codes


Code Contents Meaning
#0000 Normal end
#2203 Operation error • The operating mode is incorrect (execution is not possible in the current mode).
• An error occurred in EEPROM.

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.

You might also like