You are on page 1of 20

NU Series [NU-EP1 (EtherNet/IP)]

Connection Guide
Allen-Bradley CompactLogix LR-W/MU-N12 Edition

Overview

NU-EP1 Configuration (IP Address setting)

Allen-Bradley PLC Configuration

Programming

Cyclic Communication
• Reads the ON/OFF output of the LR-W
• Reads the current value of LR-W
• External input (LED OFF) to LR-W
Message Communication
• Changing the parameters of the LR-W (Write)
• Reads out the parameters of the LR-W.
NU Series Connection Guide

EtherNet/IP communication with Allen-Bradley PLC

overview
This section describes how to read/write the information of the LR-W series connected to the NU-EP1 from/to the
Allen-Bradley Compact Logix via EtherNet/IP communication.

This document describes how to configure the following settings for EtherNet/IP communication

l Cyclic Communication
• Reads the ON/OFF output of LR-W (NU-EP1 to PLC)
• Read the current value of LR-W (NU-EP1 to PLC)
• External input to LR-W (PLC to NU-EP1)

l Message communication
• Changing LR-W parameters
• Reads out the parameters of the LR-W.

n Related Manuals
For detailed settings of the NU-EP1 and parameters of each sensor, refer to the following manuals

This section describes the NU-EP1 system configuration,


NU-EP1A
specifications, flow from installation to start-up, and
User’s manual
parameters of the sensors connected to the NU-EP1.

* Refer to the manual of Allen-Bradley PLC for the operation method and settings of Allen-Bradley PLC and
programming software "Studio 5000".

2
NU Series Connection Guide

NU-EP1 Configuration

Setting IP Address <IP Setting Tool>

1 Start the IP Setting Tool


Devices, such as the NU-EP1, connected to the network and for which the IP address has not been set
will appear.
Click the [Scan EtherNet/IP devices (A)] button to display the devices for which the IP address is set.

2 Select the device for which the IP address is to be set, and click on [Setup IP
addr.(I)]. [Setup IP addr.] will open.
Set an IP address which is not currently used in "IP addr.(required)(I)", and click on the [OK] button.

3 This completes the IP address setting.

3
NU Series Connection Guide

Allen-Bradley PLC Configuration

These instructions describe EtherNet/IP communication with the NU Series using a Rockwell "CompactLogix
5380 Controller" and "Studio 5000 (Ver.32.02)." For details about the functions and configuration of
"CompactLogix Controller" and "Studio 5000," see the Rockwell PLC manual.

Create a new project

1 New Project
Start up "Studio 5000" and then click [New Project].

2 Controller Selection and Project Name Input


The [New Project] dialog box is displayed. Select the controller and input the project name, then click
[Next].
Perform configurations as necessary on the next dialog box displayed, and then click [Finish].

4
NU Series Connection Guide

3 EDS File Registration


Select [Tool] and then [EDS Hardware Installation Tool] and start up "Rockwell Automation's EDS
Wizard."

4 Rockwell Automation's EDS Wizard


Follow the "Rockwell Automation's EDS Wizard" and register the EDS file. The NU Series EDS file can
be found on the KEYENCE website.

Select
[Resister an EDS file(s)].

5
NU Series Connection Guide

Select
[Resister an EDS file(s)].

Reference

The NU-EP1's EDS file can be downloaded from


the Keyence web site (www.keyence.com/global.
jsp).

6
NU Series Connection Guide

5 EtherNet/IP Mode Configuration


Use "STUDIO 5000" to configure EtherNet/IP mode.

Right-click [A1,Ethernet] and then


select [Properties].

Select the [General] tab,


then select [Change IP Mode…].

Select [A1/A2:Linear/DLR], and then


click the [OK] button.

Once configuration is complete, click the [OK] button to close the dialog box.

7
NU Series Connection Guide

6 IP Address Configuration
Use "RSLinx" to configure the IP address for the CompactLogix Controller.
*Perform the following operation with the CompactLogix connected to the PC by USB cable.

Under [USB], right-click


[CompactLogix Controller]
and then select [Module
Configuration].

Input the IP address to be


configured for the controller.

8
NU Series Connection Guide

7 Module Addition
Use "STUDIO 5000" to add the module for connecting with the NU Series.

Right-click [A1/A2, Ethernet]


and then select [New Module].

Select [NU-EP1] and then


click the [Create] button.

Input the module name and


configure the IP address.
* In this manual, configuration
is performed as follows.
• Name: nuep1
• IP address: 192.168.0.51

