EasyManua.ls Logo

Omron SYSMAC NX-CIF101 User Manual

Omron SYSMAC NX-CIF101
232 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #221 background imageLoading...
Page #221 background image
A - 41
Appendices
NX-series Communications Interface Units User’s Manual (W540)
A-4 Programming Samples
A
A-4-4 Programming Sample 3: Receiving Data
// Initialize program status using establishing communications as the trigger.
InitialRequestTrigger_R_TRIG_instance(
E001_NX_Unit_I_O_Data_Active_Status_125[1],
InitialRequestTrigger);
IF( InitialRequestTrigger = TRUE ) THEN
RcvInitialize := FALSE;//Initialize.
END_IF;
//See if I/O communications are enabled and if Input SID was updated.
IF ( ( E001_NX_Unit_I_O_Data_Active_Status_125[1] = TRUE )
AND ( N1_Ch1_Input_SID_Response <> N1_Ch1_Input_SID) ) THEN
IF ((N1_Ch1_Receive_Data_Error_Flag = TRUE ) //Process (1)
OR (RcvError = TRUE))THEN
//If a receive data error is detected,
//skip the receive data until the end of the serial data is detected.
RcvSize := UINT#0;
RcvError := TRUE;
//Set the Input SID Response.
N1_Ch1_Input_SID_Response := N1_Ch1_Input_SID;
ELSIF ((N1_Ch1_Receive_Data_Flag = TRUE ) OR // Process (2)
(N1_Ch1_Receive_Last_Data_Flag = TRUE )) THEN
//When there is no receive data error and there is input data
IF( RcvInitialize=FALSE) THEN
//Initialize reception process.
RcvSize := UINT#0;
RcvInitialize := TRUE;
RcvDone:=FALSE;
END_IF;
//Get receive data.
//Set the RcvDat array to the following size: Maximum receive data
//size [bytes] + Input divided data size [bytes]
AryMove(N1_Ch1_Input_Data_01[0], RcvDat[RcvSize], UINT#4);
AryMove(N1_Ch1_Input_Data_02[0], RcvDat[RcvSize+4], UINT#4);
AryMove(N1_Ch1_Input_Data_03[0], RcvDat[RcvSize+8], UINT#4);
AryMove(N1_Ch1_Input_Data_04[0], RcvDat[RcvSize+12], UINT#4);
AryMove(N1_Ch1_Input_Data_05[0], RcvDat[RcvSize+16], UINT#4);
RcvSize:=RcvSize+N1_Ch1_Input_Data_Length;
//Set the Input SID Response.
N1_Ch1_Input_SID_Response := N1_Ch1_Input_SID;
END_IF;
// Check for final data. // Process (3)
IF (N1_Ch1_Receive_Last_Data_Flag = TRUE ) THEN
IF( RcvError = FALSE ) THEN
//If there is no reception error and the final data is obtained
RcvDone:=TRUE; //End reception.
END_IF;
RcvError := FALSE;
RcvInitialize := FALSE;
END_IF;
END_IF;
ST Program

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the Omron SYSMAC NX-CIF101 and is the answer not in the manual?

Omron SYSMAC NX-CIF101 Specifications

General IconGeneral
Compatible SeriesNX Series
Power Supply24 VDC
Mounting TypeDIN Rail
Communication StandardEthernet
ModelNX-CIF101
ManufacturerOmron
Communication ProtocolEthernet/IP
SeriesNX
CategoryCommunication
FunctionEthernet communication

Summary

Features and System Configuration

Features of Communications Interface Units

Describes the features of Communications Interface Units.

Specifications and Application Procedures

Specifications

Provides general and individual unit specifications for CIF Units.

Part Names and Functions

Installation and Wiring

Connecting the Power Supply and Ground Wires

Guides on wiring power supply and ground for CIF Units.

Wiring the Terminals

Explains how to wire terminals on CIF Units.

Wiring Communications

Details how to wire CIF Units for communications.

I/O Data Specifications

I/O Data Specifications for NX-CIF101 and NX-CIF105

Details I/O data specifications for NX-CIF101 and NX-CIF105.

I/O Data Specifications for NX-CIF210

Details I/O data specifications for NX-CIF210.

Unit Settings

Unit Operation Settings

Covers communications specifications, transmission buffering, and event levels.

Serial Communications

Examples of Communications between CPU Unit or Communications Master and CIF Unit

Provides examples of data transfer between CPU/master and CIF Unit.

Communications Performance

Explains how to calculate and improve communications performance.

Adjusting Divided Data Sizes to Improve Communications Performance

Guides on optimizing divided data sizes for better communication performance.

Serial Line Monitor

Troubleshooting

How to Check for Errors

Methods for checking errors using indicators or support software.

Checking for Errors with the Indicators

Explains how to interpret TS indicator status for errors.

Checking for Errors and Troubleshooting on the Support Software

Details error checking and troubleshooting using support software.

Related product manuals