Industrial Automation
Industrial Automation | Europe

myKnowledge

Main > Product Type > Software > Programming
Minimize Text   Default    Enlarge Text
 

Print
E-mail

CP1L-EL/EM: Fn04 Read Input Register(Modbus/TCP) Function Block


Fn04 Read Input Register (Modbus / TCP)
Name Fn04_ReadInputRegister: Fn04 Read Input Register (Modbus / TCP)
 
Basic Function Request for Read One Input Register
Symbol  
Originates from Tsunagi Lab Europe
Created by OEE-HQ HvB (creation and testing)
File Name Fn04_ReadInputRegister.cxf
Applicable models CPU Unit CP1L-EL or CP1L-EM
CX-Programmer Version 9.40 or higher
Conditions for usage The following specifications can be used for FB Auto Allocation:
- CIO 0000 to 6143
- HR H000 to H511
- AR A448 to A959
- D00000 to D09999 for the CP1L-EL
- D00000 to D32767 for the CP1L-EM
Function Description Fn04_ReadInputRegister Function Block read one Input Register conform the address variable and Outputs the result in the data variable Output.
Kind of FB definition Connect Always ON type
  Connect the EN input to the Always ON Flag (P_ON).
  The same instance cannot be used in two or more places.
FB Precautions

Omron can not be held responsible in case of malfunction.

EN input condition • Connect EN to condition for the FB to Work
• Fn04 send the Request for Read the Input Address
• Socket Number 1 to 3
• Register Address
Restrictions
  Input variables
• Socket Number 1 to 3
  Output variables • This FB requires multiple cycles to process.
• The status of the Outputs bits are Reset if the Fn04 bit is OFF. Except for the Data Output.
Application example Fn04_ReadInputRegister Function Block is designed for use with the other Function Blocks. For more more details on the use of this function block see also CP1L-EL/EM Modbus TCP Client Socket Services.
The Socket Number Output can be used for the Socket Number Input used by:

- Open_Socket
- Fn03_ReadRegister
- Fn05_ForceSingleCoil
- Fn06_WriteRegister
- Close_Socket

Example:

Related manuals CP1L-EM/EL CPU Unit Manual (W516-E1)
  • Variable Table 

Input Variables

Name Variable name Data type Default Range Description
EN EN BOOL     1 (ON): Starts FB
0 (OFF): Does not start FB
Read Input Register Fn04 BOOL     Start request for Read Input Register
Socket Number SocketNo UNIT   &1 to &3 &1 to &3
Address Address WORD     Register address to read

Output Variables

Name Variable name Data type Range Description
ENO ENO BOOL   1 (ON): FB operating normally
0 (OFF): FB not operating normally
Done Done BOOL   Done
Error Error BOOL   Error
Error ID ErrorID UNIT   Error code:
TCP/UDP Error Codes
Ethernet Units Construction of Networks Operation Manual (W420)
7-3 Command/Response Reference FINS Error Codes Communications Commands Reference Manual (W342)
5-1-3 Error Codes CP1L-EL/EM CPU Unit Operation Manual (W516) 12-1 Troubleshooting
Data Data WORD   Contents of register

Revision History

Version Date Contents
1.00 21-Apr-2012 Original production

Note

This manual is a reference that explains the function block functions. It does not explain the operational limitations of Units, components, or combinations of Units and components. Always read and understand the Operation Manuals for the system’s Units and other components before using them.

 



Attachments



Comments (View All Comments / Add Comment)

Related Articles
No related articles found.
Created 2012-04-17
Modified 2013-11-21
Views 6450

 

You are not logged in.