Click the [Change…] button


and then perform connection
configuration.

9
NU Series Connection Guide

8 Connection Configuration
Configure the connection for connecting with the NU Series.

Select [Monitor Data And


External Input].

Select [INT].

Click the [OK] button to close


the dialogbox.

If changing the RPI, perform


configurations on the
[Connection] screen.

Click the [OK] button to close


the dialogbox.

When configuration is
completed, the "NU-EP1
nuep1" Module is added.

10
NU Series Connection Guide

programming
n Tags

Tags

n Program

Programs

11
NU Series Connection Guide

Cyclic Communication
n Assignment to IN Area (NU-EP1 to Scanner)
<Monitor Data (64-word/128-byte) Assembly Instance: 64H (100)>

12
NU Series Connection Guide

n Assignment to OUT Area (Scanner to NU-EP1)


<External Input (2-word/4-byte) Assembly Instance: 65H (101)>

[Cyclic communication data assignment]


In the case of the LR-W series, the sensor data that can be assigned to a Cyclic communication is as follows.

ID Number
1st 2nd 3rd
Output of the selected
1 output 16 banks Output 2 Not used
bank
Output Output 1 of the selected Output 2 of the selected Output 3 of the selected
4 outputs, 2 banks
bank bank bank
binary Output 1 Output 2 Output 3
Current value of selected
1 output 16 banks Not used Not used
bank
Current value of output 1 Current value of output 2 Current value of output 3
Current value 4 outputs, 2 banks
of the selected bank of the selected bank of the selected bank
Number of the output with Current value of the
binary Not used
the highest matching rate selected output number
1 output 16 banks External input *1 Not used Not used

External input 4 outputs, 2 banks External input *1 Not used Not used
binary External input *1 Not used Not used
1 output 16 banks Bank 1 setting value Bank 2 setting value Bank 3 setting value
Bank 1, Output 1 Setting Bank 1, Output 2 Setting Bank 1, Output 3 Setting
Setting Value 1 4 outputs, 2 banks
value value value
binary Output 1 Setting value Output 2 Setting value Output 3 Setting value
1 output 16 banks Bank 4 setting value Bank 5 setting value Bank 6 setting value
Bank 1, Output 4 Setting Bank 2, Output 1 Setting Bank 2, Output 2 Setting
Setting Value 2 4 outputs, 2 banks
value value value
binary Output 4 Setting value Output 5 Setting value Output 6 Setting value
*1 Selectable from External Tuning / LED OFF (stop projection) / OFF.

13
NU Series Connection Guide

Cyclic communication
n Read the ON/OFF output of LR-W (NU-EP1 to PLC)
◆ Tags
name data type
LRW_Output BOOL

◆ Programs

n Read the current value of LR-W (NU-EP1 to PLC)


◆ Tags
name data type
LRW_Current_Value UINT

◆ Programs

n External input (LED OFF) to LR-W (PLC to NU-EP1)


◆ Tags
name data type
LRW_LED_OFF BOOL

◆ Programs

Point To use the external input function, the LR-W must be configured for the external input function.

screen setup feature


Off Do not use the external input function (default setting)
External Tuning Input
Tuning Tuning using external inputs
*If a preset is selected in the detection mode, the preset tuning input is used.
LED Off Stop the emission of the LED by external input.

14
NU Series Connection Guide

Message communication
[NU Object]
This object provides the status of the NU-EP1 or sensor amplifier connected to the NU-EP1, and writes/reads the
parameters. This object is unique to the NUEP1.

l Writing data to sensor amplifier


Parameters are written to the NU-EP1 or a sensor amplifier connected to the NU-EP1.
[Command format]
Item Value
Service code (HEX) 10H (Set Attribute Single)

Class ID (HEX) 66H


00 : NU
Instance ID (DEC)
01 to 16 : Sensor ID number
Attribute ID (HEX) “Parameter List”

Service data “Parameter List”

[Response format]
Item Value
General status (HEX) “General status”

Service response data -

l Reading data from sensor amplifier


Each parameter is read from the NU-EP1 or a sensor amplifier connected to the NU-EP1.
[Command format]
Item Value
Service code (HEX) 0EH (Get Attribute Single)

Class ID (HEX) 66H


00 : NU
Instance ID (DEC)
01 to 16 : Sensor ID number
Attribute ID (HEX) “Parameter List”

Service data -

[Response format]
Item Value
General status (HEX) “General status”

Service response data -

