_EJ1N200_ReadVariable (1/1) EJ1N -200 Read Variable Area: _EJ1N200_ReadVariable Basic function Symbol Reads one element from the specified variable area. Start trigger ↑ Busy Flag Unit selection Serial Port No. Communications unit No.of the Temperature Controller. Variable type Read address File name Applicable models Conditions for usage Function description FB precautions _EJ1N200_ReadVariable (BOOL) (BOOL) EN ENO (INT) (BOOL) UnitSelect FB_BUSY (INT) (BOOL) FB_OK PortNo (INT) (BOOL) TCNo FB_NG (WORD) (DINT) VariableType Data (WORD) (WORD) Address FINS_Error (WORD) Compoway/F_Error1 (WORD) Compoway/F_Error2 FB Busy Flag FB Normal end FB Error end Read data FINS Error Code Compoway/F Error Code Compoway/F Response Code Lib\FBL\omronlib\TemperatureController\EJ1N-TC\Serial\_EJ1N200_ReadVariable10.cxf Temperature EJ1N Controller CPU Unit CS1*-CPU**H Unit version 3.0 or higher CJ1*-CPU**H Unit version 3.0 or higher CJ1M-CPU** Unit version 3.0 or higher CP1H CP1L Serial CS1W-SCU21-V1, CJ1W-SCU21-V1, CJ1W-SCU41-V1 Unit Version 1.2 or higher Communications CS1W-SCB21-V1 and CS1W-SCB41-V1 Unit Version 1.2 or higher Units/Boards CX-Programmer Version 5.0 or higher External Connections • 1:N connection is possible. Communications Settings • The communications settings(Serial Gateway) of the serial port must be the same as those of the Temperature Controller. • The communications settings of the specified serial port can be set to the default the Temperature Controller settings using the Set Communications Port (_EJ1N600_SetComm) function block, and the other Temperature Controller settings using the Set Serial Gateway Mode (_SCx604_SetPortGATEWAY) function block. CPU Unit Settings PLC Setup: Shared Settings for Communications Instructions in FBs • Communications Instruction Response Timeout Time (default: 2 s) 5 s recommended • Number of retries (default: 0) Shared Resources • Communications ports (internal logical ports) When the start trigger turns ON, one element, a present value or set value, is read from the specified Variable Type and Read Address. Refer to the manual for the Controller being used for details on variable types and read addresses. (See Related manuals.) Refer to the FINS error code and Compoway/F Error Code and Compoway/F Response code if an error occurs. The FINS error code and Compoway/F Error Code and Compoway/F Response code will be output as #0000 for a normal end. • The FB is processed over multiple cycles. The FB_BUSY output variable can be used to check whether 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. Time Chart Start Trigger ON OFF FB Busy Flag (FB_BUSY) ON OFF FB Normal End(FB_OK)ON or FB Error End(FB_NG)OFF Read Data EN input condition Connect EN to an OR between an upwardly differentiated condition for the start trigger and the FB_BUSY output from the FB. _EJ1N200_ReadVariable (2/2) Restrictions Input variables Output variables Application example • Always use an upwardly differentiated condition for EN. • 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. A Controller is connected to serial port 1 on a Serial Communications Board (SCB). When bit A turns ON, the process value of The communications unit number 2 is read. S erial port No.: 1 E J1 1 T he pro cess value is rea d V aria ble ty pe: C 4 A ddres s: 0 100 B it A ↑ B it B U n it se le ction #B B B B S e ria l P ort N o. &1 C ontro ller unit N o. &2 V ariab le type #C4 R ead a ddress # 0100 B it C Related manuals Related FBs E J1 2 E J1 3 E J1 4 E J1 5 U nit selec tion: S C B (#B B B B ) SCB CPU _E J1N 200 _R ead V a riable (B O O L) (B O O L) EN ENO (IN T) (B O O L) U nitS elect F B _B U S Y (IN T) (B O O L) P ortN o FB_O K (IN T) (B O O L) TCNo F B _N G (W O R D ) (D IN T) V ariableT y pe D a ta (W O R D ) (W O R D ) A dd res s F IN S _E rror (W O R D ) C om pow ay/F _ Error1 (W O R D ) C om pow ay/F _ Error2 F B B usy F lag B it B F B N orm al en d B it C F B E rror end B it D R ead d ata D0 F IN S Error Code C om po w ay/F E rror C ode C om po w ay/F R esp onse C od e P roc es sing after read ing va riable EJ1 EJ1 Modular Temperature Controllers User’s Manual (H142-E1) 6.4 Detailed Description of the Services, Read Variable Area Appendix Variable Area Map FINS Error code CS/CJ Series Communications Commands Reference Manual (W342-E1) 5-1-3 End Codes Use the following FB to read status. Read Status: _EJ1N201_ReadStatus Variable Tables Input Variables Name Data type EN Variable name EN Unit selection Serial Port No. UnitSelect PortNo INT INT Default Range BOOL &0 &1 At right. &1 to &2 Description 1 (ON): FB started. 0 (OFF): FB not started. Specify the Unit and the serial port. Only serial port 2 of CP1H/CP1L M-type CPU unit is possible to use this FB. Connected to CPU Unit Unit selection #FFFF Serial port No. Not accessed. (Serial Port2) Connected to Serial Communication Board(SCB) Unit selection #BBBB Serial port No. &1: Serial Port 1 &2: Serial Port 2 Connected to Serial Communication Unit(SCU) Unit selection SCU Unit No. (&0 to &15) Serial port No. &1: Serial Port 1 &2: Serial Port 2 Communications unit No. of the Temperature Controller. Variable type Read address TCNo INT &0 Variable Type WORD #0 Address WORD #0 &0 to &63 Specify The communications unit No. of the Temperature Controller. Specify the variable type. Refer to the Related Manuals for details on variable types. Specify the address to write. Refer to the Related Manuals for details on addresses. _EJ1N200_ReadVariable (3/3) Output Variables Name ENO (May be omitted.) FB Busy Flag Variable name ENO Data type BOOL FB_BUSY BOOL FB Normal end FB_OK BOOL FB Error end FB_NG BOOL Read data Data DINT FINS error code FINS_ErrorCode WORD Compoway/F Error code CompowayF_Erro rCode1 WORD Compoway/F Response code CompowayF_Erro rCode2 WORD Compoway/F Error Code Code Contents #0000 Normal End #000F FINS Command Error #0010 Parity Error #0011 #0012 #0013 #0016 #0018 Flaming Error Overrun Error BCC Error Sub-address Error Frame Length Error Range Description 1(ON): A FB has operated normally. 0(OFF): A FB has not started. / A FB ended in error. Turned off automatically after a completion of processing. Turned ON only for 1 cycle when processing ends normally. Turned ON only for 1 cycle when processing ends in error. Outputs the read data. Refer to the Related Manuals for details on read data. Outputs the Fins Error Code when a FB_NG flag is ON. It is #0000 when ended normally. For details of the codes, refer to the CS/CJ Series Communications Commands Reference Manual (W342-E1). Outputs the Compoway/F Error Code when a FB_NG flag is ON. Mainly the error statuses on physical communication lines are output as the Compoway/F Error Code. It is #0000 when ended normally. For details of the codes, refer to the descriptions below. Outputs the Compoway/F Response Code when a FB_NG flag is ON. Mainly the operation error status of the Temperature Controller is output as the Compoway/F Response Code. It is #0000 when ended normally. For details of the codes, refer to the descriptions below. Descriptions The command processing ended normally. Specifying a FINS command cannot be executed. The sum of bits whose received data is “1” does not accord with the setting of a “Communication Parity”. The stop bit is “0”. The next data was received when it was full with the already received data. The received BCC and the calculated BCC are different. The sub-addresses are out of the range. The length of the received flame exceeds the specified number of bytes. Compoway/F Response Code Details Code Contents #0000 Normal End #1101 Area type Error #7011 Operation Error Meaning The processing ended normally. The Variable type does not exist. The FB cannot be executed due to a device error. Version History Version 1.0 Contents Original production Date 2006.04. Attention This document describes the functions of Function Blocks. The usage restrictions for units or components and its combinations are not described here. We would like you to make sure of reading the User’s Manual before actually using the products.
© Copyright 2026 Paperzz