15
NU Series Connection Guide

n Changing LR-W parameters (PLC to NU-EP1)


◆ LR-W Parameters
Attribute ID name data type attribute value
0 : Bank1 l
0368H 2byte 1 : Bank2
Bank selection R/W
(872) INT :
15 : Bank16

◆ Tags
name data type
NU_Write_execute BOOL

LRW_Write_Bank_No INT

Write_MSG MESSAGE

Write_data INT

◆ Programs

l MSG Function block

name value
Service Type Set Attribute Single

Class (HEX) 66

Instance 1

Attribute (HEX) 368

Souce Element Write_data

Path nuep1

16
NU Series Connection Guide

n Reading LR-W parameters (PLC to NU-EP1)


◆ LR-W Parameters
Attribute ID name data type attribute value
0326H 2byte
Light intensity ratio Red R 0 to 9999
(806) INT
0327H 2byte
Light intensity ratio Green R 0 to 9999
(807) INT
0328H 2byte
Light intensity ratio Blue R 0 to 9999
(808) INT

◆ Tags
name data type
RGB_Read_execute BOOL

LRW_Red_Light_intensity_ratio INT

LRW_Green_Light_intensity_ratio INT

LRW_Blue_Light_intensity_ratio INT

NU_Read_data1 INT

NU_Read_data2 INT

NU_Read_data3 INT

Read_MSG1 MESSAGE

Read_MSG2 MESSAGE

Read_MSG3 MESSAGE

Timer1 TIMER

Timer2 TIMER

T1_Flag BOOL

T2_Flag BOOL

ONS_1 BOOL

ONS_2 BOOL

M1 BOOL

M2 BOOL

◆ Programs

17
NU Series Connection Guide

l MSG Function block


<Attribute ID: 0x0326 (Light intensity ratio Red)>

name value
Service Type Get Attribute Single

Class (HEX) 66

Instance 1

Attribute (HEX) 326

Destination Element NU_Read_data1

Path nuep1

18
NU Series Connection Guide

<Attribute ID: 0x0327 (Light intensity ratio Green)>

name value
Service Type Get Attribute Single

Class (HEX) 66

Instance 1

Attribute (HEX) 327

Destination Element NU_Read_data2

Path nuep1

<Attribute ID: 0x0328 (Light intensity ratio Green)>

name value
Service Type Get Attribute Single

Class (HEX) 66

Instance 1

Attribute (HEX) 328

Destination Element NU_Read_data3

Path nuep1

19
Specifications are subject to change without notice.

KEYENCE CORPORATION
1-3-14, Higashi-Nakajima, Higashi-Yodogawa-ku, Osaka, 533-8555, Japan PHONE: +81-6-6379-2211 www.keyence.com/glb
AUSTRIA FRANCE ITALY POLAND TAIWAN
Phone: +43 (0)2236 378266 0 Phone: +33 1 56 37 78 00 Phone: +39-02-6688220 Phone: +48 71 368 61 60 Phone: +886-2-2721-1080
BELGIUM GERMANY KOREA ROMANIA THAILAND
Phone: +32 (0)15 281 222 Phone: +49-6102-3656-0 Phone: +82-31-789-4300 Phone: +40 (0)269 232 808 Phone: +66-2-078-1090
BRAZIL HONG KONG MALAYSIA SINGAPORE UK & IRELAND
Phone: +55-11-3045-4011 Phone: +852-3104-1010 Phone: +60-3-7883-2211 Phone: +65-6392-1011 Phone: +44 (0)1908-696-900
CANADA HUNGARY MEXICO SLOVAKIA USA
Phone: +1-905-366-7655 Phone: +36 1 802 7360 Phone: +52-55-8850-0100 Phone: +421 (0)2 5939 6461 Phone: +1-201-930-0100
CHINA INDIA NETHERLANDS SLOVENIA VIETNAM
Phone: +86-21-3357-1001 Phone: +91-44-4963-0900 Phone: +31 (0)40 206 6100 Phone: +386 (0)1 4701 666 Phone: +84-24-3772-5555
CZECH REPUBLIC INDONESIA PHILIPPINES SWITZERLAND
Phone: +420 220 184 700 Phone: +62-21-2966-0120 Phone: +63-(0)2-8981-5000 Phone: +41 (0)43 455 77 30
A4WW1-MAN-2033

Copyright (c) 2024 KEYENCE CORPORATION. All rights reserved. 234065GB 2014-1 I37GB Printed in Japan

You might also like