You are on page 1of 234

658US

Chapter
6
Communication control

Communication control

Documentation for the installation and configuration methods


of the controller, software, and CAD data can be downloaded
from the following URL.
www.keyence.com/cvxus

CV-X UM_A 6-1


Control/data output via Overview of
commands communication control
commands
Control/data output
q The controller allows "non-procedural commands" for non-
via commands
procedural communication and "number-specified
commands" for PLC communication.
Control/data output This section shows the list of communication control
via the PLC-Link commands, cautions for using commands, command
notations as well as each command's detailed behavior.
• List of communication control commands (Page 6-3)
Control/data output • Details of communication control commands (Page 6-5)
Control/data output via commands

via I/O terminals

Control and data output


by EtherNet/IP

Control and data output


by PROFINET

Control and data output


by EtherCAT

6-2 CV-X UM_A


List of communication control commands

List of communication control commands

When using number-specified commands


Notes on command input/output
Specification and execution of each command number is
When using non-procedural commands processed in 1 word.

Command input during operation Command input during operation


• Usually, command input can be accepted during Usually, command input is accepted during operation.
operation. However, if commands need to be executed However, if commands need to be executed in a high-
in a high-speed operation line, remember that execution speed operation line, remember that execution of
of commands may stop image capture acceptance commands may suspend image capture acceptance.

Control/data output via commands


temporarily.
When an error occurs on command acceptance
• The execution time of a command depends on the
The error code is written in the command result address as
amount of load on the image processing unit and the
the execution result. The error response consists of the
type of operation performed by the controller. For the
following information:
use in which a program must wait for command
• 0: Success
execution to be completed before starting the next
• 02: Command error (The received command is not
inspection, be careful of the waiting time fluctuation
available.)
according to the conditions mentioned above.
• 03: Command action disabled (The received command
Number of digits for command parameters cannot work.)
Any number of parameter digits within the range specified • 22: The number or range of the parameter is incorrect.
for each command can be entered.
An example of error output
If a command handles integers and a fractional When the No. 1005 (unavailable number) is specified for
Reference
value is specified, the value is put into the program No. changing command, "22" is written in the
command parameters as an integer, wherein the
command result address as binary data of 1 word.
tenths-place digit is rounded off to the nearest
integer. Example: Changing the current program No. to
When an error occurs on command acceptance program No. 10 stored in SD card 1 using the PLC-Link.
An error response "ER, **, nn" will be returned. The detailed command assignments for this example is
The error response consists of the following information: shown below.
• **: Received command that caused the error
Controller PLC
• nn: 2-digit error code
Command import DM100 24 Command Address
- 02: Command error (The received command is invalid.) SD Card 1 DM101
Command execution
- 03: Command action disabled (The received command Change DM102 1 Command Address + 2
cannot work.) the program DM103
to No. 10. DM104 10 Command Address + 4
- 22: Parameter error (The value of parameter data or the DM105
number of data pieces is outside the range.) Command
Execution Result When successful
- 91: Timeout error DM200 0 Command Result Address
For 03 error
An example of error output DM200 3 Command Result Address

When the No. 1005 (unavailable number) is specified for


program No. changing command (PW), "ER,PW,22" is
returned as response data.

CV-X UM_A 6-3


List of communication control commands

Controller operation mode and available input commands


D = Possible
Availability by device
PLC-Link,
Number-
EtherNet/IP,
Command type Assigned commands Command specified- Non-procedural
PROFINET,
command No.
EtherCAT
Run Setup Run Setup
Trigger Trigger 1 (Page 6-5) T1 1 D D
Trigger 2 (Page 6-5) T2 2 D D
Trigger 3 (Page 6-5) T3 3 D D
Trigger 4 (Page 6-5) T4 4 D D
Issue all triggers (Page 6-5) TA 5 D D
System control Switch to run mode (Page 6-6) R0 8 D D
Switch to setup mode (Page 6-6) S0 9 D D
Control/data output via commands

Reset (Page 6-7) RS 10 D D


Reboot (Page 6-7) RB 11 D D
Save program (Page 6-8) SS 12 D D
Clear error (Page 6-8) CE 13 D D D D
Change operation screens (Page 6-9) VW 14 D D
Trigger reset (Page 6-9) RE 15 D D
Read run/setup mode (Page 6-10) RM 16 D D D D
Change programs Change programs (Page 6-10) PW 24 D D
Read programs (Page 6-11) PR 25 D D
Capture control Shutter speed setting (Page 6-11) CSH 32 D D
Camera sensitivity setting (Page 6-13) CSE 33 D D
Trigger delay (Page 6-14) CTD 34 D D
Lighting intensity value setting (Page 6-15) CLV 35 D D
Vision tool Image Registration (Update Reference Value) BS 40 D D
(Page 6-16)
Write execute condition (Page 6-17) EXW 41 D D
Read execute condition (Page 6-18) EXR 42 D D
Change registered string (Page 6-18) CW 43 D D
Read registered string (Page 6-19) CR 44 D D
Change judgment condition (Page 6-20) DW 45 D D
Read judgment condition (Page 6-21) DR 46 D D
Change defect level (Page 6-22) SLW 47 D D
Read defect level (Page 6-23) SLR 48 D D
Register 1 Character to Library (Page 6-23) CA 49 D D
Delete 1 Character from Library (Page 6-24) CD 50 D D
Update Capture Position (Page 6-23) CPW 51 D D
Measured Value Change Measured Value before Correction of MCC 52 D D
Correction Measured Value Correction (Page 6-25)
Write Measured Value Correction (Page 6-26) MCW 53 D D
Read Measured Value Correction (Page 6-28) MCR 54 D D
I/O control Enable/disable trigger input (Page 6-29) TE 56 D D D D
Enable/disable output (Page 6-29) OE 57 D D
Utility Clear statistical data (Page 6-30) TC 64 D D
Save statistical data (Page 6-31) TS 65 D D
Clear archived image (Page 6-32) HC 66 D D
Save archived image (Page 6-32) HS 67 D D
Image capture (Page 6-33) BC 68 D D D D
Change output file/folder (Page 6-34) OW 69 D D
Change Externally Specified String (Page 6-34) STW 70 D D
Read Externally Specified String (Page 6-35) STR 71 D D
Echo (Page 6-35) EC – D D
System Write date/time (Page 6-36) TW 80 D D
Read date/time (Page 6-36) TR 81 D D
Version information readout (Page 6-37) VI 82 D D D D
Write Time Zone (Page 6-38) TZW 83 D D
Read Time Zone (Page 6-38) TZR 84 D D
VisionDatabase Delete the output image (Page 6-39) DDF 96 D D
(sold separately) Change External Input String (Page 6-39) DSW 97 D D
Read External Input String (Page 6-40) DSR 98 D D

6-4 CV-X UM_A


Details of communication control commands

Details of communication control commands

TA: Issues all triggers


Trigger
This command issues all triggers T1 to T4. (Any unused
T1 to T4: Issue trigger trigger is not considered to be an error.)

Each of these commands issues the specified trigger. For non-procedural commands
• Send
For non-procedural commands
• Send TA
• Receive
T1 Issues Trigger 1.

Control/data output via commands


T2 Issues Trigger 2. TA
T3 Issues Trigger 3.
For number-specified commands
T4 Issues Trigger 4.
The number-specified command No. is "5".
• Receive • Send
T1 Word device *
T2 5
T3 * Starting word device (command address)
T4
• Receive
For number-specified commands Word device *
The number-specified command No. is "1" for T1, "2" Return value Execution result
for T2, "3" for T3, and "4" for T4.
* Starting word device (command result address)
• Send
Execution result
Word device *
• 0: Success
T1 1 Issues Trigger 1.
• 22: Some unnecessary parameter is included.
T2 2 Issues Trigger 2.
• 03: The command was sent when all triggers could
T3 3 Issues Trigger 3.
not be accepted or when trigger input was disabled
T4 4 Issues Trigger 4.
(when all of READY* are not turned on).
* Starting word device (command address)
Real-time performance
• Receive
This does not affect the measurement processing time
Word device *
Return value Execution result
* Starting word device (command result address)

Execution result
• 0: Success
• 22: Some unnecessary parameter is included.
• 03: The command was sent when triggers could not
be accepted or when trigger input was disabled
(when READY* is not turned on).

Real-time performance
This does not affect the measurement processing time

CV-X UM_A 6-5


Details of communication control commands

S0: Switch to setup mode


System control
This command switches the controller from run mode to
R0: Switch to run mode setup mode. (If the controller is already in setup mode, the
command execution finishes normally without making any
This command switches the controller from setup mode to
changes.)
run mode. If the controller is already in run mode, the
command execution finishes normally without making any For non-procedural commands
changes. • Send

For non-procedural commands S0

• Send • Receive

R0 S0

• Receive For number-specified commands


R0 The number-specified command No. is "9".
Control/data output via commands

• Send
For number-specified commands
The number-specified command No. is "8". Word device *

• Send 9
* Starting word device (command address)
Word device *
8 • Receive
* Starting word device (command address) Word device *

• Receive Return value Execution result


* Starting word device (command result address)
Word device *
Return value Execution result Execution result
* Starting word device (command result address) • 0: Success
• 22: Some unnecessary parameter is included.
Execution result
• 03: The command was sent during operation that
• 0: Success
does not accept switching to setup mode.
• 22: Some unnecessary parameter is included.
• 03: The command was sent during operation that Real-time performance
does not accept switching to run mode. When a tool is being executed, the controller is
- Edit Tool switched to setup mode after the tool execution.
- Tool Adjustment Navigation
- Auto-Teach Inspection Adjustment Navigation
- Statistics
- Batch Test result screen
- Position Adjustment
- Execute
- Operation Screen Setting
- Output Setting
- Camera Installation Replication
- Scaling
- Custom menu edit
- Mouse Setting
- Archived Image Settings
- Save Program Settings
- Security Settings

Real-time performance
The command is instantly executed.

6-6 CV-X UM_A


Details of communication control commands

RS: Reset RB: Reboot


This command performs all of the following: This command saves the current program settings and
• Clears all buffers including the image buffer. reboots the system.
• Creates a new file name for the file used to store data.
For non-procedural commands
• Initializes total status output.
• Send
• Clears all of history data.
• Clears all of statistical data. RB
• Clears the measurement count. • Receive
• Clears OUT_DATA0 to OUT_DATA15.
RB

For non-procedural commands For number-specified commands


• Send The number-specified command No. is "11".
RS • Send
• Receive Word device *

Control/data output via commands


RS 11
* Starting word device (command address)
For number-specified commands
The number-specified command No. is "10". • Receive
• Send Word device *

Word device * Return value Execution result

10 * Starting word device (command result address)

* Starting word device (command address) Execution result


• Receive • 0: Success
• 22: When some unnecessary parameter was
Word device *
included. (Failure to access the SD card is not
Return value Execution result
considered to be an error and the system is
* Starting word device (command result address)
rebooted.)
Execution result
Real-time performance
• 0: Success
• When a tool is being executed, the command is
• 22: Some unnecessary parameter is included.
executed after the tool execution.
Real-time performance • When data is being output, the process is
When a tool is being executed, reset is executed after synchronized according to the OE timing, and then
the tool execution. the command is executed.

CV-X UM_A 6-7


Details of communication control commands

SS: Save Program CE: Clear error


Saves the current program settings and global settings. This command clears the error status. Even when an error
status does not exist, the command execution finishes
For non-procedural commands
normally.
• Send
SS
For non-procedural commands
• Send
• Receive
CE
SS
• Receive
For number-specified commands
CE
The number-specified command No. is "12".
• Send For number-specified commands
Word device *
The number-specified command No. is "13".
• Send
12
Control/data output via commands

* Starting word device (command address) Word device *


13
• Receive
* Starting word device (command address)
Word device *
• Receive
Return value Execution result
* Starting word device (command result address) Word device *
Return value Execution result
Execution result
* Starting word device (command result address)
• 0: Success
• 22: Some unnecessary parameter is included. Execution result
• 03: The SD card has not been inserted or cannot be • 0: Success
accessed. • 22: Some unnecessary parameter is included.

Real-time performance Real-time performance


This does not affect the measurement processing time. This does not affect the measurement processing time.

6-8 CV-X UM_A


Details of communication control commands

VW: Changing the operation screen RE: Trigger reset


Changes the display to the specified operation screen. Cancels the state in which a trigger is input halfway into a
measurement round when Multi-Capture is enabled. This
For non-procedural commands
function discards the capture image and measurement
• Send
result of the currently running measurement round and
VW,n,mm restores the state before the measurement execution.
• Receive
For non-procedural commands
VW • Send
For number-specified commands RE
The number-specified command No. is "14". • Receive
• Send
RE
Word
*+1
*+2
*+3
*+4
*+5

* For number-specified commands


device

Control/data output via commands


14 n mm The number-specified command No. is "15".
* Starting word device (command address)
• Send

• Receive Word *
device
Word
* 15
device
* Starting word device (command address)
Return Execution
value result • Receive
* Starting word device (command result address) Word *
device
Parameters (common)
Return Execution
• n: Specified screen type (0 - 1)
value result
0: Image display
* Starting word device (command result address)
1: Operation screen
• mm: Screen No. Execution result
0 - 4: Camera No. (1 - 4, 0 = All cameras) • 0: Success
0 - 9: Operation screen No. (S00 - S09) • 22: Some unnecessary parameter is included.

Execution result Real-time performance


• 0: Success When a tool is being executed, the trigger reset is
• 22: The number of parameters or the range of the executed after the tool execution.
parameter is incorrect.
• 03:
- The specified screen No. does not exist.
- Operation screen change is not possible because a
dialog box is open.

Real-time performance
This does not affect the measurement processing time.

CV-X UM_A 6-9


Details of communication control commands

RM:Read run/setup mode


Change program settings
Reads the status of the controller (i.e. whether it is in run
mode or setup mode). PW: Change programs
For non-procedural commands This command closes all open dialogs and loads the
• Send program of the specified No. (nnn) from the SD card.
RM
• Any changes to the setting data is discarded.
• If the command successfully finishes, the global setting
• Receive
file is saved after the command execution.
RM,n
For non-procedural commands
For number-specified commands • Send
The number-specified command No. is "16".
PW,d,nnn
• Send
• Receive
Word *
Control/data output via commands

device PW
16
For number-specified commands
* Starting word device (command address) The number-specified command No. is "24".
• Receive • Send
Word * Word
*+1
*+2
*+3

*+1
*+2
*+3
*+4
*+5
*
device device
Return Execution n 24 d nnn
value result * Starting word device (command address)
* Starting word device (command result address)
• Receive
Parameters (common) Word
*
• n: Controller status device
0: Setup mode Return Execution
1: Run mode value result
* Starting word device (command result address)
Execution result
• 0: Success Parameters (common)
• 22: Some unnecessary parameter is included. • d: SD card No. (1 or 2)
- 1: SD1
Real-time performance
- 2: SD2
This does not affect the measurement processing
• nnn: Program No. (0 to 999)
time.
Execution result
• 0: Success
• 22: The number of parameters or the range of the
parameter is incorrect.
• 03:
- The program does not exist.
- The SD card has not been inserted or cannot be
accessed.
- The controller ID lock is applied to the specified
program.
- When the switching destination program is lower
than version 4.0 (Conversion via manual switching
operation is necessary) (In the case of the CV-
X400/X300 Series only)

Real-time performance
The program is changed after measurement
processing finishes.

6-10 CV-X UM_A


Details of communication control commands

PR: Read program setting


Capture control
This command returns the SD card number and the
program No. of the program currently being read. CSH: Shutter speed setting
For non-procedural commands This command changes the shutter speed for the specified
• Send camera.
PR For non-procedural commands
• Receive • Send
PR,d,nnn CSH,c,nn
CSH,c,nn,p
For number-specified commands
CSH,c,nn,p,l
The number-specified command No. is "25".
• Send • Receive

Word CSH

Control/data output via commands


*
device
• Parameter
25
- c: Camera No. (1 to 4)
* Starting word device (command address) - nn: Shutter speed
• Receive 0: 1/15
1: 1/30
Word
*+1
*+2
*+3
*+4
*+5

* 2: 1/60
device
Return Execution d nnn 3: 1/120
value result 4: 1/240
* Starting word device (command result address) 5: 1/500
6: 1/1000
Parameters (common) 7: 1/2000
• d: SD card No. (1 or 2) 8: 1/5000
- 1: SD1 9: 1/10000
- 2: SD2 10: 1/20000
• nnn: Program No. (0 to 999) 11: 1/50000*1
Execution result 12: 1/100000*1
• 0: Success - p: Capture number (for Program Setting
• 22: Some unnecessary parameter is included. (Generic)) or capture point (for Program Setting
(Connector)) (1 to 8)
Real-time performance - l: Lighting for multiple image capture (1 to 2)
This command does not affect the measurement 1: Lighting A
processing time. 2: Lighting B
Lighting in 3D Capture Mode (1 to 2)
1: Lighting for 2D Capture
2: Lighting for 3D Capture
Lighting in Outline Capture Mode (1 to 2)
1: Lighting for acquiring normal images and
moving object correction images
2: Lighting for acquiring images in each direction
*1 Can only be specified for CA-H500CX/H500MX/H200CX/
H200MX/HX500C/HX500M/HX200C/HX200M

CV-X UM_A 6-11


Details of communication control commands

For number-specified commands Execution result


The number-specified command No. is "32". • 0: Success
• Send • 22:
Word
- The number of parameters or the range of the

*+1
*+2
*+3
*+4
*+5
* parameter is incorrect.
device
32 c nn - The capture number (p) parameter has not been
set when multi-capture is used.
Word
- The capture number (p) and lighting (l)
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*
device
parameters have not been set when connector
32 c nn p
multiple image capture (multi-capture) is used.
Word - The capture number (p) and lighting (l)
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9
*
device parameters are set when multiple image capture
32 c nn p l (multi-capture) is not used.
* Starting word device (command address) - An invalid capture number or lighting was
Control/data output via commands

• Receive specified.
• 03:
Word
* - The specified camera No. is invalid or the camera
device
is disconnected.
Return Execution
- When a camera No. where the LJ-V Series head is
value result
selected is specified.
* Starting word device (command result address)
If the same camera settings are set as
• Parameter Reference
shared for different capture numbers, the
- c: Camera No. (1 to 4) same setting is changed for all such
- nn: Shutter speed capture numbers.
0: 1/15
Real-time performance
1: 1/30
This command is executed by stopping the current
2: 1/60
measurement temporarily.
3: 1/120
4: 1/240
5: 1/500
6: 1/1000
7: 1/2000
8: 1/5000
9: 1/10000
10: 1/20000
11: 1/50000*1
12: 1/100000*1
- p: Capture number (for Program Setting
(Generic)) or capture point (for Program Setting
(Connector)) (1 to 8)
- l: Lighting for multiple image capture (1 to 2)
1: Lighting A
2: Lighting B
Lighting in 3D Capture Mode (1 to 2)
1: Lighting for 2D Capture
2: Lighting for 3D Capture
Lighting in Outline Capture Mode (1 to 2)
1: Lighting for acquiring normal images and
moving object correction images
2: Lighting for acquiring images in each direction
*1 Can only be specified for CA-H500CX/H500MX/H200CX/
H200MX/HX500C/HX500M/HX200C/HX200M

6-12 CV-X UM_A


Details of communication control commands

CSE: Camera sensitivity setting • Parameter


- c: Camera No. (1 to 4)
This command changes the sensitivity of the specified
- nn: Sensitivity (10 to 90, one-tenth of the specified
camera.
value is set as the camera sensitivity.)
For non-procedural commands - p: Capture number (for Program Setting
• Send (Generic)) or capture point (for Program Setting
(Connector)) (1 - 8)
CSE,c,nn
- l: Lighting for multiple image capture (1 - 2)
CSE,c,nn,p
1: Lighting A
CSE,c,nn,p,l
2: Lighting B
• Receive
The setting range of nn for high speed
Reference
CSE cameras is 10 to 70.

• Parameter Execution result


- c: Camera No. (1 to 4) • 0: Success

Control/data output via commands


- nn: Sensitivity (10 to 90, one-tenth of the specified • 22:
value is set as the camera sensitivity.) - The number of parameters or the range of the
- p: Capture number (for Program Setting parameter is incorrect.
(Generic)) or capture point (for Program Setting - The capture number (p) parameter has not been
(Connector)) (1 - 8) set when multi-capture is used.
- l: Lighting for multiple image capture (1 - 2) - The capture number (p) and lighting (l)
1: Lighting A parameters have not been set when connector
2: Lighting B multiple image capture (multi-capture) is used.
The setting range of nn for high speed - The capture number (p) and lighting (l)
Reference
cameras is 10 to 70. parameters are set when multiple image capture
(multi-capture) is not used.
For number-specified commands
- An invalid capture number or lighting was
The number-specified command No. is "33".
specified.
• Send
• 03:
Word - The specified camera No. is invalid or the camera
*+1
*+2
*+3
*+4
*+5

*
device
is disconnected.
33 c nn
- When a camera No. where the LJ-V Series head is
Word selected is specified.
*+1
*+2
*+3
*+4
*+5
*+6
*+7

*
device
If the same camera settings are set as
33 c nn p Reference
shared for different capture numbers, the
same setting is changed for all such
Word
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9

* capture numbers.
device
33 c nn p l Real-time performance
* Starting word device (command address) This command is executed by stopping the current
• Receive measurement temporarily.

Word
*
device
Return Execution
value result
* Starting word device (command result address)

CV-X UM_A 6-13


Details of communication control commands

CTD: Trigger delay Execution result


• 0: Success
This command places a delay time between the trigger
• 22:
input and the start of image capture.
- The number of parameters or the range of the
For non-procedural commands parameter is incorrect.
• Send - The capture number (p) parameter has not been
set when multi-capture is used.
CTD,c,nnn
- The capture number (p) and lighting (l)
CTD,c,nnn,p
parameters have not been set when connector
CTD,c,nnn,p,l
multiple image capture (multi-capture) is used.
• Receive - The capture number (p) and lighting (l)
CTD parameters are set when multiple image capture
(multi-capture) is not used.
• Parameter
- An invalid capture number or lighting was
- c: Camera No. (1 to 4)
Control/data output via commands

specified.
- nnn: Trigger delay (0 to 999) (ms)
• 03:
- p: Capture number (for Program Setting
- The specified camera No. is invalid or the camera
(Generic)) or capture point (for Program Setting
is disconnected.
(Connector)) (1 - 8)
- When a camera No. where the LJ-V Series head is
- l: Lighting for multiple image capture (1 - 2)
selected is specified.
1: Lighting A
2: Lighting B If the same camera settings are set as
Reference
shared for different capture numbers, the
For number-specified commands same setting is changed for all such
The number-specified command No. is "34". capture numbers.
• Send
Real-time performance
Word This command is executed by stopping the current
*+1
*+2
*+3
*+4
*+5

*
device measurement temporarily.
34 c nnn

Word
*+1
*+2
*+3
*+4
*+5
*+6
*+7

*
device
34 c nnn p

Word
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9

*
device
34 c nnn p l
* Starting word device (command address)
• Receive
Word
*
device
Return Execution
value result
* Starting word device (command result address)
• Parameter
- c: Camera No. (1 to 4)
- nnn: Trigger delay (0 to 999) (ms)
- p: Capture number (for Program Setting
(Generic)) or capture point (for Program Setting
(Connector)) (1 - 8)
- l: Lighting for multiple image capture (1 - 2)
1: Lighting A
2: Lighting B

6-14 CV-X UM_A


Details of communication control commands

CLV: Lighting intensity value setting For number-specified commands


The number-specified command No. is "35".
This command changes the intensity of the specified lighting.
• Send
For non-procedural commands Word

*+1
*+2
*+3
*+4
*+5
*
• Send device

CLV,c,nnnn 35 c nnn

CLV,c,nnnn,p Word

*+1
*+2
*+3
*+4
*+5
*+6
*+7
*
CLV,c,nnnn,p,l device
• Receive 35 c nnn p

CLV Word

*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9
*
device
• Parameter
35 c nnn p l
- c: Light No.
* Starting word device (command address)
1 to 8 (CV-X200/X100 Series)

Control/data output via commands


• Receive
1 to 16 (CV-X400/X300 Series)
- nnnn: Lighting Intensity value Word
*
0 to 255 (CV-X200/X100 Series) device

0 to 1023 (CV-X400/X300 Series) Return Execution


value result
- p: Capture number (for Program Setting (Generic))
or capture point (for Program Setting (Connector)) * Starting word device (command result address)
(1 to 8) • Parameter
- l: - c: Light No.
Lighting for multiple image capture (1 to 2) 1 to 8 (CV-X200/X100 Series)
(for Program Setting (Connector) Only) 1 to 16 (CV-X400/X300 Series)
1: Lighting A - nnnn: Lighting Intensity value
2: Lighting B 0 to 255 (CV-X200/X100 Series)
Lighting color (1 to 8) (Only when MultiSpectrum 0 to 1023 (CV-X400/X300 Series)
Mode is set) - p: Capture number (for Program Setting
1: UV (Generic)) or capture point (for Program Setting
2: B (Connector)) (1 to 8)
3: G - l:
4: AM Lighting for multiple image capture (1 to 2)
5: R (for Program Setting (Connector) Only)
6: FR 1: Lighting A
7: IR 2: Lighting B
8: W Lighting color (1 to 8) (Only when MultiSpectrum
Specify 2D volume/3D volume (Only when 3D Mode is set)
Capture Mode is set) 1: UV
1: Lighting for 2D Capture 2: B
2: Lighting for 3D Capture 3: G
Lighting in Outline Capture Mode (1 to 2) 4: AM
1: Lighting for acquiring normal images and 5: R
moving object correction images 6: FR
2: Lighting for acquiring images in each direction 7: IR
8: W
Specify 2D volume/3D volume (Only when 3D
Capture Mode is set)
1: Lighting for 2D Capture
2: Lighting for 3D Capture
Lighting in Outline Capture Mode (1 to 2)
1: Lighting for acquiring normal images and
moving object correction images
2: Lighting for acquiring images in each direction

CV-X UM_A 6-15


Details of communication control commands

Execution result
• 0: Success Vision tool
• 22:
- The number of parameters or the range of the BS: Image registration
parameter is incorrect. This command saves the latest current image as a reference
- The capture number (p) parameter has not been image with number nnn, and then calculates the reference
set when multi-capture is used. value based on the saved reference image. If the parameters
- The capture number (p) and lighting (l) are not specified, the command recalculates the reference
parameters have not been set when connector value based on the current reference image.
multiple image capture (multi-capture) is used.
• If a file with the same number exists, that file
- The capture number (p) and lighting (l) Reference
will be overwritten unless it is read-only.
parameters are set when multiple image capture • For number-specified commands, setting 0 for
(multi-capture) is not used. the first argument will recalculate the reference
- An invalid capture number or lighting was value based on the current reference image.
• For more details about reference image
Control/data output via commands

specified.
numbers when registering images taken by
• 03: The illumination expansion unit is disconnected/
high-functioning cameras or LJ-V series heads,
The specified illumination expansion unit is turned refer to "Reference image numbers for capture
off/The setting of the specified illumination using high-functioning cameras or LJ-V series
expansion unit is invalid. heads" (Page 7-14).

If the same camera settings are set as For non-procedural commands


Reference
shared for different capture numbers, the • Send
same setting is changed for all such
capture numbers. BS Recalculates the reference value
based on the current reference
Real-time performance image.
This command is executed by stopping the current BS,c,nnn Registers the latest current image
measurement temporarily. as reference and calculates the
reference value.
BS,c,nnn,p When multiple image capture is
used (Program Setting (Generic))
BS,c,nnn,p,l When multiple image capture is
used (Program Setting
(Connector))
• Receive
BS
• Parameter
- c: None (0) or camera No. (1 - 4)
- nnn: Reference image No. (0 to 899)
- p: Capture number (for Program Setting
(Generic)) or capture point (for Program Setting
(Connector)) (1 - 8)
- l: Lighting for multiple image capture (1 - 2)
1: Lighting A
2: Lighting B

6-16 CV-X UM_A


Details of communication control commands

For number-specified commands EXW: Write execute condition


The number-specified command No. is "40".
This command changes the number of the execution
• Send
condition currently enabled to the specified number.
Word

*+1
*+2
*+3
*+4
*+5
*
device For non-procedural commands
40 c nnn • Send

Word EXW,n
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*
device • Receive
40 c nnn p
EXW
Word
For number-specified commands
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9
*
device
The number-specified command No. is "41".
40 c nnn p l
• Send
* Starting word device (command address)
Word

Control/data output via commands


*+1
*+2
*+3
• Receive *
device
Word 41 n
*
device
* Starting word device (command address)
Return Execution
value result • Receive
* Starting word device (command result address) Word
*
• Parameter device
- c: None (0) or camera No. (1 - 4) Return Execution
- nnn: Reference image No. (0 to 899) value result
- p: Capture number (for Program Setting * Starting word device (command result address)
(Generic)) or capture point (for Program Setting
(Connector)) (1 - 8) Parameters (common)
- l: Lighting for multiple image capture (1 - 2) • n: 0 to 99 (execute condition number)
1: Lighting A
2: Lighting B Execution result
• 0: Success
Execution result • 22:
• 0: Success - The number of parameters or the range of the
• 22:
parameter is incorrect.
- The number of parameters or the range of the
parameter is incorrect. Real-time performance
- The capture number (p) parameter has not been set
This does not affect the measurement processing
when multi-capture is used.
- The capture number (p) and lighting (l) parameters time.
have not been set when connector multiple image
capture (multi-capture) is used.
- The capture number (p) and lighting (l) parameters
are set when multiple image capture (multi-capture)
is not used.
- An invalid capture number or lighting was specified.
- When a reference image No. outside the 000-399
range is specified while the camera No. where the
LJ-V Series head is selected is specified.
• 03:
- The SD card is not inserted or cannot be accessed.
- The SD card is full and no more images can be
registered.
- The file of the specified number is read-only.
- The registration of the reference image data failed.
- Insufficient processing memory causing failure to
calculate the reference value.
- The specified camera is invalid or connected
incorrectly.

Real-time performance
This command is executed by stopping the current
measurement temporarily.
CV-X UM_A 6-17
Details of communication control commands

EXR: Read execute condition CW: Change registered string


This command reads the number of the execute condition The No. nnn OCR tool and OCR2 tool registered string,
currently enabled. and the reference pattern string for the 1D code reader
tool and 2D code reader tool are changed to the specified
For non-procedural commands
character string ssss. If registered string ssss is not
• Send
specified, the most recent reading result for that tool is set.
EXR
• If registered string ssss is not specified, the most
Reference
• Receive recent reading result for that tool is used as the
registered string.
EXR,n
• Since the system stores the string as ASCII
For number-specified commands characters, the special characters such as Year4,
eYear (0) cannot be specified.
The number-specified command No. is "42".
• The following restrictions apply when using with
• Send the OCR/OCR2 tool.
- The characters which can be used for the OCR
Word
Control/data output via commands

* tool are uppercase and lowercase letters,


Device
colon (:), period (.), hyphen (-), and forward
42 slash (/). The characters which can be used for
the OCR2 tool are uppercase and lowercase
* Starting word device (command address)
letters, colon (:), period (.), hyphen (-), forward
• Receive slash (/), brackets (), and plus sign (+).
Characters which cannot be used will result in
Word an error.
*+1
*+2
*+3

*
device - If the string is changed to the latest readout
result, a space of 20 characters in the case of
Return Execution n
the OCR tool and 40 characters in the case of
value result the OCR2 tool is allocated if measurement has
* Starting word device (command result address) not yet been performed. If the string read is
less than the maximum number of characters,
Parameters (common) spaces are inserted for the remaining
characters.
• n: 0 to 99 (execute condition number)
- If a recognized character is "? (recognition
impossible)", a space is placed for the character.
Execution result - If no string is specified (CW,nnn,m," ),
• 0: Success the registered string is cleared.
• 22: Some unnecessary parameter is included. - If measurement has not yet been performed,
spaces are set.
• The following restrictions apply when using with
Real-time performance
the 1D code reader tool and 2D code reader tool.
This does not affect the measurement processing - The string is cleared if measurement has not
time. yet been performed.
- The registered string ssss can contain a
maximum of 200 characters.

For non-procedural commands


• Send
CW,nnn,m,"ssss Changes the registered
string to the specified string.
CW,nnn,m Sets the latest readout result
as the registered string
• Receive
CW
• Parameter
- nnn: Tool No. (100 to 499)
- m: Line No./Reference condition No.
For OCR tool or OCR2 tool: 1 (fixed)
For 1D code reader tool or 2D code reader tool: 1 - 16
- ssss: Registered string
For OCR tool: Number of characters 0 - 20
For OCR2 tool: Number of characters 0 - 40
For 1D code reader tool: Number of characters 0 - 128
For 2D code reader tool: Number of characters 0 - 200

6-18 CV-X UM_A


Details of communication control commands

For number-specified commands CR: Read registered string


The number-specified command No. is "43".
Reads the No. nnn OCR tool and OCR2 tool registered
• Send (t=0)
string, and the reference pattern string of the 1D code
Word reader tool and 2D code reader tool, and returns the same

*+1
*+2
*+3
*+4
*+5
*+6
*+7
*
device
character strings as the [Registered String] and
43 nnn m t
[Reference Pattern] on the tool edit screen. In the case of
* Starting word device (command address) the number-specified command, when the end of the
• Send (t=1) string is reached, 0 is stored and the process ends.
Word

*+10
*+11
For non-procedural commands
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9
* ···
device
• Send
43 nnn m t s1 s2 ···
CR,nnn,m
* Starting word device (command address)
• Receive
• Receive

Control/data output via commands


CR,ssss
Word
* • Parameter
device
Return Execution - nnn: Tool No. (100 to 499)
value result - m: Line No./Reference condition No.
* Starting word device (command result address) For OCR tool or OCR2 tool: 1 (fixed)
• Parameter For 1D code reader tool or 2D code reader tool: 1 - 16
- nnn: Tool No. (100 to 499) - ssss: Registered string
- m: Line No./Reference condition No. For OCR tool: Number of characters 0 - 20
For OCR tool or OCR2 tool: 1 (fixed) For OCR2 tool: Number of characters 0 - 40
For 1D code reader tool or 2D code reader tool: 1 - 16 For 1D code reader tool: Number of characters 0 - 128
- t: For 2D code reader tool: Number of characters 0 - 200
0: Use the most recent reading result. For number-specified commands
1: Set the characters specified for ssss.
The number-specified command No. is "44".
- ssss: Registered string (2 words are used per
• Send
character. Terminator is 0 (zero).)
For OCR tool: Number of characters 0 - 20 Word
*+1
*+2
*+3
*+4
*+5
*
device
For OCR2 tool: Number of characters 0 - 40
For 1D code reader tool: Number of characters 0 - 128 44 nnn m

For 2D code reader tool: Number of characters 0 - 512 * Starting word device (command address)

• Receive
Execution result
• 0: Success Word
*+1
*+2
*+3
*+4
*+5
*+6
*+7

* ···
• 03: device

- A tool other than OCR, OCR2, 1D code reader, or Return Execution s1 s2 s3 ···
2D code reader was specified. value result

- The specified tool has a setting error. * Starting word device (command result address)
• 22: • Parameter
- The number of parameters or the range of the - nnn: Tool No. (100 to 499)
parameter is incorrect. - m: Line No./Reference condition No.
- An unnecessary parameter is included. For OCR tool or OCR2 tool: 1 (fixed)
- A character that cannot be used has been For 1D code reader tool or 2D code reader tool: 1 - 16
specified. - ssss: Registered string (2 words are used per
character. Terminator is 0 (zero).)
Real-time performance For OCR tool: Number of characters 0 - 20
This command is executed by stopping the current For OCR2 tool: Number of characters 0 - 40
measurement temporarily. For 1D code reader tool: Number of characters 0 - 128
For 2D code reader tool: Number of characters 0 - 512

CV-X UM_A 6-19


Details of communication control commands

Execution result DW: Change judgment condition


• 0: Success
Changes the upper limit and lower limit in the judgment
• 22: The number of parameters or the range of the
conditions for the specified tool.
parameter is incorrect.
• 03: For non-procedural commands
- A tool other than OCR, OCR2, 1D code reader, or • Send
2D code reader was specified.
DW,nnn,aaa,b,mmm
- There is no registered string set.
- The specified reference pattern does not exist. • Receive
DW
Real-time performance
This does not affect the measurement processing For number-specified commands
time. The number-specified command No. is "45".
• Send
Word
Control/data output via commands

*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9
*
device
45 nnn aaa b mmm
* Starting word device (command address)

• Receive
Word
*
device
Return Execution
value result
* Starting word device (command result address)

Parameters (common)
• nnn: Tool No. (100 to 499)
When Multi-Region Mode is ON, the region No.
Reference
can be specified by specifying the following
values.
100 *Tool No. (100 to 499) + Region No. (0 to 31)
If no region No. is specified (if a value between
100 and 499 is specified), the region with the
youngest number will be the target.

• aaa: Item ID for judgment condition type (Page 3-


61)
• b: Specify upper limit (0) or lower limit (1).
• mmm: Judgment condition value (In the case of a
number-specified command, contents vary depending
on the [Decimal Point] setting for PLC-Link, EtherNet/IP,
PROFINET, or EtherCAT.)
- When [Fixed-point] is selected: the setting value is
multiplied by 1000 and is a signed 32-bit integer
data.
- When [Floating-point] is selected: Single-precision
floating point data
Use the CW command to change the
Reference
judgment string for the OCR tool, OCR2 tool,
1D code reader tool, or 2D code reader tool.

6-20 CV-X UM_A


Details of communication control commands

Execution result DR: Read judgment condition


• 0: Success
Reads the upper limit and lower limit in the judgment
• 22: The number of parameters, the number of digits,
conditions for the specified tool.
or the range of the parameter is incorrect.
• 03: For non-procedural commands
- The specified type does not exist for that tool. • Send
- A screen where judgment conditions can be
DR,nnn,aaa,b
changed (custom menu, statistics, etc.) is open.
• Receive
- The new value is incorrect.
DR,mmm
Real-time performance
This does not affect the measurement processing time. For number-specified commands
The number-specified command No. is "46".
• Send
Word

Control/data output via commands


*+1
*+2
*+3
*+4
*+5
*+6
*+7
*
device
46 nnn aaa b
* Starting word device (command address)

• Receive
Word

*+1
*+2
*+3
*
device
Return Execution mmm
value result
* Starting word device (command result address)

Parameters (common)
• nnn: Tool No. (100 to 499)
When Multi-Region Mode is ON, the region No.
Reference
can be specified by specifying the following
values.
100 *Tool No. (100 to 499) + Region No. (0 to 31)
If no region No. is specified (if a value between
100 and 499 is specified), the region with the
youngest number will be the target.

• aaa: Item ID for judgment condition type (Page 3-


61)
• b: Specify upper limit (0) or lower limit (1).
• mmm: Judgment condition value (In the case of a
number-specified command, contents vary depending
on the [Decimal Point] setting for PLC-Link, EtherNet/IP,
PROFINET, or EtherCAT.)
- When [Fixed-point] is selected: the setting value is
multiplied by 1000 and is a signed 32-bit integer
data.
- When [Floating-point] is selected: Single-precision
floating point data
Use the CR command for reading the
Reference
judgment string of the OCR tool, OCR2 tool,
1D code reader tool, or 2D code reader tool.

CV-X UM_A 6-21


Details of communication control commands

Execution result SLW: Change defect level


• 0: Success
Changes the defect level for the specified defect tool.
• 22: The number of parameters, the number of digits,
or the range of the parameter is incorrect. For non-procedural commands
• 03: The specified type does not exist for that tool. • Send
• 05: Command response output failed (insufficient
SLW,nnn,mmm
command response output area)
• Receive
Real-time performance
SLW
This does not affect the measurement processing
time. For number-specified commands
The number-specified command No. is "47".
• Send
Word

*+1
*+2
*+3
*+4
*+5
*
device
Control/data output via commands

47 nnn mmm
* Starting word device (command address)

• Receive
Word
*
device
Return Execution
value result
* Starting word device (command result address)

Parameters (common)
• nnn: Tool No. (100 to 499)
When Multi-Region Mode is ON, the region No.
Reference
can be specified by specifying the following
values.
100 *Tool No. (100 to 499) + Region No. (0 to 31)
If no region No. is specified (if a value between
100 and 499 is specified), the region with the
youngest number will be the target.

• mmm: Defect level value

Execution result
• 0: Success
• 22: The number, the number of digits, or the range of
the parameter is incorrect.
• 03:
- Specified tool is not a defect tool.
- The custom menu screen is open.
- The new value is incorrect.

Real-time performance
This does not affect the measurement processing time.

6-22 CV-X UM_A


Details of communication control commands

SLR: Read defect level CA: Register 1 Character to Library


Reads the defect level of the specified defect tool. Registers characters read by the OCR tool or OCR2 tool to
the OCR library.
For non-procedural commands
• Send For non-procedural commands
SLR,nnn
• Send
CA,nnn,m,aa,ccc
• Receive
SLR,mmm • Receive
CA
For number-specified commands
The number-specified command No. is "48". For number-specified commands
• Send The number-specified command No. is "49".
• Send
Word
*+1
*+2
*+3

* Word

*+10
*+11
*+12
*+13
*+14
*+15
*+16
device

*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9
*

Control/data output via commands


device
48 nnn
49 nnn m aa ccc
* Starting word device (command address)
* Starting word device (command address)
• Receive
• Receive
Word
*+1
*+2
*+3

* Word

*+1
device *
device
Return Execution mmm
Return Execution
value result
value result
* Starting word device (command result address)
* Starting word device (command result address)
Parameters (common)
Parameters (common)
• nnn: Tool No. (100 to 499)
• nnn: Tool No. (100 to 499)
Reference
When Multi-Region Mode is ON, the region No. • m: Detect result row number (1)
can be specified by specifying the following • aa: Detect result character number
values.
- For OCR tool: 1 to 20
100 *Tool No. (100 to 499) + Region No. (0 to 31)
- For OCR2 tool: 1 to 40
If no region No. is specified (if a value between
100 and 499 is specified), the region with the • ccc: Destination character type (Page 6-24)
youngest number will be the target. - For OCR tool: -1 to 65 (does nothing when -1)
- For OCR2 tool: -1 to 68 (does nothing when -1)
• mmm: Defect level value
Execution result
Execution result
• 0: Success
• 0: Success
• 03:
• 22: The number, the number of digits, or the range of
- The SD card has not been inserted or cannot be
the parameter is incorrect.
accessed
• 03: Specified tool is not a defect tool.
- The tool does not exist or a tool other than OCR/
• 05: Command response output failed (insufficient OCR2 is specified
command response output area) - The built-in library is selected in the tool or the
Real-time performance specified library file does not exist
- Failed to register to the OCR library
This does not affect the measurement processing time.
• 22:
- The number of parameters or the range of the
parameter is incorrect.

Real-time performance
This command is instantly executed.

CV-X UM_A 6-23


Details of communication control commands

CD: Delete 1 Character from Library Character type specified in the CA/CD command
The registration destination character type specified by the
Deletes the character for the last Register No. of the
CA command and character type to be deleted by using the
specified character type from the OCR library.
CD command is specified by using the code which
For non-procedural commands corresponds to the character type.
• Send The corresponding code for the character types are shown
CD,nnn,ccc below.
Character type Code Character type Code
• Receive
Not specified -1 - 36
CD
0 0 . 37
1 1 : 38
For number-specified commands
The number-specified command No. is "50". 2 2 / 39

• Send 3 3 a 40
4 4 b 41
Control/data output via commands

Word
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8

* 5 5 c 42
device
50 nnn ccc 6 6 d 43

* Starting word device (command address) 7 7 e 44


8 8 f 45
• Receive
9 9 g 46
Word
*+1

* A 10 h 47
device
B 11 i 48
Return Execution
value result C 12 j 49

* Starting word device (command result address) D 13 k 50


E 14 l 51
Parameters (common)
F 15 m 52
• nnn: Tool No. (100 to 499)
G 16 n 53
• ccc: Type of character to be deleted (Page 6-24)
H 17 o 54
- For OCR tool: -1 to 65 (does nothing when -1)
I 18 p 55
- For OCR2 tool: -1 to 68 (does nothing when -1)
J 19 q 56
Execution result K 20 r 57
• 0: Success L 21 s 58
• 03: M 22 t 59
- The SD card has not been inserted or cannot be N 23 u 60
accessed O 24 v 61
- The tool does not exist or a tool other than OCR/ P 25 w 62
OCR2 is specified
Q 26 x 63
- The built-in library is selected in the tool or the
R 27 y 64
specified library file does not exist
S 28 z 65
- No character of the type specified is registered
T 29 * Cannot be
- Failed to delete from the OCR library
specified
• 22:
U 30 # Cannot be
- The number of parameters or the range of the
specified
parameter is incorrect.
V 31 (Space) Cannot be
Real-time performance specified
This command is instantly executed. W 32 ( 66
X 33 ) 67
Y 34 + 68
Z 35

6-24 CV-X UM_A


Details of communication control commands

CPW: Update Capture Position


Measured Value Correction
Updates the capture position coordinates of the Vision-
Guided Robotics tool of all cameras or the specified
camera number. MCC: Change Measured Value before Correction
The Vision-Guided Robotics tool’s capture position
of Measured Value Correction
Reference coordinates which are subject to updating shall This command calculates the measured value before
only be those that fulfill either of the following
conditions. correction for the specified value.
• The operation direction is "Detected Pt. to Master
Pos." For non-procedural commands
• On-hand camera • Send
For non-procedural commands MCC,nnn,m,a
• Send • Receive
CPW,c,x,y,z,rx,ry,rz MCC,c
• Receive
• Parameter

Control/data output via commands


CPW - nnn: Tool No. (100 to 499)

For number-specified commands When Multi-Region Mode is ON, the


Reference
region No. can be specified by specifying
The number-specified command No. is "51". the following values.
• Send 100 *Tool No. (100 to 499) + Region No. (0 to 31)
If no region No. is specified (if a value
Word between 100 and 499 is specified), the
*+12
*+13
*+14
*+15
*+10
*+11
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9

*
device region with the youngest number will be
the target.
51 c x y z rx ry rz
* Starting word device (command address) - m:
Measurement Item No. (0 to 31, for Profile
• Receive
Measurement or Continuous Profile Measurement)
Word Item ID for the judgment conditions type (for Height
* Measurement or Trend Height Measurement)
device
- a: Value
Return Execution
- c: Correction value
value result
For number-specified commands
* Starting word device (command result address)
The number-specified command No. is "52".
Parameters (common) • Send
• c: All cameras (0) or Camera No. (1 to 4) Word
*+1
*+2
*+3
*+4
*+5
*+6
*+7

*
• x: X position (-9999.999 to 9999.999) device

• y: Y position (-9999.999 to 9999.999) 52 nnn m a


• z: Height (-9999.999 to 9999.999) * Starting word device (command address)
• rx: Angle X (-180.000 to 180.000) • Receive
• ry: Angle Y (-180.000 to 180.000) Word
*+1
*+2
*+3

*
• rz: Angle Z (-180.000 to 180.000) device

Contents other than the camera number vary Return Execution c


Reference value result
depending on the [Decimal Point] setting for
PLC-Link, EtherNet/IP, PROFINET, or EtherCAT. * Starting word device (command result address)
• When [Fixed-point] is selected: the setting
value is multiplied by 1000 and is a signed
• Parameter
32-bit integer data. - nnn: Tool No. (100 to 499)
• When [Floating-point] is selected: Single- When Multi-Region Mode is ON, the
precision floating point data Reference
region No. can be specified by specifying
the following values.
Execution result 100 *Tool No. (100 to 499) + Region No. (0 to 31)
• 0: Success If no region No. is specified (if a value
• 22: The number of parameters, the number of digits, between 100 and 499 is specified), the
region with the youngest number will be
or the range of the parameter is incorrect. the target.
• 03: When an unconnected or non-existent camera
- m:
number is specified, or when a tool to update does
Measurement Item No. (0 to 31, for Profile
not exist. Measurement or Continuous Profile Measurement)
Item ID for the judgment conditions type (for Height
Real-time performance Measurement or Trend Height Measurement)
This does not affect the measurement processing - a: Value
time. - c: Correction value
CV-X UM_A 6-25
Details of communication control commands

Execution result MCW: Write Measured Value Correction


• 0: Success
This command changes the measured value correction
• 03:
setting of the specified measurement item number for a
- The tool does not exist or a tool other than Height
given tool and also calculates the correction value. The
Measurement, Trend Height Measurement, Profile calculation is done using one of the following methods
Measurement, or Continuous Profile Measurement depending on the parameters specified.
is specified (1) Change the correction method to 1-point correction,
- A measurement item number that is not covered is and then specify the value before correction and the
specified when Profile Measurement or value after correction to calculate the correction value.
Continuous Profile Measurement is set. (2) Change the correction method to 1-point correction,
subtract the specified offset value from the set value
- The calculation for Measured Value before
after correction, and then set this result as the
Correction failed.
correction value.
• 22: (3) Change the correction method to 2-point correction,
- The number of parameters is incorrect. and then specify the value before correction and the
Control/data output via commands

- The range of the parameter is incorrect. value after correction for correction values 1 and 2 in
- When the number of digits of the parameter is too order to calculate these values.
many. (4) Change the correction method to 2-point correction,
perform an inverse calculation on the specified
Real-time performance coefficients A and B from the set value after correction,
This does not affect the measurement processing and then set this result as the correction value.
time.
For non-procedural commands
• Send
MCW,nnn,m,l,c,f (1)
MCW,nnn,m,l,o (2)
MCW,nnn,m,l,c1,f1,c2,f2 (3)
MCW,nnn,m,l,a,b (4)

• Receive
MCW

• Parameter
- nnn: Tool No. (100 to 499)
When Multi-Region Mode is ON, the
Reference
region No. can be specified by specifying
the following values.
100 *Tool No. (100 to 499) + Region No. (0 to 31)
If no region No. is specified (if a value
between 100 and 499 is specified), the
region with the youngest number will be
the target.

- m:
Measurement Item No. (0 to 31, for Profile
Measurement or Continuous Profile Measurement)
AL (All measurement items)
Item ID for the judgment conditions type (for Height
Measurement or Trend Height Measurement)
- l: Correction method
0: 1-point correction (1)(2)
1: 2-point correction (3)(4)
- c: Value before correction
- f: Value after correction
- o: Offset value
- c1: Value before correction 1
- c2: Value before correction 2
- f1: Value after correction 1
- f2: Value after correction 2
- a: Coefficient A
- b: Coefficient B

6-26 CV-X UM_A


Details of communication control commands

For number-specified commands Execution result


The number-specified command No. is "53". • 0: Success
• Send • 03:
Word - The tool does not exist or a tool other than Height

*+10
*+11
*+12
*+13
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9
*
device Measurement, Trend Height Measurement, Profile
53 nnn m l t c f Measurement, or Continuous Profile Measurement
Word is specified

*+10
*+11
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9
*
device - A measurement item number that is not covered is
53 nnn m l t o specified when Profile Measurement or
Word Continuous Profile Measurement is set.

*+10
*+11
*+12
*+13
*+14
*+15
*+16
*+17
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9
* - The correction calculation failed.
device
53 nnn m l t c1 f1 c2 f2 • 22:
- The number of parameters is incorrect.
Word
*+10
*+11
*+12
*+13
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9

* - The range of the parameter is incorrect.


device

Control/data output via commands


53 nnn m l t a b - When the number of digits of the parameter is too
many.
* Starting word device (command address)

• Receive Real-time performance


This command is executed by stopping the current
Word
* measurement temporarily.
device
Return Execution
value result
* Starting word device (command result address)
• Parameter
- nnn: Tool No. (100 to 499)
When Multi-Region Mode is ON, the
Reference
region No. can be specified by specifying
the following values.
100 *Tool No. (100 to 499) + Region No. (0 to 31)
If no region No. is specified (if a value
between 100 and 499 is specified), the
region with the youngest number will be
the target.

- m:
Measurement Item No. (0 to 31, for Profile
Measurement or Continuous Profile Measurement)
AL (All measurement items)
Item ID for the judgment conditions type (for Height
Measurement or Trend Height Measurement)
- l: Correction method
0: 1-point correction (1)(2)
1: 2-point correction (3)(4)
- t: Specification Method
0: Specify Correction Value
1: Specify offset and coefficient
- c: Value before correction
- f: Value after correction
- o: Offset value
- c1: Value before correction 1
- c2: Value before correction 2
- f1: Value after correction 1
- f2: Value after correction 2
- a: Coefficient A
- b: Coefficient B

CV-X UM_A 6-27


Details of communication control commands

MCR: Read Measured Value Correction • Parameter


- nnn: Tool No. (100 to 499)
Returns the values for Measured Value Correction set in
the specified tool. When Multi-Region Mode is ON, the
Reference
region No. can be specified by specifying
the following values.
For non-procedural commands
100 *Tool No. (100 to 499) + Region No. (0 to 31)
• Send If no region No. is specified (if a value
between 100 and 499 is specified), the
MCR,nnn,m region with the youngest number will be
the target.
• Receive
MCR,0,c,f,o In the case of 1-point correction
- m:
Measurement Item No. (0 to 31, for Profile
MCR,1,c1,f1,c2,f2,a,b In the case of 2-point correction
Measurement or Continuous Profile Measurement)
• Parameter Item ID for the judgment conditions type (for Height
- nnn: Tool No. (100 to 499) Measurement or Trend Height Measurement)
- c: Value before correction
Control/data output via commands

When Multi-Region Mode is ON, the


Reference
region No. can be specified by specifying - f: Value after correction
the following values.
100 *Tool No. (100 to 499) + Region No. (0 to 31) - o: Offset value
If no region No. is specified (if a value - c1: Value before correction 1
between 100 and 499 is specified), the - c2: Value before correction 2
region with the youngest number will be
the target. - f1: Value after correction 1
- f2: Value after correction 2
- m:
- a: Coefficient A
Measurement Item No. (0 to 31, for Profile
- b: Coefficient B
Measurement or Continuous Profile Measurement)
Item ID for the judgment conditions type (for Height Execution result
Measurement or Trend Height Measurement) • 0: Success
- c: Value before correction • 03:
- f: Value after correction - The tool does not exist or a tool other than Height
- o: Offset value Measurement, Trend Height Measurement, Profile
- c1: Value before correction 1 Measurement, or Continuous Profile Measurement
- c2: Value before correction 2 is specified.
- f1: Value after correction 1 - A measurement item number that is not covered is
- f2: Value after correction 2 specified when Profile Measurement or
- a: Coefficient A Continuous Profile Measurement is set.
- b: Coefficient B - The correction calculation failed.
• 22:
For number-specified commands
- The number of parameters is incorrect.
The number-specified command No. is "54".
- The range of the parameter is incorrect.
• Send
- When the number of digits of the parameter is too
Word many.
*+1
*+2
*+3
*+4
*+5

*
device
54 nnn m Real-time performance
* Starting word device (command address) This does not affect the measurement processing
• Receive time.

Word
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9

*
device
Return Execution
0 c f o
value result

Word
*+10
*+11
*+12
*+13
*+14
*+15
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9

*
device
Return Execution
1 c1 f1 c2 f2 a b
value result

* Starting word device (command result address)

6-28 CV-X UM_A


Details of communication control commands

OE: Enable/disable output


I/O control
This command disables the data/image output to the
TE: Enable/disable trigger input output buffer and clears the data in the buffer, so that data
output to external devices is controlled. This command
When "TE,0" is executed, the READY terminal is set to
controls the following output functions:
remain off and thus no trigger input will be accepted. When
• Results output (terminal block, Ethernet, RS-232C,
"TE,1" is executed, trigger input will be accepted.
PLC-Link, EtherNet/IP, PROFINET, EtherCAT, SD card,
For non-procedural commands USB HDD, PC Program, FTP, VisionDataStorage(USB))
• Send • Image output (SD card, USB HDD, PC Program, FTP,
VisionDataStorage(USB))
TE,n
• Output to VisionDatabase
• Receive
For non-procedural commands
TE
• Send

Control/data output via commands


For number-specified commands
OE,n
The number-specified command No. is "56".
• Receive
• Send
OE
*+1
*+2
*+3

Word
*
device For number-specified commands
56 n The number-specified command No. is "57".
* Starting word device (command address) • Send
• Receive Word

*+1
*+2
*+3
*
Word device
*
device 57 n
Return Execution * Starting word device (command address)
value result
• Receive
* Starting word device (command result address)
Word
*
Parameters (common) device
• n: Return Execution
- 0: Trigger input disabled value result
- 1: Trigger input enabled * Starting word device (command result address)

Execution result Parameters (common)


• 0: Success • n: Mode
• 22: The number of parameters or the range of the - 0: Output disabled
parameter is incorrect. - 1: Output enabled

Real-time performance Execution result


This does not affect the measurement processing • 0: Success
time. • 22:
- The number of parameters or the range of the
parameter is incorrect.

Real-time performance
- This does not affect the measurement processing
time.

CV-X UM_A 6-29


Details of communication control commands

Details of command behavior when executed


• Data output Utility
- Output is stopped for each trigger. (As for output to
RS-232C, Ethernet, SD card, USB HDD, PLC-Link, TC: Clear statistical data
EtherNet/IP, PROFINET, or EtherCAT, when output is This command clears the statistical data and then resumes
disabled during result data output for 1 trigger, data taking statistics.
output for that trigger does not stop.)
- When enabled, output is resumed at the next trigger For non-procedural commands
execution. • Send
• Parallel terminal output TC
- Outputs to STO, OUT_DATA0 to 15, OR terminal • Receive
blocks are immediately shut off and the state is set to
TC
normal.
- Even while output is disabled, the total status result of For number-specified commands
Control/data output via commands

OR changes. However, such change is not applied to The number-specified command No. is "64".
the terminal blocks. • Send
- When output is enabled, the current value of OR is Word
immediately applied to the external terminals. *
device
- For STO, OUT_DATA0 to 15, output is resumed at the 64
next trigger execution. * Starting word device (command address)
• Relationship with TEST
• Receive
- There is no priority setting between OE and TEST
terminal. The value specified later overwrites the Word
*
setting by which output is enabled or disabled. device

- For example, inputting "OE,1" (enable) when Return Execution


value result
TEST=ON (disable) enables output. (Then, specifying
ON (disable) when TEST=OFF (enable) disables * Starting word device (command result address)

output.) Execution result


- Output is enabled or disabled based on the status • 0: Success
(level) of TEST immediately after the controller is • 22: Some unnecessary parameter is included.
turned on, reset, or the program is changed. For
example, inputting "OE,1" (enable) when TEST is ON Real-time performance
(disable) enables output. (Then, when the program is It stops the taking of statistics and is executed
changed later, output is disabled when TEST=ON immediately.
(disable).)

6-30 CV-X UM_A


Details of communication control commands

TS: Save statistical data Execution result


• 0: Success
This command selects the type of statistical data file to be
• 22:
saved to the SD card.
- The number of parameters or the range of the
• The measured values files and the statistics files create
parameter is incorrect.
their own CSV files respectively.
- The file type is invalid.
• The naming rule of the file which will store the data
- The folder name is invalid.
conforms to the file naming rules of statistics for both of
- The number of specified characters is 0 or
measured values files and the statistics files.
exceeds the maximum number.
• If a folder for saving the data does not exist, a new folder
- An invalid character is included (0x7F, 0x80,
will be created.
0xA0, 0xFD and up, '*', '?', '"', '<', '>', '|',)
• If the file for saving the data already exists, it will be
- A single-byte period or space exists at the
overwritten (regardless of read-only or other file
beginning or ending of the folder name.
attributes).
• 03:
• Once the data is saved, it will not be output any more

Control/data output via commands


- The saving failed.
(including data saved from the statistics menu).
- The SD card is not inserted.
• For the number-specified commands, the outputting
- The saving destination folder or file cannot be
folder name is fixed to "cv-x/start" of SD card 2.
created.
For non-procedural commands - The saving destination file cannot be opened.
• Send - The SD card capacity is full.
- There is no target of statistical measurement set.
TS,n,ssss
• Receive
TS

For number-specified commands


The number-specified command No. is "65".
• Send
Word
*+1
*+2
*+3

*
device
65 n
* Starting word device (command address)

• Receive
Word
*
device
Return Execution
value result
* Starting word device (command result address)

Parameters
• n: File type for saving
- 0: Measured values file (a save file using the list of
measured values)
- 1: Statistics files (a save file using process
monitor)
• ssss: Output destination folder name (a string with a
maximum of 221 characters, a double-byte
character is counted as two single-byte characters)

Real-time performance
This does not affect the measurement processing
time.

CV-X UM_A 6-31


Details of communication control commands

HC: Clear archived image HS: Save archived image


This command clears the archived images. This command saves the archived image to the SD card or
USB HDD.
For non-procedural commands • If a folder for saving the data does not exist, a new folder
• Send will be created.
• The folder for saving the data is "cv-x/hist/Program No./
HC
YYMMDD_HHMMSS/CAMn (camera No.)" in the SD
• Receive card 2 or USB HDD.
• If the file for saving the data already exists, it will be
HC
overwritten (regardless of read-only or other file
For number-specified commands attributes).
• Even when the error 03 occurs during the process, the
The number-specified command No. is "66".
command tries to save all archived images to avoid
• Send
interruption of the process.
Word • All specified archives are saved regardless of whether
*
device they are already saved or not.
Control/data output via commands

66 • If there is no archived image for saving, the error 03 is


returned.
* Starting word device (command address)
• Each type of LumiTrax archived image is
• Receive Reference
saved in the same way as archived images.
The LumiTrax images that are saved differ
Word
* depending on the LumiTrax image settings
device and target LumiTrax image to archive set.
Return Execution • Each type of MultiSpectrum archived image is
value result saved in the same way as archived images.
The MultiSpectrum images that are saved
* Starting word device (command result address) differ depending on the MultiSpectrum image
settings and target MultiSpectrum image to
Execution result archive set.
• 0: Success • Each type of 3D Capture archived image is
saved in the same way as archived images.
• 22: Some unnecessary parameter is included.
• Each type of Outline Capture archived image
is saved in the same way as archived images.
Real-time performance The Outline Capture images that are saved
This does not affect the measurement processing differ depending on the Outline Capture image
time. settings and target Outline Capture image to
archive set.

For non-procedural commands


• Send
HS,n,m,h,c
HS,n,m,h,c,d
• Receive
HS
• Parameter
- n: Compression type (0: No compression (BMP),
1:1/2, 2:1/4, 3:1/8, 9:JPEG, 10:PNG)
- m: Type of the archived image (if the image
archive condition is total status NG, the buffer of 1
is read even when 0 is specified.)
0 (Latest Archive)
1 (Total NG Archive)
- h: Measurement Count
AL (all measurements),
NW (latest measurement)
integer value (measurement count)
- c: Camera No.
AL: all cameras
1 to 4: Camera No.
- d: Device
0: SD Card
1: USB HDD
6-32 CV-X UM_A
Details of communication control commands

For number-specified commands BC: Image capture


The number-specified command No. is "67".
This command captures an image of the screen and saves
• Send
it to the SD card, FTP, or VisionDataStorage(USB).
Word The file name used when saving follows the setting set in

*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9
*
device
"Image Capture" of the global setting (Page 5-30).
67 n m h c
* Starting word device (command address) For non-procedural commands
• Send
• Receive
BC
Word
* BC, n
device
Return Execution • Receive
value result
BC
* Starting word device (command result address)
For number-specified commands

Control/data output via commands


• Parameter
The number-specified command No. is "68".
- n: Compression type (0: No compression (BMP),
• Send
1:1/2, 2:1/4, 3:1/8, 9:JPEG, 10:PNG)
- m: Type of the archived image Word

*+1
*+2
*+3
*
0 (Latest Archive) device
1 (Total NG Archive) 68 n
- h: Measurement Count (binary of 2 words in little * Starting word device (command address)
endian) • Receive
1 to 1000000000: measurement count
Word
0: latest measurement (NW) *
device
-1: all measurements (AL)
Return Execution
- c: Camera No.
value result
0: AL (all cameras)
* Starting word device (command result address)
1 to 4: Camera No.
- d: Device Parameters (common)
0: SD Card • n: Output destination
1: USB HDD - None: SD2
Execution result - 0: SD2
• 0: Success - 1: FTP
• 22: The number of parameters or the range of the - 2: VisionDataStorage(USB)
parameter is incorrect. Execution result
• 03: • 0: Success
- Data saving failed at least once (per image). • 22: Some unnecessary parameter is included.
- The SD card/USB HDD is not inserted. • 03:
- The saving destination folder or file cannot be - The SD card is not writable.
created. - The SD card is not found.
- The saving destination file cannot be opened. - FTP output, or VisionDataStorage(USB) output
- The SD card/USB HDD capacity is full. failed.
- When the following parameter settings and results
exist. Real-time performance
When NW or an integer value is specified for This does not affect the measurement processing
Measurement Count and the archived image with time.
the specified measurement count does not exist.
When AL is specified and no archived images
exist.
When AL is specified and the image archived at
the time of receiving the command is not available
for output (overwritten).

Real-time performance
This does not affect the measurement processing
time.

CV-X UM_A 6-33


Details of communication control commands

OW: Change output file/folder STW: Change Externally Specified String


This command changes the output file/folder. Changes the content of the externally specified string.
• When changing a data output file, a new result file is
For non-procedural commands
created using the latest date and time.
• Send
• When changing an image output folder, a new image
STW,n,"ssss
output folder is created using the latest date and time.

For non-procedural commands • Receive


• Send STW

OW,n • Parameters
• Receive - n: Specify the Externally Specified String to be
changed (0 to 9)
OW
- "ssss: Changing string (number of characters 0 to 64)
For number-specified commands
For number-specified commands
Control/data output via commands

The number-specified command No. is "69".


The number-specified command No. is "70".
• Send
• Send
Word Word
*+1
*+2
*+3

*+1
*+2
*+3
*+4
*+5
*+6
*+7
* * ...
device device
69 n 70 n s1 s2 ...
* Starting word device (command address) * Starting word device (command address)

• Receive • Receive

Word Word
*
* device
device
Return Execution
Return Execution value result
value result
* Starting word device (command result address)
* Starting word device (command result address)
• Parameters
Parameters (common) - n: Specify the Externally Specified String to be
• n: Select the target for changing changed (0 to 9)
- 0: Changes the SD2/FTP/VisionDataStorage(USB)/ - "ssss: Changing string (number of characters 0 to 64)
USB HDD result output file Two words per character are used, and the
- 1: Changes the SD2/FTP/VisionDataStorage(USB)/ termination code is 0 (zero)
USB HDD/PC Program image output folder
Execution result
Execution result • 0: Success
• 0: Success • 03: When the Externally Specified String cannot be
• 22: The number of parameters or the range of the utilized (in the case of old version of program setting
parameter is incorrect. etc.)
• 22:
Real-time performance
- Some unnecessary parameter is included.
This command is instantly executed.
- The range of the parameter is incorrect.

Real-time performance
This command is instantly executed.

Point Only ASCII characters can be specified if SFTP


transfer (Page 5-11) is enabled for FTP and the
externally specified string being referred to by the
file naming conventions for the image output is
rewritten with this command.

6-34 CV-X UM_A


Details of communication control commands

STR: Read Externally Specified String EC: Echo


Reads the content of the externally specified string. This command returns the same character string as the
one that was sent from the external device.
For non-procedural commands
• Send Reference The number-specified commands cannot be used.
STR,n
For non-procedural commands
• Receive • Send
STR.ssss EC,ssss
• Parameters • Receive
- n: Specify the Externally Specified String to be
EC,ssss
read (0 to 9)
- ssss: Read string (number of characters 0 to 64) Parameter
• ssss: variable-length string, Character string of 128

Control/data output via commands


For number-specified commands characters or less (alphabet and numbers only,
The number-specified command No. is "71". Control codes and terminators are not included.)
• Send
Word Execution result
*+1
*+2
*+3

*
device • 0: Success
71 n • 22
* Starting word device (command address) - The characters in the parameter exceed 128
• Receive characters.
Word
- The character string of the parameter includes a
*+1
*+2
*+3
*+4
*+5
*+6
*+7

* ...
device character other than those specified above.
Return Execution s1 s2 s3 ... - The number of parameters is incorrect.
value result
* Starting word device (command result address) Real-time performance
• Parameters This does not affect the measurement processing
- n: Specify the Externally Specified String to be time.
read (0 to 9)
- ssss: Read string (number of characters 0 to 64)
Two words per character are used, and the
termination code is 0 (zero)

Execution result
• 0: Success
• 03: When the Externally Specified String cannot be
utilized (in the case of old version of program setting
etc.)
• 22:
- Some unnecessary parameter is included.
- The range of the parameter is incorrect.

Real-time performance
This command is instantly executed.

CV-X UM_A 6-35


Details of communication control commands

TR : Read date/time
System
This command reads the current date and time on the
TW: Write Date/Time controller.

This command sets the date and time of the controller. For non-procedural commands
• Send
For non-procedural commands
• Send TR
• Receive
TW,yy,mo,dd,hh,mi,ss
TW,yyyy,mo,dd,hh,mi,ss TR,yy,mo,dd,hh,mi,ss

• Receive For number-specified commands


TW The number-specified command No. is "81".
• Send
For number-specified commands
Word
Control/data output via commands

The number-specified command No. is "80". *


device
• Send
81
Word
*+12
*+13
*+10
*+11
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9

* * Starting word device (command address)


device
80 yy mo dd hh mi ss • Receive
Word

*+12
*+13
*+10
*+11
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9
Word *
*+12
*+13
*+10
*+11
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9

* device
device
Return Execution
80 yyyy mo dd hh mi ss yy mo dd hh mi ss
value result
* Starting word device (command address)
* Starting word device (command result address)
• Receive
Parameters (common)
Word
* • yy: Year (0 to 99, lower two digits of the western
device
calendar (05 for 2005))
Return Execution
• mo: Month (1 to 12)
value result
• dd: Day (1 to 31)
* Starting word device (command result address)
• hh: Hour (0 to 23, 24-hour format)
Parameters (common) • mi: Minutes (0 to 59)
• yy: Year (0 to 99, lower two digits of the western • ss: Seconds (0 to 59)
calendar (05 for 2005)). When 00 to 99 is specified,
Execution result
2000 will be added to the value before processing.
• 0: Success
• yyyy: Year (2000 to 2099)
• 22: Some unnecessary parameter is included.
• mo: Month (1 to 12)
• dd: Day (1 to 31) Real-time performance
• hh: Hour (0 to 23, 24-hour format) This does not affect the measurement processing
• mi: Minutes (0 to 59) time.
• ss: Seconds (0 to 59)

Execution result
• 0: Success
• 22: The number of parameters or the range of the
parameter is incorrect.
• 03: The date/time setting failed.

Real-time performance
This does not affect the measurement processing
time.

6-36 CV-X UM_A


Details of communication control commands

VI: Version information readout Execution result


• 0: Success
This command returns the system information (model,
• 22: Some unnecessary parameter is included.
ROM version) of the controller.
Real-time performance
For non-procedural commands
This does not affect the measurement processing
• Send
time.
VI
The output format (number of characters, whether to
Reference
• Receive use signs) for non-procedural output is shown
below.
VI,nnnn,vvvv
• Parameter Item Number of Sign Remarks
- nnnn: The system's model (Character string digits
representing the model) Model Value 3 Unsigned
- vvvv: The ROM version (Character string of 14 Package 1 Unsigned For PLC

Control/data output via commands


characters, four-digit number showing the first number information output
of the major version.four-digit number showing the ROM The first 4 Unsigned
second number of the major version.four-digit number version number of the
major version
showing the minor version)
The second 4 Unsigned
For number-specified commands number of the
The number-specified command No. is "82". major version
• Send Minor version 4 Unsigned

Word
*
device
82
* Starting word device (command address)

• Receive
Word
*+10
*+11
*+1
*+2
*+3
*+4
*+5
*+6
*+7
*+8
*+9

*
device
Return Execution
nnn g hw mj mn
value result
* Starting word device (command result address)

• Parameter
- nnn: The numbers of the model. (numerical
values)
- g: Package (F=0, M=1, A=2, R=3, E=4, LJ=5)
- hw: The first number of the major version in the
ROM version information
- mj: The second number of the major version in the
ROM version information
- mn: Minor version included in the ROM version
information
- Example: The model is "CV-X172F", the ROM
version is "2.0.0001", and the command result
address is set as 200.
DM202-203 172
DM204-205 0
DM206-207 2
DM208-209 0
DM210-211 1

CV-X UM_A 6-37


Details of communication control commands

TZW: Write Time Zone TZR: Read Time Zone


This command sets the SNTP time zone. This command reads out the SNTP time zone setting.

For non-procedural commands For non-procedural commands


• Send • Send
TZW,n TZR

• Receive • Receive
TZW TZR,n

For number-specified commands For number-specified commands


The number-specified command No. is "83". The number-specified command No. is "84".
• Send • Send
Word Word
*+1
*+2
*+3
*+4

*+1
* *
device device
Control/data output via commands

83 n 84
* Starting word device (command address) * Starting word device (command address)

• Receive • Receive
Word Word

*+1
*+2
*+3
*+4
*+1

* *
device device
Return Execution Return Execution n
value result value result
* Starting word device (command result address) * Starting word device (command result address)

Parameters (common) Parameters (common)


• n: Time zone (0 to 33) (Page 5-20) • n: Time zone (0 to 33) (Page 5-20)
Execution result Execution result
• 0: Success • 0: Success
• 22: • 22: Some unnecessary parameter is included.
- Some unnecessary parameter is included.
- The number of parameters or the range of the Real-time performance
parameter is incorrect. This does not affect the measurement processing
time.
Real-time performance
This does not affect the measurement processing
time.

6-38 CV-X UM_A


Details of communication control commands

DSW: Change External Input String


VisionDatabase
Change the External Input String available to export to
DDF: Delete the output image VisionDatabase to the specified string ssss.

The images output via the VisionDatabase function are For non-procedural commands
deleted in accordance with the VisionDatabase settings. • Send
This command is only received and then a response is DSW,n,ssss
returned.
• Receive
Delete processing is implemented separately after the
command is received. DSW

• Parameter
For non-procedural commands
- n: Specifies the External Input String to change
• Send
0: External Input String 1
DDF
1: External Input String 2

Control/data output via commands


• Receive - ssss: Changing string (Number of characters 0 -
DDF 200)

For number-specified commands For number-specified commands


The number-specified command No. is "96". The number-specified command No. is "97".
• Send • Send

Word Word

*+1
*+2
*+3
*+4
*+5
*+6
*+7
* * ···
device device
96 97 n s1 s2 ···

* Starting word device (command address) * Starting word device (command address)

• Receive • Receive

Word Word
* *
device device
Return Execution Return Execution
value result value result

* Starting word device (command result address) * Starting word device (command result address)
• Parameter
Execution result - n: Specifies the External Input String to change
• 0: Success 0: External Input String 1
• 03: 1: External Input String 2
- The command was received during deletion - ssss: Changing string (Number of characters 0 - 200)
processing.
(2 words are used per character. Terminator is 0 (zero).)
- If the VisionDatabase output function has not been
added to the controller Execution result
• 22: Some unnecessary parameter is included. • 0: Success
• 03: If the VisionDatabase output function has not
Real-time performance
been added to the controller
This does not affect the measurement processing
• 22:
time.
- Some unnecessary parameter is included.
- A character that cannot be used has been
specified.
- The number of parameters is incorrect.

Real-time performance
This does not affect the measurement processing
time.

CV-X UM_A 6-39


Details of communication control commands

DSR: Read External Input String


Read the External Input String that will be exported to
VisionDatabase.

For non-procedural commands


• Send
DSR,n
• Receive
DSR,ssss

• Parameter
- n: Specifies the External Input String to read
0: External Input String 1
1: External Input String 2
Control/data output via commands

- ssss: Read string (Number of characters 0 - 200)

For number-specified commands


The number-specified command No. is "98".
• Send
Word
*+1
*+2
*+3

*
device
98 n
* Starting word device (command address)

• Receive
Word
*+1
*+2
*+3
*+4
*+5
*+6
*+7

* ···
device
Return Execution ···
s1 s2 s3
value result
* Starting word device (command result address)
• Parameter
- n: Specifies the External Input String to read
0: External Input String 1
1: External Input String 2
- ssss: Read string (Number of characters 0 - 200)
(2 words are used per character. Terminator is 0 (zero).)

Execution result
• 0: Success
• 03: If the VisionDatabase output function has not
been added to the controller
• 22:
- Some unnecessary parameter is included.
- A character that cannot be used has been
specified.
- The number of parameters is incorrect.

Real-time performance
This does not affect the measurement processing
time.

6-40 CV-X UM_A


Control/data output via
the PLC-Link

Control/data output
via commands

Control/data output
q
via the PLC-Link

Control/data output

Control/data output via the PLC-Link


via I/O terminals

Control and data output


by EtherNet/IP

Control and data output


by PROFINET

Control and data output


by EtherCAT

CV-X UM_A 6-41


Overview of the PLC-Link function

Overview of the PLC-Link function

Using the PLC-Link with the RS-232C or Ethernet interface


enables the following operations. Example of the PLC-Link usage
• Data output using the PLC-Link: Allows measurement
data in the controller to be output directly to the DM Example 1: Data output
(data memory) of the PLC. Outputting the measurement results 1 to 3 to KV-7000
• Operation of the controller using the PLC-Link: Allows series.
the operation of the controller via the PLC-Link by
reading of the commands stored in the DM of the PLC. Controller PLC
• DM (data memory) is referred to as data Measurement result 1 DM0000-DM0001 (32bit)
Reference
Control/data output via the PLC-Link

register (D) for the Mitsubishi Electric PLC, as 1111.111 1111111


Measurement result 2 DM0002-DM0003 (32bit)
data memory (D) for the Omron PLC, and as
2222.222 Write data 2222222
data register (M) for the YASKAWA Electric
Measurement result 3 DM0004-DM0005 (32bit)
PLC.
3333.333 3333333
• PLC-Link cannot be used at the same time as
(Notation when Fixed-point option is chosen for Decimal Point)
EtherNet/IP, PROFINET, or EtherCAT.
• The measurement results in the controller are saved to
the specified DM of the PLC for each trigger.
• 2 DMs (32bits) are used for 1 measurement result.

Example 2: Command control (number-specified)

Changing the date and time setting on the controller


using 80 "TW command"

Controller PLC
DM100 80 Instruction No.
DM101
DM102 12 Year
DM103
Date & Time of Command DM104 2 Month
import DM105
the controller is
changed to DM106 12 Day
Command
2012/02/12 DM107
execution
03:27:10. DM108 3 Time
DM109
DM110 27 Minute
DM111
DM112 10 Second
DM113

• The controller reads the command No. and required


parameters previously stored in the DM of the PLC using
the terminal input or polling to execute the command.
• The assigned command No. uses 16 bits and command
parameters use 32 bits (little endian) in binary when
saved to the DM.

6-42 CV-X UM_A


Types of compatible PLC-Link connections

Types of compatible PLC-Link connections

The following PLCs are compatible with the PLC-Link connection.

• The range of data memories differ depending on the system. For more details, refer to the manual for each PLC.
Reference
• Except for some PLCs, only connections via a link unit are supported.

Via RS-232C interface

Keyence Corporation
Series name PLC Controller Link unit PLC operation mode PLC type

Control/data output via the PLC-Link


KV KV-700 KV-L20 KV BUILDER mode KV-L20 Series
KV-1000 KV-L20R KV STUDIO mode KV-L20 Series
KV-3000, KV-5000, KV-5500 KV-L20V, KV-L21V KV STUDIO mode KV-L20 Series
KV-7300, KV-7500, KV-8000 KV-L20V, KV-L21V, KV-XL202 KV STUDIO mode KV-L20 Series
KV Nano KV-N10L, KV-NC10L, KV-NC20L KV STUDIO mode KV-L20 Series

Mitsubishi Electric Corporation


Series name PLC Controller Link unit PLC operation mode PLC type
MELSEC-AnS A1S, A1SH, A1SJ, A1SJH1, A2S, A2SH, A1SJ71 (U) C24-R2, Exclusive protocol format 1 MELSEC AnN Series
A171S, A171SH A1SJ71 (U) C24-PRF
A1CPUC24-R2 Calculator link port Exclusive protocol format 1 MELSEC AnN Series
A2US, A2USH A1SJ71 (U) C24-R2, Exclusive protocol format 1 MELSEC AnN Series
A1SJ71 (U) C24-PRF
MELSEC-A0J2 A0J2, A0J2H A0J2-C214-S1 Exclusive protocol format 1 MELSEC AnN Series
MELSEC-AnN A1N, A2N, A3N AJ71C24, AJ71C24-S3, AJ71C24-S6, Exclusive protocol format 1 MELSEC AnN Series
AJ71C24-S8, AJ71UC24
MELSEC-AnA A2A, A3A AJ71C24-S6, AJ71C24-S8, Exclusive protocol format 1 MELSEC AnN Series
AJ71UC24
MELSEC-AnU A2U, A3U, A4U AJ71C24-S6, AJ71C24-S8, Exclusive protocol format 1 MELSEC AnN Series
AJ71UC24
MELSEC-QnA Q2A, Q2A-S1, Q3A, Q4A AJ71QC24 (N), AJ71QC24 (N) R2 Exclusive protocol format 5 MELSEC AnN Series
AJ71QC24 (N) R4
Q2AS, Q2AS-S1, Q2ASH, Q2ASH-S1 A1SJ71QC24, A1SJ71QC24-R2 Exclusive protocol format 5 MELSEC AnN Series
MELSEC-Q Q00CPU, Q01CPU QJ71C24, QJ71C24 (N)-R2 MC protocol format 5 MELSEC Q/L Series
Q02CPU, Q02HCPU, Q02UCPU, QJ71C24, QJ71C24 (N)-R2 MC protocol format 5 MELSEC Q/L Series
Q03UDECPU, Q04UDEHCPU, Q06UDEHCPU,
Q10UDEHCPU, Q13UDEHCPU,
Q20UDEHCPU, Q26UDEHCPU, Q06HCPU,
Q12HCPU, Q25HCPU, Q02UCPU,
Q03UDVCPU, Q04UDVCPU, Q06UDVCPU,
Q13UDVCPU, Q26UDVCPU
Q02CPU-A, Q02HCPU-A, Q06HCPU-A A1SJ71 (U) C24-R2 Exclusive protocol format 1 MELSEC AnN Series
A1SJ71 (U) C24-PRF
MELSEC-L L02CPU, L26CPU-BT LJ71C24, LJ71C24-R2 MC protocol format 5 MELSEC Q/L Series
MELSEC iQ-R R04CPU RJ71C24 MC protocol format 5 MELSEC Q/L Series
MELSEC iQ-F FX5U None* MC protocol format 5 MELSEC Q/L Series
MELSEC-FX FX1S FX1N-232-BD, FX2NC-232ADP Exclusive protocol MELSEC FX Series
communication
FX3G FX3G-232-BD, FX3U-232ADP Exclusive protocol MELSEC FX Series
communication
FX3U, FX3UC FX3U-232-BD, FX3U-232ADP Exclusive protocol MELSEC FX Series
communication
* Connection via link unit is not supported.

CV-X UM_A 6-43


Types of compatible PLC-Link connections

Omron Corporation

Series name PLC Controller Link unit PLC operation mode PLC type
SYSMAC SPM1 SRM1-C01 CPM1-C1F01 Upper link (SYSWAY) SYSMAC C Series
SRM1-C02
SYSMAC CPM1 CPM1 CPM1-C1F01 Upper link (SYSWAY) SYSMAC C Series
SYSMAC CPM1A CPM1A
SYSMAC CPM2A CPM2A-30CD**, CPM2A-40CD**, CPM1-C1F01 Upper link (SYSWAY) SYSMAC C Series
CPM2A-60CD**
SYSMAC CPM2C CPM2C-10CD**, CPM2C-20CD** CPM1-C1F01 Upper link (SYSWAY) SYSMAC C Series
CPM2C-C1F01
SYSMAC CQM1H CQM1H-CPU11*, CQM1H-CPU21*, CPM1-C1F01 Upper link (SYSWAY) SYSMAC C Series
CQM1H-CPU51/61 CQM1H-SCB41
SYSMAC C C120, C120F C120-LK201-V1 Upper link (SYSWAY) SYSMAC C Series
C200H C200H-LK201 (-V1) Upper link (SYSWAY) SYSMAC C Series
C200HS-CPU01, C200HS-CPU03,C200HS-CPU21/23, C200H-LK201 (-V1) Upper link (SYSWAY) SYSMAC C Series
Control/data output via the PLC-Link

C200HS-CPU31/33
C500, C500F, C1000H, C1000HF, C2000, C2000H C120-LK201-V1 Upper link (SYSWAY) SYSMAC C Series
C500-LK201-V1
C500-LK203
SYSMAC α C200HE-CPU11, C200HE-CPU32, C200HE-CPU42 C200H-LK201 (-V1) Upper link (SYSWAY) SYSMAC C Series
C200HG-CPU33, C200HG-CPU43, C200HG-CPU53, C200H-LK201 (-V1) Upper link (SYSWAY) SYSMAC C Series
C200HG-CPU63
C200HX-CPU34, C200HX-CPU44, C200HX-CPU54, C200H-LK201 (-V1) Upper link (SYSWAY) SYSMAC C Series
C200HX-CPU64, C200HX-CPU65-Z, C200HX-CPU85-Z
SYSMAC CJ CJ1M-CPU11-ETN, CJ1M-CPU12, CJ1M-CPU12-ETN, CJ1W-SCU21 (-V1), Upper link (SYSWAY) SYSMAC CJ/CS1/CP1
CJ1M-CPU13, CJ1M-CPU13-ETN, CJ1M-CPU22, CJ1W-SCU22, Series
CJ1M-CPU23, CJ1G-CPU44, CJ1G-CPU45, CJ1W-SCU41
CJ1G-CPU42H, CJ1G-CPU43H, CJ1G-CPU44H,
CJ1G-CPU45H, CJ1H-CPU64H-R, CJ1H-CPU65H,
CJ1H-CPU65H-R, CJ1H-CPU66H, CJ1H-CPU66H-R,
CJ1H-CPU67H, CJ1H-CPU67H-R, CJ2M-CPU11,
CJ2M-CPU12, CJ2M-CPU13, CJ2M-CPU14,
CJ2M-CPU15, CJ2M-CPU31, CJ2M-CPU32,
CJ2M-CPU33, CJ2M-CPU34, CJ2M-CPU35,
CJ2H-CPU64-EIP, CJ2H-CPU65-EIP, CJ2H-CPU66-EIP,
CJ2H-CPU67-EIP, CJ2H-CPU68-EIP
SYSMAC CS1 CS1G-CPU42 (H), CS1G-CPU43 (H), CS1G-CPU44 (H), CS1W-SCU21 (-V1) Upper link (SYSWAY) SYSMAC CJ/CS1/CP1
CS1G-CPU45 (H), CS1H-CPU63 (H), CS1H-CPU64 (H), Series
CS1H-CPU65 (H), CS1H-CPU66 (H), CS1H-CPU67 (H)
SYSMAC CP1 CP1H-Y20DT-D, CP1H-XA40D*-*, CP1H-X40D*-*, CP1W-CIF01 Upper link (SYSWAY) SYSMAC CJ/CS1/CP1
CP1L-M60D*-*, CP1L-M40D*-*, CP1L-M30D*-*, Series
CP1L-L20D*-*, CP1L-L14D*-*, CP1E-NA20D*-*,
CP1E-N60D*-*, CP1E-N40D*-*, CP1E-N30D*-*
* The CQM1H-SCB41 link unit cannot be used.

YASKAWA Electric Corporation

Series name PLC Controller Link unit PLC operation mode PLC type
MP2000 MP2200, MP2300, 217IF-01, 218IF-01 MEMOBUS YASKAWA MP Series
MP2310, MP2300S 218IF-02
MP900 MP920*, MP930* 217IF** MEMOBUS YASKAWA MP Series
* Also compatible with the built-in RS-232C interface on the system.
** Cannot be connected to MP930.

6-44 CV-X UM_A


Types of compatible PLC-Link connections

Via Ethernet interface

Keyence Corporation

Series name PLC Controller Link unit PLC type


KV KV-700, KV-1000 KV-LE20, KV-LE20A KV Series
KV-3000, KV-5000*, KV-5500* KV-LE20V, KV-LE21V, KV Series
KV-EP21V**
KV-7300, KV-7500*, KV-8000* KV-LE20V, KV-LE21V, KV Series
KV-EP21V, KV-XLE0.2
KV Nano KV-NC1EP KV Series
* Also compatible with the built-in Ethernet interface on the system.
** Only CPU version 2 or later can be used for KV-3000, KV-5000 and KV-5500.

Control/data output via the PLC-Link


Mitsubishi Electric Corporation

Series name PLC Controller Link unit PLC type


MELSEC-Q Q00CPU, Q01CPU, Q02CPU, Q02HCPU, Q02UCPU, Q03UDECPU*, QJ71E71 MELSEC Q/L Series
Q04UDEHCPU*, Q06UDEHCPU*, Q10UDEHCPU*, Q13UDEHCPU*, QJ71E71-100
Q20UDEHCPU*, Q26UDEHCPU*, Q06HCPU, Q12HCPU, Q25HCPU,
Q03UDVCPU*, Q04UDVCPU*, Q06UDVCPU*, Q13UDVCPU*,
Q26UDVCPU*
MELSEC-L L02CPU*, L26CPU-BT* None MELSEC Q/L Series
MELSEC iQ-R R04CPU* RJ71EN71 MELSEC Q/L Series
MELSEC iQ-F FX5U*/FX5UC* None** MELSEC Q/L Series
* Also compatible with the built-in Ethernet interface on the system.
** Connection via link unit is not supported.

Omron Corporation

Series name PLC Controller Link unit PLC type


SYSMAC CJ CJ1M-CPU11-ETN*, CJ1M-CPU12, CJ1M-CPU12-ETN*, CJ1W-ETN11, SYSMAC CJ/CS1/CP1 Series
CJ1M-CPU13, CJ1M-CPU13-ETN*, CJ1M-CPU22, CJ1M-CPU23, CJ1W-ETN21
CJ1G-CPU44, CJ1G-CPU45, CJ1G-CPU42H, CJ1G-CPU43H,
CJ1G-CPU44H, CJ1G-CPU45H, CJ1H-CPU64H-R,
CJ1H-CPU65H, CJ1H-CPU65H-R, CJ1H-CPU66H,
CJ1H-CPU66H-R, CJ1H-CPU67H, CJ1H-CPU67H-R,
CJ2M-CPU11, CJ2M-CPU12, CJ2M-CPU13, CJ2M-CPU14,
CJ2M-CPU15, CJ2M-CPU31*, CJ2M-CPU32*, CJ2M-CPU33*, CJ2M-
CPU34*, CJ2M-CPU35*, CJ2H-CPU64-EIP*,
CJ2H-CPU65-EIP*, CJ2H-CPU66-EIP*, CJ2H-CPU67-EIP*,
CJ2H-CPU68-EIP*
SYSMAC CS1 CS1G-CPU42 (H), CS1G-CPU43 (H), CS1G-CPU44 (H), CS1W-ETN11, SYSMAC CJ/CS1/CP1 Series
CS1G-CPU45 (H), CS1H-CPU63 (H), CS1H-CPU64 (H), CS1W-ETN21
CS1H-CPU65 (H), CS1H-CPU66 (H), CS1H-CPU67 (H)
SYSMAC CP1 CP1H-Y20DT-D, CP1H-XA40D*-*, CP1H-X40D*-* CP1W-CIF41, SYSMAC CJ/CS1/CP1 Series
CJ1W-ETN21**
CP1L-M60D*-*, CP1L-M40D*-*, CP1L-M30D*-*, CP1W-CIF41 SYSMAC CJ/CS1/CP1 Series
CP1L-L20D*-*, CP1L-L14D*-*, CP1E-NA20D*-*,
CP1E-N60D*-*, CP1E-N40D*-*, CP1E-N30D*-*
* Also compatible with the built-in Ethernet interface on the system.
** CJ unit adapter CP1W-EXT01 is required.

YASKAWA Electric Corporation

Series name PLC Controller Link unit PLC type


MP2000 MP2200, MP2300, MP2310*, MP2300S*, MP2400* 218IF-01, 218IF-02 YASKAWA MP Series
* Also compatible with the built-in Ethernet interface on the system.

CV-X UM_A 6-45


Connecting to the PLC-Link/setting the link unit

Connecting to the PLC-Link/setting the link unit

1. Wiring overview
The PLC is wired to the controller in the following way.

PLC Controller

PLC
(CPU internal port RS-232C
or or
Link unit) Ethernet
Control/data output via the PLC-Link

Terminal block
I/O unit
(PLC)

• When the controller is not receiving commands from the PLC or when it is polling, the PLC does not need to be connected to
Reference
the terminal block (PLC).
• Since the controller complies with the modem definition, when connecting the controller to a device that complies with the
terminal definition via RS-232C, connect the SD signal of the controller to the SD signal of the device and the RD signal of the
controller to the RD signal of the device.

2. Wiring for the PLC-Link and setting the link unit (RS-232C)

When connecting to a Keyence KV-XL202


• Process the connector for the KV side of OP-26487 (2.5m straight cable) into loose wires, and connect directly to the
terminal block on the KV-XL202 as shown below.
• Set the link unit operation mode to [KV-STUDIO mode].

CV-X series KV-XL202


(RJ-11 modular jack) (7-pin Terminal block)

5.RD 1.SD
3.SD 2.RD
1.CS 5.ER
6.RS 6.DR
3.RS
4.CS
4.SG 7.SG

When connecting to a Keyence KV Series PLC (other than KV-XL202)


• Use OP-26486 (D-sub 9-pin female connector) and OP-26487 (2.5m straight cable).
• Set the link unit operation mode to [KV-Builder mode] (for the KV-700) or [KV-STUDIO mode] (for the KV-Nano, KV-1000/
3000/5000/5500/7300/7500/8000).
CV-X series PC/KV-L20 Series
(RJ-11 modular jack) (9-pin)

5.RD 3.SD
3.SD 2.RD
1.CS 4.ER
6.RS 6.DR
7.RS
2.NC 8.CS
4.SG 5.SG
1.CD
9.RI

6-46 CV-X UM_A


Connecting to the PLC-Link/setting the link unit

When connecting to an Omron SYSMAC PLC

Reference When connecting to a SYSMAC C, adapt the wiring described here to the pins on the actual connectors used for the connection.

• Use OP-84384 (D-sub 9-pin male connector) and OP-26487 (2.5 m straight cable) for the SYSMAC (9-pin).
• Set the link unit operation mode to "upper link (SYSWAY)".
• Set the 1:1 or 1:N process to "1:N process".
• Set the unit number to "No. 0".
• Set the CS control to "None".
• When enabling settings using CX-Programmer 6.0 or later, make sure to set the [Optional settings on/off] item to [On].
When set to "Off", changes to other settings will not be enabled.

For 9-pin For 25-pin

CV-X series SYSMAC CV-X series SYSMAC

Control/data output via the PLC-Link


(RJ-11 modular jack) (9-pin) (RJ-11 modular jack) (25-pin)

5.RD 2.SD 5.RD 2.SD


3.SD 3.RD 3.SD 3.RD
1.CS 4.RS 1.CS 4.RS
6.RS 5.CS 6.RS 5.CS
8.ER
7.DR
4.SG 9.SG 4.SG 7.SG
6.+5V

Point • If OP-26486 and OP-26487 are used as is to connect to a SYSMAC (9-pin), it may cause damage to the controller or the
connected device. Do not use this connector.
• In the CV-X400/X300/X100 Series, the controller's signal GND and power GND are insulated.
• In the CV-X200 Series, the controller's signal GND and power GND are common. Take care to avoid voltage discrepancies
between this unit and the destination signal GND as it may cause damage to the controller or the connected device.

Connecting to a MELSEC AnN, Q/L/iQ-R/iQ-F Series PLC


• For the MELSEC AnN, Q/L/iQ-R series,use OP-86930 (D-sub 9-pin male connector) and OP-26487 (2.5 m straight cable).
• For the MELSEC iQ-F series, use the OP-26486 (D-sub 9-pin female connector) and the OP-26487 (2.5 m straight cable).
• Set the operation mode for the link unit to [MC protocol format 5] (for the Q/L/iQ-R/iQ-F Series) or [exclusive protocol
format 1] (for the A Series).
• When using the Q series and the iQ-R series, set [Authorize writing during RUN] to [Authorize].
• Set the checksum setting to [On].

• When connected to the A Series, "RS-232C CD terminal unchecked" must be defined in the ladder. Refer to the manual for the
Reference
Mitsubishi Electric computing link unit for more details.
• It is necessary to convert to a D-sub 9 pin male connector when using the OP-26486 (D-sub 9 pin female connector)
with the MELSEC AnN, Q/L/iQ-R Series. Use a commercially available gender converter (D-sub 9 pin female to D-sub 9
pin male, straight connection).
• When using the Q Series link unit QJ71C24 (N) -R2 with the settings "Baud rate 115200 bit/s, data length 8 bits, stop bit 1, even
parity", the switch setting in the PC parameters will be "0BEE (hexadecimal)".

CV-X series MELSEC AnN,


(RJ-11 modular jack) Q/L/iQ-R/iQ-F series
(9-pin)
5.RD 3.SD
3.SD 2.RD
1.CS 4.ER
6.RS 6.DR
7.RS
2.NC 8.CS
4.SG 5.SG
1.CD

Point • In the CV-X400/X300/X100 Series, the controller's signal GND and power GND are insulated.
• In the CV-X200 Series, the controller's signal GND and power GND are common. Take care to avoid voltage discrepancies
between this unit and the destination signal GND as it may cause damage to the controller or the connected device.

CV-X UM_A 6-47


Connecting to the PLC-Link/setting the link unit

Connecting to the MELSEC FX Series (other than the FX5 Series)


• Use OP-26486 (D-sub 9-pin female connector) and OP-26487 (2.5 m straight cable).
• Assignment of the communication channels starts from the "communication function expansion board" and the
"communication special adapter" which are closer to the CPU.
• Set the link unit operation mode to [Exclusive Protocol Communication]. Set the checksum setting to [On].
• Set the H/W type to [Normal/RS-232C], the transmission control procedure to [Type 1 (without CR, CF)], the station
number to [00H].
CV-X series MELSEC FX series
(RJ-11 modular jack) (9-pin)

5.RD 3.SD
3.SD 2.RD
1.CS 4.ER
6.RS 6.DR
7.RS
2.NC 8.CS
4.SG 5.SG
1.CD
Control/data output via the PLC-Link

9.RI

Point • To connect to the MELSEC FX5 Series, refer to "Connecting to a MELSEC AnN, Q/L/iQ-R/iQ-F Series PLC".
• In the CV-X400/X300/X100 Series, the controller's signal GND and power GND are insulated.
• In the CV-X200 Series, the controller's signal GND and power GND are common. Take care to avoid voltage discrepancies
between this unit and the destination signal GND as it may cause damage to the controller or the connected device.

Connecting to a YASKAWA MP Series PLC


• Work on OP-26487 (2.5 m straight cable) and connect it to the commercially available D-sub 9 pin male connector as
shown in the figure below.
• Set the communication protocol to "MEMOBUS".
• Set Master/Slave to "Slave".
• Set the transmission mode to "RTU".
• Set the device address to "1".
• Describe the MSG-RCV processing in the ladder. (Set the automatic reception to "Specified" for a module that allows
automatic reception.) Refer to the manual for the YASKAWA Electric communication unit for more details.
CV-X series MP Series
(RJ-11 modular jack) (9-pin)

5.RD 2.SD
3.SD 3.RD
1.CS 4.RS
6.RS 5.CS
4.SG 7.SG
6.SR
9.TR
1.FG

Point • If OP-26486 and OP-26487 are connected as they are, it may result in damage to the controller and the connected device. Do
not use this connector.
• In the CV-X400/X300/X100 Series, the controller's signal GND and power GND are insulated.
• In the CV-X200 Series, the controller's signal GND and power GND are common. Take care to avoid voltage discrepancies
between this unit and the destination signal GND as it may cause damage to the controller or the connected device.

6-48 CV-X UM_A


Connecting to the PLC-Link/setting the link unit

When connecting to a Mitsubishi MELSEC link unit


3. Wiring for the PLC-Link and setting
the link unit (Ethernet) For the Q/L Series
Change settings using the network parameters in GX
• Make sure that the specified IP address is unique and
Developer or GX Works 2.
different from the IP addresses for other devices.
• [MELSECNET/Ethernet]
• For all devices on a connected network use the same
- Network type: Select [Ethernet].
subnet mask. For additional networks use a unique
- Mode: Select [Online].
different subnet mask.
• [Operation settings]
• The port number for the communication port settings,
- Communication data code setting: Select [Binary
“9010”, cannot be used because it is reserved for the
code communication].
controller.
- Initial timing setting: Select [Always OPEN].
• Use a category 5e or greater shielded twisted pair (STP)
- IP address setting: Set the IP address which is
cable for connection. When connecting the equipment
specified for the PLC-Link settings on the controller.
directly (1 to 1), use a cross cable. When connecting
- Send frame setting: Select [Ethernet (V2.0)].

Control/data output via the PLC-Link


through a hub, use a straight cable.
- Authorize writing during RUN: Select [Authorize].

When connecting to a Keyence KV Series PLC For the iQ-R Series


Set the GX Works 3 unit parameters.
Use KV BUILDER for setting.
From the [Basic Settings] > [Destination Device Connection
• IP address: Set the IP address which is specified for the
Configuration Settings] > [Advance] unit list, add [UDP
PLC-Link settings on the controller.
Connection Device] to the Ethernet configuration
• Port number (VT): Set the port number which is
and configure the following settings:
specified for the PLC-Link settings on the controller.
• Telecommunication Method: Select either [Fixed
Buffer (With Protocol)] or [Random Access Buffer].
When connecting to an Omron SYSMAC PLC • Sequencer (Port Number)/Sensor/Device (Port
Change the settings using CX-Programmer. Before starting Number): Set the PLC port number for both (setting
this setting, complete NODE No. for the PLC-Link settings range: 1025 to 4999, 5010 to 65534 (excluding 9010)).
on the controller. (Normally specify "1" for the number.) • Sensor/Device (IP Address): Specify the IP address for
• IP address: Set the IP address which is specified for the this unit.
PLC-Link settings on the controller. • Availability Check: Select [Do not check availability].
• FINS UDP port: Select [Define user], and set the • Authorize writing during RUN: Select [Authorize].
specified port number which is specified for the PLC-
Link settings on the controller.
• IP address table: Set the IP address and node address
specified in the [Ethernet] screen (Page 5-3) of the
global settings on the controller. The node address is
normally [1].
• IP router table: Set this item only when using a router. In
router address, set the IP address for the router. In IP
address, set the IP address specified in the [Ethernet]
screen (Page 5-3) of the global settings on the
controller.
Specify a NODE No. for the link unit which is
Reference
different from the NODE No. for the PLC-Link setting
on the controller.

CV-X UM_A 6-49


Connecting to the PLC-Link/setting the link unit

Connecting to a Mitsubishi MELSEC PLC with Connecting to a YASKAWA MP Series PLC


built-in Ethernet port Use MP720 for setting.
• Communication protocol: Select [Extended
Point • The built-in Ethernet port does not support Auto
open UDP port (port number default: 5000) like the MEMOBUS].
QJ71E71-100. Specify the communications port on • Master/Slave: Select [Slave].
the controller to a value from 1025 to 4999, or 5010 • Code: Select [BIN].
to 65535 (excluding 9010).
• Connection type: Select [UDP].
• Do not set more than one controller to the same port
• IP address: Set the IP address which is specified for the
number. When connecting multiple controllers via a
hub, set each controller with a different PLC-Link settings on the controller.
communication port number, and set multiple local • Port number: Set the port number which is specified for
port numbers that correspond to them. the PLC-Link settings on the controller.
• Describe the MSG-RCV processing in the ladder. (Set
For the Q/L Series the automatic reception to "Specified" for a module that
Change settings using the PC parameters in GX Developer allows automatic reception.)
Control/data output via the PLC-Link

or GX Works 2. Refer to the manual for the YASKAWA Electric


• [Built-In Ethernet Port Settings] communication unit for more details.
- IP address: Set the IP address which is specified for
the PLC-Link settings on the controller.
- Communication data code setting: Select [Binary
code communication].
- Authorize writing during RUN: Check [Authorize].
• [Open Settings]: Add these settings.
- Protocol: Select [UDP].
- Open method: Select [MCprotocol].
- Local node port number: Specify a hexadecimal
value within the range 0401 to 1387, and 1392 to
FFFE. Numbers from 1388 to 1391, 2332 (5000 to
5009, 9010 in decimal) are reserved.
Specify the [Port] setting in the controller with the
decimal notation of the hexadecimal value specified
here. (Example, if the local node port number is 1387,
specify 4999 in the controller).

For the iQ-R/iQ-F Series


Set the GX Works 3 unit parameters.
• Self node settings
- IP Address: Set the IP address specified for the
destination address in this unit's PLC-Link.
- Communication Data Code Setting: Select [Binary].
- Authorize/prohibit writing during RUN setting:
Select [Authorize all (SLMP)] (for iQ-R only).
• Destination Device Connection Configuration
Settings: From the [Basic Settings] > [Destination
Device Connection Configuration Settings] > [Details]
unit list, add [SLMP Connection Device] to the Ethernet
configuration and configure the following settings:
- Protocol: Set [UDP].
- Sequencer (Port Number): Set the PLC port number
for both (setting range: 1025 - 4999, 5010 - 65534
(excluding 9010)).
- Sensor/Device (IP Address): Specify the IP address
for this unit.

6-50 CV-X UM_A


Outputting measurement data via PLC-Link

Outputting measurement data via PLC-Link

Data output procedure (Data Output Flow)


The controller outputs data via the PLC-Link in the following manner.

Controller (CV-X series) PLC

The image processing


r is completed in the

Control/data output via the PLC-Link


controller, the result data is stored.
b
a
Confirm the value in the Result Ack Address (bit)
Write 0 to the Result Ack Address (bit).
is 0 (level).

c c
The measured data is written to the DM The measured data is written to the Result
continued from the Result Output Address. Output Address.

d d
When the data writing for 1 measurement is Check the completion of measured data writing
completed, write 1 to the DM at the Result Ack for 1 measurement by confirming that the value
Address (bit). in the Result Ack Address (bit) is changed (set)
to 1 and then reference the data of the Result
Output Address.
e
e
Detect that the DM value of the Result Ack
Address (bit) is changed (set) to 1 and check Write 1 to the Result Ack Address (bit).
the completion of the data reading.*1

f f
Write 0 to the DM of the Result Ready Address Confirm that the value in the Result Ready
(bit). Address (bit) is changed (set) to 0.

a
Write 0 to the Result Ack Address (bit).

• For processing with the [Acknowledge result output completion] and [Enable Handshake] options enabled, all result data can be
retrieved on the PLC side. If not all result data is necessary and you only need to retrieve the latest result data on the PLC side, the
following settings can reduce the time required to output the results.
If you disable [Enable Handshake], you can restrict Result Ack Address (bit) value confirmation in Steps 2 and 5 (in this case, the
controller outputs the result data regardless of whether data has been completely read or not on the PLC side). Moreover, if you disable
[Acknowledge result output completion], you can restrict writing to Result Ready Address (bit) in Steps 4 and 6 (in this case, you cannot
determine on the PLC side whether the result data has been updated).

Timing Chart

Image processing Image processing

b
Result Ack Address (bit) The PLC writes.

Result Ready Address (bit) The controller writes.

Result Output Address The controller writes.

ac d e f a

For detailed settings, see the steps starting from the next page.

CV-X UM_A 6-51


Outputting measurement data via PLC-Link

Using the PLC-Link via RS-232C 6 Specify the starting address of the data memory to
(Measurement Data Output) which the controller outputs data for the PLC unit
in the [Result Output Address] field as required.
Change the settings on the controller to output data via the
As all measurement data on the controller is output in
PLC-Link.
32 bits, a word device for 1 data is 2 words.
When the controller is changed to run mode, the
Reference The controller can write data to the PLC within
warning message "Failed to establish a link with the Reference
the following data memory ranges.
PLC." could be repeatedly displayed. In this case,
• KV-L20 Series: 00000 to 65535
the PLC-Link settings or connection of an active
• MELSEC AnA Series: 0000 to 8191
PLC may be incorrect.
• MELSEC Q/L/iQ-R/iQ-F Series: 00000 to 32767
• MELSEC FX Series: 0000 to 7999
• SYSMAC C Series: 0000 to 9999
1 From [Global], select [Communications & I/O] - • SYSMAC CJ/CS1/CP1 Series: 00000 to
[PLC-Link] in setup mode. 32767
The [PLC-Link] screen appears. • YASKAWA MP Series: 0000 to 4095
Control/data output via the PLC-Link

If the data is written outside the specified data


2 Select [PLC-Link (RS-232C)] in [Mode]. memory range, an error message appears,
indicating communication is interrupted.
3 In [PLC Type], select the PLC type for the Additionally, the data memory range actually
connected PLC model. available for the device of the same series
When the PLC type is selected, the relevant setting varies depending on the PLC specifications
and settings, and therefore, there may be a
items are displayed.
case where the range cannot be used up to
Refer to "Types of compatible PLC-Link connections" the maximum.
(Page 6-43) for more details on the [PLC Type] to be
selected for the connected PLC model. 7 Check the [Acknowledge result output completion]
to be notified that data output is completed.
4 Change the communication settings as required.
Unchecking this option can reduce the communication
Baud rate time. However, it is necessary to pay attention to the
Select 9600 (Default), 19200, 38400, 57600, 115200 or data reception timing control at the PLC side in this
230400 (CV-X400/X300/X200 Series only) (bps) for the case. See "Data output procedure (Data Output Flow)"
baud rate. (Page 6-51) for details on various data communication
with the PLC.
Stop Bit
Select [1] (default) or [2] for the stop bit. 8 In the [Result Ready Address (bit)], specify the data
memory address to which the data is output to be
Parity Bit
notified that data output is completed.
Select [Even] (default), [Odd], or [None] for the parity
When data output to the PLC is successfully
bit.
completed, the controller writes "1" to this memory.
5 Select the data representation method for the data
9 After completing the setting, left-click [OK].
that are output in decimal with [Decimal Point].
• Fixed-point (default): The original data is multiplied 10Restart the controller.
by 1000, and handled as a 32-bit signed integer
data (address m: lower 16 bits, address m+1: upper
16 bits).
• Floating-point: The data is handled as a 32-bit
single-precision floating decimal point data.
For details on the data that are output in decimal
Reference
in results data output, see "Operation symbol/
output item comparison table (Measured Value/
Judgment Value)" (Page 3-61)

6-52 CV-X UM_A


Outputting measurement data via PLC-Link

Using the PLC-Link via Ethernet 6 Specify the starting address of the data memory to
(Measurement Data Output) which the controller outputs data for the PLC unit
in the [Result Output Address] field as required.
Change the settings on the controller to output data via the
As all measurement data on the controller is output in
PLC-Link.
32 bits, a word device for 1 data is 2 words.
When the controller is changed to run mode, the
Reference The controller can write data to the PLC within
warning message "Failed to establish a link with the Reference
the following data memory ranges.
PLC." could be repeatedly displayed. In this case,
• KV Series: 00000 to 65535
the PLC-Link settings or connection of an active
• MELSEC Q/L/iQ-R/iQ-F Series: 00000 to 32767
PLC may be incorrect.
• SYSMAC CJ/CS1/CP1 Series: 00000 to 32767
• YASKAWA MP Series: 0000 to 4095
If the data is written outside the specified data
1 From [Global], select [Communications & I/O] - memory range, an error message appears,
[PLC-Link] in setup mode. indicating communication is interrupted.
The [PLC-Link] screen appears. Additionally, the data memory range actually

Control/data output via the PLC-Link


available for the device of the same series
2 Select [PLC-Link (Ethernet)] in [Mode]. varies depending on the PLC specifications
and settings, and therefore, there may be a
3 In [PLC Type], select the PLC type for the case where the range cannot be used up to
connected PLC model. the maximum.
When the PLC type is selected, the relevant setting
7 Check the [Acknowledge result output completion]
items are displayed.
to be notified that data output is completed.
Refer to "Types of compatible PLC-Link connections"
Unchecking this option can reduce the communication
(Page 6-43) for more details on the [PLC Type] to be
time. However, it is necessary to pay attention to the
selected for the connected PLC model.
data reception timing control at the PLC side in this
4 Change the settings as required. case. See "Data output procedure (Data Output Flow)"
(Page 6-51) for details on various data communication
IP Address with the PLC.
Enter the IP address for the unit that the controller is
communicating with. 8 To be notified of data output completion, specify
the data memory address to which the data is
Port output in the [Result Ready Address (bit)].
Enter the port number to be used for the PLC-Link. When data output to the PLC is successfully
Point The port number, “9010”, cannot be used completed, the controller writes "1" to this memory.
because it is reserved for the controller.
9 After completing the setting, left-click [OK].
Resend time (ms)
Enter the resend time (ms) for use if a communication
10Restart the controller.
error occurs. The changes will not take effect until the controller is
Reference
restarted.
NODE No. (when selecting SYSMAC)
Enter the node number used to identify the controller.
Data output setting
5 Select the data representation method for the data
that are output in decimal with [Decimal Point]. • All of the output data and output order via the PLC-Link
• Fixed-point (default): The original data is multiplied are specified in the [PLC-Link] screen of the [Output
by 1000, and handled as a 32-bit signed integer Settings]. See "Changing PLC communication settings
data (address m: lower 16 bits, address m+1: upper (PLC-Link)" (Page 5-5) for more details.
16 bits). • Every time a trigger is input, the measurement results
• Floating-point: The data is handled as a 32-bit set in the output data setting are written to the specified
single-precision floating decimal point data. result output address.
For details on the data that are output in decimal • After the measurement result for 1 trigger is written, 1 is
Reference
in results data output, see "Operation symbol/ written to the specified result ready address (bit).
output item comparison table (Measured Value/
Judgment Value)" (Page 3-61)

CV-X UM_A 6-53


Controlling the system via PLC-Link (PLC terminal)

Controlling the system via PLC-Link (PLC terminal)

Shorting/opening the PLC terminals directly allows commands to be read and executed as with command execute address
(bit).Wiring to the PLC terminals is required.(Page 6-46)

Command execution procedure via PLC terminal (Command Processing Flow)


A command is executed between the controller and the PLC in the following manner.

Controller (CV-X series) PLC


Control/data output via the PLC-Link

a
Write the command No. and parameters to the
command address.
b
At the timing that the PLC terminal is set, the b
controller reads the command No. and Turn the terminal input [PLC] of the controller ON.
parameters from the DM of the command
address and executes the command.

c
d
When the command execution is completed, the
response data of the command execution is The response data is written to the Command
written to the DM continued from the Command Result Address.
Result Address.
e
e
Check the completion of command execution by
Write the response data of command execution confirming that the value in the Command
and write 1 to the DM value at the Command Complete Address (bit) is changed (set) to 1,
Complete Address (bit). and then check the response data.

f
g Set the PLC terminal of the controller.
Detect that the PLC terminal is set and reset the g
value of the Command Complete Address (bit)
to 0. Confirm that the Command Complete Address
(bit) is changed (set) to 0 and move to the next
command operation.

• The returned data varies depending on the commands. For more details, see "Details of communication control commands" (Page 6-5)
and confirm the received data of each command

Timing Chart
.

Command Execute Conditions Command Execute

PLC Terminal 햳 햷 The PLC writes.

Command Complete Address (bit) 햸 The controller writes.

Command Address The PLC writes.

햴 햶
Command Result Address The controller writes.

햲 햵

For detailed settings, see the steps starting from the next page.

6-54 CV-X UM_A


Controlling the system via PLC-Link (PLC terminal)

Using the PLC-Link via RS-232C 6 Select [PLC Terminal] in [Command Execute
(PLC Terminal) Event].

Change the settings to control the system via the PLC-Link 7 In the [Command Complete Address (bit)], specify
(PLC terminal). the data memory address used by the system to
The number-specified commands can be used for notify of the completion of command execution.
controlling the system. See "Details of communication Check the written results when the command
control commands" (Page 6-5) for more details on number- complete address (bit) changes to 1.
specified commands.
8 In the [Command Address], specify the starting
When the controller is changed to run mode, the address of the data memory in which instruction
Reference
warning message "Failed to establish a link with the
(command) codes and parameters for the
PLC." could be repeatedly displayed. In this case,
the PLC-Link settings or connection of an active
controller are stored.
PLC may be incorrect. • Only a starting address can be specified. Multiple
addresses cannot be specified at a time.

Control/data output via the PLC-Link


• Using the number-specified commands (Page 6-5)
1 From [Global], select [Communications & I/O] - format, the command No. is stored in the starting
[PLC-Link] in setup mode. address in 16bit-binary and the command
The [PLC-Link] screen appears. parameters are stored successively from the starting
2 Select [PLC-Link (RS-232C)] in [Mode]. address +2 in 32bit-binary for 1 data item.

3 In [PLC Type], select the PLC type for the 9 In the [Command Result Address], specify the
connected PLC model. starting address of the data memory which stores
When the PLC type is selected, the relevant setting the data string returned to the PLC as a result of
items are displayed. the command execution.
Refer to "Types of compatible PLC-Link connections" • Only a starting address can be specified. Multiple
(Page 6-43) for more details on the [PLC Type] to be addresses cannot be specified at a time.
selected for the connected PLC model. • Using the number-specified commands (Page 6-5)
format, the command response is stored in the
4 Change the settings as required. starting address in 16bit-binary and the command
Baud rate data is stored successively from the starting
Select 9600 (Default), 19200, 38400, 57600, 115200 or address +2 in 32bit-binary for 1 data item.
230400 (CV-X400/X300/X200 Series only) (bps) for the 10After completing the setting, left-click [OK].
baud rate.
11 Restart the controller.
Stop Bit
Select [1] (default) or [2] for the stop bit.

Parity Bit
Select [Even] (default), [Odd], or [None] for the parity
bit.

5 Select the data representation method for the data


that are output in decimal with [Decimal Point].
• Fixed-point (default): The original data is multiplied
by 1000, and handled as a 32-bit signed integer
data (address m: lower 16 bits, address m+1: upper
16 bits).
• Floating-point: The data is handled as a 32-bit
single-precision floating decimal point data.
For details on the data that handle decimal
Reference
numbers in command controls, see "Control/
data output via commands" (Page 6-2)

CV-X UM_A 6-55


Controlling the system via PLC-Link (PLC terminal)

Using the PLC-Link via Ethernet 6 Select [PLC Terminal] in [Command Execute
(PLC Terminal) Event].

Change the settings to control the system via the PLC-Link 7 In the [Command Complete Address (bit)], specify
(PLC terminal). the data memory address used by the system to
The number-specified commands can be used for notify of the completion of command execution.
controlling the system. See "Details of communication Check the written results when the command
control commands" (Page 6-5) for more details on number- complete address (bit) changes to 1.
specified commands.
8 In the [Command Address], specify the starting
When the controller is changed to run mode, the address of the data memory in which instruction
Reference
warning message "Failed to establish a link with the
(command) codes and parameters for the
PLC." could be repeatedly displayed. In this case,
the PLC-Link settings or connection of an active
controller are stored.
PLC may be incorrect. • Only a starting address can be specified. Multiple
addresses cannot be specified at a time.
Control/data output via the PLC-Link

• Using the number-specified commands (Page 6-5)


1 From [Global], select [Communications & I/O] - format, the command No. is stored in the starting
[PLC-Link] in setup mode. address in 16bit-binary and the command
The [PLC-Link] screen appears. parameters are stored successively from the starting
2 Select [PLC-Link (Ethernet)] in [Mode]. address +2 in 32bit-binary for 1 data item.

3 In [PLC Type], select the PLC type for the 9 In the [Command Result Address], specify the
connected PLC model. starting address of the data memory which stores
When the PLC type is selected, the relevant setting the data string returned to the PLC as a result of
items are displayed. the command execution.
Refer to "Types of compatible PLC-Link connections" • Only a starting address can be specified. Multiple
(Page 6-43) for more details on the [PLC Type] to be addresses cannot be specified at a time.
selected for the connected PLC model. • Using the number-specified commands (Page 6-5)
format, the command response is stored in the
4 Change the settings as required. starting address in 16bit-binary and the command
IP Address data is stored successively from the starting
Enter the IP address for the unit that the controller is address +2 in 32bit-binary for 1 data item.
communicating with. 10After completing the setting, left-click [OK].
A confirmation message will appear if any setting is
Port
changed.
Enter the port number to be used for the PLC-Link.

Resend time (ms)


11 Restart the controller.
Enter the resend time (ms) for use if a communication
error occurs.

5 Select the data representation method for the data


that are output in decimal with [Decimal Point].
• Fixed-point (default): The original data is multiplied
by 1000, and handled as a 32-bit signed integer
data (address m: lower 16 bits, address m+1: upper
16 bits).
• Floating-point: The data is handled as a 32-bit
single-precision floating decimal point data.
For details on the data that handle decimal
Reference
numbers in command controls, see "Control/
data output via commands" (Page 6-2)

6-56 CV-X UM_A


Controlling the system via PLC-Link (Polling)

Controlling the system via PLC-Link (Polling)

Set the controller to perform constant monitoring (polling) on the bit changes in the command execute address (bit) to read
and execute a command.

Command execution procedure via Polling (Command Processing Flow)


A command is executed between the controller and the PLC in the following manner.

Controller (CV-X series) PLC

Control/data output via the PLC-Link


a
Write the command No. and parameters to the
command address.
b
Detect that the value of the Command Execute
b
Address (bit) is changed (set) to 1 and read the To execute the command, write 1 to the
command No. and parameters from the DM of Command Execute Address (bit).
the command address.

c
d
When the command execution is completed, the
The response data is written to the Command
response data of the command execution is written to
Result Address.
the DM continued from the Command Result Address.
e
e
Check the completion of command execution by
Write the response data of command execution and write confirming that the value in the Command Complete
1 to the DM value at the Command Complete Address (bit). Address (bit) is changed (set) to 1, and then check the
response data of the Command Result Address.

f
g
Reset the value in the Command Execute Address (bit) to 0.
Detect that the value of the Command Execute
g
Address (bit) is changed (set) to 0 and reset the value
of the Command Complete Address (bit) to 0. Confirm that the Command Complete Address
(bit) is changed (set) to 0 and move to the next
command operation.

• The returned data varies depending on the commands. For more details, see "Details of communication control commands" (Page 6-5)
and confirm the received data of each command.

Timing Chart

Command Execute Conditions Command Execute

Command Execute Address (bit) b f The PLC writes.

Command Complete Address (bit) g The controller writes.

Command Address The PLC writes.

c e
Command Result Address The controller writes.

a d

For detailed settings, see the steps starting from the next page.
CV-X UM_A 6-57
Controlling the system via PLC-Link (Polling)

Using the PLC-Link via RS-232C 6 Select [Polling] in [Command Execute Event].
(Polling)
7 In the [Command Execute Address (bit)], specify
Change the settings to control the system via the PLC-Link the data memory address which indicates the
(Polling). command execution timing.
The number-specified commands can be used for For control via polling, reading data from the system
controlling the system. See "Details of communication will start when this bit device changes to 1.
control commands" (Page 6-5) for more details on number-
specified commands.
8 In the [Command Complete Address (bit)], specify
the data memory address used by the system to
When the controller is changed to run mode, the notify of the completion of command execution.
Reference
warning message "Failed to establish a link with the
Check the written results when the command
PLC." could be repeatedly displayed. In this case,
the PLC-Link settings or connection of an active
complete address (bit) changes to 1.
PLC may be incorrect.
9 In the [Command Address], specify the starting
Control/data output via the PLC-Link

address of the data memory in which instruction


1 From [Global], select [Communications & I/O] - (command) codes and parameters for the
[PLC-Link] in setup mode. controller are stored.
The [PLC-Link] screen appears. • Only a starting address can be specified. Multiple
addresses cannot be specified at a time.
2 Select [PLC-Link (RS-232C)] in [Mode]. • Using the number-specified commands (Page 6-5)
3 In [PLC Type], select the PLC type for the format, the command No. is stored in the starting
connected PLC model. address in 16bit-binary and the command
When the PLC type is selected, the relevant setting parameters are stored successively from the starting
items are displayed. address +2 in 32bit-binary for 1 data item.
Refer to "Types of compatible PLC-Link connections" 10In the [Command Result Address], specify the
(Page 6-43) for more details on the [PLC Type] to be starting address of the data memory which stores
selected for the connected PLC model. the data string returned by the system as a result of
4 Change the settings as required. the command execution.
• Only a starting address can be specified. Multiple
Baud rate addresses cannot be specified at a time.
Select 9600 (Default), 19200, 38400, 57600, 115200 or • Using the number-specified commands (Page 6-5)
230400 (CV-X400/X300/X200 Series only) (bps) for the format, the command response is stored in the
baud rate. starting address in 16bit-binary and the command
data is stored successively from the starting
Stop Bit
address +2 in 32bit-binary for 1 data item.
Select [1] (default) or [2] for the stop bit.

Parity Bit
11 After completing the setting, left-click [OK].
Select [Even] (default), [Odd], or [None] for the parity 12Restart the controller.
bit.

5 Select the data representation method for the data


that are output in decimal with [Decimal Point].
• Fixed-point (default): The original data is multiplied
by 1000, and handled as a 32-bit signed integer
data (address m: lower 16 bits, address m+1: upper
16 bits).
• Floating-point: The data is handled as a 32-bit
single-precision floating decimal point data.
For details on the data that handle decimal
Reference
numbers in command controls, see "Control/
data output via commands" (Page 6-2)

6-58 CV-X UM_A


Controlling the system via PLC-Link (Polling)

Using PLC-Link via Ethernet 6 Select [Polling] in [Command Execute Event].


(Polling)
7 In the [Command Execute Address (bit)], specify
Change the settings to control the system via the PLC-Link the data memory address which indicates the
(Polling). command execution timing.
The number-specified commands can be used for For control via polling, reading data from the system
controlling the system. See "Details of communication will start when this bit device changes to 1.
control commands" (Page 6-5) for more details on number-
specified commands.
8 In the [Command Complete Address (bit)], specify
the data memory address used by the system to
When the controller is changed to run mode, the notify of the completion of command execution.
Reference
warning message "Failed to establish a link with the
Check the written results when the command
PLC." could be repeatedly displayed. In this case,
the PLC-Link settings or connection of an active
complete address (bit) changes to 1.
PLC may be incorrect.
9 In the [Command Address], specify the starting

Control/data output via the PLC-Link


address of the data memory in which instruction
1 From [Global], select [Communications & I/O] - (command) codes and parameters for the
[PLC-Link] in setup mode. controller are stored.
The [PLC-Link] screen appears. • Only a starting address can be specified. Multiple
addresses cannot be specified at a time.
2 Select [PLC-Link (Ethernet)] in [Mode]. • Using the number-specified commands (Page 6-5)
3 In [PLC Type], select the PLC type for the format, the command No. is stored in the starting
connected PLC model. address in 16bit-binary and the command
When the PLC type is selected, the relevant setting parameters are stored successively from the starting
items are displayed. address +2 in 32bit-binary for 1 data item.
Refer to "Types of compatible PLC-Link connections" 10In the [Command Result Address], specify the
(Page 6-43) for more details on the [PLC Type] to be starting address of the data memory which stores
selected for the connected PLC model. the data string returned by the system as a result of
4 Change the settings as required. the command execution.
• Only a starting address can be specified. Multiple
IP Address addresses cannot be specified at a time.
Enter the IP address for the unit that the controller is • Using the number-specified commands (Page 6-5)
communicating with. format, the command response is stored in the
starting address in 16bit-binary and the command
Port
data is stored successively from the starting
Enter the port number to be used for the PLC-Link.
address +2 in 32bit-binary for 1 data item.
Resend time (ms)
Enter the resend time (ms) for use if a communication
11 After completing the setting, left-click [OK].
error occurs. 12Restart the controller.
5 Select the data representation method for the data
that are output in decimal with [Decimal Point].
• Fixed-point (default): The original data is multiplied
by 1000, and handled as a 32-bit signed integer
data (address m: lower 16 bits, address m+1: upper
16 bits).
• Floating-point: The data is handled as a 32-bit
single-precision floating decimal point data.
For details on the data that handle decimal
Reference
numbers in command controls, see "Control/
data output via commands" (Page 6-2)

CV-X UM_A 6-59


Troubleshooting

Troubleshooting

When correct operation does not occur

The message "Initializing PLC-Link Try No. *" PLC-Link is established, however, data cannot be
appears repeatedly at the bottom right of the written to the connected PLC.
screen. There is a limit to the range of data memory that can be
The system failed to establish PLC-Link communication written to. Check the range that can be written to at the
with the PLC, and the initialization process is occurring in connected PLC.
order to reconnect.
Control/data output via the PLC-Link

• When connected by RS-232C: Check the PLC-Link Monitoring of the communications status is being
communication settings, connection cable, and status at performed with the RS-232C monitor, however,
the device the cable is connected to. the text is garbled.
• When connected by Ethernet: Check the PLC-Link
The RS-232C monitor does not support monitoring of the
communication settings, IP address, connection cable
communications used in PLC-Link communications.
(cross cable if connected directly), and status at the
device the cable is connected to.

When a trigger command is issued by PLC-


Link, the capture timing is later compared with
trigger signal input from the terminal block.
When a command is executed from PLC-Link, more time is
required before execution starts and variation is larger
compared with when the terminal block is used (in
particular with polling control).
If the timing variation is a problem when capturing an
object moving at a high speed, input the trigger from the
terminal block.

Data cannot be acquired correctly when reading


data based on the change in the rise of STO output
from an external terminal.
STO is the data strobe signal for the terminal output.
Therefore, it cannot be used as the strobe signal for any
other data output.
Refer to the result ready address for the timing as to when
to read data by PLC-Link.

6-60 CV-X UM_A


Troubleshooting

Error Message

Message Cause Corrective Action Error


cause No.
Failed to establish a link with An error occurred in the connection with • Check the connection with the PLC and the
the PLC. the PLC when the [PLC-Link (RS-232C)] settings of the PLC.
or [PLC-Link (Ethernet)] function was • If PLC-Link is not used, change communication
enabled. mode to [Disable PLC-Link].
13301
• If an error message is displayed after trigger
input, check that the data memory destination
specified is within the range that matches the
PLC format.
Unable to output to the PLC- The controller output buffer for outputting Reduce the amount of data to be output so the
Link due to a full output buffer. via PLC-Link is full. (Handshake OFF) data is output via PLC-Link at a faster rate than it
builds up. Or, extend the time between triggers/ 13302

Control/data output via the PLC-Link


processing to allow for data to be output. Note:
Results data are not written when the buffer is full.
The delay of the handshake The controller output buffer for outputting Reduce the amount of data to be output so the
control causes skipping of the via PLC-Link is full. (Handshake ON) data is output via PLC-Link at a faster rate than it
PLC communication result builds up. Or, extend the time between triggers/
13303
output. processing to allow for data to be output. Note:
When the output buffer is full, measurement waits
until the buffer is emptied.

CV-X UM_A 6-61


Control/data output via Functions available with
I/O terminals I/O terminals of the
controller
Control/data output
The controller has the following I/O terminals:
via commands
• Parallel I/O interface: Uses a specialized parallel
connection cable (3m) OP-51657 (optional).
Control/data output • Terminal block interface (OUT/IN): Detachable terminal
via the PLC-Link block included with the controller.

Control/data output Main functions available with I/O terminals


q
Control/data output via I/O terminals

via I/O terminals


Input

Control and data output Capture


• Trigger input: Allows a camera to capture images at a
by EtherNet/IP
specified timing.

Control and data output Control


• Command input: Instructs change of a program or
by PROFINET execute conditions, etc.
• Control input: Interrupts data output or image capture,
Control and data output etc..

by EtherCAT Reference
It is also possible to use the encoder input when
using the LJ-V Series head with the CV-X482 or
CV-X480LJ. For more details, refer to "LJ-V Input
Unit (CA-E100LJ/E110LJ: Option)" (Page 6-88).

Output

Results output
• Judgment output: Outputs upper/lower limit judgment
results on the processed images.

Control
• FLASH output: Outputs signals for Strobe control in
synchronization with triggers.
• Control output: Outputs signals for system errors or
synchronization with external devices.

6-62 CV-X UM_A


I/O Terminals of the CV-X100/X200 Series

I/O Terminals of the CV-X100/X200 Series

Main functions of the input/output terminal block (CV-X100/X200 Series)


The I/O terminals on the controller have the following functions.

Reference The output signals STO, OR, and OUT_DATA0 to 15 are output only in run mode.

Terminal Block Interface (OUT)


Signal Signal Description Function
STO Strobe signal output for Used to read the data of the total status output and OUT_DATA0 to OUT_DATA15, based
data output on leading edge synchronization.
OR Total status output Used to output the OR result for the judged value of tool specified in the output settings.

Control/data output via I/O terminals


ERROR Error output This signal is output while any of system errors occur with the dialog displayed on the
screen. For details on typical system errors, see "Error messages" (Page 9-96).
In the [ERROR Output Settings] (Page 5-32) of the global settings, enabling or disabling
the error output for the SD card-related errors etc. can be specified.
RUN Run mode output This signal is output while the controller operates in run mode.
COMOUT1 Common for terminal block Output common terminal for terminal block interface (OUT) 1 to 2
outputs
FLASH 1 Strobe light output 1 Used to be assigned to cameras 1 to 4 to output strobe synchronization signals.
FLASH 2 Strobe light output 2 Used to be assigned to cameras 1 to 4 to output strobe synchronization signals.
FLASH3 Strobe light output 3 Used to be assigned to cameras 1 to 4 to output strobe synchronization signals.
FLASH4 Strobe light output 4 Used to be assigned to cameras 1 to 4 to output strobe synchronization signals.
COMOUT_F+ (+) Common for terminal (+) Output common terminal for the terminal block interface (OUT) 3, 4, 6, 7.
block outputs
COMOUT_F- (-) Common for terminal (-) Output common terminal for the terminal block interface (OUT) 3, 4, 6, 7.
block outputs

When using ERROR, RUN, and FLASH1 to 4, always apply DC24V ±10% between COMOUT_F+ and COMOUT_F-.
Reference

Terminal Block Interface (IN)

Signal Signal Description Function


COMIN1 Common for terminal block Input common terminal for terminal block interface (IN) 2 to 6
inputs
PLC PLC command readout Used to execute command control via the PLC terminal using the PLC-Link (leading edge
request synchronization). As the request acceptance may be delayed depending on other process
conditions, hold the ON state for input until the command complete address (bit) on the
PLC unit changes to 1 (the command execution is confirmed).
TRG1 Trigger 1 input Allows the camera assigned to trigger 1 to capture images (leading edge synchronization).
The input is accepted while READY1 is on.
TRG2 Trigger 2 input Allows the camera assigned to trigger 2 to capture images (leading edge synchronization).
The input is accepted while READY2 is on.
TRG3 Trigger 3 input Allows the camera assigned to trigger 3 to capture images (leading edge synchronization).
The input is accepted while READY3 is on.
TRG4 Trigger 4 input Allows the camera assigned to trigger 4 to capture images (leading edge synchronization).
The input is accepted while READY4 is on.
TEST Trial run input Used to suspend the status output for trial run or any other reasons.
At the time of input, result data that have not been output are deleted.
While this signal is on, OR output, STO output, and data output of OUT_DATA0 to 15 are
reset and forcibly set to normal state.
The data output from the communication port is also canceled and stopped during the input.
As soon as the input turns off, result outputs for the processed images will resume.
EXT Disable trigger input Used to suspend the occurrence of internal triggers and the acceptance of external
triggers. When the input turns on, READY terminal is forced to be off to stop the
acceptance of all triggers (level synchronization).
24VDC + power supply (DC 24 V) Supplies a 24 V power source for the controller.
input
0V - power supply (0 V) input Supplies 0 V of the 24 V power source for the controller.

CV-X UM_A 6-63


I/O Terminals of the CV-X100/X200 Series

Parallel I/O Interface

Signal Signal Description Function


COMIN2 Connector input common Common input terminal for the parallel I/O interface.
terminal
CMD_PARAM0 Command parameter input bit 0 Used to input parameters necessary for commands from the parallel I/O interface in binary.
(LSB) (Page 6-98)
CMD_PARAM1 Command parameter input bit 1
CMD_PARAM2 Command parameter input bit 2
CMD_PARAM3 Command parameter input bit 3
CMD_PARAM4 Command parameter input bit 4
CMD_PARAM5 Command parameter input bit 5
CMD_PARAM6 Command parameter input bit 6
CMD_PARAM7 Command parameter input bit 7
Control/data output via I/O terminals

(MSB)
CMD_CODE0 Command input bit 0 (LSB) Used to input command codes from the parallel I/O interface in binary. (Page 6-98)
CMD_CODE1 Command input bit 1
CMD_CODE2 Command input bit 2
CMD_CODE3 Command input bit 3 (MSB)
CST Command confirmation input Executes commands and parameters from the parallel I/O interface. (leading edge
synchronization)
• When an acceptance check of CST is performed, check that CMD_READY has fallen
after the CST input.
• When confirmation of command execution completion is performed, check that ACK
(success) or NACK(failure) has risen after the CST input.
RESET Reset Used to reset operation.
• OR output and OUT_DATA 0 to 15 are set to the normal state.
• The measurement count returns to 0.
• All of archived image data are deleted.
• All of the data in the output buffer are reset.
• A new measurement result output destination file is created. A new image output
destination folder is created.
• The trigger waiting state of individual triggers is canceled.
PST Output data switch input Used to issue an instruction to switch data for the case of terminal data output with
handshake.
As long as there is no PST input handshake control, output after the first STO rise stops.
See "Terminal data output timing (Handshake: ON)" (Page 6-128) for more details.
COMOUT2 Connector output common Common output terminal for the parallel I/O interface. This is internally common with the
terminal No. 40 COMOUT2.
ACK Execution success confirmation The signal is output when the commands from the parallel I/O interface successfully finish.
output for command inputs
NACK Execution failure confirmation The signal is output when the commands from the parallel I/O interface unsuccessfully
output for command inputs finish.
BUSY BUSY signal output This signal is output during image processing or command processing.
While BUSY is on, some delays may occur with start of the execution for the next image/
command processing.
EXPOSURE_BUSY Camera exposure in progress This signal is output when exposure is in progress at any of the connected cameras.
signal output
CMD_READY Permission output for The signal is output when execution of commands from the parallel I/O interface is
command input acceptable.
When CST is input with CMD_READY turned off, CST is ignored.
READY1 Trigger 1 input permission output Turns on when trigger 1 input is acceptable.
READY2 Trigger 2 input permission output Turns on when trigger 2 input is acceptable.
READY3 Trigger 3 input permission output Turns on when trigger 3 input is acceptable.
READY4 Trigger 4 input permission output Turns on when trigger 4 input is acceptable.

6-64 CV-X UM_A


I/O Terminals of the CV-X100/X200 Series

Signal Signal Description Function


OUT_DATA0 Data output bit 0 (LSB) Any of tool judgment, partial judgment, CAM judgment, or group judgment of measurement
OUT_DATA1 Data output bit 1 results is output according to the output settings.

OUT_DATA2 Data output bit 2


OUT_DATA3 Data output bit 3
OUT_DATA4 Data output bit 4
OUT_DATA5 Data output bit 5
OUT_DATA6 Data output bit 6
OUT_DATA7 Data output bit 7
OUT_DATA8 Data output bit 8
OUT_DATA9 Data output bit 9
OUT_DATA10 Data output bit 10
OUT_DATA11 Data output bit 11
OUT_DATA12 Data output bit 12

Control/data output via I/O terminals


OUT_DATA13 Data output bit 13
OUT_DATA14 Data output bit 14
OUT_DATA15 Data output bit 15 (MSB)
COMOUT2 Connector output common Common output terminal for the parallel I/O interface. This is internally common with No. 17
terminal COMOUT2.

CV-X UM_A 6-65


I/O Terminals of the CV-X100/X200 Series

Parallel I/O Interface (CV-X100/X200 Series)

CV-X100 Series CV-X200 Series


Control/data output via I/O terminals

Use the dedicated parallel connection cable (3 m) OP-51657 (sold separately) to wire devices to the connector.
Reference

Pin Layout: Cable colors when optional OP-51657 is used.

Circuit diagram Cable


No. Terminal name Signal Signal Description*2
(Page 6-75) color
1 COMIN2 – Connector input common terminal – Brown
2 IN0 CMD_PARAM0 Command parameter bit 0 B Red
3 IN1 CMD_PARAM1 Command parameter bit 1 B Orange
4 IN2 CMD_PARAM2 Command parameter bit 2 B Yellow
5 IN3 CMD_PARAM3 Command parameter bit 3 B Green
6 IN4 CMD_PARAM4 Command parameter bit 4 B Blue
7 IN5 CMD_PARAM5 Command parameter bit 5 B Purple
8 IN6 CMD_PARAM6*1 Command parameter bit 6*1 B Gray
*1
9 IN7 CMD_PARAM7 Command parameter bit 7*1 B White
10 IN8 CMD_CODE0 Command input bit 0 B Black
11 IN9 CMD_CODE1 Command input bit 1 B Brown
12 IN10 CMD_CODE2 Command input bit 2 B Red
13 IN11 CMD_CODE3 Command input bit 3 B Orange
14 IN12 CST Command execution input B Yellow
15 IN13 RESET Reset B Green
16 IN14 PST*1 Output data cycle input*1 B Blue
17 COMOUT2 – Connector output common terminal – Purple
18 OUT0 ACK*1 Verification of successfully executed command input*1 D Gray
*1 *1
19 OUT1 NACK Verification of unsuccessfully executed command input D White
20 OUT2 BUSY*1 Busy signal*1 D Black
21 OUT3 CMD_READY Command input permission D Brown
22 OUT4 READY1 Trigger 1 input permission D Red
23 OUT5 READY2 Trigger 2 input permission D Orange
24 OUT6 OUT_DATA0*1 Data output bit 0*1 D Yellow
*1 *1
25 OUT7 OUT_DATA1 Data output bit 1 D Green
26 OUT8 OUT_DATA2 Data output bit 2 D Blue
27 OUT9 OUT_DATA3 Data output bit 3 D Purple
28 OUT10 OUT_DATA4 Data output bit 4 D Gray
29 OUT11 OUT_DATA5 Data output bit 5 D White
30 OUT12 OUT_DATA6 Data output bit 6 D Black
31 OUT13 OUT_DATA7 Data output bit 7 D Brown
32 OUT14 OUT_DATA8 Data output bit 8 D Red

6-66 CV-X UM_A


I/O Terminals of the CV-X100/X200 Series

Circuit diagram Cable


No. Terminal name Signal Signal Description*2
(Page 6-75) color
33 OUT15 OUT_DATA9 Data output bit 9 D Orange
34 OUT16 OUT_DATA10 Data output bit 10 D Yellow
35 OUT17 OUT_DATA11 Data output bit 11 D Green
36 OUT18 OUT_DATA12*1 Data output bit 12 *1 D Blue
37 OUT19 OUT_DATA13*1 Data output bit 13 *1 D Purple
38 OUT20 OUT_DATA14*1 Data output bit 14 *1 D Gray
39 OUT21 OUT_DATA15*1 Data output bit 15 *1 D White
40 COMOUT2 – Connector output common terminal – Black
*1 It is the default assigned value on the terminal where the signal assignment can be changed. These assignments may vary if the Global
settings have been changed.
*2 For more details about the signal description, see "Main functions of the input/output terminal block (CV-X100/X200 Series)" (Page 6-63).

• COMOUT2 for Pin 17 and Pin 40 are common.

Control/data output via I/O terminals


Reference
• COMIN2 is a common terminal for input for the parallel I/O connector.
• COMOUT2 is a common terminal for output for the parallel I/O connector.
• Power source 0 V and COMIN1, COMIN2, COMOUT1, COMOUT2, COMOUT_F+, and COMOUT_F- are all isolated.

CV-X UM_A 6-67


I/O Terminals of the CV-X100/X200 Series

Terminal Block Interface (for CV-X100 Series)

Standard Specifications
Terminal block specifications for the controller are as follows.

Point Tightening above the specified torque may cause damage to the terminal block.

OUTPUT connector INPUT connector


Control/data output via I/O terminals

Suitable wiring: AWG 16 - 28 • Suitable wiring: AWG 16 - 28


Terminal block screw torque: 0.25 Nm or less • Terminal block screw torque: 0.25 Nm or less

Pin Layout

OUTPUT connector

Terminal block display at Circuit diagram


No. Terminal name Signal Signal description *2
time of shipment (Page 6-75)
1 OUT22 STO STO Output timing indicator D
2 OUT23 OR OR Total status output D
3 F_OUT2 ERROR*1 ERR Error output*1 C
*1 *1
4 F_OUT3 RUN RUN Run mode output C
5 COMOUT1 – COMOUT Common for terminal block outputs –
6 F_OUT0 FLASH 1 FLS1 Strobe light output for trigger 1 C
7 F_OUT1 FLASH 2 FLS2 Strobe light output for trigger 2 C
8 COMOUT_ F+ – COMF+ + common for terminal output –
9 COMOUT_F- – COMF- - common for terminal output –
*1: It is the default assigned value on the terminal where the signal assignment can be changed. These assignments may vary if the
Global settings have been changed.
*2: For more details about the signal description, see the "Main functions of the input/output terminal block (CV-X100/X200 Series)" (Page
6-63).

• Power source 0V, COMOUT1, COMOUT_F+, and COMOUT_F- are all isolated.
Reference
• COMOUT1 is a common terminal exclusively used for terminal outputs 1 and 2.
• COMOUT_F+ and COMOUT_F- are the common terminals exclusively used for terminal outputs 3 to 4 and 6 to 7.

6-68 CV-X UM_A


I/O Terminals of the CV-X100/X200 Series

INPUT connector

Terminal block display at Circuit diagram


No. Terminal name Signal Signal description *2
time of shipment (Page 6-75)
1 COMIN1 – COMIN Common for terminal block inputs -–
*1 *1
2 IN15 PLC PLC Command read request from PLC B
3 F_IN0 TRG1 TRG1 Trigger 1 input A
4 F_IN1 TRG2 TRG2 Trigger 2 input A
5 F_IN2 TEST*1 TEST Trial run input*1 A
*1 input*1
6 F_IN3 EXT EXT Disable trigger A
7 24 VDC – 24 VDC + ve power supply input (24 VDC) –
8 0V – 0V + ve power supply input (0 VDC) –
*1: It is the default assigned value on the terminal where the signal assignment can be changed. These assignments may vary if the
Global settings have been changed.

Control/data output via I/O terminals


*2: For more details about the signal description, see the "Main functions of the input/output terminal block (CV-X100/X200 Series)" (Page
6-63).

• Power source 0V and COMIN1 are all isolated.


Reference
• COMIN1 is the common terminal for inputs 2 to 6.

CV-X UM_A 6-69


I/O Terminals of the CV-X100/X200 Series

Terminal Block Interface (for CV-X200 Series)

Standard Specifications
Terminal block specifications for the controller are as follows.

Point Tightening above the specified torque may cause damage to the terminal block.

OUTPUT connector INPUT connector


Control/data output via I/O terminals

• Suitable wiring: AWG 16 - 28 • Suitable wiring: AWG 16 - 28


• Terminal block screw torque: 0.25 Nm or less • Terminal block screw torque: 0.25 Nm or less

Pin Layout

OUTPUT connector

Terminal block display at Circuit diagram


No. Terminal name Signal Signal description *2
time of shipment (Page 6-75)
1 OUT22 STO STO Output timing indicator D
2 OUT23 OR OR Total status output D
3 F_OUT2 ERROR*1 ERR Error output*1 C
4 F_OUT3 RUN*1 RUN Run mode output*1 C
5 COMOUT1 – COMOUT Common for terminal block outputs –
6 F_OUT0 FLASH 1 FLS1 Strobe light output for trigger 1 C
7 F_OUT1 FLASH 2 FLS2 Strobe light output for trigger 2 C
8 COMOUT_ F+ – COMF+ + common for terminal output –
9 COMOUT_F- – COMF- - common for terminal output –
*1: It is the default assigned value on the terminal where the signal assignment can be changed. These assignments may vary if the
Global settings have been changed.
*2: For more details about the signal description, see the "Main functions of the input/output terminal block (CV-X100/X200 Series)" (Page
6-63).

• Power source 0V, COMOUT1, COMOUT_F+, and COMOUT_F- are all isolated.
Reference
• COMOUT1 is a common terminal exclusively used for terminal outputs 1 and 2.
• COMOUT_F+ and COMOUT_F- are the common terminals exclusively used for terminal outputs 3 to 4 and 6 to 7.

6-70 CV-X UM_A


I/O Terminals of the CV-X100/X200 Series

INPUT connector

Terminal block display at Circuit diagram


No. Terminal name Signal Signal description *2
time of shipment (Page 6-75)
1 COMIN1 – COMIN1 Common for terminal block inputs -–
*1 *1
2 IN15 PLC PLC Command read request from PLC B
3 F_IN0 TRG1 TRG1 Trigger 1 input A
4 F_IN1 TRG2 TRG2 Trigger 2 input A
5 F_IN2 TEST*1 TEST Trial run input*1 A
*1 input*1
6 F_IN3 EXT EXT Disable trigger A
*1: It is the default assigned value on the terminal where the signal assignment can be changed. These assignments may vary if the
Global settings have been changed.
*2: For more details about the signal description, see the "Main functions of the input/output terminal block (CV-X100/X200 Series)" (Page
6-63).

• Power source 0V and COMIN1 are all isolated.

Control/data output via I/O terminals


Reference
• COMIN1 is the common terminal for inputs 2 to 6.

CV-X UM_A 6-71


I/O Terminals of the CV-X100/X200 Series

Expansion unit (for CV-X100/X200 Series)

Illumination expansion unit CA-DC21E (Option)


The following section details the terminal block specifications for the illumination expansion unit (CA-DC21E).

NOTICE Tightening above the specified torque may cause damage to the terminal block.

OUTPUT connector INPUT connector


• Compatible wires: POWER

4
3
LIGHT 2
• Compatible wires: POWER

4
3
LIGHT 2

2 2

AWG14 to 22 1

AWG14 to 22 1

4 4 LIGHT 1
LIGHT 1

• Terminal block 3
2
1
• Terminal block 3
2
1

screw torque: 0.25 OUT


햲 screw torque: 0.25 OUT

Nm or less Nm or less
IN 햶 IN

Control/data output via I/O terminals

Connector Specifications
• OUT Connector Terminal Block
No. Signal Signal Description Description
(terminal block display)
1 LIGHT2+ (L2+) + ve terminal for Light 2 Connect the + ve side of light 2.
2 LIGHT2- (L2-) - ve terminal for Light 2 Connect the - ve side of light 2.
3 NC (NC) Not used Not used
4 LIGHT1+ (L1+) + ve terminal for Light 1 Connect the + ve side of light 1.
5 LIGHT1- (L1-) - ve terminal for Light 1 Connect the - ve side of light 1.

• Connecting a 12 V DC illumination unit to an output terminal at 24 V DC may cause fire, electric shock, or damage
to the controller and user operating the unit.
CAUTION
• Ensure that the DIP switch located on the right side of the CA-DC21E is configured correctly for the illumination
being connected.

• IN Connector Terminal Block


No. Signal Signal Description Description
(terminal block display)
1 COMIN (COMIN) Common for terminal block inputs Dedicated common input for the IN connector terminal.
2 LIGHT_OFF (LOFF) Forced light off input Used to force the emission of LED illumination units to off.
3 24VDC (24V) + ve power supply input (24 V DC) Supplies a 24 V power source for the illumination
expansion unit.
4 0 V (0 V) - power supply (0 V) input Supplies a 0 V power source for the illumination
expansion unit.
The power source 0V and COMIN are insulated respectively.
The power source 0V and the controller power source 0V are insulated respectively.

6-72 CV-X UM_A


I/O Terminals of the CV-X100/X200 Series

DIP Switch Settings


Output voltages for Light 1 and Light 2 can be changed individually by configuring the DIP switches as indicated below.
The factory settings of the DIP switch positions are indicated by .

Bit Output voltage


1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8
OFF OFF OFF OFF — — — — Light 1: 12 V
ON ON ON OFF — — — — Light 1: 24 V
— — — — OFF OFF OFF OFF Light 2: 12 V
ON

— — — — ON ON ON OFF Light 2: 24 V

Setting the output voltage incorrectly may cause fire, electric shock, or product malfunction. When
CAUTION
connecting the KEYENCE illumination unit, use the factory setting of 12V.

Input Circuit Diagram


• Max. applied voltage: 26.4 V 6.2kΩ

Control/data output via I/O terminals


LOFF
• ON voltage: 10.8 V or greater
4.7kΩ
• ON current: 2 mA or greater
COMIN
• OFF voltage: 3 V or less
• OFF current: 0.3 mA or less

Illumination expansion unit CA-DC10E (Option)


The following section details the terminal block specifications for the illumination expansion unit (CA-DC10E).

NOTICE Tightening above the specified torque may cause damage to the terminal block.

INPUT connector
• Compatible wires: AWG14 to 22
• Terminal block screw torque: 0.25 Nm or less

Connector Specifications
• IN Connector Terminal Block
No. Signal Signal Description Description
(terminal block display)
1 24VDC (24V) + ve power supply input (24 V DC) Supplies a 24 V power source for the illumination
expansion unit.
2 NC Not used Not used.
3 0 V (0 V) - power supply (0 V) input Supplies a 0 V power source for the illumination
expansion unit.
The power source 0V and the controller power source 0V are insulated respectively.

CV-X UM_A 6-73


I/O Terminals of the CV-X100/X200 Series

Illumination expansion unit CA-DC30E (Option)


The following section details the terminal block specifications for the illumination expansion unit (CA-DC30E).

Power connector
• Compatible wires: AWG14 to 22 POWER

LIGHT 2

• Terminal block screw torque: 0.25 Nm or less


LIGHT 1

IN

Connector Specifications
• Power Connector Terminal Block
Control/data output via I/O terminals

No. Signal Signal Description Description


(terminal block display)
1 24 VDC (24V) + ve power supply input (24 V DC) Supplies a 24 V power source for the illumination
expansion unit.
2 0 V (0 V) - power supply (0 V) input Supplies a 0 V power source for the illumination
expansion unit.
3 FG frame ground terminal Connect to a Class D ground.
The power source 0V and the controller power source 0V are insulated respectively.

6-74 CV-X UM_A


I/O Terminals of the CV-X100/X200 Series

Input/Output Circuit (CV-X100/X200 Series) : Input Connections

Input circuit diagram Example of connections

Circuit A (For F_IN0 to 3 only, EV compatible) When connecting an NPN PLC output to the system input

R1
OUT IN
IN

R2

com
COM(-) COMIN*

PLC (NPN output) Input circuit on controller


• CV-X100 series
R1: 3.9 kΩ, R2: 680 Ω
• CV-X200 series When connecting a PNP output to the controller input

Control/data output via I/O terminals


R1: 3.3 kΩ, R2: 10 kΩ
• Max. applied voltage: 26.4 V IN

• ON voltage: 10.8 V or greater


• ON current: 3 mA or greater
COM(+)
• OFF voltage: 5 V or less COMIN*

• OFF current: 1 mA or less


Input circuit on controller

Circuit B (other inputs) OUT

PLC (PNP output)


6.2 kΩ
IN

4.7 kΩ

com

• Max. applied voltage: 26.4 V


• ON voltage: 10.8 V or greater
• ON current: 2 mA or greater
• OFF voltage: 3 V or less
• OFF current: 0.3 mA or less
See "Pin Layout" (Page 6-68) for common
Reference
connections.

CV-X UM_A 6-75


I/O Terminals of the CV-X100/X200 Series

Input/Output Circuit (CV-X100/X200 Series) : Output Connections

The overcurrent protective Poly Switch is set to trip at 1 A. For the power supplied to output, use a 1 A or larger power
NOTICE
source.

Output circuit diagram (NPN output type) Output circuit diagram (PNP output type, controllers
with a "P" at the end of the part number)

Circuit C (F_OUT0 to 3) Circuit C (F_OUT0 to 3)

COMOUT_F+ COMOUT_F+

OUT
Poly Switch
Control/data output via I/O terminals

OUT
Poly Switch
COMOUT_F- COMOUT_F-

• Max. applied voltage: 30 V • Max. applied voltage: 30 V


• Max. sink current: 50 mA • Max. sink current: 50 mA
• Leakage current: 0.1 mA or less • Leakage current: 0.1 mA or less
• Residual voltage: • Residual voltage:
1.4 V or less (50 mA) 1.4 V or less (50 mA)
1.0 V or less (20 mA) 1.0 V or less (20 mA)

Circuit D (other outputs) Circuit D (other outputs)

OUT COM
Poly Switch

COM OUT
Poly Switch

• Max. applied voltage: 30 V • Max. applied voltage: 30 V


• Max. sink current: 50 mA • Max. sink current: 50 mA
• Leakage current: 0.1 mA or less • Leakage current: 0.1 mA or less
• Residual voltage: • Residual voltage:
1.4 V or less (50 mA) 1.4 V or less (50 mA)
1.0 V or less (20 mA) 1.0 V or less (20 mA)

6-76 CV-X UM_A


I/O Terminals of the CV-X100/X200 Series

Example of connections (system with NPN outputs)

When connecting an NPN output from the controller to a PLC with a positive common

IN OUT

Poly Switch

COM(+) COM

PLC input circuit positive common Output circuit on controller

When connecting an NPN output from the controller to a relay

OUT

Control/data output via I/O terminals


Poly Switch
Load

COM

Relay Output circuit on controller

When connecting the F_OUT output (NPN) from the controller to the no-voltage input terminal for the CA-DC100
LED light controller

COMOUT_F+
5V

EXT OUT

Poly
Switch

0V COM COMOUT_F-

CA-DC100 Output circuit on controller

When connecting the F_OUT output (NPN) from the controller to a PLC with a positive common

IN COMOUT_F+

OUT

Poly
Switch

COM(+) COMOUT_F-

PLC input circuit positive common Output circuit on controller

• The common output terminal for the terminal block1 is the COMOUT1 terminal.
Point
• The common output terminal for the I/O connector is the COMOUT2 terminal of the parallel I/O interface.

CV-X UM_A 6-77


I/O Terminals of the CV-X100/X200 Series

Example of connections (PNP output type, controllers with a "P" at the end of the part number)

When connecting a PNP output from the controller to a PLC with a negative common

COM(-) COM

IN OUT

Poly Switch
PLC input circuit negative common Output circuit on controller

When connecting a PNP output from the controller to a relay

COM
Control/data output via I/O terminals

Load

OUT

Poly Switch
Relay Output circuit on controller

When connecting the F_OUT output (PNP) from the controller to the no-voltage input terminal for the CA-DC100
LED light controller

COMOUT_F+

5V

10kΩ
100Ω EXT1
EXT2 1kΩ OUT
(1W) Poly
Switch

0V COM COMOUT_F-

CA-DC100 Output circuit on controller

When connecting the F_OUT output (PNP) from the controller to a PLC with a negative common

COM(-) COMOUT_F+

OUT
Poly
Switch
IN

COMOUT_F-

PLC input circuit negative common Output circuit on controller

• The common output terminal for the terminal block1 is the COMOUT1 terminal.
Point
• The common output terminal for the I/O connector is the COMOUT2 terminal of the parallel I/O interface.

6-78 CV-X UM_A


I/O Terminals of the CV-X400/X300 Series

I/O Terminals of the CV-X400/X300 Series

Main functions of the input/output terminal block (CV-X400/X300 Series)


The I/O terminals on the controller have the following functions.

Reference The output signals STO, OR, and OUT_DATA0 to 15 are output only in run mode.

Terminal Block Interface (OUT)

Signal Signal Description Function


STO Strobe signal output for Used to read the data of the total status output and OUT_DATA0 to OUT_DATA15, based
data output on leading edge synchronization.

Control/data output via I/O terminals


OR Total status output Used to output the OR result for the judged value of tool specified in the output settings.
ERROR Error output This signal is output while any of system errors occur with the dialog displayed on the
screen. For details on typical system errors, see "Error messages" (Page 9-96).
In the [ERROR Output Settings] (Page 5-32) of the global settings, enabling or disabling
the error output for the SD card-related errors etc. can be specified.
RUN Run mode output This signal is output while the controller operates in run mode.
COMOUT1 Common for terminal block Output common terminal for terminal block interface (OUT) 1 to 2
outputs
FLASH 1 Strobe light output 1 Used to be assigned to cameras 1 to 4 to output strobe synchronization signals.
FLASH 2 Strobe light output 2 Used to be assigned to cameras 1 to 4 to output strobe synchronization signals.
FLASH3 Strobe light output 3 Used to be assigned to cameras 1 to 4 to output strobe synchronization signals.
FLASH4 Strobe light output 4 Used to be assigned to cameras 1 to 4 to output strobe synchronization signals.
COMOUT_F Common for terminal block Output common terminal for the terminal block interface (OUT) 3, 4, 6, 7.
outputs

Terminal Block Interface (IN)

Signal Signal Description Function


COMIN1 Common for terminal block Input common terminal for terminal block interface (IN) 2 to 6
inputs
PLC PLC command readout Used to execute command control via the PLC terminal using the PLC-Link (leading edge
request synchronization). As the request acceptance may be delayed depending on other process
conditions, hold the ON state for input until the command complete address (bit) on the
PLC unit changes to 1 (the command execution is confirmed).
TRG1 Trigger 1 input Allows the camera assigned to trigger 1 to capture images (leading edge synchronization).
The input is accepted while READY1 is on.
TRG2 Trigger 2 input Allows the camera assigned to trigger 2 to capture images (leading edge synchronization).
The input is accepted while READY2 is on.
TRG3 Trigger 3 input Allows the camera assigned to trigger 3 to capture images (leading edge synchronization).
The input is accepted while READY3 is on.
TRG4 Trigger 4 input Allows the camera assigned to trigger 4 to capture images (leading edge synchronization).
The input is accepted while READY4 is on.
TEST Trial run input Used to suspend the status output for trial run or any other reasons.
At the time of input, result data that have not been output are deleted.
While this signal is on, OR output, STO output, and data output of OUT_DATA0 to 15 are
reset and forcibly set to normal state.
The data output from the communication port is also canceled and stopped during the
input.
As soon as the input turns off, result outputs for the processed images will resume.
EXT Disable trigger input Used to suspend the occurrence of internal triggers and the acceptance of external
triggers. When the input turns on, READY terminal is forced to be off to stop the
acceptance of all triggers (level synchronization).

CV-X UM_A 6-79


I/O Terminals of the CV-X400/X300 Series

Parallel I/O Interface

Signal Signal Description Function


COMIN2 Connector input common Common input terminal for the parallel I/O interface.
terminal
CMD_PARAM0 Command parameter input bit 0 Used to input parameters necessary for commands from the parallel I/O interface in binary.
(LSB) (Page 6-98)
CMD_PARAM1 Command parameter input bit 1
CMD_PARAM2 Command parameter input bit 2
CMD_PARAM3 Command parameter input bit 3
CMD_PARAM4 Command parameter input bit 4
CMD_PARAM5 Command parameter input bit 5
CMD_PARAM6 Command parameter input bit 6
CMD_PARAM7 Command parameter input bit 7
Control/data output via I/O terminals

(MSB)
CMD_CODE0 Command input bit 0 (LSB) Used to input command codes from the parallel I/O interface in binary. (Page 6-98)
CMD_CODE1 Command input bit 1
CMD_CODE2 Command input bit 2
CMD_CODE3 Command input bit 3 (MSB)
CST Command confirmation input Executes commands and parameters from the parallel I/O interface. (leading edge
synchronization)
• When an acceptance check of CST is performed, check that CMD_READY has fallen
after the CST input.
• When confirmation of command execution completion is performed, check that ACK
(success) or NACK(failure) has risen after the CST input.
RESET Reset Used to reset operation.
• OR output and OUT_DATA 0 to 15 are set to the normal state.
• The measurement count returns to 0.
• All of archived image data are deleted.
• All of the data in the output buffer are reset.
• A new measurement result output destination file is created. A new image output
destination folder is created.
• The trigger waiting state of individual triggers is canceled.
PST Output data switch input Used to issue an instruction to switch data for the case of terminal data output with
handshake.
As long as there is no PST input handshake control, output after the first STO rise stops.
See "Terminal data output timing (Handshake: ON)" (Page 6-128) for more details.
COMOUT2 Connector output common Common output terminal for the parallel I/O interface. This is internally common with the
terminal No. 40 COMOUT2.
ACK Execution success confirmation The signal is output when the commands from the parallel I/O interface successfully finish.
output for command inputs
NACK Execution failure confirmation The signal is output when the commands from the parallel I/O interface unsuccessfully
output for command inputs finish.
BUSY BUSY signal output This signal is output during image processing or command processing.
While BUSY is on, some delays may occur with start of the execution for the next image/
command processing.
EXPOSURE_BUSY Camera exposure in progress This signal is output when exposure is in progress at any of the connected cameras.
signal output
CMD_READY Permission output for The signal is output when execution of commands from the parallel I/O interface is
command input acceptable.
When CST is input with CMD_READY turned off, CST is ignored.
READY1 Trigger 1 input permission output Turns on when trigger 1 input is acceptable.
READY2 Trigger 2 input permission output Turns on when trigger 2 input is acceptable.
READY3 Trigger 3 input permission output Turns on when trigger 3 input is acceptable.
READY4 Trigger 4 input permission output Turns on when trigger 4 input is acceptable.

6-80 CV-X UM_A


I/O Terminals of the CV-X400/X300 Series

Signal Signal Description Function


OUT_DATA0 Data output bit 0 (LSB) Any of tool judgment, partial judgment, CAM judgment, or group judgment of measurement
OUT_DATA1 Data output bit 1 results is output according to the output settings.

OUT_DATA2 Data output bit 2


OUT_DATA3 Data output bit 3
OUT_DATA4 Data output bit 4
OUT_DATA5 Data output bit 5
OUT_DATA6 Data output bit 6
OUT_DATA7 Data output bit 7
OUT_DATA8 Data output bit 8
OUT_DATA9 Data output bit 9
OUT_DATA10 Data output bit 10
OUT_DATA11 Data output bit 11
OUT_DATA12 Data output bit 12

Control/data output via I/O terminals


OUT_DATA13 Data output bit 13
OUT_DATA14 Data output bit 14
OUT_DATA15 Data output bit 15 (MSB)
OUTPUT_IMG_B Image output in progress This signal is output when the image output is in progress.
USY signal output
OUTPUT_IMG_ST Image output data present This signal is output when an image or images that should have been output remain in the
ATUS signal output image output buffer.
COMOUT2 Connector output common Common output terminal for the parallel I/O interface. This is internally common with No. 17
terminal COMOUT2.

CV-X UM_A 6-81


I/O Terminals of the CV-X400/X300 Series

Parallel I/O Interface (CV-X400/X300 Series)


Control/data output via I/O terminals

Use the dedicated parallel connection cable (3 m) OP-51657 (sold separately) to wire devices to the connector.
Reference

Pin Layout: Cable colors when optional OP-51657 is used.

Circuit diagram Cable


No. Terminal name Signal Signal Description*2
(Page 6-90) color
1 COMIN2 – Connector input common terminal – Brown
2 IN0 CMD_PARAM0 Command parameter bit 0 B Red
3 IN1 CMD_PARAM1 Command parameter bit 1 B Orange
4 IN2 CMD_PARAM2 Command parameter bit 2 B Yellow
5 IN3 CMD_PARAM3 Command parameter bit 3 B Green
6 IN4 CMD_PARAM4 Command parameter bit 4 B Blue
7 IN5 CMD_PARAM5 Command parameter bit 5 B Purple
*1 *1
8 IN6 CMD_PARAM6 Command parameter bit 6 B Gray
9 IN7 CMD_PARAM7*1 Command parameter bit 7*1 B White
10 IN8 CMD_CODE0 Command input bit 0 B Black
11 IN9 CMD_CODE1 Command input bit 1 B Brown
12 IN10 CMD_CODE2 Command input bit 2 B Red
13 IN11 CMD_CODE3 Command input bit 3 B Orange
14 IN12 CST Command execution input B Yellow
15 IN13 RESET Reset B Green
*1 *1
16 IN14 PST Output data cycle input B Blue
17 COMOUT2 – Connector output common terminal – Purple
*1 input*1
18 OUT0 ACK Verification of successfully executed command C Gray
19 OUT1 NACK*1 Verification of unsuccessfully executed command input*1 C White
*1 signal*1
20 OUT2 BUSY Busy C Black
21 OUT3 CMD_READY Command input permission C Brown
22 OUT4 READY1 Trigger 1 input permission C Red
23 OUT5 READY2 Trigger 2 input permission C Orange
24 OUT6 OUT_DATA0*1 Data output bit 0*1 C Yellow
25 OUT7 OUT_DATA1*1 Data output bit 1*1 C Green
26 OUT8 OUT_DATA2 Data output bit 2 C Blue
27 OUT9 OUT_DATA3 Data output bit 3 C Purple
28 OUT10 OUT_DATA4 Data output bit 4 C Gray
29 OUT11 OUT_DATA5 Data output bit 5 C White
30 OUT12 OUT_DATA6 Data output bit 6 C Black
31 OUT13 OUT_DATA7 Data output bit 7 C Brown

6-82 CV-X UM_A


I/O Terminals of the CV-X400/X300 Series

Circuit diagram Cable


No. Terminal name Signal Signal Description*2
(Page 6-90) color
32 OUT14 OUT_DATA8 Data output bit 8 C Red
33 OUT15 OUT_DATA9 Data output bit 9 C Orange
34 OUT16 OUT_DATA10 Data output bit 10 C Yellow
35 OUT17 OUT_DATA11 Data output bit 11 C Green
36 OUT18 OUT_DATA12*1 Data output bit 12 *1 C Blue
37 OUT19 OUT_DATA13*1 Data output bit 13 *1 C Purple
38 OUT20 OUT_DATA14*1 Data output bit 14 *1 C Gray
*1 *1
39 OUT21 OUT_DATA15 Data output bit 15 C White
40 COMOUT2 – Connector output common terminal – Black
*1: It is the default assigned value on the terminal where the signal assignment can be changed. These assignments may vary if the
Global settings have been changed.
*2: For more details about the signal description, see the "Main functions of the input/output terminal block (CV-X400/X300 Series)" (Page

Control/data output via I/O terminals


6-79).

• COMOUT2 for Pin 17 and Pin 40 are common.


Reference
• COMIN2 is a common terminal for input for the parallel I/O connector.
• COMOUT2 is a common terminal for output for the parallel I/O connector.
• Power source 0 V and COMIN1, COMIN2, COMOUT1, COMOUT2, COMOUT_F are all isolated.

CV-X UM_A 6-83


I/O Terminals of the CV-X400/X300 Series

Terminal Block Interface (for CV-X400/X300 Series)

Standard Specifications
Terminal block specifications for the controller are as follows.

Point Tightening above the specified torque may cause damage to the terminal block.

OUTPUT connector INPUT connector


Control/data output via I/O terminals

Suitable wiring Suitable wiring


AWG 16 - 28 AWG 16 - 28

Terminal block screw torque Terminal block screw torque


0.25 Nm or less 0.25 Nm or less

Pin Layout

OUTPUT connector

Terminal block display at Circuit diagram


No. Terminal name Signal Signal description *2
time of shipment (Page 6-90)
1 OUT22 STO STO Output timing indicator C
2 OUT23 OR OR Total status output C
3 F_OUT2 ERROR*1 ERR Error output*1 C
*1
4 F_OUT3 RUN RUN Run mode output*1 C
5 COMOUT1 – COMOUT Common for terminal block outputs –
6 F_OUT0 FLASH 1 FLS1 Strobe light output for trigger 1 C
7 F_OUT1 FLASH 2 FLS2 Strobe light output for trigger 2 C
8 N.C. – – – –
9 COMOUT_F – COMF Common for F_OUT –
*1: It is the default assigned value on the terminal where the signal assignment can be changed. These assignments may vary if the
Global settings have been changed.
*2: For more details about the signal description, see the "Main functions of the input/output terminal block (CV-X400/X300 Series)" (Page
6-79).

• Power source 0V, COMOUT1, COMOUT_F are all isolated.


Reference
• COMOUT1 is a common terminal exclusively used for terminal outputs 1 and 2.
• COMOUT_F is the common terminal exclusively used for terminal outputs 3 to 4 and 6 to 7.

6-84 CV-X UM_A


I/O Terminals of the CV-X400/X300 Series

INPUT connector

Terminal block display at Circuit diagram


No. Terminal name Signal Signal description *2
time of shipment (Page 6-90)
1 COMIN1 – COMIN1 Common for terminal block inputs -–
*1 *1
2 IN15 PLC PLC Command read request from PLC B
3 F_IN0 TRG1 TRG1 Trigger 1 input A
4 F_IN1 TRG2 TRG2 Trigger 2 input A
5 F_IN2 TEST*1 TEST Trial run input*1 A
*1 input*1
6 F_IN3 EXT EXT Disable trigger A
*1: It is the default assigned value on the terminal where the signal assignment can be changed. These assignments may vary if the
Global settings have been changed.
*2: For more details about the signal description, see the "Main functions of the input/output terminal block (CV-X400/X300 Series)" (Page
6-79).

• Power source 0V and COMIN1 are all isolated.

Control/data output via I/O terminals


Reference
• COMIN1 is the common terminal for inputs 2 to 6.

CV-X UM_A 6-85


I/O Terminals of the CV-X400/X300 Series

Expansion Unit (CV-X400 Series)

Illumination expansion unit CA-DC40E (Option)


The following section details the terminal block specifications for the illumination expansion unit (CA-DC40E).

Point Tightening above the specified torque may cause damage to the terminal block.

OUTPUT connector INPUT connector


• Compatible wires: AWG14 to 22 • Compatible wires: AWG14 to 22
• Terminal block screw torque: 0.25 Nm or less • Terminal block screw torque: 0.25 Nm or less
Control/data output via I/O terminals

L2+ (1)
L2-
COM
IN
(1)
L1+ LOFF
2

(4)
L1- LOFF
1
24V
DC
0V

FG
(6)

Connector Specifications
• OUT Connector Terminal Block
No. Signal (terminal block display) Signal Description Description
1 LIGHT2+(L2+) + ve terminal for Light 2 Connect the + ve side of light 2.
2 LIGHT2-(L2-) - ve terminal for Light 2 Connect the - ve side of light 2.
3 LIGHT1+(L1+) + ve terminal for Light 1 Connect the + ve side of light 1.
4 LIGHT1-(L1-) - ve terminal for Light 1 Connect the - ve side of light 1.

If a 12 V illumination unit is connected to a terminal block for which the voltage has been set to 24 V, this may cause a
CAUTION fire, electric shock, or product malfunction. Normally, use the standard voltage for Keyence illumination units, 12 V,
which is also the default setting.

If the voltage has been set to 24 V, nothing will be output from the Light 1 Output Connector or the Light 2 Output
Point
Connector.

• IN Connector Terminal Block

No. Signal (terminal block display) Signal Description Description


1 COMIN(COMIN) Common for terminal Dedicated input common for the IN connector terminal block.
block inputs
2 LIGHT2_OFF(LOFF2) Forcibly stop lighting input Used to force the emission of LED illumination unit to off by level
for Light 2 synchronized input.
3 LIGHT1_OFF(LOFF1) Forcibly stop lighting input Used to force the emission of LED illumination unit to off by level
for Light 1 synchronized input.
4 24VDC(24VDC) + ve power supply input Supplies a 24 V power source for the illumination expansion unit.
(24 V DC)
5 0V(0V) - power supply (0 V) input Connects the 0 V of the 24 V power source for the illumination
expansion unit.
6 FG(FG) frame ground terminal Connect to a Class D ground.

Point The 0 V power supply, COMIN, controller, and other expansion unit commons are all insulated.

Input circuit diagram


• Max. applied voltage: 26.4 V 7.5 kΩ
LOFF
• ON voltage: 19 V or greater
910 Ω
• ON current: 3 mA or greater
COMIN
• OFF voltage: 5 V or less
• OFF current: 1 mA or less

6-86 CV-X UM_A


I/O Terminals of the CV-X400/X300 Series

Illumination Expansion Unit (CA-DC50E: Option)


The following section details the terminal block specifications for the illumination expansion unit (CA-DC50E).

Power supply connector


• Compatible wires: AWG14 to 22
• Terminal block screw torque: 0.25 Nm or less

24V (1)
0V

FG
(3)

Control/data output via I/O terminals


Connector Specifications
• Power supply Connector Terminal Block

No. Signal Signal Description Description


(terminal block display)
1 24VDC(24V) + ve power supply input Supplies a 24 V power source for the illumination expansion unit.
(24 V DC)
2 0V(0V) - power supply (0 V) input Connects the 0 V of the 24 V power source for the illumination
expansion unit.
3 FG(FG) frame ground terminal Connect to a Class D ground.

Point The 0 V power supply, controller, and other expansion unit commons are all insulated.

Illumination Expansion Unit (CA-DC60E: Option)


The following section details the terminal block specifications for the illumination expansion unit (CA-DC60E).

Power supply connector


• Compatible wires: AWG14 to 22
• Terminal block screw torque: 0.25 Nm or less

Connector Specifications
• Power supply Connector Terminal Block

No. Signal (terminal block display) Signal Description Description


1 24VDC(24V) + ve power supply input Supplies a 24 V power source for the illumination expansion unit.
(24 V DC)
2 0V(0V) - power supply (0 V) input Connects the 0 V of the 24 V power source for the illumination
expansion unit.
3 FG(FG) frame ground terminal Connect to a Class D ground.

Point The 0 V power supply, controller, and other expansion unit commons are all insulated.

CV-X UM_A 6-87


I/O Terminals of the CV-X400/X300 Series

LJ-V Input Unit (CA-E100LJ/E110LJ: Option)


The connector specifications for the CA-E100LJ/E110LJ LJ-V input unit (sold separately) are as follows.

Point Tightening with a force above the standard torque may cause damage to the terminal block.

ENCODER connector I/O connector

24V (1)
12V

5V

(+)
COM
(-)
24V

12V

5V

(+)
COM
(-)
24V
5V
OUT (1)
0V
12V OUT
Control/data output via I/O terminals

N.C.
5V
COM
(+)
COM
(-) (15) RMT (5)

• Suitable wiring: AWG16 - 28 • Suitable wiring: AWG16 - 28


• Terminal block screw torque: 0.25 N·m or less • Terminal block screw torque: 0.25 N·m or less

Pin Layout: ENCODER connector

No. Terminal name Terminal block Terminal explanation Signal Circuit diagram
display at time direction (Page 6-90)
of shipment
1 OC A 24 24V Open collector Encoder input A (24V) In D
2 OC A 12 12V Open collector Encoder input A (12V) In D
3 OC A 5 5V Open collector Encoder input A (5V) In D
4 422 A+ + RS-422 Encoder input A+ In D
5 ENC A COM COM(-) Encoder input A common (-) - -
6 OC B 24 24V Open collector Encoder input B (24V) In D
7 OC B 12 12V Open collector Encoder input B (12V) In D
8 OC B 5 5V Open collector Encoder input B (5V) In D
9 422 B+ + RS-422 Encoder input B+ In D
10 ENC B COM COM(-) Encoder input B common (-) - -
11 OC Z 24 24V Open collector Encoder input Z (24V) In D
12 OC Z 12 12V Open collector Encoder input Z (12V) In D
13 OC Z 5 5V Open collector Encoder input Z (5V) In D
14 422 Z+ + RS-422 Encoder input Z+ In D
15 ENC Z COM COM(-) Encoder input Z common (-) - -

• Use a shield cable that supports an RS-422 signal for the connection, and always connect the Cable shield to the FG.
Point
• There is continuity between each input circuit. Pay attention so that potential differences are not generated between
the signals.
• The ENC A COM, ENC B COM, ENC Z COM, 0V OUT and REMOTE COM are respectively insulated from the controller
and the other expansion unit commons.

6-88 CV-X UM_A


I/O Terminals of the CV-X400/X300 Series

Pin Layout: I/O connector

No. Terminal name Terminal block Terminal explanation Signal Circuit diagram
display at time direction (Page 6-90)
of shipment
1 5V OUT 5V OUT Encoder service power supply - -
2 0V OUT 0V OUT (150mA MAX) - -
3 N.C - - - -
4 RMT COM COM Laser remote interlock input common - -
5 REMOTE RMT Laser remote interlock input In E

• The rated output for the 5 V OUT is 150 mA. When using encoders which are going to exceed that, prepare an external
Point
5 V power supply.
• The laser remote interlock inputs are non-voltage inputs. The laser beams are emitted from the LJ-V Series head which
are connected to CA-E100LJ/E110LJ via short-circuits with the input commons, and if the aperture is open the trigger
receiving is also cancelled in conjunction with all of the LJ-V Series head emissions being terminated. (factory default

Control/data output via I/O terminals


is that it is short-circuited via a shorting pin).
• The ENC A COM, ENC B COM, ENC Z COM, 0V OUT and REMOTE COM are respectively insulated from the controller
and the other expansion unit commons.

CV-X UM_A 6-89


I/O Terminals of the CV-X400/X300 Series

Input/Output Circuit (CV-X400/X300 Series): Input Connections (CV-X400/X300 Series)

Input circuit diagram Example of connections

Circuit A (For F_IN0 to 3 only, EV compatible) When connecting an NPN PLC output to the system input

7.5 kΩ
IN OUT IN

910 Ω

COMIN *

COM(-) COMIN*

PLC (NPN output) Input circuit on controller


• Max. applied voltage: 26.4 V
• ON voltage: 19 V or greater
When connecting a PNP PLC output to the system input
Control/data output via I/O terminals

• ON current: 2.2 mA or greater


• OFF voltage: 5 V or less
• OFF current: 1 mA or less IN

Circuit B (other inputs)


COM(+)
COMIN*
15 kΩ
IN
Input circuit on controller

2.7 kΩ OUT

COMIN*
PLC (PNP output)

• Max. applied voltage: 26.4 V


• ON voltage: 19 V or greater
• ON current: 1.2 mA or greater
• OFF voltage: 3 V or less
• OFF current: 0.3 mA or less
* The commons which are connected differ
Point
according to the IN terminals. The common
terminal for IN connectors 2 - 6 is COMIN1,
and the common terminal for parallel I/O
connectors 2 - 16 is COMIN2.

6-90 CV-X UM_A


I/O Terminals of the CV-X400/X300 Series

Input/Output Circuit (CV-X400/X300 Series): Output Connections (CV-X400/X300 Series)

Output circuit diagram

Circuit C (common for all output terminals)


• Max. imposed voltage: 30 V Poly Switch

• Max. sink current: 50 mA OUT

• Leakage current: 0.1 mA or less


• Residual voltage:
1.4 V or less (50 mA) COMOUT*

1.0 V or less (20 mA)

Since this instrument utilizes a photo MOSFET in the output elements, any one of the NPN inputs, or PNP inputs is
Point
connectable.

Control/data output via I/O terminals


Example of connections: When connecting the output from the controller with a positive common

Point If the input instrument is compatible with the NPN open collector outputs, then refer to this connection example.

When connecting the output from the controller to a PLC with a positive common
IN

Poly Switch

OUT

COMOUT*

COM(+)

PLC input circuit positive common Output circuit on controller

When connecting the output from the controller to a relay

Poly Switch
Load
OUT

COMOUT*

Relay Output circuit on controller

* The commons which are connected differ according to the OUT terminals. The common terminal for OUT connectors 1
Point
- 2 is COMOUT1, and the common terminal for OUT connectors 3 - 4/6 - 7 is COMOUT_F, and the common terminal for
parallel I/O connectors 18 - 39 is COMOUT2.

CV-X UM_A 6-91


I/O Terminals of the CV-X400/X300 Series

Example of connections: When connecting the output from the controller with a negative common

Point If the input instrument is compatible with the PNP open collector outputs, then refer to this connection example.

When connecting the output from the controller to a PLC with a negative common
IN
Poly Switch

OUT

COMOUT*
COM(-)

PLC input circuit negative common Output circuit on controller


Control/data output via I/O terminals

When connecting the output from the controller to a relay

Poly Switch
Load
OUT

COMOUT*

Relay Output circuit on controller

* The commons which are connected differ according to the OUT terminals. The common terminal for OUT
Point
connectors 1 - 2 is COMOUT1, and the common terminal for OUT connectors 3 - 4/6 - 7 is COMOUT_F, and the
common terminal for parallel I/O connectors 18 - 39 is COMOUT2.

6-92 CV-X UM_A


I/O Terminals of the CV-X400/X300 Series

Input/Output Circuit (CV-X400/X300 Series): Input Connections (CA-E100LJ/E110LJ)

Input circuit diagram

Circuit D (ENCODER Input) Circuit E (Laser Remote Interlock Input)

3kΩ +5V +5V


OC 24
1.6kΩ 2.2kΩ
OC 12 1kΩ
220Ω
OC 5
120Ω

Internal circuit
422 + REMOTE
Poly Switch Internal
1kΩ
circuit
ENC COM
Poly Switch 150Ω RMT COM

• Max. imposed voltage: 26.4V/13.2V/5.5V • Non-voltage input

Control/data output via I/O terminals


• ON voltage: 21.6 V or greater/10.8 V or greater/3.5V or • ON voltage: 1V or less
greater • OFF current: 0.6 mA or less
• ON current: 7.5 mA or greater • Short-circuit current (Typ.): 2 mA
• OFF voltage: 3.6 V or less/2.4 V or less/1.0 V or less

RS-422 encoder input (when using the line driver)


• AM26LS32 equivalent

Example of connections (Circuit D)

When connecting the NPN open collector output encoder


Shielded
twisted pair cable OC 24
NPN Open collector 12V *
output on Encoder
OC 12
OC 5
422 +
Poly Switch Internal
OUT circuit

A phase/ ENC COM


B phase/ Poly Switch
Z phase Input circuit on CA-E100LJ/E110LJ
COM(-)

* The diagram is for the example where 12 V was used. Connect to 5V/12V/24V in accordance with the power supply.

Point Use a shielded cable for the connection.

When connecting the PNP open collector output encoder


Shielded
twisted pair cable OC 24
PNP Open collector
output on Encoder
OC 12
OC 5
422 +
Poly Switch Internal
COM(+) 12V * circuit

ENC COM
Poly Switch
Input circuit on CA-E100LJ/E110LJ
OUT

* The diagram is for the example where 12 V was used. Connect to 5V/12V/24V in accordance with the power supply.

Point Use a shielded cable for the connection.

CV-X UM_A 6-93


I/O Terminals of the CV-X400/X300 Series

When connecting the RS-422 output encoder

RS-422 output OC 24
on Encoder
A phase/ Shielded
twisted pair cable OC 12
B phase/
Z phase + OC 5
422 +
Poly Switch Internal
circuit

A phase/ ENC COM


Poly Switch
B phase/
Z phase - Input circuit on CA-E100LJ/E110LJ

Point Use a shielded cable that conforms with the RS-422 signal for the connection.

An example of wiring to a KEYENCE encoder relay unit (CA-EN100U)

CA-EN100U CV-X482 + CA-E100LJ/E110LJ


Control/data output via I/O terminals

(1)

...
(15)
(1)

...
(5)

(1) ... (10)


LJ-V Input Unit
CA-E100LJ/E110LJ
ENCODER Connector
CA-EN100U Terminal block
No. Terminal name*
No. Terminal name Terminal explanation 1 24V
1 24V DC+ Power supply input (24 V DC) 24 V DC power supply 2 12V
2 24V DC- Power supply input (0 V DC) (sold separately)
3 5V
3 NC Not used 4 (+)
4 422A+ RS-422 Encoder output A+ Black 5 COM(-)
5 422A- RS-422 Encoder output A- Black/White 6 24V
6 422B+ RS-422 Encoder output B+ Red 7 12V
7 422B- RS-422 Encoder output B- Red/White 8 5V
8 422Z+ RS-422 Encoder output Z+ Green 9 (+)
9 422Z- RS-422 Encoder output Z- Green/White 10 COM(-)
10 SG Signal GND Clear 11 24V
12 12V
13 5V
14 (+)
15 COM(-)

I/O Connector
No. Terminal name*
1 5V OUT

RS-422 cable 2 0V OUT


(2.5 m: bundled with the encoder relay unit) 3 N.C.
4 COM
5 RMT

6-94 CV-X UM_A


I/O Terminals of the CV-X400/X300 Series

Example of connections (Circuit E)

When connecting the NPN open collector output PLC When connecting the PNP open collector output PLC

+5V +5V +5V +5V

Internal circuit

Internal circuit
OUT REMOTE COM(+) REMOTE

COM(-) RMT COM OUT RMT COM

PLC Input circuit on CA-E100LJ/E110LJ PLC Input circuit on CA-E100LJ/E110LJ


(NPN output) (PNP output)

Control/data output via I/O terminals

CV-X UM_A 6-95


Using command inputs via I/O terminals

Using command inputs via I/O terminals

Command input timing

Reference Except for image capture and clear error, the commands can be input only when the controller is operating in run mode.

Basic flow (an example of real-time command execution)

CMD_CODE (3-0) command type Command


Control/data output via I/O terminals

CMD_PARAM (7-0) command parameter Parameter

a
CST D A

C b
BUSY C

c
ACK (execution successful) B

c
NACK (execution failed) B d

e
CMD_READY
C C

f (Always ON)
READY1

A: 1 msec or more B: Same as the STO output time C: Within 1 msec D: 500 µsec or more

/ A command input is confirmed at the leading edge of CST.


0 BUSY turns on to indicate that image processing or a command from the terminal block is being executed.
1 The result of the command execution (success or failure) can be checked by either ACK or NACK being turned on for
STO output ON time.
2 CMD_READY turns on when ACK or NACK turns off.
3 CST is ignored if it is input while CMD_READY is turned off. In this case, neither an ACK nor NACK response is given for
CST.
4 If a command is not based on real-time execution, READY turns off during execution of the command.

6-96 CV-X UM_A


Using command inputs via I/O terminals

Timing of commands which are not based on real-time execution

When no command request is received

TRG1

READY1

When a command request is received

TRG1

READY1 1 µsec or more

Control/data output via I/O terminals


CST

Capture time Image Command


ACK processing time Execute Time

Command
execution
waiting time

• When a command request is received during processing, the command is executed as soon as image processing is
completed.
• READY signal does not turn on until the command execution is completed. Therefore, a next trigger input is not accepted until
READY signal turns on.

When no image capture is performed.

READY1 Within 500 µsec 1 µsec or more

CST

Command
ACK Execute Time

The command is executed immediately and READY signal turns off during the command execution.

CV-X UM_A 6-97


Using command inputs via I/O terminals

I/O command inputs available on the controller


The I/O command inputs available on the controller are shown below.
See the descriptions in the following pages for more details on each command.

Value Command name Command detail CMD_CODE CMD_PARAM


(IN8 to IN11) (IN0 to IN7)
3 2 1 0 7 6 5 4 3 2 1 0
0 Save program (Page 6-99) The same function as SS 0 0 0 0 None
command (Page 6-8)
1 Specify parameter in 0 0 0 1 0 - 255
upper 8 bits (Page 6-99)
2 Change programs The same function as PW 0 0 1 0 0 - 255: Program number
(SD card 1) (Page 6-99) command (Page 6-10)
(fixed to SD1)
Control/data output via I/O terminals

3 Change programs The same function as PW 0 0 1 1 0 - 255: Program number


(SD card 2) (Page 6-99) command (Page 6-10)
(fixed to SD2)
4 Image registration The same function as BS 0 1 0 0 IN7 to IN6: Camera No. (specify with 0 to 3)
(Page 6-99) (with parameters) IN5 to IN0: Destination number
command (Page 6-16)
5 Update reference value The same function as BS 0 1 0 1 None
(Page 6-99) (without parameters)
command (Page 6-16)
6 Image capture The same function as BC 0 1 1 0 IN1 to IN0: Destination
(Page 6-99) command (Page 6-33) (0: SD2, 1: FTP, 2: VisionDataStorage(USB))
7 Write execute condition The same function as EXW 0 1 1 1 0 to 99: Execute condition number
(Page 6-99) command (Page 6-17)
8 Clear error (Page 6-99) The same function as CE 1 0 0 0 None
command (Page 6-8)
9 Change output file/folder The same function as OW 1 0 0 1 IN0: Changes data output files when set to 1
(Page 6-100) command (Page 6-34) IN1: Changes image output folders when
set to 1
10 Change Operation Screen This function is the same 1 0 1 0 IN6: Specified screen type
(Page 6-100) as the VW command (specify with 0, 1)
(Page 6-9) IN3 to IN0: Screen No. (specify with 0 to 9)
11 Save statistical data The same function as TS 1 0 1 1 IN0: Type of file for writing data
(Page 6-100) command (Page 6-31) (0: measured value 1: statistical data)
12 Change shutter speed The same function as CSH 1 1 0 0 IN7 to IN6: Camera No. (specify with 0 to 3)
(Page 6-100) command (Page 6-11) IN3 to IN0: Shutter Speed
13 Change camera sensitivity The same function as CSE 1 1 0 1 IN7 to IN6: Camera No. (specify with 0 to 3)
(Page 6-100) command (Page 6-13) IN3 to IN0: Camera sensitivity (specify with
1 to 9)
14 Trigger reset (Page 6-100) The same function as RE 1 1 1 0 None
command (Page 6-9).
1: ON (short), 0: OFF (open)

• Except for image capture and clear error, the I/O commands can be input only when the controller is operating in run mode.
Reference
• To confirm a command, input the command to CMD_PARAM0 to 7, CMD_CODE0 to 3 and then turn the CST input on
(recognition of the leading edge).
• ACK output and NACK output ON time is of the same duration as STO output time.
• As the commands based on real-time execution are executed along with the measurement process, execution of that kind of
command does not affect the image processing. However, command execution time for this case will take longer than when
the command alone is solely executed.

6-98 CV-X UM_A


Using command inputs via I/O terminals

0. Save program 3. Change programs (SD card 2)


Saves the setting. Changes the current program to the target program,
specified in 16 bits, on the SD card 2.
Parameter
None Parameter
Program No. 0 to 255 (To select 256 to 999, specify the
1. Specify parameter in upper 8 bits upper bits 15 to 8 in the parameter of [1. Specify
parameter in upper 8 bits], and the lower bits 7 to 0 in this
Specifies the upper bits of a parameter used with a
parameter.)
different command.
The specified parameter is held until the next
Reference 4. Image registration
command execution or shut down of the controller.
Registers the latest captured image as reference image for
Parameter
the camera with the specified No.
• When referencing with [Change Programs]: Specifies

Control/data output via I/O terminals


the upper 8 bits of the parameter. Parameter
• When referencing with [Register Image]: • CMD_PARAM5 to 0: Destination No. 0 to 63 (When
- When multiple image capture is not used: specifying destination No. 64 to 899, select [1. Specify
CMD_PARAM7 to 4: Not used parameter in upper 8 bits] for the upper bits, and
CMD_PARAM3 to 0: Upper 4 bits of destination specify 5 to 0 in this parameter.)
number • CMD_PARAM7 to 6: Camera No. (0: CAM 1, 1: CAM 2,
- When multiple image capture is used (Program Setting 2: CAM 3, 3: CAM 4)
(Generic)): • When multiple image capture is used, it is necessary to
CMD_PARAM7 to 4: Capture number (0 to 7) specify the capture number using [1. Specify parameter
CMD_PARAM3 to 0: Upper 4 bits of destination in upper 8 bits].
number
- When multiple image capture is used (Program 5. Update reference value
Setting (Connector)):
The command recalculates a reference measured value
CMD_PARAM7 to 4: Capture point (0 to 7)
using the latest reference image.
CMD_PARAM3 to 2: Capture number lighting (0:
Lighting A, 1: Lighting B) Parameter
CMD_PARAM1 to 0: Upper 2 bits of destination None
number
• When referencing with [Shutter Speed] or [Camera
6. Image capture
Sensitivity]
- When multiple image capture is not used: Not used This command captures an image of the screen.
- When multiple image capture is used (Program Parameter
Setting (Generic)): CMD_PARAM1 to 0: Destination (0:SD2, 1: FTP,
CMD_PARAM7 to 4: Capture number (0 to 7) 2: VisionDataStorage (USB))
CMD_PARAM3 to 0: Not used
- When multiple image capture is used (Program
7. Write execute condition
Setting (Connector)):
CMD_PARAM7 to 4: Capture point (0 to 7) This command changes the number of the execution
CMD_PARAM3 to 2: Capture number lighting (0: condition currently enabled to the specified number.
Lighting A, 1: Lighting B)
Parameter
CMD_PARAM1 to 0: Not used
CMD_PARAM6 to 0: Value of execute condition number (0
to 99)
2. Change programs (SD card 1)
Changes the current program to the target program, 8. Clear error
specified in 16 bits, on the SD card 1.
This command clears the error status.
Parameter
Parameter
Program No. 0 to 255 (To select 256 to 999, specify the
None
upper bits 15 to 8 in the parameter of [1. Specify
parameter in upper 8 bits], and the lower bits 7 to 0 in this
parameter.)

CV-X UM_A 6-99


Using command inputs via I/O terminals

9. Change output file/folder 13. Change camera sensitivity


• When changing a data output file, a new result file is This command changes the sensitivity of the specified
created using the latest date and time. camera.
• When changing an image output folder, a new image
Parameter
output folder is created using the latest date and time.
• CMD_PARAM7 to 6: Camera No. (0: CAM1, 1: CAM2, 2:
Parameter CAM3, 3: CAM4)
CMD_PARAM1 to 0: Select target. (1: data output file, 2: • CMD_PARAM3 to 0: Specify the camera sensitivity (1 to
image output folder, 3: both) 9, for high speed camera: 1 to 7)
• When multiple image capture is used, it is necessary to
10. Change operation screen specify the capture number using [1. Specify parameter
in upper 8 bits].
Changes the display to the specified operation screen.

Parameter 14. Trigger reset


Control/data output via I/O terminals

• CMD_PARAM6: Specified screen type (0: Image


This command cancels the state in which a trigger is input
display, 1: Customized operation screen)
halfway into a measurement round when Multi-Capture is
• CMD_PARAM3 to 0: Screen number (0 to 4: Camera
enabled. It discards the capture image and measurement
No., 0 to 9: Customized operation screen No.)
result of the currently running measurement round and
restores the state before the measurement execution.
11. Save statistical data
Parameter
This command saves archived statistical data to the SD
None
card 2. See "Saving recorded results to an SD card 2"
(Page 4-37) for more details on the data in the saved file.

Parameter
CMD_PARAM0: Type of file for writing data (0: measured
value 1: statistical data)

12. Change shutter speed


This command changes the shutter speed for the specified
camera.

Parameter
• CMD_PARAM7 to 6: Camera No.(0: CAM1, 1: CAM2, 2:
CAM3, 3: CAM4)
• CMD_PARAM4: 0 (fixed)
• CMD_PARAM3 to 0: Shutter speed (0:1/15, 1:1/30, 2:1/
60, 3:1/120, 4:1/240, 5:1/500, 6:1/1000, 7:1/2000, 8:1/
5000, 9:1/10000, 10:1/20000)
• When multiple image capture is used, it is necessary to
specify the capture number using [1. Specify parameter
in upper 8 bits].

6-100 CV-X UM_A


Using command inputs via I/O terminals

I/O command control procedures


Use the following procedures to operate the controller via the I/O commands.

Example of changing to the program 15 on the SD card 1 using the I/O commands.

CMD_CODE(3-0)
command type

CMD_PARAM(7-0)
command parameter

CST

CMD_READY

Control/data output via I/O terminals


Program No.

ACK(NACK)

/Enter the command codes of the change program (SD card 1) command in CMD_CODE0 to 3.
CMD_CODE3: 0 (OFF)
CMD_CODE2: 0 (OFF)
CMD_CODE1: 1 (ON)
CMD_CODE0: 0 (OFF)
0Enter the codes of program 15 to which the setting is changed in CMD_PARAM7 to 0.
CMD_PARAM7: 0 (OFF)
CMD_PARAM6: 0 (OFF)
CMD_PARAM5: 0 (OFF)
CMD_PARAM4: 0 (OFF)
CMD_PARAM3: 1 (ON)
CMD_PARAM2: 1 (ON)
CMD_PARAM1: 1 (ON)
CMD_PARAM0: 1 (ON)
1Turn the input of CST on.
2CMD_READY turns off and program change starts.
3When the setting is changed to program 15, ACK turns on for a certain time, and then CMD_READY turns on after ACK
falls.

Reference ACK output and NACK output duration time is the same as the time set with STO (default: 10ms).

CV-X UM_A 6-101


Outputting data via I/O terminals

Outputting data via I/O terminals

Output order
According to the output order, the data specified in the output settings is output from OUT_DATA0 to 15 sequentially.
The items and order for output can be specified in [OUT terminal] of [Output Settings] (Page 3-100) as required.
Examples of output details and timing are shown in the following pages.

• STO output is generated one time even when none of the output settings is specified.
Reference
• When the controller is operating in setup mode or TEST terminal (Page 6-131) is ON, the data is not output.
• If asynchronous trigger capture (Page 3-19) is enabled, the output of the judgment value and measurement result are
implemented by camera. In order to check which camera’s measurement results the output data are, change the settings so
Control/data output via I/O terminals

that they include the CAM * Execute Status in the output data.

Example of output
If measurement is performed using the settings below, the timing chart of output signals is as follows in the next page.
• Measurement conditions
- CAM1 T100: Area, T101: Area, T102: Area, T103: Area, T104: Area, T105: Area, T106: Area, T107: Area
- CAM2 T200: Blob
- CAM3 T300: Pattern search, T301: Profile defect
- CAM4 T400: Edge Position, T401: Edge Position, T402: Defect, T403: Blob
• Output setting
- First time: CAM1 Judgment, Second: Tool Judgment for T100 to T107, Third: CAM2 Judgment, Fourth: Tool Judgment
for T200, Fifth: CAM3 Judgment, Sixth: Tool Judgment for T301, Seventh: CAM4 Judgment, Eighth: Tool Judgment for
T402 and 403
For these output settings, a total of 8 times of separated outputs will be performed for 1 measurement.
If [Enable Handshake] is set to OFF, output turns on and off repeatedly 8 times at the output switch cycle time with STO. On
the output device, read OUT_DATA0 to 15 in synchronization with the leading edge of STO.

TRG

/ 0 1 2 3 4 5 6
OUT0 CAM 1 T100 CAM 2 T200 CAM 3 T301 CAM 4 T402
Judgment Judged value Judgment Judged value Judgment Judged value Judgment Judged value
OUT1 0 T101 0 0 0 0 0 T403
Judged value Judged value
OUT2 0 T102 0 0 0 0 0 0
Judged value
OUT3 0 T103 0 0 0 0 0 0
Judged value
OUT4 0 T104 0 0 0 0 0 0
Judged value
OUT5 0 T105 0 0 0 0 0 0
Judged value
OUT6 0 T106 Judged 0 0 0 0 0 0
value
OUT7 0 T107 0 0 0 0 0 0
Judged value
OUT8 0 0 0 0 0 0 0 0
OUT9 0 0 0 0 0 0 0 0
OUT10 0 0 0 0 0 0 0 0

6-102 CV-X UM_A


Outputting data via I/O terminals

OUT11 0 0 0 0 0 0 0 0
OUT12 0 0 0 0 0 0 0 0
OUT13 0 0 0 0 0 0 0 0
OUT14 0 0 0 0 0 0 0 0
OUT15 0 0 0 0 0 0 0 0

OUT_DATA a b c d e f g h
0 to 15

STO
A
B A: Output rise time B: Output time C: Output change time
C

• For more details on how to set items A - C above, refer to "Changing Terminal settings (External Terminal)" (Page 5-4).
• The output duration for 1 measurement via the I/O terminals is segment count x output switch cycle time.

Control/data output via I/O terminals


• If the duration of output via the I/O is longer than the trigger input cycle, priority is given to image processing. Therefore, output delay may be
caused, which will lead to the data being omitted. To avoid this, set the output switch cycle time shorter than the trigger input cycle time.

CV-X UM_A 6-103


Timing chart

Timing chart

1. Operations at startup

Typical operations at startup (for CV-X200/X100 Series)

ON Power on

Power supply
A B
OFF

BUSY
Control/data output via I/O terminals

a
RUN
F C

CMD_READY D G
b
c
READY1

FLASH1 E

READY2
d

FLASH2 E

ACK

NACK

OUT_DATA

ERROR

STO

OR

A: 20 sec. or more B: 1 sec. or more C: 5 ms or more D: 50 ms or more


E: 50 ms or more F: 11 sec. or more (CV-X100 Series) / 21 sec. or more (CV-X200 Series)
G: 0.5 ms or more

/When the system enters run mode, the RUN terminal turns on.
0Command inputs will be accepted when CMD_READY turns on/off once after startup and then turns on again.
1The input of TRG1 is accepted after READY1 turns on.
2This terminal remains off unless TRG2 is enabled in the settings. When enabled, this terminal turns on in the same way as
READY1.

6-104 CV-X UM_A


Timing chart

Typical operations at startup (for CV-X400/X300 Series)

ON Power on

Power supply
A B
OFF

BUSY

a
RUN
E C

CMD_READY D F
b
c
READY1

FLASH1

Control/data output via I/O terminals


READY2
d

FLASH2

ACK

NACK

OUT_DATA

ERROR

STO

OR

A: 20 sec. or more B: 1 sec. or more C: 5 ms or more D: 50 ms or more


E: 50 sec. or more F: 0.5 ms or more

/When the system enters run mode, the RUN terminal turns on.
0Command inputs will be accepted when CMD_READY turns on/off once after startup and then turns on again.
1The input of TRG1 is accepted after READY1 turns on.
2This terminal remains off unless TRG2 is enabled in the settings. When enabled, this terminal turns on in the same way as
READY1.

CV-X UM_A 6-105


Timing chart

Normally open (N.O.)/normally closed (N.C.) reflection timing

ON Power on

Power supply
OFF

햲 A 햳
Open
N.O
All output terminals
(except for FLASH)
N.C
Close

햲 B 햳
Open
N.O
FLASH*
N.C
Close
Control/data output via I/O terminals

A: 6 sec. or more B: 5 sec. or more

/The system enters normally open state immediately after startup, regardless of the settings.
0 The normally closed settings are reflected after a certain period of time.

6-106 CV-X UM_A


Timing chart

2. Typical operations at trigger input (Capture Type: Normal)


Operations at trigger input depend on various settings of the camera.
When [Normal] is specified in [Set Advanced] - [Capture Type] of [Set Camera], captures + measurements of all cameras
currently used is processed as 1 measurement.

Basic operation

Capture option Image Buffer (1 time)


Behavior at Full Buffer No capturing
Trigger Mode External trigger (using only trigger 1)

ON

TRG1
A

Control/data output via I/O terminals


OFF

FLASH1*1
B

햲 햴

READY1
C

A: Trigger minimum input time 1 ms or more


B: Depends on the flash lighting time
C: READY1 trailing response delay 1 ms or less

/The input of TRG1 is accepted while the READY1 output is on. When a trigger is input, an image is captured and transmitted
by camera 1. The READY1 turns off during this time.
0The trigger input turns on flash lighting duration for the specified duration (can be changed with setting). See "2. Typical
operations at trigger input (FLASH Output Timing)" (Page 6-120) for more details.
1If there is space in the image buffer count buffer after image capture and transmission is complete, READY1 turns on to
accept the next trigger input even while the image processing is being performed.

*1 The assignment of the trigger terminals and FLASH terminals can be changed. The above example shows the setting which assigns TRG1
and FLASH1 to camera 1.

CV-X UM_A 6-107


Timing chart

Basic operations (when using trigger 1 and trigger 2)

Capture option Image Buffer (1 time)


Behavior at Full Buffer No capturing
Trigger Mode External trigger (using trigger 1 and trigger 2)

ON 햲
TRG1
A
OFF

FLASH1*1
B

햳 햴

READY1
C
Control/data output via I/O terminals

TRG2 햲

FLASH2*1
B

햳 햵

READY2
C

A: Trigger minimum input time 1 ms or more


B: Depends on the flash lighting time
C: READY1 trailing response delay 1 ms or less

/Although TRG1 and TRG2 can be input in any order, the same trigger cannot be input consecutively. (1) To input the same
trigger consecutively, the image buffer count must be set to two or more times.
0The input of TRG1 is accepted while READY1 is on. The input of TRG2 is accepted while READY2 is on.
1When the image buffer is reserved for only one image, READY1 for camera 1 which completed image capture/transmission
does not turn on until the buffer space is available after camera 2 completes image capture/transmission.
2If there is space in the image buffer, READY2 for camera 2 which completed image capture/transmission turns on to allow
reception of the next trigger input even during image processing.

*1 The assignment of the trigger terminals and FLASH terminals can be changed. The above example shows the setting which assigns TRG1
and FLASH1 to camera 1 and TRG2 and FLASH2 to camera 2.

6-108 CV-X UM_A


Timing chart

Basic operations (when using trigger 1 and trigger 2: trigger delay valid)

Capture option Image Buffer (1 time)


Behavior at Full Buffer No capturing
Trigger Mode External trigger (using trigger 1 and trigger 2), trigger delay valid

ON a
TRG1 A
OFF
Image sensor shutter B
of camera 1 b

Image sensor shutter B


of camera 2 b

C
FLASH1*1 c

Control/data output via I/O terminals


C
FLASH2*1 c

d D d
READY1
f
EXPOSURE_BUSY E E

TRG2 A

Image sensor shutter B


b
of camera 3

Image sensor shutter B b


of camera 4

C
FLASH3*1 c

C
FLASH4*1 c
e
D
READY2

A: Trigger minimum input time 1 ms or more


B: Trigger delay time (0 to 999 ms)
C: Depends on the flash lighting time settings.
D: READY1 trailing response delay 1 ms or less
E: Response delay for EXPOSURE_BUSY 1 ms or less
/Although TRG1 and TRG2 can be input in any order, the same trigger cannot be input consecutively. To input the same
trigger consecutively, the image buffer count must be set to two or more times.
0When a trigger is input, the camera assigned to the trigger starts image capture after the trigger delay time set for each
camera in the camera settings.
1The FLASH output (FLASH*1) is linked to the image capture timing of the camera to which the trigger delay was applied, and
will turn on according to the camera settings. (The above example shows the case where the on-delay for the FLASH output
timing is set to "Start Capture to Flash Lighting".)
2When the image buffer is reserved for only one image, READY1 for camera 1/2 which completed image capture/transmission
does not turn on until the buffer space is available after camera 3/4 completes image capture/transmission.
3 If there is space in the image buffer, READY2 for camera 3/4 which completed image capture/transmission turns on to allow
reception of the next trigger input even during image processing.
4 While the image sensor shutter of any one of the cameras is in operation, EXPOSURE BUSY (camera exposure signal)
becomes ON.
*1 The assignment of the cameras and FLASH terminals can be changed. The above example shows the setting which assigns TRG1 to camera
1 and camera 2, TRG2 to camera 3 and 4, FLASH1 to camera 1, FLASH2 to camera 2, FLASH3 to camera 3, FLASH4 to camera 4
respectively.
CV-X UM_A 6-109
Timing chart

Operations for multiple measurements

Capture option Image Buffer (1 time)


Behavior at Full Buffer No capturing
Trigger Mode External trigger (using only trigger 1)

When the image processing time is shorter than the image capture/transmission time
1st trigger 2nd trigger 3rd trigger

TRG1 a

READY1

1st image capture/ 2nd image capture/ 3rd image capture/


transmission transmission transmission
1st image processing 2nd image processing 3rd image processing
Control/data output via I/O terminals

Measurement time

/ Since READY1 is turned on, the next trigger input is accepted.

When the image processing time is longer than the image capture/transmission time
1st trigger 2nd trigger 3rd trigger

TRG1

READY1
Waiting time for processing Waiting time for processing
image of 2nd trigger image of 3rd trigger
1st image capture/ 2nd image capture/ 3rd image capture/
transmission transmission transmission
1st image processing 2nd image processing 3rd image processing

Measurement time

* When the next trigger is input during image processing, the measurement time shown on the screen also includes the waiting
time for completion of image processing.

6-110 CV-X UM_A


Timing chart

Basic operations for multiple measurements (Behavior at full buffer is "overwrite oldest image")

Capture option Image Buffer (1 time)


Behavior at Full Buffer Overwrite oldest image
Trigger Mode External trigger (using only trigger 1)

1st trigger 2nd trigger 3rd trigger 4th trigger

TRG1 a

READY1
Waiting time for processing image of 3rd trigger
*
1st image capture/ 2nd image capture/ 3rd image capture/ 4th image capture/
transmission transmission transmission transmission
1st image processing 2nd image processing (Image of 3rd trigger is used.)

Control/data output via I/O terminals


Measurement time

* By the time the second image processing starts, the third image capture/transmission is complete and the image for the
second trigger in the buffer is overwritten and thus not used in image processing.

Basic operations for multiple measurements (when image buffer count is 2)

Capture option Image Buffer (2 times)


Behavior at Full Buffer No capturing
Trigger Mode External trigger (using only trigger 1)

1st trigger 2nd trigger 3rd trigger 4th trigger

TRG1 햲

READY1 *
Waiting time for processing image of 2nd trigger

1st image capture/ 2nd image capture/ 3rd image capture/ 4th image capture/
transmission transmission transmission transmission
1st image processing 2nd image processing

Measurement time

* When the image buffer is enabled for two times, up to three triggers (including the one for current image processing) can be
input in the shortest amount of time.
Increasing the image buffer count within the range of the available space of image memory allows a specific number of times of
image capturing in advance during the processing of the previous image.

CV-X UM_A 6-111


Timing chart

Basic operations for multiple measurements (when image buffer is off)

Capture option Image Buffer OFF


Behavior at Full Buffer -
Trigger Mode External trigger (using only trigger 1)

When the capture option is set to [None], trigger cannot be input while measurement is being executed.
1st trigger 2nd trigger

TRG1

READY1

1st image capture/ 2nd image capture/


transmission 1st image processing transmission 2nd image processing
Control/data output via I/O terminals

Basic operations for multiple measurements (for internal trigger)

Capture option Image Buffer (1 time)


Behavior at Full Buffer No capturing
Trigger Mode Internal Trigger

Internal trigger

READY1

1st image capture/ 2nd image capture/ 3rd image capture/


transmission transmission transmission
1st image processing 2nd image processing 3rd image processing

1st result output 2nd result output

A: Internal trigger interval time (1 - 999 ms)

/When the internal trigger is selected, trigger signals are generated in a specified trigger cycle. Although a trigger signal
generated when READY1/2 turns on is accepted and the image capture starts, a signal generated when READY1/2 is off
is ignored. Consequently, a time lag between the signal generation and an actual image capture execution will occur
until a trigger signal is generated in the next trigger cycle.
For this reason, to shorten the processing time, it is recommended that the trigger cycle is set to 1ms to reduce the
possible time lag. In addition, to capture images in a regular cycle, it is recommended that the trigger cycle is set to a
value longer than the displayed time interval between triggers (This action prevents the internal trigger from being
generated when READY1/2 is OFF).

6-112 CV-X UM_A


Timing chart

To stop the internal trigger


The internal triggers generate constantly during operation and cannot be stopped. However, it is possible to control the
triggers as if it were stopped using the following steps.
• Stopping result output using TEST terminal: Used to stop result output such as status output forcibly while capturing
is not stopped.

Internal trigger

READY1

1st image capture/ 2nd image capture/ 3rd image capture/


transmission transmission transmission
1st image processing 2nd image processing 3rd image processing

Stop of output 2nd result output

Control/data output via I/O terminals


TEST

/Data output stops while TEST terminal is ON.


• Stopping image capture using EXT terminal: Used to stop image processing itself. However, the data output for
triggers accepted previously is not stopped.

Internal trigger

Stop of acceptance
READY1

1st image capture 2nd image capture 3rd image capture

1st image processing 2nd image processing

1st result output 2nd result output

EXT

/READY1/2 output turns off while EXT terminal is ON. Therefore, internal triggers are not accepted, and thus, the image
capture is not performed.

CV-X UM_A 6-113


Timing chart

2. Typical operations at trigger input (Capture Type: Asynchronous Trigger)

Capture Type Asynchronous Trigger


Capture option Image Buffer (3 times)
Behavior at Full Buffer No capturing
Trigger Mode External trigger (using trigger 1 and trigger 2)

By inputting the trigger signal having the same number as the camera number (TRG1 for CAM 1), the capture +
measurement processing of only the arbitrary 1 camera is executed and processed as 1 measurement.

1st measurement 2nd measurement 3rd measurement

c d
b
1st image capture/ 2nd image capture/ 3rd image capture/ 4th image capture/
Camera 1 transmission transmission transmission transmission
Control/data output via I/O terminals

1st image capture/ 2nd image capture/


Camera 2 transmission transmission

a a a a

TRG1

READY1

a a

TRG2

READY2

/When TRG1 is input, capture is performed with CAM 1 and the captured image is saved in the image buffer of CAM 1.
When TRG2 is input, capture is performed with CAM 2 and the captured image is saved in the image buffer of CAM 2.
There is no restriction on the input timing or order of TRG1 and TRG2, so they are accepted independently of each other.
In addition, TRG1 and TRG2 can be accepted even during measurement.
0As the first measurement, measurement is performed for the first image of CAM 1 saved in the image buffer.
1As the second measurement, measurement is performed for the second image of CAM 1 saved following the first image
in the image buffer.
2As the third measurement, measurement is performed for the first image of CAM 2 saved following the second image in
the image buffer.

• If the capture type is asynchronous trigger, assignments of trigger terminals cannot be changed. TRG1 is assigned to
Reference
CAM1, TRG2 to CAM2, TRG3 to CAM3, TRG4 to CAM4.
• When the result output is set, the result is output for each measurement. By including the system variable “CAM N
Execute Status” in the result output, the camera with which measurement has been performed using asynchronous
trigger can be identified.

6-114 CV-X UM_A


Timing chart

2. Typical operations at trigger input (Capture Type: Multi-Capture)

Capture Type Multi-Capture


Capture option Image buffer OFF
Behavior at Full Buffer No capturing
Trigger Mode External trigger (using trigger 1 and trigger 2)

Performs multiple image captures at the same location and processes them as a single measurement. You can also use this
capture type to capture images while varying the lighting settings or shutter speed at each capture.

1st measurement 2nd measurement

1st Image capture 2nd Image capture 1st Image capture

Control/data output via I/O terminals


Image capture/ Image capture/ Image capture/
Camera 1 Transmission Transmission Transmission

Image capture/ Image capture/


Camera 2 Transmission b Transmission c
Image processing Image processing 1st result output

a a a
TRG1

READY1

a a
TRG2

READY2

/Enabled TRG signals can be input in any order.


0Image processing begins once all of the camera images for the same capture number are ready and once image processing
is complete, the next trigger can be received.
1Once capturing and image processing for the specified number of captures ends, the processing for that measurement
completes, and then result output and screen update are performed.

If settings are configured so that the light and camera settings change for each count, the READY signal will be delayed
Reference
to apply the settings each time. The delay time varies depending on the settings to change, the camera, and lighting.

CV-X UM_A 6-115


Timing chart

2. Typical operations at trigger input (when in LumiTrax Mode)

Capture options Image Buffer (once)


Behavior at image buffer buffer full No capturing
Trigger mode External trigger (Trigger 1), with trigger delay

Image Capture
Image processing
Capturing (1st) Capturing (2nd) … Capturing (n-th) LumiTrax processing

TRG1

A
Emission of light

Imaging element
shutter B B B
Control/data output via I/O terminals

C
READY1

BUSY

EXPOSURE_BUSY

For CV-X200 Series:


A: Trigger delay set time
CA-HX048C/HX048M Trigger delay set time + 70 μs (when the shutter time is 1/10000 or more)
Trigger delay set time + 40 μs (when the shutter time is below 1/10000)
CA-HX200C/HX200M Trigger delay set time + 40 μs
CA-HX500C/HX500M Trigger delay set time + 40 μs
B: Time from light emission start to capturing start
When using CA-DRW*X 60 μs (Internal fixed value)
C: Shutter intervals
CA-HX048C/HX048M (784×596) Color camera: 2605 μs, Monochrome camera 2560 μs, or exposure time + 260 μs, whichever is longer
CA-HX200C/HX200M (1600×1200) Color camera: 3500 μs, Monochrome camera 3490 μs, or exposure time + 260 μs, whichever is longer
CA-HX500C/HX500M (2432×2040) Color camera: 5895 μs, Monochrome camera 5880 μs, or exposure time + 260 μs, whichever is longer
For CV-X400 Series:
A: Trigger delay set time
CA-H048CX/H048MX/HX048C/HX048M Trigger delay set time + 90 μs (Normally open) or 230μs (Normally closed) (when the shutter time is 1/10000 or more)
Trigger delay set time + 60 μs (Normally open) or 200μs (Normally closed) (when the shutter time is below 1/10000)
CA-H200CX/H200MX/HX200C/HX200M Trigger delay set time + 60 μs (Normally open) or 200μs (Normally closed)
CA-H500CX/H500MX/HX500C/HX500M Trigger delay set time + 60 μs (Normally open) or 200μs (Normally closed)
CA-HF6400C/HF6400M/HF2100C/HF2100M Trigger delay set time + 60 μs (Normally open) or 200μs (Normally closed)
B: Time from light emission start to capturing start
When using CA-DRW*X 60 μs (Internal fixed value)
When using CA-DRM*X 220 to 240 μs (Internal fixed value)
When using CA-DQP*X 100 μs (Internal fixed value)
When using CA-DQW40X 100 μs (Internal fixed value)
C: Shutter intervals
CA-H048CX/H048MX/HX048C/HX048M (512×480) Color camera: 1700μs, Monochrome camera: 1660μs, or exposure time + 260 μs, whichever is longer
CA-H048CX/H048MX/HX048C/HX048M (640×480) Color camera: 1920μs, Monochrome camera: 1880μs, or exposure time + 260 μs, whichever is longer
CA-H048CX/H048MX/HX048C/HX048M (784×596) Color camera: 2605μs, Monochrome camera: 2560μs, or exposure time + 260 μs, whichever is longer
CA-H200CX/H200MX (1600×1200) Color camera: 4150μs, Monochrome camera: 4130μs, or exposure time + 300 μs, whichever is longer
CA-H500CX/H500MX (1600×1200) Color camera: 4150μs, Monochrome camera: 4130μs, or exposure time + 300 μs, whichever is longer
CA-HX200C/HX200M (1600×1200) Color camera: 3500μs, Monochrome camera: 3490μs, or exposure time + 260 μs, whichever is longer
CA-HX500C/HX500M (1600×1200) Color camera: 3500μs, Monochrome camera: 3490μs, or exposure time + 260 μs, whichever is longer
CA-H500CX/H500MX (2432×2040) Color camera: 6930μs, Monochrome camera: 6905μs, or exposure time + 300 μs, whichever is longer
CA-HX500C/HX500M (2432×2040) Color camera: 5895μs, Monochrome camera: 5880μs, or exposure time + 260 μs, whichever is longer
CA-HF6400C/HF6400M/HF2100C/HF2100M Exposure time + transfer time* + software processing** or more**
(depending on the Program/controller state)
* : Transfer time (ms)
Number of Channels Used
Camera
pixels 1 2 4
CA-HF6400C 5104×4092 83.3 39.2 28.9
CA-HF6400M 5104×4092 83.2 39.2 28.9
CA-HF2100C 5104×4092 83.2 39.4 20.2
CA-HF2100M 5104×4092 83.2 39.3 20.2
CA-HF2100C 2432×2050 23.6 10.8 -
CA-HF2100M 2432×2050 23.5 10.8 -

• The number of images captured depends on the LumiTrax setting.


Reference
• The light emitting time is the time where B FLASH output start point is subtracted from the shutter speed.
• The transfer time + processing time after each capturing depends on the image size, camera type (color/
monochrome), and LumiTrax setting.
• The figure above shows the operation wherein Image Buffer is on.

6-116 CV-X UM_A


Timing chart

2. Typical operations at trigger input (when in MultiSpectrum Mode)

Capture options Image buffer (once)


Behavior at image buffer full No capturing
Trigger mode External trigger (Trigger 1), with trigger delay

Image Capture
Image processing
Capturing (1st) Capturing (2nd) ... Capturing (n-th) MultiSpectrum processing

TRG1
A
Emission of light

Imaging element B B B
shutter

Control/data output via I/O terminals


C
READY1

BUSY

EXPOSURE_BUSY

A: Trigger delay set time


CA-H048MX/HX048M Trigger delay set time + 70μs (when the shutter time is 1/10000 or more)
Trigger delay set time + 40μs (when the shutter time is below 1/10000)
CA-H200MX/HX200M Trigger delay set time + 40μs
CA-H500MX/HX500M Trigger delay set time + 40μs

B: Time from light emission start to capturing start: 220 to 240 μs (Internal fixed value)

C: Shutter intervals (the longer time from the values below)


For CV-X400 Series:
1) CA-H048MX/HX048M (512×480) 1660μs
CA-H048MX/HX048M (640×480) 1880μs
CA-H048MX/HX048M (784×596) 2560μs
CA-H200MX (1600×1200) 4130μs
CA-HX200M (1600×1200) 3490μs
CA-H500MX (1600×1200) 4130μs
CA-HX500M (1600×1200) 3490μs
CA-H500MX (2432×2040) 6905μs
CA-HX500M (2432×2040) 5880μs
2) CA-H048MX/HX048M Exposure time + 260μs
CA-HX200M/HX500M Exposure time + 260μs
CA-H200MX/H500MX Exposure time + 300μs

• The number of images captured depends on the MultiSpectrum mode settings.


Reference
• The light emitting time is B (Time from light emission start to capturing start) plus the shutter speed.
• The transfer time + processing time after each capturing depends on the image size and MultiSpectrum mode settings.
• The figure above shows the operation wherein Image Buffer is on.

CV-X UM_A 6-117


Timing chart

2. Typical operations at trigger input (when in 3D Capture Mode)

Capture options Image buffer (once)


Behavior at image buffer full No capturing
Trigger mode External trigger (Trigger 1), with trigger delay

Image Capture
Image processing
3D Capture Controller
Capturing (1st) Capturing (2nd) ... Capturing (n-th) processing processing

TRG1

A
READY1
Control/data output via I/O terminals

BUSY

B
EXPOSURE_BUSY

A : Trigger delay time Depends on the settings.


B : 0 ms or more

• The number of captured images depends on the 3D capture settings.


Reference
• The processing time after each capture depends on the image size and 3D capture settings.
• The figure above shows the operation when the image capture buffer is on.

6-118 CV-X UM_A


Timing chart

2. Typical operations at trigger input (when in Outline Capture Mode)

Capture options Image buffer (once)


Behavior at image buffer full No capturing
Trigger mode External trigger (Trigger 1), with trigger delay

Image Capture
Outline Capture Image processing
Capturing (1st) Capturing (2nd) ... Capturing (n-th) processing

TRG1

Emission of light A

Imaging element
shutter B B B

Control/data output via I/O terminals


C
READY1

BUSY

EXPOSURE_BUSY

A: Trigger delay set time


CA-H048CX/H048MX Trigger delay set time + 70 μs (when the shutter time is 1/10000 or more)
Trigger delay set time + 40 μs (when the shutter time is below 1/10000)
CA-H200CX/H200MX/H500CX/H500MX Trigger delay set time + 40 μs

B: Time from light emission start to capturing start


CA-DQP*X : 100 μs (Internal fixed value)

C: Shutter intervals (the longer time from the values below)


1) CA-H048CX/H048MX (512×480) Color camera: 1700 μs, Monochrome camera: 1660 μs
CA-H048CX/H048MX (640×480) Color camera: 1920 μs, Monochrome camera: 1880 μs
CA-H048CX/H048MX (784×596) Color camera: 2605 μs, Monochrome camera: 2560 μs
CA-H200CX/H200MX (1600×1200) Color camera: 4150 μs, Monochrome camera: 4130 μs
CA-H500CX/H500MX (1600×1200) Color camera: 4150 μs, Monochrome camera: 4130 μs
CA-H500CX/H500MX (2432×2040) Color camera: 6930 μs, Monochrome camera: 6905 μs
2) CA-H048CX/H048MX Exposure time + 260 μs
CA-H200CX/H200MX/H500CX/H500MX Exposure time + 300 μs

• The number of images captured depends on the Outline Capture settings.


Reference
• The Outline Capture processing time after each capturing depends on the image size, camera type (color/
monochrome), and Outline Capture settings.
• The figure above shows the operation wherein Image Buffer is on.

CV-X UM_A 6-119


Timing chart

2. Typical operations at trigger input (FLASH Output Timing)

• If you select [Normally Closed] in FLASH Output Mode, lighting connected to a light controller (CA-DC*E; sold separately)
Reference
turns on up to 30 μs before the FLASH signal.
• If one trigger is selected for multiple cameras with different trigger delay settings, the second rise onwards may
overlap with output as the FLASH is also output multiple times in conjunction with camera capture. If the rise signal is
necessary for every image capture with a strobe light, adjust the FLASH output time and configure it so that output
does not overlap.

When FLASH output timing is "Start Capture to Flash Output"

ON

TRG1
OFF B
A
Control/data output via I/O terminals

Imaging element a D
shutter
C c
FLASH1 b

E E
EXPOSURE_BUSY

A: CV-X100 series: CV-X200 series:


- CA-035C/035M, CA-HS035C/HS035M, - CA-035C/035M, CA-HS035C/HS035M,
CV-035C/035M, CV-S035C/S035M 60μs (Response delay 0 - 5 μs) CV-035C/035M, CV-S035C/S035M 40μs (Response delay 0 - 5 μs)
- CA-H035C/H035M, CV-H035C/H035M 60μs (Response delay 0 - 5 μs) - CA-H035C/H035M, CV-H035C/H035M 40μs (Response delay 0 - 5 μs)
- CV-H100C/H100M 60μs (Response delay 0 - 5 μs) - CV-H100C/H100M 40μs (Response delay 0 - 5 μs)
- CA-200C/200M, CA-HS200C/HS200M 60μs (Response delay 0 - 5 μs) - CA-200C/200M, CA-HS200C/HS200M 40μs (Response delay 0 - 5 μs)
- CV-200C/200M, CV-S200C/S200M 60μs (Response delay 0 - 50 μs) - CV-200C/200M, CV-S200C/S200M 40μs (Response delay 0 - 50 μs)
- CA-H200C/H200M, CV-H200C/H200M 60μs (Response delay 0 - 5 μs) - CA-H200C/H200M, CV-H200C/H200M 40μs (Response delay 0 - 5 μs)
- CA-H500C/H500M 60μs (Response delay 0 - 5 μs) - CA-H500C/H500M 40μs (Response delay 0 - 5 μs)
- CV-H500C/H500M 60μs (Response delay 0 - 20 μs) - CV-H500C/H500M 40μs (Response delay 0 - 20 μs)
- CA-HX048C/HX048M 40μs (Response delay 0 - 5 μs) - CA-H2100C/H2100M 40μs (Response delay 0 - 20 μs)
- CA-HX200C/HX200M 40μs (Response delay 0 - 5 μs) - CA-HX048C/HX048M 40μs (Response delay 0 - 5 μs)
- CA-HX500C/HX500M 40μs (Response delay 0 - 5 μs) - CA-HX200C/HX200M 40μs (Response delay 0 - 5 μs)
- When trigger delay is set: - CA-HX500C/HX500M 40μs (Response delay 0 - 5 μs)
(All models) Trigger delay time + 60μs (Response delay 0 - 200 μs) - When trigger delay is set:
(All models) Trigger delay time + 40μs (Response delay 0 - 5 μs)
CV-X400/X300 series:
- CA-035C/035M, CA-HS035C/HS035M,
CV-035C/035M, CV-S035C/S035M 60μs (Normally open) or 200μs (Normally closed) (Response delay 0 - 5 μs)
- CA-H035C/H035M, CV-H035C/H035M 60μs (Normally open) or 200μs (Normally closed) (Response delay 0 - 5 μs)
- CA-200C/200M, CA-HS200C/HS200M 60μs (Normally open) or 200μs (Normally closed) (Response delay 0 - 5 μs)
- CV-200C/200M, CV-S200C/S200M 60μs (Normally open) or 200μs (Normally closed) (Response delay 0 - 50 μs)
- CA-H200C/H200M, CV-H200C/H200M 60μs (Normally open) or 200μs (Normally closed) (Response delay 0 - 5 μs)
- CA-H500C/H500M 60μs (Normally open) or 200μs (Normally closed) (Response delay 0 - 5 μs)
- CV-H500C/H500M 60μs (Normally open) or 200μs (Normally closed) (Response delay 0 - 20 μs)
- CA-H2100C/H2100M 60μs (Normally open) or 200μs (Normally closed) (Response delay 0 - 5 μs)
- CA-H048CX/H048MX, CA-HX048C/HX048M 60μs (Normally open) or 200μs (Normally closed) (Response delay 0 - 5 μs)
- CA-H200CX/H200MX, CA-HX200C/HX200M 60μs (Normally open) or 200μs (Normally closed) (Response delay 0 - 5 μs)
- CA-H500CX/H500MX, CA-HX500C/HX500M 60μs (Normally open) or 200μs (Normally closed) (Response delay 0 - 5 μs)
- CA-HF6400C/HF6400M/HF2100C/HF2100M 60μs (Normally open) or 200μs (Normally closed) (Response delay 0 - 5 μs)
- When trigger delay is set:
(All models) Trigger delay time + 60μs (Normally open) or 200μs (Normally closed) (Response delay 0 - 5 μs)
B: Shutter time
C: [Start Capture to Flash Output] time (0 - 50000 μs)±10 μs
D: Flash lighting time (0.1 - 999.9 ms)
E: Response delay for EXPOSURE_BUSY 1 ms or less

/After receiving the TRG1 input, the controller gives an order for a camera to operate the imaging element shutter.
0Sets the FLASH output start point as the time to start FLASH output based on the timing of ordering the imaging element
shutter operation.
1The flash output time is the length of time the FLASH output is turned on.

6-120 CV-X UM_A


Timing chart

When FLASH output timing is "Flash Output to Start Capture"

ON
TRG1
B
OFF
C
b
Imaging element
shutter D
a
FLASH1 A

E E
EXPOSURE_BUSY

A: 60 μs (±10 μs)*1
When trigger delay is set: (All models) Trigger delay time + 60 μs (Response fluctuation: -10 to +210 μs)
B: Shutter time

Control/data output via I/O terminals


C: CV-X100 series:
- CA-035C/035M, CA-HS035C/HS035M,
CV-035C/035M, CV-S035C/S035M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 5 μs)
- CA-H035C/H035M, CV-H035C/H035M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 5 μs)
- CV-H100C/H100M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 5 μs)
- CA-200C/200M, CA-HS200C/HS200M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 5 μs)
- CV-200C/200M, CV-S200C/S200M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 50 μs)
- CA-H200C/H200M, CV-H200C/H200M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 5 μs)
- CA-H500C/H500M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 5 μs)
- CV-H500C/H500M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 20 μs)
- CA-HX048C/HX048M Absolute value of [Flash Output to Start Capture] time (-500 - 0 μs) (Response delay 0 - 5 μs)
- CA-HX200C/HX200M Absolute value of [Flash Output to Start Capture] time (-500 - 0 μs) (Response delay 0 - 5 μs)
- CA-HX500C/HX500M Absolute value of [Flash Output to Start Capture] time (-500 - 0 μs) (Response delay 0 - 5 μs)
CV-X200 series:
- CA-035C/035M, CA-HS035C/HS035M,
CV-035C/035M, CV-S035C/S035M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 5 μs)
- CA-H035C/H035M, CV-H035C/H035M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 5 μs)
- CV-H100C/H100M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 5 μs)
- CA-200C/200M, CA-HS200C/HS200M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 5 μs)
- CV-200C/200M, CV-S200C/S200M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 50 μs)
- CA-H200C/H200M, CV-H200C/H200M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 5 μs)
- CA-H500C/H500M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 5 μs)
- CV-H500C/H500M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 20 μs)
- CA-H2100C/H2100M [Flash Output to Start Capture] time (0 - 500 μs) (Response delay 0 - 5 μs)
- CA-HX048C/HX048M Absolute value of [Flash Output to Start Capture] time (-500 - 0 μs) (Response delay 0 - 5 μs)
- CA-HX200C/HX200M Absolute value of [Flash Output to Start Capture] time (-500 - 0 μs) (Response delay 0 - 5 μs)
- CA-HX500C/HX500M Absolute value of [Flash Output to Start Capture] time (-500 - 0 μs) (Response delay 0 - 5 μs)
CV-X400/X300 series:
- CA-035C/035M, CA-HS035C/HS035M,
CV-035C/035M, CV-S035C/S035M Absolute value of [Flash Output to Start Capture] time (-50000 - 0 μs) (Response delay 0 - 5 μs)
- CA-H035C/H035M, CV-H035C/H035M Absolute value of [Flash Output to Start Capture] time (-50000 - 0 μs) (Response delay 0 - 5 μs)
- CA-200C/200M, CA-HS200C/HS200M Absolute value of [Flash Output to Start Capture] time (-50000 - 0 μs) (Response delay 0 - 5 μs)
- CV-200C/200M, CV-S200C/S200M Absolute value of [Flash Output to Start Capture] time (-50000 - 0 μs) (Response delay 0 - 50 μs)
- CA-H200C/H200M, CV-H200C/H200M Absolute value of [Flash Output to Start Capture] time (-50000 - 0 μs) (Response delay 0 - 5 μs)
- CA-H500C/H500M Absolute value of [Flash Output to Start Capture] time (-50000 - 0 μs) (Response delay 0 - 5 μs)
- CV-H500C/H500M Absolute value of [Flash Output to Start Capture] time (-50000 - 0 μs) (Response delay 0 - 20 μs)
- CA-H2100C/H2100M Absolute value of [Flash Output to Start Capture] time (-50000 - 0 μs) (Response delay 0 - 5 μs)
- CA-H048CX/H048MX, CA-HX048C/HX048M Absolute value of [Flash Output to Start Capture] time (-50000 - 0 μs) (Response delay 0 - 5 μs)
- CA-H200CX/H200MX, CA-HX200C/HX200M Absolute value of [Flash Output to Start Capture] time (-50000 - 0 μs) (Response delay 0 - 5 μs)
- CA-H500CX/H500MX, CA-HX500C/HX500M Absolute value of [Flash Output to Start Capture] time (-50000 - 0 μs) (Response delay 0 - 5 μs)
- CA-HF6400C/HF6400M, CA-HF2100C/HF2100M Absolute value of [Flash Output to Start Capture] time (-50000 - 0 μs) (Response delay 0 - 5 μs)
D: Flash lighting time (0.1 - 999.9 ms)
E: Response delay for EXPOSURE_BUSY 1 ms or less

/If the FLASH output start point is negative, the FLASH1 output turns on first after receiving TRG1 input.
0After delaying for the duration of the extent of the absolute value of the FLASH1 [Flash Output to Start Capture] time, the
controller gives a command for a camera to operate the imaging element shutter.
*1 When one FLASH terminal is assigned to TRG1

CV-X UM_A 6-121


Timing chart

When several FLASH terminals are assigned


It is also possible to assign several FLASH terminals to a single camera. The timing chart in this instance is shown below.

Setting + example
• TRG1 is assigned to CAM1.
• FLASH1 output timing "Flash Output to Start Capture" 200 μs
• FLASH2 output timing "Flash Output to Start Capture" 100 μs
• FLASH3 output timing "Start Capture to Flash Output" 150 μs
• FLASH4 output timing "Start Capture to Flash Output" 250 μs

ON
TRG1
OFF
*1 FLASH1 output time

a
Control/data output via I/O terminals

FLASH1
200 μs
FLASH2 output time

b
FLASH2
100 μs
Shutter time

Imaging element c
shutter of camera 1

150 μs FLASH3 output time

FLASH3 d

250 μs FLASH4 output time

FLASH4 e

*2

/After TRG1 input is received, the FLASH output timing is set to "Flash Output to Start Capture" and the FLASH1 output which
has the longest duration set is turned on.
0FLASH2 output turns on.
1After a delay for the duration of "Flash Output to Start Capture" for FLASH1 initially turned on, the controller gives an order to
operate the image sensor shutter of camera 1.
2FLASH output timing is set to "Start Capture to Flash Output" based on the timing of ordering for the image sensor shutter
operation. FLASH3, which has the shortest duration set, is turned on.
3Based on the timing of ordering for the image sensor shutter operation, FLASH4 with the FLASH output timing setting of "Start
Capture to Flash Output" is turned on.

*1 CV-X100 Series: 60μs (±10μs), CV-X400/X300/X200 Series: 40 μs (±10μs)

*2 When using the CV-X200/X100 series, to assign several FLASH terminals to a single camera, you must set the on-delay values so that all
FLASH lightings start within the range of 500 μs or less.

6-122 CV-X UM_A


Timing chart

2. Typical operations at trigger input (Current Images when Run Screen Update Mode
is Live Image)

햲 1st 2nd 3rd 4th


Capture
processing Capture Transfer Capture Transfer Capture Transfer Capture Transfer

FLASH1 햳

TRG1 햴

Image processing
with 3rd image
A

Control/data output via I/O terminals


READY1 햵

A: Measurement time

/The camera captures images and transfers data continuously.


0In conjunction with camera capture, the FLASH terminal outputs according to the settings set in [Camera Settings]-[Flash
Output Settings] (Page 3-14).
1A trigger input starts image processing.
2After the trigger is input, READY remains off until the image processing finishes.

To make the updating method of the screen during run mode continuous, check the [Live Image in Run Mode] box via [Run
Reference
Screen Update Mode] in [Global] (Page 5-23). To specify the updating method for the screen in setup mode, choose [Live] on
the VIEW Toolbar.

CV-X UM_A 6-123


Timing chart

2. Typical operations at trigger input


(When the LJ-V series head is used and [Sheet-fed] is set)

Camera settings
Number of Lines 10
Line Scan Interval Specify Encoder
1 pulse/line
Sampling mode x1

Trg1

(2)
Ext D
Control/data output via I/O terminals

Encoder (A phase)

A A
(1)
READY1 B B C

Image capture Image1 1 2 3 4 5 6 7 8 9 10 Image2 1 2 3 4 5 6 7 8 9 10


*The numbers indicate
the encoder coordinates. Copies final scan line

A: Dependent on Trg1 input timing and encoder input timing


B: READY1 fall response delay 1 ms or lower
C: READY1 rise response delay 1 ms or lower
D: Ext rise response delay 1 ms or lower

(1) Capture starts with trigger input to Trg1 and READY1 is always off during capture.
(2) Capture finishes with Ext input and the final scan line is copied to the remaining lines.

6-124 CV-X UM_A


Timing chart

2. Typical operations at trigger input


(When the LJ-V series head is used, [Continuous] is set, and [Total Number of Lines]
is disabled)

Camera settings
Number of Lines 10*
Number of Overlapping Lines Two lines*
Total Number of Lines Disabled
Line Scan Interval Specify Encoder
1 pulse/line
Sampling mode x1
* For the purposes of this description, the number of lines is 10 and number of overlap lines is two. If you specify the
number of overlap lines, the minimum number of lines that you can actually set is 128 and the minimum number of
overlap lines is 64.

Control/data output via I/O terminals


Trg1

(2)
Reset

Encoder (A phase)

A
(1)
READY1 B

Image capture Image1 1 2 3 4 5 6 7 8 9 10


*The numbers indicate
the encoder coordinates.
Image2 9 10 11 12 13 14 15 16 17 18

Erase 17 18 19 20 21 22

A: Dependent on Trg1 input timing and encoder input timing


B: READY1 fall response delay 1 ms or lower

(1) Capture starts with trigger input to Trg1 and READY1 is always off during capture.
(2) Continuous capture stops with Reset input and data that was in the middle of being captured is deleted by reset processing.

• If [External Trigger] is set to [Reset Pulse Count and Trigger], the encoder count and coordinates are reset when an
Reference
external trigger is input.
• The behavior for Ext input is the same as Sheet-fed (Page 6-124).

CV-X UM_A 6-125


Timing chart

2. Typical operations at trigger input


(When the LJ-V series head is used, [Continuous] is set, and [Total Number of Lines]
is enabled)

Camera settings
Number of Lines 10*
Number of Overlapping Lines Two lines*
Total Number of Lines Enabled, 23 lines*
Line Scan Interval Specify Encoder
1 pulse/line
Sampling mode x1
* For the purposes of this description, the number of lines is 10, the number of overlap lines is two, and the number of total
lines is 23. If you specify the number of overlap lines, the minimum number of lines that you can set when the total number
of lines is enabled is 128, the minimum number of overlap lines is 64, and the minimum total number of lines is 128.
Control/data output via I/O terminals

Trg1

Encoder (A phase)

A
(1)
READY1 B

Image capture Image1 1 2 3 4 5 6 7 8 9 10


*The numbers indicate
the encoder coordinates.
Image2 9 10 11 12 13 14 15 16 17 18
(2)

Image3 17 18 19 20 21 22 23 24 25 26

Copies final scan line


Total Number of Lines 23 lines

A: Dependent on Trg1 input timing and encoder input timing


B: READY1 fall response delay 1 ms or lower

(1) Capture starts with trigger input to Trg1 and READY1 is always off during capture.
(2) Capture finishes if the number of capture lines reaches the total number of lines and the final scan line is copied to the
remaining lines.

Reference • If [External Trigger] is set to [Reset Pulse Count and Trigger], the encoder count and coordinates are reset when an
external trigger is input.
• The behavior for Ext input is the same as Sheet-fed (Page 6-124).

6-126 CV-X UM_A


Timing chart

3. Typical operations of the data output terminals

Terminal data output timing (Handshake: OFF)

End of calculation
C
b
OUT_DATA[15:0]

OR
B
a A c
STO

A: Status change time (1 to 999 ms) B: Output time (1 to 999 ms) C: OUT cycle time (2 - 1000 ms)
However, set the value to "A+B ≤C".

Control/data output via I/O terminals


/To change each of the time A to C, refer to "Changing Terminal settings (External Terminal)" (Page 5-4).
0The Judgment result data is output to OUT_DATA [15:0]. Every time the data is output, the OUT_DATA [15:0] is changed
sequentially.
1When handshake is OFF, the data is changed according to the specified output cycle automatically. Every time the data
is changed, the STO output turns on after A ms (output rise time) and turns off after B ms (output time).
To read each measurement result data, synchronize the timing with the STO rise time.

• See "Outputting data via I/O terminals" (Page 6-102) for more details on terminal data output.
Reference
• If asynchronous trigger capture is enabled, the output of the judgment value and measurement result are implemented by
camera. In order to check which camera’s measurement results the output data are, change the settings so that they
include the CAM * Execute Status in the output data. Additionally, the judgment values of tools that were not executed with
the asynchronous trigger capture are output as OK and the measurement results are output as 0. To not refresh the output
data for the tools that have not been executed, select [Do Not Output When Tool(s) Unexecuted] in the output settings.

CV-X UM_A 6-127


Timing chart

Terminal data output timing (Handshake: ON)

End of calculation
C

OUT_DATA[15:0] 햲

OR

A 햳 햴 A 햶 햷
STO
D

햴 햵
PST
E F

A: Status change time (1 to 999 ms) B: Output time (1 to 999 ms) C: Cycle time (2 to 1000 ms)
D: PST OFF response time (0.5 ms or less) E: PST minimum input time (1.0 ms or more) F: PST ON response time (0.5 ms or less)
Control/data output via I/O terminals

However, set the value to "A+B ≤ C".

/The judgment result data is output to OUT_DATA [15:0]. Every time the data is output, the OUT_DATA [15:0] is changed
sequentially.
0The first data is output after the image processing finishes and the STO output turns on when A ms (output rise time)
passes. To read each measurement result data, synchronize the timing with the STO rise time.
1Switching the PST input from ON to OFF after the STO rising edge is reached, the STO output turns off.
2Then, when the PST input is turned from off to on, the data is changed.
3The STO output turns on when A (output rise time) ms pass after the data is changed. Repeating steps 3 to 5 switches
the output data sequentially. After all of the judgment result data has been output, repeating these steps no longer
changes the data or turns the STO on and off.
4When handshake is ON, the data can be changed at any time.

• See "Outputting data via I/O terminals" (Page 6-102) for more details on terminal data output.
Reference
• As long as the PST input is without handshake control, the data output after the first STO rise time stops. Therefore, terminal
output data while output is disabled is stored in the buffer memory, and when the buffer memory is full, new output data
overflows. In this case, overflow data is not output.

6-128 CV-X UM_A


Timing chart

4. Operations at inputting on control terminal

RESET terminal operation


This terminal is used to set the output terminals to normal state and reset the trigger wait state.
When the program is changed, the RESET is performed simultaneously.

Reference For more details on the RESET operation, refer to Page 6-64.

When trigger is not yet input

RESET

C B

Control/data output via I/O terminals


READY1

C
READY2

C
BUSY

A: RESET minimum input time (1 ms or more. Same for the following.)


B: RESET time (1s or less. Same for the following.)
C: RESET response delay time (1 ms or less. Same for the following.)

When trigger is input

RESET

TRG1

READY1

OUT_DATA[15:0] D

OR D

STO

Image
Image capture processing Reset operation

BUSY

D: 0 ms or more

CV-X UM_A 6-129


Timing chart

When data is output

RESET

TRG1

READY1

OUT_DATA[15:0]

OR

STO
Control/data output via I/O terminals

Image capture Image processing Data output Reset operation

BUSY

/The completion of the RESET operation is confirmed by monitoring the falling edge of BUSY.
0During the RESET operation, the READY1/2 terminal is forcibly turned off once and turned back on after the reset
operation is complete. The RESET operation also cancels the input waiting state of any of TRG1/2 and resets it to the
state before the trigger input.
1When RESET is input during data output, data output including image output is canceled after completing the current
output for 1 count of data measurement, and no more data will be output until the RESET operation is complete. In
addition, if RESET is input before data output, no data is output.

6-130 CV-X UM_A


Timing chart

TEST terminal operation


TEST terminal is used to cancel output operations.
One shot input allows all the current result output state to be reset to normal state. It is also used to prevent upper/lower
limit judgment from being output even if the image processing during setting adjustment is operated using the level input.

a c
TEST
A

TRG1

READY1
B

a
OUT_DATA[15:0]

Control/data output via I/O terminals


OR

a
STO

RS-232C, Ethernet, SD Card 2 Data output b c

A: TEST minimum input time (1 ms or more) B: 500 µs or less

/While the TEST input is ON, terminal output (OUT_DATA[15:0], OR, STO) is forcibly set to normal state. (The response
delay is within 500 μs).
0As for output to RS-232C, Ethernet, SD card, PLC-Link, EtherNet/IP, PROFINET, EtherCAT or PC program, even when the
TEST terminal turns on during result data output for 1 trigger, that data output does not stop.
1If the TEST terminal is ON before result data output for 1 trigger starts, all of output for that trigger is stopped, and result
output is not performed even when the TEST terminal is turned OFF later on.

Image archiving (Page 4-42) will stop during input to the TEST terminal. However, the output of image data that are
Reference
already saved in the image buffer memory will continue.

EXT terminal operation


The EXT terminal is used to pause an image capture. This is useful in case that external trigger inputs and internal trigger
acceptances need to be stopped due to setting adjustments or any other reasons.

EXT
A
a b

READY1
B B
a b

READY2

A: EXT minimum input time (1 ms or more) B: READY response delay (0.5 ms or less)

/When the EXT input is ON, READY1 and READY2 output is OFF. The trigger cannot be input during this state (all of
external terminal, PLC communication, RS-232C, Ethernet, mouse). Even when any internal trigger is selected, capturing
and processing of images stop as soon as READY turns off. The result data output for the trigger input, which was
accepted before the EXT input turned on, will be performed regardless of the EXT state.
0When the EXT input turns off, the READY1 and READY2 output return to a state based on the camera condition.

CV-X UM_A 6-131


Timing chart

Timing chart for using command inputs through I/O terminals


Refer to "Using command inputs via I/O terminals" (Page 6-96).

TEST terminal operations for the total status output (OR) when the "OR terminal output mode" is set to
"Hold Status"
The status condition is normally updated for each trigger. However, if the status is NG, the condition is unchanged until
input such as TEST is executed.

TRG1

READY1
Control/data output via I/O terminals

OUT_DATA[15:0]

OR

STO

TEST

(Continued)

TRG1

READY1

OUT_DATA[15:0]

OR

STO

TEST
A

A: TEST minimum input time (1 ms or more)

/If [Hold Status] is enabled and the last status is NG, the OR output remains NG regardless of an actual status result.
0When the TEST input is turned on/off, the hold status is cancelled and all terminals are reset to the normal status. And,
the OR output condition will be updated when the result for the next OR output is output.
1As the TEST input is not turned on, if the last status result is NG, the OR output remains NG regardless of an actual status
result.

6-132 CV-X UM_A


Timing chart

Output operations of the total status output (OR) when "OR terminal output mode" is set to "One Shot
Output"

TRG1

Image processing Image processing Image processing


Image processing
NG judgment NG judgment OK judgment

OR (one shot 햲 햴 햶
A A
output)

OR (Update 햳 햵
Every Judge)

STO 햶

Control/data output via I/O terminals


A: One shot time (1 to 9999 ms)

/If the one shot output is enabled, the OR output is in NG state when the image processing started by trigger input is NG
after the image processing finishes (not synchronized with the STO rise).
0When "Update Every Judge" is enabled, the OR output is in the NG state along with the STO rise.
1If the one shot output is enabled, the OR output holds the NG state for the specified period of time, and then resets the
NG state.
2When "Update Every Judge" is enabled, the OR output holds the NG state until the next result output for image
processing is started. Therefore, if output results are consecutively judged as NG, the OR output holds the NG state.
3If image processing is continuously performed with one shot output enabled, the previous NG state may remain at the
time of image processing results being finalized by the STO.

If a result is judged as NG while the NG state is held, the OR output holds NG state for one shot time from that timing. If signals
Reference
need to rise and fall for each NG, set the one shot time to the value smaller than output cycle.

CV-X UM_A 6-133


Control and data output Overview of control and
by EtherNet/IP data output by EtherNet/IP
This system supports communication with EtherNet/IP.
Control/data output EtherNet/IP is an open communications standard with
via commands specifications that are managed by ODVA (Open DeviceNet
Vendor Association, Inc.). Communication is possible with all
devices that support it, regardless of the vendor.
Control/data output The following functions are possible by EtherNet/IP connection.
via the PLC-Link
Cyclic communication
Control/data output Cyclic communication at RPI (Request Packet Interval)
Control and data output by EtherNet/IP

via I/O terminals communication cycle intervals allows high-speed control at


intervals of several ms to several tens of ms (implicit
communication). In addition, because it is possible to control
Control and data output
q the controller by referencing and updating variables and
by EtherNet/IP devices in the PLC without considering the communication, it
allows programs to be written easily on the PLC side.
• Control controller: Control the controller by using cyclic
Control and data output
communication to send the commands for execution.
by PROFINET • Results data output: Data can be output by cyclic
communication when the items for output from EtherNet/
Control and data output IP are set in the output settings (Page 3-111).
• Change execute condition number: The controller can be
by EtherCAT
controlled by specifying the execute condition number by
cyclic communication.
• Settings such as the cyclic communication cycle
Reference
(RPI), data size, timeout time, and sending
trigger are made on the PLC side. For cyclic
communication with the controller, set an RPI of 5
ms or more (1 ms or more when using the
communication expansion unit). When COS
(Change Of State) is selected with a PLC (Keyence
KV Series etc.) where a sending trigger can be
selected, in the same way set a minimum sending
interval (Inhibit Time) of 5 ms or more (1 ms or more
when using the communication expansion unit).
• Even when an RPI of 5 ms or more (1 ms or more
when using the communication expansion unit) is
set, due to the controller measurement settings,
dialog box operations, commands, combined
use with FTP, remote desktop, or other
communications, the controller may temporarily
or continuously be subject to excessive load,
causing delays in processing or temporary
interruption of communications due to timeout. In
such cases, it is necessary to either review the
cyclic communication settings and service
conditions, or else to change the EtherNet/IP
settings in the global settings to prioritize
communications processing over image
processing. (CV-X200/X100 Series Only) (When
this is done, there may be an increase or variation
in measurement time.) Be sure to verify that there
are no problems with operating performance,
including the issues above, prior to operation.
• In a network where many devices are connected,
including EtherNet/IP devices, if a large load is
constantly or temporarily applied to the network,
then delays and packet loss may occur. Be sure
to perform sufficient verification prior to operation.

6-134 CV-X UM_A


Overview of control and data output by EtherNet/IP

Message communication
Operation flow
This can be used for communications that do not require
punctuality as is needed with cyclic communications (Explicit Checking the specifications (Page 6-139)
message).
• Check whether or not the connected PLC is a model
There is no functional difference between the controller
that supports EtherNet/IP connections.
message communication function and cyclic communication
• Check the allocation conditions of the input and output
function. As a result, it is not necessary to use it in most
data.
cases. However, it can be used for EtherNet/IP
communications with PLC devices that do not support cyclic 
communication (SLC5/05 Series, etc.). Changing the EtherNet/IP settings (Page 6-144)
• Configure the controller settings for EtherNet/IP connection.
Main setting items: Enable/Disable setting for the EtherNet/IP,
Controller IP address (the IP address for the EtherNet/IP
module when using the EtherNet/IP module), PLC type,

Control and data output by EtherNet/IP


cyclic communications data size, input data and output
data allocations.

Establishing an EtherNet/IP link
• To check whether or not a link has been established by
cyclic communications, select [Global] -
[Communications & I/O] - [EtherNet/IP], and check with
[Cyclic Communication Status].
• If the EtherNet/IP connection is successful, the controller
Ethernet port LINK LED (green) begins flashing (when
using the EtherNet/IP module, the unit’s Network Status
LED turns green).

Executing the necessary processes
Data output (Page 6-147)
• The data specified in the output settings is written to
the results output area.
• The "Result ready flag" is used to check the completion
of data writing.
• The "Result ack flag" is turned ON to report that reading
was completed.

Command control (Page 6-149)


• Communication control commands (Page 6-2) can be
executed.
• Enter the command code and command parameters in
the command input area and turn the "Command
request flag" ON to execute the command.
• When the "Command ready flag" is ON, the command
can be executed.
• The "Command complete flag" is used to check that
command execution was completed.

Changing the execute condition No. (Page 6-151)


• Change the Exec Cond No. to change the execute
condition No.

CV-X UM_A 6-135


Preparing the EtherNet/IP connection

Preparing the EtherNet/IP connection

Models that support EtherNet/IP connections


For details of the setting procedures for each PLC, refer to "Typical setup procedure for EtherNet/IP" (Page 6-152) and to the
instruction manual provided with the PLC.

Keyence PLC

KV Series
PLC model EtherNet/IP communication unit Firmware version
Control and data output by EtherNet/IP

KV-3000 KV-EP21V Ver. 2 or later


KV-5000 KV-EP21V Ver. 2 or later
KV-5500 - (Controller internal port or KV-EP21V) Ver. 2 or later
KV-7300 KV-XLE02, KV-EP21V -
KV-7500 - (Controller internal port or KV-XLE02, KV-EP21V) -
KV-8000 - (Controller internal port or KV-XLE02, KV-EP21V) -
KV-Nano KV-NC1EP Ver. 1 or later

Rockwell PLC

ControlLogix PLC
PLC model EtherNet/IP communication unit Firmware version
1756 ControlLogix 1756-ENBT, 1756-EN2T Ver. 13 or later
1756-L81E Ver. 32 or later
1769 CompactLogix - (Controller internal port) Ver. 32 or later

SLC5/05 PLC
PLC model EtherNet/IP Communications unit Firmware version
1747 SLC5/05 - (Controller internal port) OS firmware level Series C, FRN 10 or later
1763 MicroLogix 1100 - (Controller internal port) 16.000 or later

Omron PLC

PLC model EtherNet/IP communication unit Firmware version


SYSMAC CJ2 - (Controller internal port or CJ1W-EIP21) V 1.0 or later
SYSMAC CJ1 CJ1W-EIP21 V 1.0 or later
SYSMAC CS1 CS1W-EIP21 V 1.0 or later
SYSMAC NJ - (Controller internal port) V 1.13 or later

6-136 CV-X UM_A


Preparing the EtherNet/IP Connection (When Using the CA-NEP20E)

Preparing the EtherNet/IP Connection


(When Using the CA-NEP20E)

Installing the EtherNet/IP Module CA-NEC20E EtherNet/IP Module


Specifications
The optional EtherNet/IP module CA-NEP20E is used when
using EtherNet/IP communication via a communication
expansion unit. Standard specifications
Remove the protective cover from the expansion unit
connector on the right side of the controller and install the Item
EtherNet/IP module as shown below. Compliant standard IEEE802.3u (100BASE-TX)
The controller must be turned off before connecting Communication speed 100 Mbps (100BASE-TX)

Control and data output by EtherNet/IP


Point
or disconnecting the CA-NEP20E. Communication cycle 1 ms shortest
Connection cable Category 5e or greater shielded twisted
pair (STP) cable
Node interval 100 m
Communication port RJ45 connector × 2
Communication size 1436 bytes
Supported functions Cyclic communication (Implicit
message), Message communication
(Explicit message) UCMM/Class3-
compliant,
DLR (Device Level Ring)-compliant
Conformance test Compliant with Version.CT17
version
When Using the Illumination Expansion
Unit and EtherNet/IP Module Together
Mount the camera input unit directly to the controller, then Wiring diagram (P1 port/P2 port)
mount the illumination expansion unit and EtherNet/IP
module to the right side of the camera input unit.

No. Signal name Function


1 TX + Transmission data (+)
2 TX - Transmission data (-)
3 RX + Reception data (+)

Camera input unit 4 - 75 Ω terminating resistance connected


CA-E100
5 - 75 Ω terminating resistance connected

Illumination 6 RX - Reception data (-)


expansion unit
CA-DC40E 7 - 75 Ω terminating resistance connected
EtherNet/IP module 8 - 75 Ω terminating resistance connected
CA-NEP20E

Point Illumination expansion units and EtherNet/IP


modules cannot be installed between camera input
units and controllers.

CV-X UM_A 6-137


Preparing the EtherNet/IP Connection (When Using the CA-NEP20E)

Connecting to an EtherNet/IP Network


Connect the EtherNet/IP network cable to the P1 port or
the P2 port RJ connector. If an adapter is present
downstream of this unit, connect a network cable to the
unused port.

P1 port
Control and data output by EtherNet/IP

P2 port

Point Use a category 5e or greater STP (shielded twisted


pair) cable for the network cable. You can use
either a straight cable or a crossover cable.

6-138 CV-X UM_A


Controller EtherNet/IP communication specifications

Controller EtherNet/IP communication specifications

Standard specifications

CV-X Ethernet port Communication expansion unit (CA-NEP20E)


Cyclic No. of connections Maximum 32 1 (Exclusive Owner)
communication*1 4 (Input Only)
(Implicit Communication size Follow the PLC connection settings.
communication) To 248 bytes (Connection with Rockwell's SLC5/05)
To 496 bytes (Connection with Rockwell's ControlLogix/CompactLogix)
To 1436 bytes (Connection with Keyence's KV series and Omron's SYSMAC CJ2/CJ1/

Control and data output by EtherNet/IP


CS1/NJ)
Transmission trigger Follow the PLC connection settings.
• Cyclic
• COS*2
Instance ID • 100: Input data (transmission of
• 100: Input data (transmission of controller)
• 101: Output data (reception of controller) communication expansion unit)
(254 for Input Only connection) • 150: Output data (reception of
communication expansion unit) (3 for
Input Only)
Message No. of connections Maximum 32 Maximum 6
communication Supported Explicit UCMM/Class3
(Explicit message) message method
Conformance test Compliant with Version.CT15. Compliant with Version.CT17.
*1 The conditions for the cyclic communication status to be "Connected" are a bidirectional communication (Exclusive Owner) connection
or an Input Only connection being established in the case of the CV-X Ethernet port and a bidirectional communication (Exclusive
Owner) connection being established in the case of the communication expansion unit.
*2 Only the PLC compliant with COS (Keyence's KV-3000/5000/5500/7300/7500/8000, KV-nano, etc.) can be specified. When the COS
transmission trigger is selected, the controller sends the data at the timing when the transmission data is changed. (If the transmission
data is not changed, it sends the data at specified RPI (communication frequency) intervals.) If the transmission data is continuously
changed, the transmission is held during InhibitTime (minimum transmission interval). Also, the target used to check for changes to the
transmission data is the "Result ready flag" and the "Command complete flag" in the case of the CV-X Ethernet port and is the entirety
of the transmission data in the case of the communication expansion unit.

When to use explicit message communication and implicit fixed-cycle communication


In terms of functionality, there is no difference between the controller's message communication function and cyclic
communication function. For this reason, there is no need to use the message communication in most cases. The message
communication is needed when performing EtherNet/IP communication with PLC devices which do not support cyclic
communication (such as the SLC5/05 series).

Point • Since the explicit message communication performs TCP/IP communication, it is not suitable for a high speed control
when compared to the implicit communication using UDP.
• Although the explicit message communication is a communication through TCP/IP, the data may not be delivered
depending on the condition of the network. Design the control (e.g. re-sending with time-out) at the PLC considering
such a case.

CV-X UM_A 6-139


Controller EtherNet/IP communication specifications

Allocation conditions of cyclic communication data

Example of controller send-data settings (CV-X Series to Keyence KV-7000 Series)


Example when 1 CV-X is connected to a KV-7000 Series, cyclic communication data size is 496 bytes (addresses 0000 - 0495),
and the command response output area is set to 24 bytes (B****/W**** in the table are examples of KV-7000 link relay and link
register address allocation)

Setting Address 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0bit
condition (byte)
Bit 0000 B007 Reserved B006 Reserved B005 Reserved B004 Result OR B003 Result B002 Cmd B001 Cmd Error B000 Cmd
area Ready Ready Complete
0001 B00F Reserved B00E Reserved B00D Reserved B00C Reserved B00B READY4 B00A READY3 B009 READY2 B008 READY1
0002 B017 Reserved B016 Reserved B015 Reserved B014 Reserved B013 ACK4 B012 ACK3 B011 ACK2 B010 ACK1
0003 B01F OUTPUT B01E OUTPUT B01D Reserved B01C Reserved B01B RUN B01A Reserved B019 ERROR B018 BUSY
_IMG _IMG
Control and data output by EtherNet/IP

_STATUS _BUSY
0004 B027 Tool Judge B026 Tool Judge B025 Tool Judge B024 Tool Judge B023 Tool Judge B022 Tool Judge B021 Tool Judge B020 Tool Judge
Value7 Value6 Value5 Value4 Value3 Value2 Value1 Value0
0005 B02F Tool Judge B02E Tool Judge B02D Tool Judge B02C Tool Judge B02B Tool Judge B02A Tool Judge B029 Tool Judge B028 Tool Judge
Value15 Value14 Value13 Value12 Value11 Value10 Value9 Value8
0006 B037 Tool Judge B036 Tool Judge B035 Tool Judge B034 Tool Judge B033 Tool Judge B032 Tool Judge B031 Tool Judge B030 Tool Judge
Value23 Value22 Value21 Value20 Value19 Value18 Value17 Value16
0007 B03F Tool Judge B03E Tool Judge B03D Tool Judge B03C Tool Judge B03B Tool Judge B03A Tool Judge B039 Tool Judge B038 Tool Judge
Value31 Value30 Value29 Value28 Value27 Value26 Value25 Value24
0008 B047 Tool Judge B046 Tool Judge B045 Tool Judge B044 Tool Judge B043 Tool Judge B042 Tool Judge B041 Tool Judge B040 Tool Judge
Value39 Value38 Value37 Value36 Value35 Value34 Value33 Value32
0009 B04F Tool Judge B04E Tool Judge B04D Tool Judge B04C Tool Judge B04B Tool Judge B04A Tool Judge B049 Tool Judge B048 Tool Judge
Value47 Value46 Value45 Value44 Value43 Value42 Value41 Value40
0010 B057 Tool Judge B056 Tool Judge B055 Tool Judge B054 Tool Judge B053 Tool Judge B052 Tool Judge B051 Tool Judge B050 Tool Judge
Value55 Value54 Value53 Value52 Value51 Value50 Value49 Value48
0011 B05F Tool Judge B05E Tool Judge B05D Tool Judge B05C Tool Judge B05B Tool Judge B05A Tool Judge B059 Tool Judge B058 Tool Judge
Value63 Value62 Value61 Value60 Value59 Value58 Value57 Value56
Error 0012 W000 Error Code
code area 0013
Reserved 0014 W001 Reserved
area 0015
Measurement 0016 W002 Total Count
count 0017
area
0018
0019
Command 0020 W004 Command Result
output area 0021
0022
0023
0024 W006 Command Data 1
0025
0026
0027
0028 W008 Command Data 2
0029
0030
0031

6-140 CV-X UM_A


Controller EtherNet/IP communication specifications

Setting Address 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0bit
condition (byte)
Command
···
output area 0044 W010 Command Data 6
0045
0046
0047
Results 0048 W012 Result Data 1
output 0049
area
0050
0051
0052 W014 Result Data 2
0053
0054
0055

Control and data output by EtherNet/IP


···

Names and Operations of Input Signals

Allocated area Name Remarks


Bit area Cmd Complete Turns on when command processing is complete.
Cmd Err Turns off when command processing is successful and turns on when it fails.
Cmd Ready Turns on when command processes can be received.
Result Ready Turns on when data transmission is complete.
Result OR Used to output the OR result for the judged value of tools specified in the output settings.
READY1 Output when trigger n input is acceptable.
READY2
READY3
READY4
ACK1 Becomes ON when Trigger 1 input is accepted. Becomes OFF when Trigger 1 input
is set to OFF.
ACK2 Becomes ON when Trigger 2 input is accepted. Becomes OFF when Trigger 2 input
is set to OFF.
ACK3 Becomes ON when Trigger 3 input is accepted. Becomes OFF when Trigger 3 input
is set to OFF.
ACK4 Becomes ON when Trigger 4 input is accepted. Becomes OFF when Trigger 4 input
is set to OFF.
BUSY This signal is output during image processing or command processing.
ERROR This signal is output while any of system errors occur with the dialog displayed on the
screen.
For details on typical system errors, see "Error messages" (Page 9-96).
In [ERROR Output Settings] (Page 5-32) in the Global Settings, enabling or disabling
the error output for the SD card-related errors, etc. can be specified.
RUN This signal is output when the controller is in Run mode.
OUTPUT_IMG_BUSY This signal is output when the image output is in progress.
OUTPUT_IMG_STATUS This signal is output when an image or images that should have been output remain
in the image output buffer.
Tool judgment area Tool Judge Value0 Returns the judgment value allocated to the bit allocation region (Address 0004:bit0).
Tool Judge Value1 Returns the judgment value allocated to the bit allocation region (Address 0004:bit1).
···
Tool Judge Value63 Returns the judgment value allocated to the bit allocation region (Address 0011:bit7).
Error code area Error Code Error code corresponding to the error cause.
Measurement count area Total Count Displays the measurement count.
Command output area Command Result Indicates the command execution results.
Command Data 1 Returns the command execution result data 1.
Command Data 2 Returns the command execution result data 2.
··· ···
Command Data6 Returns the command execution result data 6.
Result output area Result Data 1 Returns the measurement result data 1.
Result Data 2 Returns the measurement result data 2.
··· ···

CV-X UM_A 6-141


Controller EtherNet/IP communication specifications

Example of controller receive-data settings (Keyence KV-7000 Series to CV-X Series)


Example when 1 CV-X is connected to a KV-7000 Series and cyclic communication data size is 496 bytes (addresses 0000
- 0495) (B****/W**** in the table are examples of KV-7000 link relay and link register address allocation)

Setting Address 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0bit
condition (byte)
Bit 0000 B067 Reserved B066 Reserved B065 Reserved B064 Error reset B063 Result ack B062 Reserved B061 Reserved B060 Cmd
area request Request
0001 B06F Reserved B06E Reserved B06D Reserved B06C Reserved B06B TRG4 B06A TRG3 B069 TRG2 B068 TRG1
0002 B077 Reserved B076 Reserved B075 Reserved B074 Reserved B073 Reserved B072 TEST B071 EXT B070 RESET
0003 B07F Reserved B07E Reserved B07D Reserved B07C Reserved B07B Reserved B07A Reserved B079 Reserved B078 Reserved
0004 B087 Reserved B086 Reserved B085 Reserved B084 Reserved B083 Reserved B082 Reserved B081 Reserved B080 Reserved
0005 B08F Reserved B08E Reserved B08D Reserved B08C Reserved B08B Reserved B08A Reserved B089 Reserved B088 Reserved
0006 B097 Reserved B096 Reserved B095 Reserved B094 Reserved B093 Reserved B092 Reserved B091 Reserved B090 Reserved
0007 B09F Reserved B09E Reserved B09D Reserved B09C Reserved B09B Reserved B09A Reserved B099 Reserved B098 Reserved
Control and data output by EtherNet/IP

0008 B0A7 Reserved B0A6 Reserved B0A5 Reserved B0A4 Reserved B0A3 Reserved B0A2 Reserved B0A1 Reserved B0A0 Reserved
0009 B0AF Reserved B0AE Reserved B0AD Reserved B0AC Reserved B0AB Reserved B0AA Reserved B0A9 Reserved B0A8 Reserved
0010 B0B7 Reserved B0B6 Reserved B0B5 Reserved B0B4 Reserved B0B3 Reserved B0B2 Reserved B0B1 Reserved B0B0 Reserved
0011 B0BF Reserved B0BE Reserved B0BD Reserved B0BC Reserved B0BB Reserved B0BA Reserved B0B9 Reserved B0B8 Reserved
Execute 0012 W0F2 ExecCondNo
condition 0013
number
0014 W0F3 Reserved
0015
Command 0016 W0F4 Command number
input area 0017
0018
0019
0020 W0F6 Cmd Parameter1
0021
0022
0023
0024 W0F8 Cmd Parameter2
0025
0026
0027
0028 W0FA Cmd Parameter3
0029
0030
0031
···

6-142 CV-X UM_A


Controller EtherNet/IP communication specifications

Names and Operations of Output Signals

Allocated area Name Remarks


Bit area Cmd Request Requests command execution when the signal switches from OFF to ON.
Result ack Provides notification of data acquisition when the signal switches from OFF to ON.
Error reset request Clears Error when the signal switches from OFF to ON.
TRG1 Allows the camera assigned to trigger ‘n’ to capture images (leading edge synchronization).
TRG2 The input is accepted while READY1 is ON.
TRG3
TRG4
RESET Used to perform reset operation.
• The Result OR output will become 0.
• The measurement count returns to 0.
• All of archived image data are deleted.
• All of the data in the output buffer are reset.
• A new measurement result output destination file is created. A new image output

Control and data output by EtherNet/IP


destination folder is created.
• The trigger waiting state of individual triggers is canceled.
EXT Used to suspend the occurrence of internal triggers and the acceptance of external
triggers. While this is on, READY1 to 4 are forced to be off to stop the acceptance of
all triggers (level synchronization).
TEST Used to suspend the status output and other outputs for trial run or any other reasons.
• The result data not output at the time of input are deleted.
• Resets the Result OR output during input.
• As soon as the input turns off, result outputs for the processed images will resume.
Command Input area Command number The command No. is written.
Cmd Parameter1 The command argument 1 is written.
Cmd Parameter2 The command argument 2 is written.
Cmd Parameter3 The command argument 3 is written.
··· ···

CV-X UM_A 6-143


Changing the EtherNet/IP settings

Changing the EtherNet/IP settings

Displaying the EtherNet/IP settings EtherNet/IP setting items that can be


screen set with this system
On the [Global] - [Communications & I/O] - [EtherNet/IP]
Enable/Disable
screen, various settings can be changed for input and output
of various data by EtherNet/IP using the controller's Ethernet Select whether to communicate via the Ethernet port on
port or the EtherNet/IP module (CA-NEP20E: Option) the controller or the EtherNet/IP module.
connected to the controller. • Disable: Disable EtherNet/IP communication.
• Enable: Select this when performing EtherNet/IP
Control and data output by EtherNet/IP

communication via the Ethernet port of the controller.


• Enable module: Select this when performing
communication via the EtherNet/IP module (CA-
NEP20E: Option) connected to the controller.
The EtherNet/IP cannot be used while the PLC-
Reference
Link (Page 6-41), PROFINET (Page 6-176), or
EtherCAT (Page 6-208) is enabled. One of them
must be disabled.

IP Address Setting

Point If the wrong setting is made, not only this unit but
other devices on the network may not function
• The Ethernet settings, such as the IP address properly. For details of the setting value, consult
Reference
and subnet mask when using the EtherNet/IP the system or network administrator.
communications via the Ethernet port on the
controller, are changed on the [Network If [Enable] or [Disable] is selected for [Enable/
Reference
Settings] screen (Page 5-3). The Ethernet Disable], the settings for the Ethernet port on the
settings for the EtherNet/IP communications controller are displayed.
via the EtherNet/IP module connected to the
controller are changed on this screen.
IP Address
• If the EtherNet/IP settings were changed, it is Input the IP address of the EtherNet/IP module (default
necessary to restart the controller in order to setting: 192.168.0.20).
apply the settings.
Subnet Mask
1 From [Global], select [Communications & I/O] - Input the subnet mask of the EtherNet/IP module (default
[EtherNet/IP]. setting: 255.255.255.0).
The [EtherNet/IP] screen appears.
Default Gateway
2 Left-click [Enable EtherNet/IP] to check the box. Input the IP address of the default gateway of the EtherNet/
3 Change the settings as required. IP module (default setting: 0.0.0.0).
See "EtherNet/IP setting items that can be set with this The set values are common for the P1 and P2
Point
system" (Page 6-144) for details of the settings for ports on the communications expansion unit.
each item.

4 Click [OK].

6-144 CV-X UM_A


Changing the EtherNet/IP settings

Enable DHCP Data Configurations


Put a check mark if the network setting information (IP Left-click [Set] to display the overview of the data
address, subnet mask, default gateway) are to be allocations in the EtherNet/IP cyclic data communication.
acquired from the DHCP server when the controller is For a command returning a text string, the response data
started (This setting is only available when [Enable may be large. When such command is used, ensure a
module] is set. Default setting: Disabled.). certain larger size for “Command Response Output Area”.
• When DHCP is enabled, the settings of the IP
(Default: 24 byte) Clicking “View List” shows the detailed
Point
address, subnet mask, and default gateway allocation statuses of the receive-data and send-data.
cannot be changed on the [EtherNet/IP] screen.
• If the DHCP server is not started, the controller
continues to retry until there is a response from the
server. Clear the check box to change to manual
assigning.

MAC Address

Control and data output by EtherNet/IP


If [Enable] is selected for [Enable/Disable], the MAC
address for the Ethernet port will appear.
If [Enable module] is selected for [Enable/Disable], the
MAC address for the EtherNet/IP module will appear.

• Receive-Data: Displays an overview of the allocations


Data Settings for data received by the controller from the PLC.
Data Size • Send-Data: Displays an overview of the allocations for
Specifies the data size of Assembly Object in the cyclic data sent from the controller to the PLC. The range for
communication and the message communication. (Default: the command response output area in the byte
496 byte) For the cyclic communication, a connecting PLC allocation area can be specified.
is given priority to specify data size. Therefore, the data size
Decimal Point
specified here may differ from that in actual processing.Use
Select the data representation method for results data
a PLC compatible with Large Forward Open in order to output and commands that handle decimal fractions.
transact data exceeding 496 byte. • Fixed-point (default): The original data is multiplied by
Connect to Allen-Bradley SLC5/05 1000, and handled as a 32-bit signed integer data.
• Floating-point: The data is handled as a 32-bit single-
Checking the box limits the data size settable up to 248
precision floating-point data.
byte. PLCs specified here do not support the cyclic
communication, therefore, the data size of Assembly • For details on the data that are output in decimal in
Reference
results data output, see "Operation symbol/output
Object in the message communication should be changed
item comparison table (Measured Value/Judgment
according to the specifications of the PLCs. Value)" (Page 3-61)
• Although there is no problem if the cyclic • For details on the data that handle decimal
Reference numbers in command controls, see "Control/data
communication data size set at the controller
is not the same as the cyclic communication output via commands" (Page 6-2)
data size on the PLC side, it is recommended
that the same value as the PLC data size be
set so that the allocated data can be sent and
received correctly.
• The value set here is used as the data size
when accessing assembly object input data
(instance 100, attribute 3) and output data
(instance 101, attribute 3) during message
communication.

CV-X UM_A 6-145


Changing the EtherNet/IP settings

Other Settings

Process Priority (CV-X200/X100 Series Only)


Select which process to prioritize during EtherNet/IP
communications.
• Image First: Depending on the image processing
contents, timeout errors or delays in results data output
may occur in EtherNet/IP communications.
• Transmission First: Priority is given to EtherNet/IP
communications. Because image processing is
interrupted to perform the communication process,
delays or variations in measurement time may occur.

Enable Handshake
The Handshake keeps this controller from loading its
Control and data output by EtherNet/IP

measurement result output data to the memory until it


acknowledges that the PLC has received the last output
data. When “Enable Handshake” box is checked, the
controller turns on “Result ready flag” after the completion
of a measurement result output. Upon reception of the
ready flag, the PLC reads the output data and turns on
“Result ack flag”. And then, the controller turns off its ready
flag after recognizing the ack flag of the PLC. The PLC
turns off “Result ack flag” to request the controller to load
next output data.

Create EDS File


Outputs an EDS file and icon which include information
related to the controller EtherNet/IP functions. The naming
rules for these files are as shown below.

When using the Ethernet port on the controller


• File output path: SD2:/cv-x/EDS
• EDS file name:
- For the CV-X100 Series:
Keyence_5002_0101.eds
- For the CV-X200 Series:
Keyence_5003_0101.eds
- For the CV-X300 Series:
Keyence_5007_0102.eds
- For the CV-X400 Series:
Keyence_5005_0102.eds
• Icon file name: CV-X***Series.ico
The asterisks (***) represent the CV-X Series number.
For example, CV-X400Series.ico is the file name for the
CV-X400 Series.

When using the EtherNet/IP module


• File output path: SD2:/cv-x/EDS_EX
• EDS file name: Keyence_5009_0101.eds
• Icon file name: CV-X3H4H-CA-NEP20E.ico
Because the EDS file does not contain the
Reference
information that was set or changed in the controller
global settings, the created EDS file will always
contain the same information.

6-146 CV-X UM_A


Output of measurement data by EtherNet/IP cyclic communications (Data Output)

Output of measurement data by EtherNet/IP cyclic


communications (Data Output)
Change the output settings for data output using EtherNet/IP.

Data output flow (example of connection with PLC EtherNet/IP unit)


Set the data and address for output in the output settings.
The controller outputs data via EtherNet/IP in the following manner.

• Data output via EtherNet/IP is performed only in run mode. Data is not output in setup mode.
Reference
• With EtherNet/IP, images and other binary data cannot be output.

Control and data output by EtherNet/IP


Controller (CV-X series) PLC

The image processing is completed in the


controller, the result data is stored.

b
a
Confirm that Result ack flag is turned off.*1
Turn off Result ack flag.

c c
Write data to ResultData and Result OR flag, The data is written to the ResultData and Result
Tool Judge Value. OR flag, Tool Judge Value.

d
d
Check the completion of data writing by
When the data writing is completed, turn on
confirming that Result ready flag changes to on,
Result ready flag.
and then reference the data.

e e
Check completion of the data reading by Turn on Result ack flag.
detecting that Result ack flag is turned on.

f f
Turn off Result ready flag. The change of Result ready flag to off is
detected.

a
Turn off Result ack flag.

*1 When handshake is OFF, output data is overwritten and updated without checking whether the Result ack flag is OFF. To take the rise
of Result ready flag as a data reference synchronization signal, turn the Result ack flag ON at each output, which will turn the Result
ready flag OFF.

CV-X UM_A 6-147


Output of measurement data by EtherNet/IP cyclic communications (Data Output)

Timing Chart

Image processing Image


processing

Result ack flag The PLC writes.

Result ready flag The controller writes.


A

Result OR flag The controller writes.

ResultData The controller writes.

Tool Judge Value The controller writes.

햲 햴 햵 햶 햷 햲
Control and data output by EtherNet/IP

A: 0 ms or more (depends on the link scan speed)

• The "Result OR flag" is updated in coordination with results output with EtherNet/IP as the output destination. When the
Reference
"Result OR flag" is used, it is necessary to configure the output setting so that 1 or more data item is output via EtherNet/IP.
• If asynchronous trigger capture (Page 3-19) is enabled, the output of judgment value and measurement result are
implemented by camera. In order to check which camera’s measurement results the output data are, change the settings so
that they include the CAM * Execute Status in the output data.

6-148 CV-X UM_A


Controlling the controller with EtherNet/IP cyclic communication (Command Control)

Controlling the controller with EtherNet/IP cyclic


communication (Command Control)
The communication control commands can be executed at any time.

Flow of command process using EtherNet/IP (example of connection with PLC


EtherNet/IP unit)
The controller performs command control via EtherNet/IP in the following manner.

Controller (CV-X series) PLC

Control and data output by EtherNet/IP


a
Write the command number to be executed to the
Command Number and the command parameter
to the Command Parameter.

c b
When the controller detects that the Command Confirm that Command ready flag is turned on
request flag is turned on, it reads the command and then turn on Command request flag.
from the Command Number and the command
parameters from the Command Parameter and Confirm the start of command execution by
executes the command, and then it turns off the detecting that Command ready flag has turned off.
Command ready flag.

d
When the command execution is completed, the
The response data is written to the Command
response data is written to Command Data and
Data*1
the error status is set in Command error flag.
e
e Confirm completion of the command execution by
detecting that Command complete flag has
Command complete flag turns on. turned on. Reference the response data and
command execution result.
g
When the controller confirms that Command
f
request flag is turned off, it turns off Turn off Command request flag.
Command complete flag and Command
error flag and turns on Command ready flag.

*1 In the case of a command for which there is no response data, data is not output in response to the Command Data.

When an error occurs, the command execution results are written to Command Result. (0: Success, <Error code>:
Reference
Failure). Error codes are as specified in "When an error occurs on command acceptance" (Page 6-3).

CV-X UM_A 6-149


Controlling the controller with EtherNet/IP cyclic communication (Command Control)

Timing Chart

Command Execute Conditions Command


execution

Command request flag A A The PLC writes.

Command ready flag A The controller writes.

Command complete flag A The controller writes.

Command error flag The controller writes.

Command Number The PLC writes.


Control and data output by EtherNet/IP

Command Parameter The PLC writes.

Command Data The controller writes.

햲햳햴 햵햶 햷햸

A: 0 ms or more (depends on the link scan speed)

6-150 CV-X UM_A


Changing the execute condition No. using EtherNet/IP cyclic communication (Execute Condition No. Change)

Changing the execute condition No. using EtherNet/IP


cyclic communication (Execute Condition No. Change)
The execute condition No. can be changed at any time.

Flow of execute condition No. change using EtherNet/IP (example of connection with
PLC EtherNet/IP unit)
The controller changes the execute condition No. value using EtherNet/IP in the following manner.
The changed value is applied at the next measurement.

Control and data output by EtherNet/IP


Controller (CV-X series) PLC

Reference ExecCondNo and change the execute


Write data to the ExecCondNo.
condition number accordingly

CV-X UM_A 6-151


Typical setup procedure for EtherNet/IP

Typical setup procedure for EtherNet/IP

3 Change the settings as required.


Connecting to a Rockwell ControlLogix
PLC
When connected to a Rockwell ControlLogix PLC, the
following communication can be used by the controller.
• Cyclic communication function: Maximum data size: 496
bytes
• Message communication function: Class3/UCMM
Control and data output by EtherNet/IP

Changing the cyclic communication settings


Name
For details of the PLC unit configuration, and of RsLinx and Set the desired device name. Based on the name set
other settings needed for communication with the PC, refer here, the following tags are generated and used as
to the PLC instruction manual. send/receive-data for cyclic communication.
1 Select the EIP communications unit (1756-ENBT) to • (Device name):I Data received from controller
• (Device name):O Data sent to controller
connect to the controller using the RsLogix5000 I/
• (Device name):C Not used
O configuration, then right-click and select [New
Module]. Comm Format
Select [Data DINT].
IP Address
Specify the controller IP address.
Input (controller send-data size)
• Instance No.: 100 (decimal)
• Data size: Any value up to 124
Output (controller receive-data size)
• Instance No.:
101 (decimal): When the Ethernet port of the controller
is used
150 (decimal): When the communication expansion
unit is used
• Data size: Any value up to 124
2 Add [ETHERNET-MODULE (Generic Ethernet
Configuration
Module)].
• Instance No.: 1 (decimal)
• Data size: 0
For an InputOnly connection, refer to "Sending
Reference
data to multiple PLC (InputOnly)" (Page 6-153).

RPI
Specify the cyclic communication interval.

Set a value of 5 ms or more (1 ms or more when using


the communication expansion unit).

6-152 CV-X UM_A


Typical setup procedure for EtherNet/IP

Depending on the controller measurement Changing the message communication settings


Reference
settings, there may be effects on the screen
displays, external I/O, or other operations After performing "Changing the cyclic communication
even when a value of 5 ms or more (1 ms or settings" (Page 6-152), use MSG commands in a ladder
more when using the communication program to perform message communication.
expansion unit) is set. Be sure to verify
operating performance prior to operation. • For details of MSG commands, refer to
Reference
"Logix5000 Controllers General Instructions"
4 Download the settings to the PLC.
(1756-RM003) and other materials.
After the settings are downloaded and the mode is • If cyclic communications will not be used,
switched to online, EtherNet/IP communications are select Inhibit Module.
enabled.
1 The following tags are defined in the RsLogix5000
Sending data to multiple PLC (InputOnly) [Controller Tags].
By connecting to multiple PLC using the connection type
known as InputOnly, it is possible for multiple PLC to
receive the data sent from the controller. When using

Control and data output by EtherNet/IP


InputOnly connections, make the following settings at each
PLC.

Bidirectional InputOnly
communication PLC connection PLC
(Max.: 1 PLC)
RPI value Any value Same value as at left
InputAssembly 100 (decimal) Same value as at left
Instance No.
InputAssembly Any value Same value as at left • Tags that contain MSG command management
data size information (message - Message type)
OutputAssembly • 101 (decimal): • 254 (decimal): • Tags that contain send/receive-data by MSG
Instance No. When the Ethernet When the Ethernet commands (tx_ param, rx_param - DINT type)
port of the port of the
controller is used controller is used 2 Add MSG commands to the RsLogic 5000 ladder.
• 150 (decimal): • 3 (decimal):
When the When the
communication communication
expansion unit is expansion unit is
used used
OutputAssembly Any value 0 bytes
data size
Comm Format Data-DINT Input Data
-DINT

3 Open the [Configuration] tab in the message


command settings dialog box, and change the
MSG command settings.

When connecting multiple PLC by InputOnly


Reference
connections and using cyclic communications, it
is necessary to send the controller input data by
means of Multicast packets. In the case of
ControlLogix, there is no problem as sending is
Message Type
fixed to Multicast packets for all controller
sending, however, be aware that with KV, Select [CIP Generic].
SYSMAC, and other connection types, there are
some devices that allow Multicast and Point to
Point to be selected.

CV-X UM_A 6-153


Typical setup procedure for EtherNet/IP

ServiceType, Class, Instance, Attribute 4 Open the [Communication] tab and change the
Set values according to the messages that will be sent. MSG communication settings.
• Example 1: Setting 1 for the Vision System Object TRG
bit when writing to the attribute
ServiceType SetAttributeSingle
ServiceCode - (Cannot be specified.)
Class 6AHex
Instance 01Hex
Attribute 69Hex
SourceElement Name of tag storing send-data
SourceLength 1 byte
(because attribute size is 1) Path
Destination - (Cannot be specified.) Specify the device name that was set for [Cyclic
Communication Settings]. (The figure above shows an
Control and data output by EtherNet/IP

• Example 2: Acquiring the Vision System Object example when the device is CV-X.)
READY1 bit value when reading the attribute
ServiceType GetAttributeSingle
5 Connected, Cache connections
• UCMM connection: Disable both (default).
ServiceCode - (Cannot be specified.)
• Class3 connection: Enable both.
Class 6AHex
Instance 01Hex 6 Enter the send-data settings and process for
Attribute 65Hex receive-data acquisition in a ladder program and
SourceElement - (Cannot be specified.) download it to the PLC.
SourceLength - (Cannot be specified.)
Destination Name of tag storing receive-data Other precautions concerning settings

• Example 3: Using the results data acquisition The format of the value of decimal fraction data varies as
service (4DHex) of the Vision System Object when shown below according to the setting selected for [Decimal
executing a service Point]. (This applies to the decimal fraction values in the
DW/DR command parameters and results data.)
ServiceType Custom
ServiceCode 4DHex When [Fixed-point] is selected
Class 6AHex The value multiplied by 1000 is stored as an integer.
Instance 01Hex
When [Floating-point] is selected
Attribute 01Hex
The value is stored as single-precision floating decimal point
SourceElement Name of tag storing send-data
form.
SourceLength 4 bytes
Destination Name of tag storing receive-data

- Tag value storing send-data:


No. 0 element (DINT type)Size of results data to
acquire (bytes)
No. 1 element (DINT type)Starting position (byte)
of results data to acquire
- Tag value storing receive-data:
No. 0 element (DINT type)No. 1 results data set
for output at controller
No. 1 element (DINT type)No. 2 results data set
for output at controller
No. 2 element (DINT type)No. 3 results data set
for output at controller
······

6-154 CV-X UM_A


Typical setup procedure for EtherNet/IP

Example when using ControlLogix to access data


Connect to Rockwell SLC5/05 PLC
expressed in floating decimal-point form
When connected to a Rockwell SLC5/05 PLC, the following
1 Prepare a REAL type tag.
communication can be used by the controller.
2 Use COP commands and exchange the floating • Message communication function: Class3
decimal value with the controller.
• Although the SLC5/05 Series does not support
• Acquiring floating decimal value: Reference
cyclic communication function, control is
Use a COP command to copy the data received in possible with the same data format and
the message to the REAL type tag. procedures as that of cyclic communication
by using messages to access the controller
Assembly Object.
DINT COP command REAL
(32bit) (32bit) • The maximum size that can be handled during
SLC5/05 Series message communication is
248 bytes.
• Setting floating decimal value: - When using message communication to

Control and data output by EtherNet/IP


After storing the floating decimal value on the REAL send and receive data, be careful that this
type tag, use a COP command to copy it to the data size is not exceeded.
to be sent by message. - The Assembly Object data size is the same
value as the cyclic communication data size
in the controller global settings. When
DINT COP command REAL
SLC5/05 is used, it is necessary to set this
(32bit) (32bit)
value to or below 248 bytes.

Changing the message communication settings


Use EEM commands in a ladder program to perform
message communication.
For details about EEM commands, refer to "SLC
Reference
500 Instruction Set Reference Manual" (1747-
RM001) and other materials.

1 The following files are defined in the RsLogix500


[Data Files].

• Files that contain EEM command management


information (message - Integer type)
• Files that contain send/receive-data as a result of
EEM commands (tx_param, rx_param - Integer type)

CV-X UM_A 6-155


Typical setup procedure for EtherNet/IP

2 Add EEM commands to the RsLogix 500 ladder. • Example 2: Acquiring the Vision System Object
READY bit value when reading the attribute
Service Generic Get Attribute Single
ServiceCode - (Cannot be specified.)
Class 6AHex
Instance 01Hex
Attribute 65Hex
Data Table Address - (Cannot be specified.)
(Send-data)
Size In Words (Send- - (Cannot be specified.)
data)
3 In the EEM command Control Block, specify the file
Data Table Address Name of file storing receive-data
to be used in the EEM commands that were defined
(Receive-data)
in Step 1 and open SetupScreen.
Size In Words 1 word (because attribute size is 1)
Control and data output by EtherNet/IP

(Receive-data)

• Example 3: Using the results data acquisition


service (4DHex) of the Vision System Object when
executing a service
Service Custom
ServiceCode 4DHex
Class 6AHex
Service, Class, Instance, Attribute Instance 01Hex
Set values according to the messages that will be Attribute 01Hex
sent. Data Table Address Name of file storing send-data
• Example 1: Setting 1 for the Vision System Object TRG bit (Send-data)
when writing to the attribute Size In Words (Send- 2 words
data)
Service Generic Set Attribute Single
Data Table Address Name of file storing receive-data
ServiceCode - (Cannot be specified.)
(Receive-data)
Class 6AHex
Size In Words Size of data to be acquired
Instance 01Hex
(Receive-data)
Attribute 69Hex
- Value of file storing send-data:
Data Table Address Name of file storing send-data
No. 0 element (Integer type) Size of results data to
(Send-data)
acquire (bytes)
Size In Words (Send- 1 word (because attribute size is 1)
No. 1 element (Integer type) -
data)
No. 2 element (Integer type) Starting position
Data Table Address - (Cannot be specified.)
(byte) for results data to acquire
(Receive-data)
No. 3 element (Integer value) -
Size In Words - (Cannot be specified.)
- Value of file storing receive-data:
(Receive-data)
No. 0 element (Integer type) Lower word of No. 1
results data set for output at the controller
No. 1 element (Integer type) Upper word of No. 1
results data set for output at the controller
No. 2 element (Integer type) Lower word of No. 2
results data set for output at the controller
No. 3 element (Integer type) Upper word of No. 2
results data set for output at the controller
No. 4 element (Integer type) Lower word of No. 3
results data set for output at the controller
No. 5 element (Integer type) Upper word of No. 3
results data set for output at the controller
······

6-156 CV-X UM_A


Typical setup procedure for EtherNet/IP

• Example 4: Accessing 4 Open the [MultiHop] tab and set the controller IP
Assembly Object attribute3:data during control address.
using the same format and procedure as for cyclic
data
- 1) Acquiring controller input data
Service ReadAssembly
ServiceCode 0EHex (cannot be specified)
Class 04Hex (cannot be specified)
Instance 64Hex
Attribute 03Hex (cannot be specified)
The figure above shows an example when the
Data Table Address (Cannot be specified.) controller IP address is 192.168.0.10.
(Send-data)
Size In Words (Send- (Cannot be specified.) 5 Open the [Send Data] tab and [Receive Data] tab,
data) and check the contents of the files that contain

Control and data output by EtherNet/IP


Data Table Address Name of file storing receive- send/receive-data.
(Receive-data) data
Size In Words 124 words
(Receive-data)
Value of file storing Data can be acquired in a
receive-data format that conforms to the
controller cyclic data
communication allocations.
* The maximum message size that can be handled by
SLC5/05 is 124 words (248 bytes). 6 Enter the send-data settings and process for
- 2) Controller output data setting
receive-data acquisition in a ladder program and
Service WriteAssembly download it to the PLC.
ServiceCode 10Hex (cannot be specified)
Class 04Hex (cannot be specified) Other precautions concerning settings
Instance 65Hex (When the Ethernet port
of the controller is used) The format of the value of decimal fraction data varies as
95Hex (When the communication shown below according to the setting selected for [Decimal
expansion unit is used) Point]. (This applies to the decimal fraction values in the
Attribute 03Hex (cannot be specified) DW/DR command parameters and results data.)
Data Table Address Name of file storing send-data
(Send-data) When [Fixed-point] is selected
Size In Words (Send- 124 words The value multiplied by 1000 is stored as an integer.
data)
When [Floating-point] is selected
Data Table Address (Cannot be specified.)
The value is stored as single-precision floating decimal point
(Receive-data)
form.
Size In Words (Cannot be specified.)
(Receive-data)
Value of file storing Specify using data in a format
send-data that conforms to the controller
cyclic data communication
allocations.
*The maximum message size that can be handled by
SLC5/05 is 124 words (248 bytes).

CV-X UM_A 6-157


Typical setup procedure for EtherNet/IP

Example when using SLC5/05 to access data expressed in floating decimal-point form
1 Prepare files containing a Float type and Integer type array (2 elements).

2 Use COP commands and MOV commands to exchange the floating decimal value with the controller.
• Acquiring the floating decimal value:
Use a MOV command or other means to copy the Integer-type 2-element data that was acquired by message and in
which the upper word and lower word were reversed to the Integer array that was prepared in advance. Then use a
COP command to copy the copied Integer array to Float type file.
MOV command COP command
Integer 0 Integer 1
(16bit) (16bit) Float
1 0 (32bit)
(16bit) (16bit)

• Setting the floating decimal value:


After storing the floating decimal value in the Float type file, use a COP command to copy 2 words to the Integer
Control and data output by EtherNet/IP

array. Then use a MOV command to copy the 2 Integer-type element data with the upper word and lower word
reversed to the Integer array.
MOV command COP command
Integer 0 Integer 1
(16bit) (16bit) Float
1 0 (32bit)
(16bit) (16bit)

6-158 CV-X UM_A


Troubleshooting

Troubleshooting

When correct operation does not occur

Checking whether or not the EtherNet/IP Although results data is output beginning from
connection is correct byte address 0048, it is unknown where the data
Select the controller [Global] - [Communications & I/O] - is output to on the PLC (KV Series) side.
[EtherNet/IP], then check [Cyclic Communication Status:] With the KV Series, when automatic allocation is used for
at the bottom of the [EtherNet/IP] screen. If [Not the first CV-X series, the CV-X series results data is written
Connected] is displayed here, then communication has beginning from link register W0012.

Control and data output by EtherNet/IP


failed. Check the cable (cross cable when connected With KV series automatic allocation, allocation byte
directly), IP address, communications settings on the PLC addresses 0000-0011 are for the link relay (beginning from
side, and other items again. B0000), and byte addresses beginning from 0012 are for
When connected to a Rockwell SLC5/05,
the link register. Allocation begins at the start from W0000,
Reference with 1 register used for each 2-byte address.
because cyclic communication is not performed,
[Not Connected] is displayed even when the When the results data byte address is 0048, then (48 - 12)/
connection is correct. 2 = No. 18 12Hex, and results data is written beginning
from W0012.
"Result OR flag" is not output.
The "Result OR flag" is updated in coordination with results
output with EtherNet/IP as the output destination. When the
"Result OR flag" is used, it is necessary that 1 or more data
item is output via EtherNet/IP.

"Result ready flag" remains ON and does not


change.
There is the possibility that "Result ack flag" control is not
being performed correctly. The "Result ready flag" turns OFF
when the "Result ack flag" rise is recognized in sending
(controller receiving). This is the same regardless of whether
handshake is ON or OFF.

Data cannot be acquired correctly when reading


data based on the change in the rise of STO output
from an external terminal.
STO is the data strobe signal for terminal output. Therefore it
cannot be used as the strobe signal for any other data output.
Refer to the "Result ready flag" for the timing as to when to
read data by EtherNet/IP.

CV-X UM_A 6-159


Troubleshooting

Error Message

Message Cause Corrective Action Error


cause No.
EtherNet/IP communication Cyclic communication was interrupted. • Check that the Ethernet cable is connected
failed. (When recovery is possible, recovery correctly.
occurs automatically.) • Check whether both the controller and the
master side were restarted after the
communications settings were updated.
• Change the cyclic communication cycle and
timeout time on the PLC side.
• In the EtherNet/IP global settings, change [Process 13601
Priority] (Page 6-146) from [Image First] to
[Transmission First] (CV-X200/X100 Series Only).
If the [Image First] setting will continue to be used,
Control and data output by EtherNet/IP

review the flow contents and trigger interval.


• With the factory default, ERROR output is not
set. Set this on the [ERROR Output Settings]
screen (Page 5-32).
EtherNet/IP output failed due The controller output buffer for outputting Change the RPI setting so the data is output via
to a full buffer. via EtherNet/IP is full. EtherNet/IP at a faster rate than it builds up. Or,
13602
extend the time between triggers. Note: Results
data are not written when the buffer is full.
The delay of the handshake When the EtherNet/IP handshake is ON, • Check that handshake is controlled properly.
control causes skipping of the delayed handshake caused results • Clear the data in the output buffer using the
13603
EtherNet/IP communication output via EtherNet/IP to be skipped. TEST terminal (bit) or reset input.
result output.
EtherNet/IP module The EtherNet/IP module was not • Check that the EtherNet/IP module is attached
disconnected. recognized and the controller cannot use correctly.
the EtherNet/IP communications. • Check that the EtherNet/IP module is not
13604
damaged.
• Do not attach or detach the EtherNet/IP module
while the controller and unit are powered on.

6-160 CV-X UM_A


Communicating with the controller using EtherNet/IP message communication

Communicating with the controller using EtherNet/IP


message communication
For details of the basic communication specifications, refer to "Controller EtherNet/IP communication specifications" (Page 6-139).

Object configuration
The EtherNet/IP function provided by the controller's Ethernet port and the communication expansion unit support the
following objects. Access to these objects can be achieved through the message communication.

Class (Object name) Class ID Instance ID Controller's Ethernet Communication


port expansion unit
Identity Object 1 (01Hex) 1 (01Hex)  

Control and data output by EtherNet/IP


Message Router Object 2 (02Hex) 1 (01Hex)  -
Assembly Object 4 (04Hex) 100 (64Hex): Input  
101 (65Hex): Output  -
150 (95Hex): Output - 
Connection Manager Object 6 (06Hex) 1 (01Hex)  
Device Level Ring Object 71(47Hex) 1 (01Hex) - 
QoS Object 72(48Hex) 1 (01Hex) - 
Vision System Object 104 (68Hex) 1 (01Hex)  
Port Object 244 (F4Hex) 1 (01Hex)  -
TCP/IP Interface Object 245 (F5Hex) 1 (01Hex)  
EtherNet Link Object 246 (F6Hex) 1 (01Hex)  
: Supported, -: Not supported

Reference • For detailed procedures for issuing the message with the PLC device in use, refer to the PLC operation manual.
• This manual mainly describes the Vision System Object which is an object that is unique to the controller. For details
regarding the other objects, refer to the EtherNet/IP specifications (http://www.odva.org) issued by ODVA.

Notation in this explanation


The following terms are used when explaining object attributes and services.

Data notation
• The bit position in the data is indicated as "Bit n". (Bit0 represents the LSB.)
• Array type data is indicated by [ ]. Example: DWORD[10] (DWORD type array, No. of elements: 10)

Data type
The data type is prescribed as follows in the EtherNet/IP specifications.

Data type Explanation Range


Min. Max.
BOOL Boolean 0: False 1: True
SINT Short integer -128 127
INT Integer -32768 32767
DINT Double precision integer -231 231-1
USINT Unsigned short integer 0 255
UINT Unsigned integer 0 65535
UDINT Unsigned double 0 232-1
precision integer
BYTE Bit string: 8 bits – –
WORD Bit string: 16 bits – –
DWORD Bit string: 32 bits – –
REAL Floating decimal point Range of single-precision floating decimal points

Reference All values are stored as little endians.

CV-X UM_A 6-161


Communicating with the controller using EtherNet/IP message communication

ClassID: 4 (04Hex) Assembly Object

Explanation
The same data that is sent and received by cyclic communications can be accessed and controlled directly by messages.
This can be used to perform control using the same data format as with cyclic communication for models that do not support
cyclic communication (such as Rockwell SLC5/05).

Reference Be aware that with messages, it is not possible to perform time-specific control as it is with cyclic communications.

Instance100 (64Hex)
This is information concerning the input assembly and is sent using cyclic communication by the controller.

Attribute
Control and data output by EtherNet/IP

Attribute ID Access Name Data type Details


3 (03Hex) Get data Byte array This information is specified by the input data for the cyclic communication
data allocation in the global settings. It includes the controller status,
command execution results, results data, and other information.
4 (04Hex) Get size UINT Attribute3 size (bytes)
This is the size that is specified for cyclic communications data size in the
cyclic communication data allocation in the global settings.

Example of input assembly data format


The input assembly configuration is as prescribed in the cyclic communication data allocation in the global settings.
For the purpose of explanation, the configuration is shown with the settings listed below.
• Cyclic communication data size: 496 bytes (Addresses 0000 - 0495)
• Command response output area: 24 bytes

Address 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0bit


(byte)
0000 Reserved Reserved Reserved Result OR Result Ready Cmd Ready Cmd Error Cmd
Complete
0001 Reserved Reserved Reserved Reserved READY4 READY3 READY2 READY1
0002 Reserved Reserved Reserved Reserved ACK4 ACK3 ACK2 ACK1
0003 OUTPUT OUTPUT Reserved Reserved RUN Reserved ERROR BUSY
_IMG_STATUS _IMG_BUSY
0004 Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge
Value7 Value6 Value5 Value4 Value3 Value2 Value1 Value0
0005 Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge
Value15 Value14 Value13 Value12 Value11 Value10 Value9 Value8
0006 Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge
Value23 Value22 Value21 Value20 Value19 Value18 Value17 Value16
0007 Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge
Value31 Value30 Value29 Value28 Value27 Value26 Value25 Value24
0008 Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge
Value39 Value38 Value37 Value36 Value35 Value34 Value33 Value32
0009 Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge
Value47 Value46 Value45 Value44 Value43 Value42 Value41 Value40
0010 Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge
Value55 Value54 Value53 Value52 Value51 Value50 Value49 Value48
0011 Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge Tool Judge
Value63 Value62 Value61 Value60 Value59 Value58 Value57 Value56
0012 Error Code
0013
0014 Reserved
0015

6-162 CV-X UM_A


Communicating with the controller using EtherNet/IP message communication

Address 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0bit


(byte)
0016 Total Count
0017
0018
0019
0020 Command Result
0021
0022
0023
0024 Command Data 1
0025
0026
0027
0028 Command Data 2

Control and data output by EtherNet/IP


0029
0030
0031
···

0044 Command Data 6


0045
0046
0047
0048 Result Data 1
0049
0050
0051
0052 Result Data 2
0053
0054
0055
···

Service

Service code Name Details


14 (0EHex) GetAttributeSingle Acquires the attribute value.

CV-X UM_A 6-163


Communicating with the controller using EtherNet/IP message communication

Instance: 101 (65Hex)/150 (95Hex)


This is information concerning the output assembly and is received using cyclic communication by the controller.
When using the Ethernet port on the controller, the instance is 101. The instance is 150 when using the communications
expansion unit.

Attribute

Attribute ID Access Name Data type Details


3 (03Hex) Get/Set data Byte array This information is specified in the output data of the cyclic communication
data allocation in the global settings. Controller controls, command input,
and other data can be written to it.
4 (04Hex) Get size UINT Attribute3 size (bytes)
This is the size that is specified for cyclic communications data size in the
cyclic communication data allocation in the global settings.

Example of output assembly data format


Control and data output by EtherNet/IP

The output assembly configuration is as prescribed in the cyclic communication data allocation in the global settings.
For the purpose of explanation, the configuration is shown with the settings listed below.
• Cyclic communication data size: 496 bytes (Addresses 0000 - 0495)

Address (byte) 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0bit
0000 Reserved Reserved Reserved Error reset Result ack Reserved Reserved Cmd Request
request
0001 Reserved Reserved Reserved Reserved TRG4 TRG3 TRG2 TRG1
0002 Reserved Reserved Reserved Reserved Reserved TEST EXT RESET
0003 Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved
0004 Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved
0005 Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved
0006 Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved
0007 Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved
0008 Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved
0009 Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved
0010 Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved
0011 Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved
0012 ExecCondNo
0013
0014 Reserved
0015
0016 Command number
0017
0018
0019
0020 Cmd Parameter1
0021
0022
0023
0024 Cmd Parameter2
0025
0026
0027
0028 Cmd Parameter3
0029
0030
0031
···

Service

Service code Name Details


14 (0EHex) GetAttributeSingle Acquires the attribute value.
16 (10Hex) SetAttributeSingle Sets the attribute value. Whether or not it can be set depends on the attribute access properties.

6-164 CV-X UM_A


Communicating with the controller using EtherNet/IP message communication

ClassID: 106 (6AHex) Vision System Object

Explanation
This object is unique to the controller, and provides the attributes and services that are necessary to control the controller by means
of messages.
For details concerning control by attributes, refer to the control sequence for cyclic communication.

Instance: 1 (01Hex)

Attribute

Attribute ID Access Name Data type Details


100 (64Hex) Get Vision System BYTE Indicates the controller status.
Object Status • Bit 0: ERROR

Control and data output by EtherNet/IP


• Bit 1: Reserved
• Bit 2: RUN
101 (65Hex) Get Process DWORD Indicates the measurement status.
Status • Bit 0: READY1
• Bit 1: READY2
• Bit 2: READY3
• Bit 3: READY4
• Bit 4: Reserved
• Bit 5: Reserved
• Bit 6: Reserved
• Bit 7: Reserved
• Bit 8: ACK1
• Bit 9: ACK2
• Bit 10: ACK3
• Bit 11: ACK4
• Bit 12: Reserved
• Bit 13: Reserved
• Bit 14: Reserved
• Bit 15: Reserved
• Bit 16: BUSY
• Bit 17 - 31: Reserved
102 (66Hex) Get/Set RESET BOOL Initializes the measurement process.
0->1: Initialize the measurement process.
103 (67Hex) Get/Set TEST BOOL Restricts the output. Clears the output buffer when 0->1.
• 1: Restrict output
• 0: Permit output
104 (68Hex) Get/Set EXT BOOL Restricts trigger input.
• 1: Restrict trigger input.
• 0: Permit trigger input.
105 (69Hex) Get/Set TRG BYTE Inputs trigger.
• Bit 0: TRG1
• Bit 1: TRG2
• Bit 2: TRG3
• Bit 3: TRG4
• Bit 4 - 7: Reserved
106 (6AHex) Get Results BYTE Indicates the results output status.
Status • Bit 0: Result ready flag
• Bit 1: Result OR flag
107 (6BHex) Get/Set Result BOOL Performs results output handshake control.
ack flag

CV-X UM_A 6-165


Communicating with the controller using EtherNet/IP message communication

Attribute ID Access Name Data type Details


108 (6CHex) Get Inspection Result DWORD[124] Displays the results data. The data size is fixed at 248 bytes
when the selected PLC type is Rockwell SLC5/05, and at 496
bytes in other cases. The amount that was specified in the
cyclic communication allocations can be acquired from the
starting address.
109 (6DHex) Get/Set Command request BOOL Requests the communication control command.
flag • 1: Request command execution.
• 0: Does not request command execution.
110 (6EHex) Get/Set Command Structure Specifies the communication control command No. and
Command DWORD parameters.
Number The data size is 248 bytes when the selected PLC type is
Command DWORD Rockwell SLC5/05, and 496 bytes in all other cases.
Param *At setup, only the size that requires update can be specified
Control and data output by EtherNet/IP

(4-byte integer multiple).


111 (6FHex) Get Command Status BYTE Indicates the command execution status.
• Bit 0: Command complete flag
• Bit 1: Command error flag
• Bit 2: Command ready flag
112 (70Hex) Get Command Result Structure Indicates the command execution results.
Command DWORD The data size is 248 bytes when the selected PLC type is
Result Rockwell SLC5/05, and 496 bytes in all other cases. The data
Command DWORD size varies depending on the command execution results. The
Data maximum data size is 248 bytes when the selected PLC type
is Rockwell SLC5/05, and a maximum of 496 bytes in all other
cases.
113 (71Hex) Get Total count UDINT Indicates the measurement count.
114 (72Hex) Get/Set Exec Cond No UINT If a value was specified that exceeds the maximum value for
the execute condition No., then the value is set as the
maximum value + 1. The update timing for Set is the same as
for EXW however it is different from EXW in that update occurs
even when operation is stopped.
With Get, an IMMEDIATE execute condition No. is acquired and
returned.
115 (73Hex) Get NGCount UDINT Indicates the NG count.
116 (74Hex) Get/Set Program ID Structure Sets and references the program No.
SD No. UINT Specifies the SD card No. (1 - 2).
Program No. UINT Specifies the program No. (0 - 999).
118 (76Hex) Get Program Load UINT Indicates the status/results of program change by attribute 116.
Status • 0: Program change successful
• 1: Program change failed
• 2: Program change in progress

* For Get access, the GetAttributeSingle service (0EHex) is used. For Set, the SetAttributeSingle service (10Hex) is used.

6-166 CV-X UM_A


Communicating with the controller using EtherNet/IP message communication

Service

Service code Name Details


5 (05Hex) Reset Initializes the measurement process.
14 (0EHex) GetAttributeSingle Acquires the attribute value.
16 (10Hex) SetAttributeSingle Sets the attribute value. Whether or not it can be set depends on the attribute access
properties.
75 (4BHex) Capture Executes capture using the specified camera.
76 (4CHex) ExecuteCommand Issues a command request. The command execution results are returned by message
response.
77 (4DHex) GetResultsData Acquires measurement results.
78 (4EHex) ChangeExecuteCondition Changes the execute condition No.
No
79 (4FHex) GetAreaAllocationInfo Acquires the cyclic communication allocation settings.
80 (50Hex) Clear error Clears the error status.

Control and data output by EtherNet/IP


Service details
• Reset service (05Hex)
Initializes the measurement process. The executed contents are the same as for I/O control reset control.
- Send parameter: None
- Response data: None
• Capture service (4BHex)
Trigger is input and capture occurs.
- Send parameter
Name Data type Details
TriggerBit BYTE Camera information specifying the capture
• Bit 0: TRG1
• Bit 1: TRG2
• Bit 2: TRG3
• Bit 3: TRG4
- Returned error code
Error Code Name Details
09 (09Hex) Abnormal parameter value A parameter value other than 1~15 was specified.
21 (15Hex) Parameter size is too A parameter was specified with a size larger than 2 bytes.
large.
19 (13Hex) Parameter size is too Parameter is missing.
small.
16 (10Hex) Status error The "Ready" which corresponds to the specified trigger is OFF
(not in run mode, receive image capture not permitted, etc.).
- Result data: None

In the communication process using messages, a processing delay of several 10s of ms or longer occurs. If this is a
Reference
problem, use cyclic communication or terminal input for control.

CV-X UM_A 6-167


Communicating with the controller using EtherNet/IP message communication

• Communication control command execution service (4CHex)


Executes communication control commands.
- Send parameter
Name Data type Details
Command Number DWORD Specifies the communication control command No.
Command Param DWORD Specifies the command parameters. A maximum of 492 bytes of
parameters can be specified (4-byte integer multiple). For details
of the command specification method, refer to "Details of
communication control commands" (Page 6-5).
- Returned error code
Error Code Sub code Name Details
00 (00Hex) Command execution Command execution was completed.
completion
Control and data output by EtherNet/IP

19 (13Hex) Parameter too small The parameter was not specified in the
error send-data.
21 (15Hex) Parameter too large Parameter larger than 496 bytes was
error specified in the send-data.
31 (1FHex) 2 Command error The specified command does not exist.
3 Command operation Operation of the received command is
prohibited not possible.
5 Command response The command results area is insufficient.
error
22 Parameter error The parameter number or range is
incorrect.
16 (10Hex) Status error The "Command ready flag" is OFF.
- Results data:
When the execution of a command that includes command results is successful, the results data is returned in the
format shown below.
Name Data type Details
Command Data DWORD [ ] Returns the command execution results. The data contained in
this area corresponds to the Command Data part. The maximum
size of the returned data is 248 bytes when the selected PLC type
is Rockwell SLC5/05, and 496 bytes in all other cases.

In the communication process using messages, a processing delay of several 10s of ms or longer occurs. If this is a
Reference
problem, use cyclic communication or terminal input for control.

6-168 CV-X UM_A


Communicating with the controller using EtherNet/IP message communication

• Results data acquisition service (4DHex)


Acquires the most recent measurement results.
- Send parameter
Name Data type Details
Size UINT Specify the size of the results data to acquire in bytes. (The
results data is in size increments of 4 bytes. Be sure to specify a
multiple of 4.)
Offset UINT Specify the offset of the results data to acquire in bytes. (The
results data is in size increments of 4 bytes. Be sure to specify a
multiple of 4.)

- Returned error code


Error Code Name Details
09 (09Hex) Abnormal parameter Offset or size value is incorrect.

Control and data output by EtherNet/IP


value
21 (15Hex) Parameter size is too Parameter size is too large.
large.
19 (13Hex) Parameter size is too Parameter size is insufficient.
small.

- Results data
Name Data type Details
Result BYTE[] Returns results data with the specified offset and size.
The maximum data size is 248 bytes when the selected PLC type
is Rockwell SLC5/05, and 496 bytes in all other cases.

• In the communication process using messages, a processing delay of several 10s of ms or longer may occur. If this is a
Reference
problem, use cyclic communication or terminal input for control.
• The results data that can be acquired is up to the size specified in the cyclic communication allocations.
• When this command is used, set the handshake to OFF.

• Execute condition number change service (4EHex)


Changes the execute condition number.
- Send parameter
Name Data type Details
No DWORD Execute condition number to set

- Returned error code


Error Code Name Details
09 (09Hex) Abnormal parameter Size value is incorrect.
value
21 (15Hex) Parameter size is too Parameter size is too large.
large.
19 (13Hex) Parameter size is too Parameter size is insufficient.
small.

- Result data: None


In the communication process using messages, a processing delay of several 10s of ms or longer occurs. If this is a
Reference
problem, use cyclic communication or terminal input for control.

CV-X UM_A 6-169


Communicating with the controller using EtherNet/IP message communication

• Area allocation information acquisition service (4FHex)


Acquires the address and size for the areas allocated to cyclic communication.
- Send parameter
Name Data type Details
Direction UINT Direction
• 0: Receiving side
• 1: Sending side
index UINT When Direction is 0 (receiving side)
• 0: Bit area
• 1: Fixed byte data area
• 2: CommandParam area
When Direction is 1 (sending side)
• 0: Bit area
• 1: Fixed byte data area
• 2: CommandData area
Control and data output by EtherNet/IP

• 3: ResultData area

- Returned error code


Error Code Name Details
09 (09Hex) Abnormal parameter A parameter value other than 0,1, 2, or 3 was specified.
value
21 (15Hex) Parameter size is too A parameter was specified with a size larger than 2 bytes.
large.
19 (13Hex) Parameter size is too Parameter is missing.
small.

- Results data:
Name Data type Details
Size UINT Size of specified area
Offset UINT Starting address of specified area

• Error clear service (50Hex)


Clears the error status.
- Send parameter
Name Data type Details
index UINT Error to be cleared
• Bit 0: Error

- Returned error code


Error Code Name Details
09 (09Hex) Abnormal parameter A parameter value other than 1 was specified.
value
21 (15Hex) Parameter size is too A parameter was specified with a size larger than 2 bytes.
large.
19 (13Hex) Parameter size is too Parameter is missing.
small.

- Result data: None


In the communication process using messages, a processing delay of several 10s of ms or longer occurs. If this is a
Reference
problem, use cyclic communication or terminal input for control.

6-170 CV-X UM_A


Communicating with the controller using EtherNet/IP message communication

Services
Controlling the controller using Specify the contents for execution. The primary services that
EtherNet/IP message communication can be used with the controller are the following.
• Access to attributes:
Using message communication GetAttributeSingle/SetAttributeSingle
The controller functions as the message communication • Object-specific service:
server. The procedure for issuing message communication Services that are prepared for individual objects.
varies depending on the device. However, information such
as the following must be specified. For details, refer to Control using message communication
"Controller EtherNet/IP communication specifications" (Page
When using messages to control the controller, access
6-139) and the manual of each device.
Vision System Object.
IP Address: Vision System Object provides the following services.
Specify the controller IP address.
Service name Service ID Explanation

Control and data output by EtherNet/IP


Class, instance: Reset 5 (05Hex) Resets the controller
Specify the following classes and instances that are provided measurement contents. It is the
by the controller EtherNet/IP function. same as the reset command in
the communications control
Class name Class ID Instance ID commands.
Identity Object 1 (01Hex) 1 (01Hex) GetAttribute 14 (0EHex) Acquires the specified attribute
Message Router 2 (02Hex) 1 (01Hex) Single value.
Object SetAttribute 16 (10Hex) Writes a value to the specified
Assembly Object 4 (04Hex) 100 (64Hex): Input Single attribute.
101 (65Hex): Output Capture 75 (4BHex) Inputs the specified trigger
(When the Ethernet port of
signal and performs image
the controller is used)
capture.
150 (95Hex): Output
(When the communication Execute 76 (4CHex) Executes communication
Command control commands.
expansion unit is used)
Connection Manager 6 (06Hex) 1 (01Hex) GetResultsData 77 (4DHex) Acquires measurement results.

Object Change 78 (4EHex) Changes the execute condition

Vision System 106 (6AHex) 1 (01Hex) Execute No.


ConditionNo
Object
Port Object 244 (F4Hex) 1 (01Hex) GetArea 79 (4FHex) Acquires the allocation
AllocationInfo information for each area
TCP/IP Interface 245 (F5Hex) 1 (01Hex)
(command response output
Object
area, system variable allocation
Ethernet Link Object 246 (F6Hex) 1 (01Hex)
area, results output area, etc.)
The primary classes that are used for message that were allocated for cyclic
Reference
communication are the following. communication data.
• Vision System Object: This object is unique to
Clear error 80 (50Hex) Clears the error status.
the controller, and is tasked with all image
sensor controls. For details about each service, refer to "Controller
Reference
• Assembly Object: With a PLC that does not EtherNet/IP communication specifications" (Page 6-
support cyclic communication, by directly 139). For details of PLC settings, refer to "Typical
reading and writing the data of this object, it is setup procedure for EtherNet/IP" (Page 6-152).
possible to achieve control that is the same as
cyclic communication.

Attributes
Specify the attributes that exist in the specified class and
instance. For details of the attributes of each class, refer to
"Controller EtherNet/IP communication specifications"
(Page 6-139) and the specifications of the EtherNet/IP
functions issued by ODVA.
To obtain the specifications issued by ODVA,
Reference
refer to the URL below.
ODVA homepage: www.odva.org/

CV-X UM_A 6-171


Communicating with the controller using EtherNet/IP message communication

Resetting the controller using Controlling image capture with


EtherNet/IP message communication EtherNet/IP message communication
Controller measurement can be reset using message
Image capture service (4BHex) control image
communication by means of the Vision System Object reset
service. Inputs the specified trigger and performs image capture.

Controller
PLC
Reset service (05Hex) control image (CV-X series)

Resets the measurement contents. The contents that are


Image capture service
executed are the same as I/O reset.

Controller Response
PLC
(CV-X series)
The following conditions must be satisfied in
Reference
Control and data output by EtherNet/IP

Reset service
order to use this service.
• EtherNet/IP must be enabled when started.
Response • EtherNet/IP must be enabled in the external
trigger type settings.
• READY1 - READY4 for the specified trigger
information must be true (READY state).
Example of data

Send-data Example of data


Class ID 6AHex Vision System Object When trigger 1 and 2 are input, specify 0x03 with the trigger
Instance ID 01Hex Fixed value information bits 0 and 1 as 1.
Service ID 05Hex Reset service
Send-data
Attribute ID – –
Data – – Class ID 6AHex Vision System Object
Instance ID 01Hex Fixed value
Response Service ID 4BHex Image capture service
Attribute ID – –
Execution result Execution result
Data Byte No. 0 03Hex bit0: Trg1 enabled
Additional code None
bit1: Trg2 enabled
bit2: Trg3 disabled
Execution result
bit3: Trg4 disabled
0 (00Hex): Service execution was successful.

Response

Execution result Execution result


Additional code None

Execution result
• 0 (00Hex): Service execution was successful.
• 9 (09Hex): Data value is not correct (not a valid value).
• 16 (10Hex): Service was not available (One of the
specified triggers was not in ready state.)
• 19 (13Hex): Incorrect data size (too small)
• 21 (15Hex): Incorrect data size (too large)

6-172 CV-X UM_A


Communicating with the controller using EtherNet/IP message communication

Response data
Command control with EtherNet/
IP message communication Execution result Execution result
Additional code Refer below.

Command execution service (4CHex) control Data Byte No. 0 Execution result byte No. 0

image Byte No. 1 00Hex


Byte No. 2 00Hex
Executes command data.
Byte No. 3 00Hex
Controller
PLC Execution result
(CV-X series)
• 0 (00Hex): Service execution was successful.
Command execution service • 19 (13Hex): Incorrect data size (too small)
• 21 (15Hex): Incorrect data size (too large)
Response • 31 (1FHex): A vendor-specific error occurred. The
detailed reason is indicated in the additional code.

Control and data output by EtherNet/IP


• The following conditions must be satisfied in
Reference Additional code
order to use this service.
- EtherNet/IP must be enabled when started.
Contain binary command error codes.
- The "Command ready flag" must be true
2 (02Hex) Command error The specified command
(service is available).
does not exist.
• The upper limit for the data that can be
specified and acquired by command input 3 (03Hex) Command Operation of the received
and command output with this service is 248 operation prohibited command is not possible.
bytes when the selected PLC type is Rockwell 22 (16Hex) Parameter error The parameter number or
SLC5/05, and is 496 bytes in all other cases. range is incorrect.
This size is unrelated to the command area
size that was allocated for the cyclic
communication area on the [Global] screen.
• The command output data returns a response
corresponding to the size of the results data
for the executed command.

Example of data
When specifying number specified command 24 (PW) and
changing to program 10 in SD1

Send-data

Class ID 6AHex Vision System Object


Instance ID 01Hex Fixed value
Service ID 4CHex Command execution service
Attribute ID – –
Data Byte No. 0 18Hex Number specified command
No. 24
(Change inspection program)
Byte No. 1 00Hex
Byte No. 2 00Hex
Byte No. 3 00Hex
Byte No. 4 01Hex SD No. 1 (01Hex)
Byte No. 5 00Hex
Byte No. 6 00Hex
Byte No. 7 00Hex
Byte No. 8 0AHex Program No. 10 (0AHex)
Byte No. 9 00Hex
Byte No. 10 00Hex
Byte No. 11 00Hex

CV-X UM_A 6-173


Communicating with the controller using EtherNet/IP message communication

Example of data
Acquiring measurement data by EtherNet/IP
message communications (Acquire Data) Acquiring 20 bytes starting from byte 12 in the results data

Send-data
Results data acquisition service (4DHex) control
image Class ID 6AHex Vision System Object
Instance ID 01Hex Fixed value
Specify the offset and size in bytes for the results data that
Service ID 4DHex Results data acquisition
was allocated in the output settings, and acquire the
service
results data.
Attribute ID – –
Controller Data Byte No. 0 14Hex Acquire 20 bytes.
PLC
(CV-X series) Byte No. 1 00Hex
Byte No. 2 0CHex Acquire results data
Result data retrieval service
beginning from byte No. 12
Control and data output by EtherNet/IP

Byte No. 3 00Hex


Response
Response data
The upper limit size for the results data that can be acquired
is the results data area size that was allocated in the cyclic Execution result Execution result
communication area. However, it is limited to 248 bytes when Additional code None
the selected PLC type is Rockwell SLC5/05, and to 496 bytes Data Byte No. 0 Results data byte No. 12
in all other cases. If a larger size is specified, data is returned Byte No. 1 Results data byte No. 13
only in the maximum size that can be returned. Byte No. 2 Results data byte No. 14
Byte No. 3 Results data byte No. 15
The following conditions must be satisfied in
Reference
order to use this service. (...)
• EtherNet/IP must be enabled when started. Byte No. 16 Results data byte No. 28
• Results data must be allocated in the cyclic Byte No. 17 Results data byte No. 29
communications area.
Byte No. 18 Results data byte No. 30
• Output data with destination [EtherNet/IP]
must be set in the output settings. Byte No. 19 Results data byte No. 31
• Measurement with the current settings must
be completed (measurement count 1 or more). Execution result
• 0 (00Hex): Service execution was successful.
• 9 (09Hex): Data value is incorrect. (Offset or size is
negative, or value is too large.)
• 19 (13Hex): Incorrect data size (too small)
• 21 (15Hex): Incorrect data size (too large)

6-174 CV-X UM_A


Communicating with the controller using EtherNet/IP message communication

Changing the execute condition number


using EtherNet/IP message communication
(Change Execute Condition Number)

Execute condition number change service


(4EHex) control image
Change the execute condition number to the specified
value.

Controller
PLC
(CV-X series)

Synchronizing system
variables change service

Control and data output by EtherNet/IP


Response

The following conditions must be satisfied in


Reference
order to use this service.
• EtherNet/IP must be enabled when started.

Example of data
Writing execute condition number 5

Send-data

Class ID 6AHex Vision System Object


Instance ID 01Hex Fixed value
Service ID 4EHex Execute condition number
change service
Attribute ID – –
Data Byte No. 0 05Hex Value written as the execute
Byte No. 1 00Hex condition number
Byte No. 2 00Hex
Byte No. 3 00Hex

Response data

Execution result Execution result


Additional code None

Execution result
• 0 (00Hex): Service execution was successful.
• 9 (09Hex): Data value is not correct (not within valid
range).
• 19 (13Hex): Incorrect data size (too small)
• 21 (15Hex): Incorrect data size (too large)

CV-X UM_A 6-175


Control and data output Overview of control and
by PROFINET data output by PROFINET
This system supports communication with PROFINET.
Control/data output PROFINET is an open communication standard prescribed
via commands by PI (PROFIBUS & PROFINET International). Communication
is possible with all devices that support it, regardless of the
vendor. The Ethernet port on the controller in this system
Control/data output conforms to Conformance Class A and the communications
via the PLC-Link expansion unit conforms to Conformance Class C.
The following functions are possible by PROFINET connection.

Control/data output
Control and data output by PROFINET

Cyclic communication
via I/O terminals
Cyclic communication at update time intervals allows high-
speed control at intervals of several ms to several tens of
Control and data output ms. In addition, because it is possible to control the
by EtherNet/IP controller by referencing and updating variables and
devices in the PLC without considering the
communication, it allows programs to be written easily on
Control and data output
q the PLC side.
by PROFINET • Control controller: Control the controller by using cyclic
communication to send the commands for execution.
Control and data output • Results data output: Data can be output by cyclic
communication when the items for output from
by EtherCAT
PROFINET are set in the output settings (Page 3-113).
• Change execute condition number: The controller can
be controlled by specifying the execute condition
number by cyclic communication.
• Set a cyclic communication update time of
Reference
4 ms or more (1 ms or more when using the
communication expansion unit).
• Even when a cyclic communication update
time of 4 ms or more (1 ms or more when using
the communication expansion unit) is set, due to
the controller measurement settings, dialog
box operations, commands, combined use
with FTP, remote desktop, or other
communications, the controller may temporarily or
continuously be subject to excessive load,
causing delays in processing or temporary
interruption of communications due to timeout. In
such cases, it is necessary to either review the
cyclic communication settings and service
conditions, or else to change the PROFINET
settings in the global settings to prioritize
communications processing over image
processing. (CV-X200/X100 Series only)
(When this is done, there may be an increase
or variation in measurement time.) Be sure to
verify that there are no problems with
operating performance, including the issues
above, prior to operation.
• In a network where many devices are
connected, including PROFINET devices, if a
large load is constantly or temporarily applied
to the network, then delays and packet loss
may occur. Be sure to perform sufficient
verification prior to operation.

6-176 CV-X UM_A


Overview of control and data output by PROFINET

Record data communication


Operation flow
(acyclic communication)
This can be used for communication applications that do not Checking the specifications (Page 6-136)
require punctuality as is needed with cyclic communications.
• Check whether or not the connected PLC is a model
With this communication method, special commands are
that supports PROFINET connections.
used to read and write from/to data records (1024 bytes/
• Check the allocation conditions of the input and output
record), and it is possible to access areas that exceed the
data.
maximum size (1408 byte: When using the Ethernet port on
the controller. 1252 byte: When using the communications 
expansion unit) for cyclic communications. Changing the PROFINET settings (Page 6-144)
• Configure the controller settings for PROFINET connection.
Main setting items: Enable/Disable setting for the
PROFINET, Controller IP address (the IP address for the
PROFINET module when using the PROFINET module),

Control and data output by PROFINET


PROFINET device name, data configuration

Establishing PROFINET communications
• To check whether or not PROFINET communications
have been established, check [Cyclic Communication
Status] in the PROFINET memory monitor, or check
[Cyclic Communication Status] from the [Global] -
[Communications & I/O] - [PROFINET] screen.
• If the PROFINET connection is successful, the controller
Ethernet port LINK LED (green) begins flashing (when
using the PROFINET module, the unit’s Network Status
LED turns green).

Executing the necessary processes
Data output (Page 6-189)
• The data specified in the output settings is written to
the results output area.
• The "Result ready flag" is used to check the completion
of data writing.
• The "Result ack flag" is turned ON to report that reading
was completed.

Command control (Page 6-191)


• Communication control commands (Page 6-2) can be
executed.
• Enter the command code and command parameters in
the command input area and turn the "Command
request flag" ON to execute the command.
• When the "Command ready flag" is ON, the command
can be executed.
• The "Command complete flag" is used to check that
command execution was completed.

Changing the execute condition No. (Page 6-193)


• Change the Exec Cond No. to change the execute
condition No.

CV-X UM_A 6-177


Preparing for PROFINET connection

Preparing for PROFINET connection

Models supporting PROFINET connections


For details of the setting procedures for each PLC, refer to "Typical setting procedure for PROFINET" (Page 6-194) and to the
instruction manual provided with the PLC.

Siemens PLC

PLC model PROFINET communications unit Firmware version


S7 300 Series
Control and data output by PROFINET

Example: CPU315-2 PN/DP - (Built-in in PLC CPU Unit) V2.6 or later


S7 400 Series
Example: CPU414-3 PN/DP - (Built-in in PLC CPU Unit) V5.3 or later
S7 1200 Series
Example: CPU1212C - (Built-in in PLC CPU Unit) V2.0 or later
S7 1500 Series
Example: CPU1511 PN - (Built-in in PLC CPU Unit) V1.8.2 or later

Omron PLC

PLC model PROFINET communications unit Firmware version


SYSMAC CJ2/CJ1 CJ1W-PNT21 V1.04 or later

6-178 CV-X UM_A


Preparing the PROFINET Connection (When Using the CA-NPN20E)

Preparing the PROFINET Connection


(When Using the CA-NPN20E)

Installing the PROFINET Module CA-NPN20E PROFINET Module


Specifications
The optional PROFINET module CA-NPN20E is used when
using PROFINET communication via a communication
expansion unit. Standard specifications
Remove the protective cover from the expansion unit
connector on the right side of the controller and install the Item
PROFINET module as shown below. Compliant standard IEEE802.3u (100BASE-TX)
The controller must be turned off before connecting Communication speed 100 Mbps (100BASE-TX)

Control and data output by PROFINET


Point
or disconnecting the CA-NPN20E. Communication cycle 1 ms shortest
Connection cable Category 5e or greater shielded twisted
pair (STP) cable
Node interval 100 m
Communication port RJ45 connector × 2
Communication size 1252 bytes
Supported functions Data I/O communication (cyclic
communication)
Record data communication (non-cyclic
communication)
Applicable protocol LLDP, DCP, MRP, SNMP
Conformance test Compliant with Conformance Class C
version V2.34
When Using the Illumination Expansion
Unit and PROFINET Module Together
Mount the camera input unit directly to the controller, then Wiring diagram (P1 port/P2 port)
mount the illumination expansion unit and PROFINET
module to the right side of the camera input unit.

No. Signal name Function


1 TX + Transmission data (+)
2 TX - Transmission data (-)
3 RX + Reception data (+)
Camera input unit 4 - 75 Ω terminating resistance connected
CA-E100
5 - 75 Ω terminating resistance connected
Illumination 6 RX - Reception data (-)
expansion unit
CA-DC40E 7 - 75 Ω terminating resistance connected
PROFINET module 8 - 75 Ω terminating resistance connected
CA-NPN20E

Point Illumination expansion units and PROFINET


modules cannot be installed between camera input
units and controllers.

CV-X UM_A 6-179


Preparing the PROFINET Connection (When Using the CA-NPN20E)

Connecting to a PROFINET Network


Connect the PROFINET network cable to the P1 port or the
P2 port RJ connector. If a slave unit is present downstream
of this unit, connect the slave unit to the unused port of this
unit.

P1 port
Control and data output by PROFINET

P2 port

Point Use a category 5e or greater STP (shielded twisted


pair) cable for the network cable. You can use
either a straight cable or a crossover cable.

6-180 CV-X UM_A


Controller PROFINET communication specifications

Controller PROFINET communication specifications

Standard specifications

The PROFINET communication of this system supports two types of communication: "data I/O communication (cyclic
communication)" and "record data communication (acyclic communication)."

Data I/O communication (cyclic communication)


This is a function to make periodic communication at specified update time intervals and is suitable for real time control.
• The update time and communication size depend on the connection settings on the PLC (maximum communication

Control and data output by PROFINET


size: 1408 bytes or 1252 bytes when using a communication expansion unit).
• See "Typical setting procedure for PROFINET" (Page 6-194) for more details.

Record data communication (acyclic communication)


This is a communication method to use dedicated commands to access to a "record" which is a piece of byte information
divided in the unit of 1024 bytes.
• Two types of commands, Read Record and Write Record, are available. When these commands are executed, a
response to the command is returned.
• This method can be used for communication which does not require real time processing.
• It is possible to access to the addresses exceeding the maximum size allowed for the cyclic communication (1408
bytes; or 1252 bytes when using a communication expansion unit).
• Ensure that the writing size is specified in units of 4 bytes.
• Each record is assigned with an index. Data is accessed based on the specified index and size.
For the controller's Ethernet port and for communication expansion units, the accessible ranges for each piece of byte
information are as follows:

Output data (received by the controller) - Read/write

Accessible address
Index
CV-X port Expansion unit
1 0008 to 1031 0008 to 1007
2 1032 to 2055 1008 to 2007
3 (None) 2008 to 2055

Input data (sent from the controller) - Read only

Accessible address
Index
CV-X port Expansion unit
10 0008 to 1031 0008 to 1007
11 1032 to 2055 1008 to 2007
12 2056 to 3079 2008 to 3007
13 3080 to 4103 3008 to 4007
14 (None) 4008 to 4103

• The Read Record and Write Record commands are issued from the PLC by using the "RDREC" (SFB 52) and "WRREC"
(SFB 53) blocks respectively. See "Typical setting procedure for PROFINET" (Page 6-194) for more details.

Point If the Write Record command is issued while the Parameter module is being written in the cyclic communication, memory
area conflict may occur. Design the use of the Write Record command to avoid the memory area conflict with the cyclic
communication.

CV-X UM_A 6-181


Controller PROFINET communication specifications

Cyclic communication data allocation conditions

Example of controller send-data settings (CV-X Series to Siemens S7-300 Series)


Example when 1 CV-X Series is connected to a Siemens S7-300 Series, and the command response output area is set to 24
bytes (I***/PIB***/PIW***/PID*** in the table are examples of Siemens S7-300 I address allocations.)

Setting Address 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0bit
status (byte)
Bit 0000 I0.7 Reserved I0.6 Reserved I0.5 Reserved I0.4 Result OR I0.3 Result I0.2 Cmd I0.1 Cmd Error I0.0 Cmd
area Ready Ready Complete
0001 I1.7 Reserved I1.6 Reserved I1.5 Reserved I1.4 Reserved I1.3 READY4 I1.2 READY3 I1.1 READY2 I1.0 READY1
0002 I2.7 Reserved I2.6 Reserved I2.5 Reserved I2.4 Reserved I2.3 ACK4 I2.2 ACK3 I2.1 ACK2 I2.0 ACK1
0003 I3.7 OUTPUT I3.6 OUTPUT I3.5 Reserved I3.4 Reserved I3.3 RUN I3.2 Reserved I3.1 ERROR I3.0 BUSY
_IMG _IMG
_STATUS _BUSY
0004 PIB256 Allocation PIB256 Allocation PIB256 Allocation PIB256 Allocation PIB256 Allocation PIB256 Allocation PIB256 Allocation PIB256 Allocation
Control and data output by PROFINET

bit No. 7 possible bit No. 6 possible bit No. 5 possible bit No. 4 possible bit No. 3 possible bit No. 2 possible bit No. 1 possible bit No. 0 possible
0005 PIB257 Allocation PIB257 Allocation PIB257 Allocation PIB257 Allocation PIB257 Allocation PIB257 Allocation PIB257 Allocation PIB257 Allocation
bit No. 7 possible bit No. 6 possible bit No. 5 possible bit No. 4 possible bit No. 3 possible bit No. 2 possible bit No. 1 possible bit No. 0 possible
0006 PIB258 Allocation PIB258 Allocation PIB258 Allocation PIB258 Allocation PIB258 Allocation PIB258 Allocation PIB258 Allocation PIB258 Allocation
bit No. 7 possible bit No. 6 possible bit No. 5 possible bit No. 4 possible bit No. 3 possible bit No. 2 possible bit No. 1 possible bit No. 0 possible
0007 PIB259 Allocation PIB259 Allocation PIB259 Allocation PIB259 Allocation PIB259 Allocation PIB259 Allocation PIB259 Allocation PIB259 Allocation
bit No. 7 possible bit No. 6 possible bit No. 5 possible bit No. 4 possible bit No. 3 possible bit No. 2 possible bit No. 1 possible bit No. 0 possible
0008 PIB260 Allocation PIB260 Allocation PIB260 Allocation PIB260 Allocation PIB260 Allocation PIB260 Allocation PIB260 Allocation PIB260 Allocation
bit No. 7 possible bit No. 6 possible bit No. 5 possible bit No. 4 possible bit No. 3 possible bit No. 2 possible bit No. 1 possible bit No. 0 possible
0009 PIB261 Allocation PIB261 Allocation PIB261 Allocation PIB261 Allocation PIB261 Allocation PIB261 Allocation PIB261 Allocation PIB261 Allocation
bit No. 7 possible bit No. 6 possible bit No. 5 possible bit No. 4 possible bit No. 3 possible bit No. 2 possible bit No. 1 possible bit No. 0 possible
0010 PIB262 Allocation PIB262 Allocation PIB262 Allocation PIB262 Allocation PIB262 Allocation PIB262 Allocation PIB262 Allocation PIB262 Allocation
bit No. 7 possible bit No. 6 possible bit No. 5 possible bit No. 4 possible bit No. 3 possible bit No. 2 possible bit No. 1 possible bit No. 0 possible
0011 PIB263 Allocation PIB263 Allocation PIB263 Allocation PIB263 Allocation PIB263 Allocation PIB263 Allocation PIB263 Allocation PIB263 Allocation
bit No. 7 possible bit No. 6 possible bit No. 5 possible bit No. 4 possible bit No. 3 possible bit No. 2 possible bit No. 1 possible bit No. 0 possible
Error 0012 PIW Error code
code 424
0013
area
Reserved 0014 PIW Reserved
area 426
0015
Mea- 0016 PID Total count
surement 428
0017
count
area 0018
0019
0020 PID Command Result
Command 432
0021
output
area 0022
0023
0024 PID Command Data 1
436
0025
0026
0027
0028 PID Command Data 2
440
0029
0030
0031
···

0044 PID Command Data 6


456
0045
0046
0047
Results 0048 PID Result Data 1
output 460
0049
area
0050
0051
0052 PID Result Data 2
464
0053
0054
0055
···

6-182 CV-X UM_A


Controller PROFINET communication specifications

Names and Operations of Input Signals

Allocated area Name Remarks


Bit area Cmd Complete Turns on when command processing is complete.
Cmd Err Turns off when command processing is successful and turns on when it fails.
Cmd Ready Turns on when command processes can be received.
Result Ready Turns on when data transmission is complete.
Result OR Used to output the OR result for the judged value of toosl specified in the output
settings.
READY1 Output when trigger n input is acceptable.
READY2
READY3
READY4
ACK1 Becomes ON when Trigger 1 input is accepted. Becomes OFF when Trigger 1 input
is set to OFF.
ACK2 Becomes ON when Trigger 2 input is accepted. Becomes OFF when Trigger 2 input
is set to OFF.

Control and data output by PROFINET


ACK3 Becomes ON when Trigger 3 input is accepted. Becomes OFF when Trigger 3 input
is set to OFF.
ACK4 Becomes ON when Trigger 4 input is accepted. Becomes OFF when Trigger 4 input
is set to OFF.
BUSY This signal is output during image processing or command processing.
ERROR This signal is output while any of system errors occur with the dialog displayed on the
screen.
For details on typical system errors, see "Error messages" (Page 9-96).
In [ERROR Output Settings] (Page 5-32) in the Global Settings, enabling or disabling
the error output for the SD card-related errors, etc. can be specified.
RUN This signal is output when the controller is in Run mode.
OUTPUT_IMG_BUSY This signal is output when the image output is in progress.
OUTPUT_IMG_STATUS This signal is output when an image or images that should have been output remain
in the image output buffer.
Tool judgment area Tool Judge Value0 Returns the judgment value allocated to the bit allocation region (Address 0004:bit0).
Tool Judge Value1 Returns the judgment value allocated to the bit allocation region (Address 0004:bit1).
··· ···
Tool Judge Value63 Returns the judgment value allocated to the bit allocation region (Address 0011:bit7).
Error code area Error Code Error code corresponding to the error cause.
Measurement count area Total Count Displays the measurement count.
Command output area Command Result Indicates the command execution results.
Command Data 1 Returns the command execution result data 1.
Command Data 2 Returns the command execution result data 2.
··· ···
Command Data6 Returns the command execution result data 6.
Result output area Result Data 1 Returns the measurement result data 1.
Result Data 2 Returns the measurement result data 2.
··· ···

CV-X UM_A 6-183


Controller PROFINET communication specifications

Example of controller receive-data settings (Siemens S7-300 Series to CV-X Series)


Example when 1 CV-X Series is connected to a Siemens S7-300 Series (Q***/PQB***/PIW***/PQD***/ in the table are Siemens S7-
300 Series Q address allocation examples.)

Setting Address 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0bit
status (byte)
Bit 0000 Q0.7 Reserved Q0.6 Reserved Q0.5 Reserved Q0.4 Error reset Q0.3 Result Q0.2 Reserved Q0.1 Reserved Q0.0 Cmd
area request ack Request
Reserved 0001 Q1.7 Reserved Q1.6 Reserved Q1.5 Reserved Q1.4 Reserved Q1.3 TRG4 Q1.2 TRG3 Q1.1 TRG2 Q1.0 TRG1
area
0002 Q2.7 Reserved Q2.6 Reserved Q2.5 Reserved Q2.4 Reserved Q2.3 Reserved Q2.2 TEST Q2.1 EXT Q2.0 RESET
0003 Q3.7 Reserved Q3.6 Reserved Q3.5 Reserved Q3.4 Reserved Q3.3 Reserved Q3.2 Reserved Q3.1 Reserved Q3.0 Reserved
0004 PQB256 Reserved PQB256 Reserved PQB256 Reserved PQB256 Reserved PQB256 Reserved PQB256 Reserved PQB256 Reserved PQB256 Reserved
bit No. 7 bit No. 6 bit No. 5 bit No. 4 bit No. 3 bit No. 2 bit No. 1 bit No. 0
0005 PQB257 Reserved PQB257 Reserved PQB257 Reserved PQB257 Reserved PQB257 Reserved PQB257 Reserved PQB257 Reserved PQB257 Reserved
bit No. 7 bit No. 6 bit No. 5 bit No. 4 bit No. 3 bit No. 2 bit No. 1 bit No. 0
Control and data output by PROFINET

0006 PQB258 Reserved PQB258 Reserved PQB258 Reserved PQB258 Reserved PQB258 Reserved PQB258 Reserved PQB258 Reserved PQB258 Reserved
bit No. 7 bit No. 6 bit No. 5 bit No. 4 bit No. 3 bit No. 2 bit No. 1 bit No. 0
0007 PQB259 Reserved PQB259 Reserved PQB259 Reserved PQB259 Reserved PQB259 Reserved PQB259 Reserved PQB259 Reserved PQB259 Reserved
bit No. 7 bit No. 6 bit No. 5 bit No. 4 bit No. 3 bit No. 2 bit No. 1 bit No. 0
0008 PQB260 Reserved PQB260 Reserved PQB260 Reserved PQB260 Reserved PQB260 Reserved PQB260 Reserved PQB260 Reserved PQB260 Reserved
bit No. 7 bit No. 6 bit No. 5 bit No. 4 bit No. 3 bit No. 2 bit No. 1 bit No. 0
0009 PQB261 Reserved PQB261 Reserved PQB261 Reserved PQB261 Reserved PQB261 Reserved PQB261 Reserved PQB261 Reserved PQB261 Reserved
bit No. 7 bit No. 6 bit No. 5 bit No. 4 bit No. 3 bit No. 2 bit No. 1 bit No. 0
0010 PQB262 Reserved PQB262 Reserved PQB262 Reserved PQB262 Reserved PQB262 Reserved PQB262 Reserved PQB262 Reserved PQB262 Reserved
bit No. 7 bit No. 6 bit No. 5 bit No. 4 bit No. 3 bit No. 2 bit No. 1 bit No. 0
0011 PQB263 Reserved PQB263 Reserved PQB263 Reserved PQB263 Reserved PQB263 Reserved PQB263 Reserved PQB263 Reserved PQB263 Reserved
bit No. 7 bit No. 6 bit No. 5 bit No. 4 bit No. 3 bit No. 2 bit No. 1 bit No. 0
Execution 0012 PQW ExecCondNo
condition 0013 424
No.
0014 PQW Reserved
0015 426

0016 PQD428 Command Number


Command 0017
input
0018
area
0019
0020 PQD432 Cmd Parameter1
0021
0022
0023
0024 PQD436 Cmd Parameter2
0025
0026
0027
0028 PQD440 Cmd Parameter3
0029
0030
0031
···

6-184 CV-X UM_A


Controller PROFINET communication specifications

Names and Operations of Output Signals

Allocated area Name Remarks


Bit area Cmd Request Requests command execution when the signal switches from OFF to ON.
Result ack Provides notification of data acquisition when the signal switches from OFF to ON.
Error reset request Clears Error when the signal switches from OFF to ON.
TRG1 Allows the camera assigned to trigger n to capture images (leading edge synchronization).
TRG2 The input is accepted while READYn is ON.
TRG3
TRG4
RESET Used to perform reset operation.
• The Result OR output will become 0.
• The measurement count returns to 0.
• All of archived image data are deleted.
• All of the data in the output buffer are reset.
• A new measurement result output destination file is created. A new image output

Control and data output by PROFINET


destination folder is created.
• The trigger waiting state of individual triggers is canceled.
EXT Used to suspend the occurrence of internal triggers and the acceptance of external
triggers. While this is on, READY1 to 4 are forced to be off to stop the acceptance of
all triggers (level synchronization).
TEST Used to suspend the status output and other outputs for trial run or any other
reasons.
• The result data not output at the time of input are deleted.
• Resets the Result OR output during input.
• As soon as the input turns off, result outputs for the processed images will resume.
Command input area Command number The command No. is written.
Cmd Parameter1 The command argument 1 is written.
Cmd Parameter2 The command argument 2 is written.
Cmd Parameter3 The command argument 3 is written.
··· ···

CV-X UM_A 6-185


Changing the PROFINET settings

Changing the PROFINET settings

Displaying the PROFINET settings PROFINET setting items that can be


screen set with this system
On the [Global] - [Communications & I/O] - [PROFINET]
Enable/Disable
screen, various settings can be changed for input and output
of various data by PROFINET using the controller's Ethernet Select whether to communicate via the Ethernet port on
port or the PROFINET module (CA-NPN20E: Option) the controller or the PROFINET module.
connected to the controller. • Disable: Disable PROFINET communication.
• Enable: Select this when performing PROFINET
Control and data output by PROFINET

communication via the Ethernet port of the controller.


• Enable module: Select this when performing
communication via the PROFINET module (CA-NPN20E:
Option) connected to the controller.
The PROFINET cannot be used while the PLC-
Reference
Link (Page 6-41), EtherNet/IP (Page 6-134), or
EtherCAT (Page 6-208) is enabled. One of them
must be disabled.

Connection

PROFINET Name
Specify a unique name for this controller so that the
• The Ethernet settings, such as the IP address connecting PLC can identify the controller in the
Reference
and subnet mask, when using the PROFINET PROFINET network. Unless a proper name is specified, the
communications via the Ethernet port on the PLC cannot find the controller and cannot ensure
controller are changed on the [Network PROFINET communication. The name to be specified here
Settings] screen (Page 5-3). The Ethernet
must be identical to that given to this controller when the
settings for the PROFINET communications
PLC configures its PROFINET specifications.
via the PROFINET module connected to the
controller are changed on this screen.
• If the PROFINET settings were changed, it is IP Address Setting
necessary to restart the controller in order to
apply the settings. Point If the wrong setting is made, not only this unit but
other devices on the network may not function
properly. For details of the setting value, consult
1 From [Global], select [Communications & I/O] - the system or network administrator.
[PROFINET].
The [PROFINET] screen appears. If [Enable] or [Disable] is selected for [Enable/
Reference
Disable], the settings for the Ethernet port on the
2 Select whether to communicate via the Ethernet controller are displayed.
port on the controller or the PROFINET module in
IP Address
the [Enable/Disable] field.
Input the IP address of the PROFINET module (default
3 Specify [PROFINET Name]. setting: 192.168.0.20).

4 Change the settings as required. Subnet Mask


See "PROFINET setting items that can be set with this Input the subnet mask of the PROFINET module (default
system" (Page 6-186) for details of the settings for each setting: 255.255.255.0).
item.

5 Click [OK].

6-186 CV-X UM_A


Changing the PROFINET settings

Default Gateway Endian


Input the IP address of the default gateway of the Endian is a method of arranging multi-byte data in the PLC
PROFINET module (default setting: 0.0.0.0). memory. Select a correct endian according to the type of
PLC (default: Big Endian).
Point The set values are common for the P1 and P2 ports
on the communications expansion unit.
The endians for typical PLC are as shown below.
• Siemens: Big endian
MAC Address • Omron: Little endian
If [Enable] is selected for [Enable/Disable], the MAC
address for the Ethernet port will appear. Other Settings
If [Enable module] is selected for [Enable/Disable], the
MAC address for the PROFINET module will appear. Process Priority (CV-X200/X100 Series Only)
Select which process to prioritize during PROFINET
communications.
Data Settings
• Image First: Depending on the image processing
Data Configurations contents, timeout errors or delays in results data output

Control and data output by PROFINET


Left-click [Set] to display the overview of the data may occur in PROFINET communications.
allocations in the PROFINET cyclic data communication. • Transmission First: Priority is given to PROFINET
For a command returning a text string, the response data communications. Because image processing is
may be large. When such command is used, ensure a interrupted to perform the communication process,
certain larger size for “Command Response Output Area”. delays or variations in measurement time may occur.
(Default: 24 byte) Clicking “View List” shows the detailed
allocation statuses of the receive-data and send-data. Enable Handshake
The Handshake keeps this controller from loading its
measurement result output data to the memory until it
acknowledges that the PLC has received the last output
data. When “Enable Handshake” box is checked, the
controller turns on “Result ready flag” after the completion
of a measurement result output. Upon reception of the
ready flag, the PLC reads the output data and turns on
“Result ack flag”. And then, the controller turns off its ready
flag after recognizing the ack flag of the PLC. The PLC
turns off “Result ack flag” to request the controller to load
next output data.
• Receive-Data: Displays an overview of the allocations Issue Alarm Manually
for data received by the controller from the PLC. Checking “Issue Alarm Manually” box will issue an alarm
• Send-Data: Displays an overview of the allocations for under PROFINET protocol through an alarm CR function.
data sent from the controller to the PLC. The range for Click the wheel button of the mouse to actually issue the
the command response output area in the byte alarm.
allocation area can be specified.

Decimal Point
Select the data representation method for when handling
the decimal numbers in the results data output or
command controls.
• Fixed-point (default): The original data is multiplied by
1000, and handled as a signed 32-bit integer data.
• Floating-point: The data is handled as 32-bit single-
precision floating decimal point data.
• For details on the data that are output in decimal in
Reference
results data output, see "Operation symbol/output
item comparison table (Measured Value/Judgment
Value)" (Page 3-61)
• For details on the data that handle decimal
numbers in command controls, see "Control/data
output via commands" (Page 6-2)

CV-X UM_A 6-187


Changing the PROFINET settings

Create GSDML File


Outputs a GSDML file and icon that include information
related to the controller PROFINET functions. The naming
rules for these files are as shown below.

When using the Ethernet port on the controller


• File output path: SD2:/cv-x/GSDML
• GSDML file name:
- For the CV-X100 Series:
GSDML-V2.25-Keyence-CV-X100-20120719.xml
- For the CV-X200 Series:
GSDML-V2.3-Keyence-CV-X200-20140116.xml
- For the CV-X300 Series:
GSDML-V2.32-Keyence-CV-X300-20190316.xml
Control and data output by PROFINET

- For the CV-X400 Series:


GSDML-V2.32-Keyence-CV-X400-20190316.xml
• Icon file name: GSDML-01FD-CV-X***.bmp
The asterisks (***) represent the CV-X Series number.
For example, GSDML-01FD-CV-X400.bmp is the file
name for the CV-X400 Series.

When using the PROFINET module


• File output path: SD2:/cv-x/GSDML_EX
• GSDML file name:
GSDML-V2.34-Keyence-CV-X3H4H-CA-NPN20E-20200312.xml
• Icon file name:
GSDML-01FD-CV-X3H4H-CA-NPN20E.bmp
Because the GSDML file does not contain the
Reference
information that was set or changed in the controller
global settings, the created GSDML file will always
contain the same information.

6-188 CV-X UM_A


Output of measurement data using PROFINET cyclic communications (Data Output)

Output of measurement data using PROFINET


cyclic communications (Data Output)
Change the output settings for data output using PROFINET.

Data output flow (example of connection with PLC PROFINET unit)


Set the data and address for output in the output settings.
The controller outputs data via PROFINET in the following manner.

• Data output via PROFINET is performed only in run mode. Data is not output in setup mode.
Reference
• With PROFINET, images and other binary data cannot be output.
• If data output via PROFINET was not executed, no data is output. In this case, the "Result ready flag" does not change.

Control and data output by PROFINET


Controller (CV-X series) PLC

The image processing is completed in the


controller, the result data is stored.

b
a
Confirm that Result ack flag is turned off.*1
Turn off Result ack flag.

c c
Write data to ResultData and Result OR flag, The data is written to the ResultData and Result
Tool Judge Value. OR flag, Tool Judge Value.

d
d
Check the completion of data writing by
When the data writing is completed, turn on
confirming that Result ready flag changes to on,
Result ready flag.
and then reference the data.

e
e
Check completion of the data reading by
Turn on Result ack flag.
detecting that Result ack flag is turned on.

f f
Turn off Result ready flag. The change of Result ready flag to off is detected.

a
Turn off Result ack flag.

*1 When handshake is OFF, output data is overwritten and updated without checking whether the Result ack flag is OFF. To take the rise
of Result ready flag as a data reference synchronization signal, turn the Result ack flag ON at each output, which will turn the Result
ready flag OFF.

CV-X UM_A 6-189


Output of measurement data using PROFINET cyclic communications (Data Output)

Timing Chart

Image processing Image


processing

Result ack flag The PLC writes.

Result ready flag The controller writes.


A

Result OR flag The controller writes.

ResultData The controller writes.

Tool Judge Value The controller writes.

햲 햴 햵 햶 햷 햲
Control and data output by PROFINET

A: 0 ms or more (depends on the link scan speed)

• The "Result OR flag" is updated in coordination with results output with PROFINET as the output destination. When the
Reference
"Result OR flag" is used, it is necessary to configure the output setting so that 1 or more data item is output via PROFINET.
• If asynchronous trigger capture (Page 3-19) is enabled, the output of judgment value and measurement result are
implemented by camera. In order to check which camera’s measurement results the output data are, change the settings so
that they include the CAM * Execute Status in the output data.

6-190 CV-X UM_A


Controlling the controller with PROFINET cyclic communication (Command Control)

Controlling the controller with PROFINET cyclic


communication (Command Control)
The communication control commands can be executed at any time.

Flow of command process using PROFINET (Example of connection with PLC


PROFINET unit)
The controller performs command control via PROFINET in the following manner.

Controller (CV-X series) PLC

Control and data output by PROFINET


a
Write the command number to be executed to the
Command Number and the command parameter
to the Command Parameter.

c b
When the controller detects that the Command Confirm that Command ready flag is turned on
request flag is turned on, it reads the command and then turn on Command request flag.
from the Command Number and the command
parameters from the Command Parameter and
Confirm the start of command execution by
executes the command, and then it turns off the
detecting that Command ready flag has turned off.
Command ready flag.

d
When the command execution is completed,
the response data is written to Command Data The response data is written to the Command
and the error status is set in Command error flag. Data*1
e
e Confirm completion of the command execution by
detecting that Command complete flag has
Command complete flag turns on. turned on. Reference the response data and
g command execution result.

When the controller confirms that Command f


request flag is turned off, it turns off Command
Turn off Command request flag.
complete flag and Command error flag and turns
on Command ready flag.

*1 In the case of a command for which there is no response data, data is not output in response to the Command Data.

When an error occurs, the command execution results are written to Command Result. (0: Success, <Error code>:
Reference
Failure).

CV-X UM_A 6-191


Controlling the controller with PROFINET cyclic communication (Command Control)

Timing Chart

Command Execute Conditions Command


execution

Command request flag A A The PLC writes.

Command ready flag A The controller writes.

Command complete flag A The controller writes.

Command error flag The controller writes.

Command Number The PLC writes.


Control and data output by PROFINET

Command Parameter The PLC writes.

Command Data The controller writes.

햲햳햴 햵햶 햷햸

A: 0 ms or more (depends on the link scan speed)

6-192 CV-X UM_A


Changing the execute condition No. using PROFINET cyclic communication (Execute Condition No. Change)

Changing the execute condition No. using PROFINET


cyclic communication (Execute Condition No. Change)
The execute condition No. can be changed at any time.

Flow of execute condition No. change using PROFINET (Example of connection with
PLC PROFINET unit)
The controller changes the execute condition No. value using PROFINET in the following manner.
The changed value is applied at the next measurement.

Control and data output by PROFINET


Controller (CV-X series) PLC

Reference the ExecCondNo value and change


the execute condition number accordingly Write data to ExecCondNo.

CV-X UM_A 6-193


Typical setting procedure for PROFINET

Typical setting procedure for PROFINET

The following example explains a case in which a CV-X 2. Changing the Siemens S7-300 Series settings
Series is connected via PROFINET to a Siemens S7-300
Series, measured value and judgment value output is 1 With the PC and CPU connected, launch [SIMATIC
performed, and PW commands are used for controller Manager] and select [New] from the [File] menu.
control. 2 Enter the project name in [Name] and click [OK].

Connecting to the CPU

1. Checking the CV-X Series global settings


Control and data output by PROFINET

1 From [Global], select [Communications & I/O] -


[PROFINET].

2 Change the PROFINET settings, then left-click [OK].

3 Right-click on the project name in the [SIMATIC


Manager] Object Hierarchy, then select [Insert New
Object] - [SIMATIC 300 Station].

As an example here, the following settings are made.


(Change the settings according to the connected device.)
• Enable/Disable: Select [Enable].
• PROFINET Name: cv-x100 (CV-X100 Series), cv-x200
(CV-X200 Series), cv-x300 (CV-X300 Series),
cv-x400 (CV-X400 Series) or cv-x3h4h-ca-npn20e [SIMATIC 300] is added.
(When using the PROFINET module)
• Data Configurations: Set the desired data
allocations and allocation offset for the bit address
and byte address.
• Decimal Point: Fixed-point
• Process Priority (CV-X200/X100 Series only):
4 Expand [Object Hierarchy] and select [SIMATIC
300], then double click [Hardware].
Image First
• Enable Handshake: Unchecked
• Issue Alarm Manually: Unchecked

3 Restart the controller.

The [HW Config] screen appears.

6-194 CV-X UM_A


Typical setting procedure for PROFINET

5 From [Hardware Catalog], expand [SIMATIC 300] - 7 Set the CPU IP address and subnet mask, then
[RACK-300], then drag & drop [Rail] into the Station click [New].
Window. The [Properties - New subnet Industrial Ethernet]
screen appears.

Control and data output by PROFINET


8 Click [OK].
The screen returns to the [Properties - Ethernet interface
[Rail] is added to the Station Window.
PN-IO] screen.
6 Drag & drop the CPU to connect from [Hardware
9 Click [OK].
Catalog] to add the CPU to the hardware
configuration chart. 10When configuring the CV-X Series for the first time,
install the GSDML file.
• On the [HW Config] screen, select [Options] -
[Install GSD File].

• From the [Install GSD Files] screen, click [Browse]


The [Properties - Ethernet interface PN-IO] screen
and select the folder that contains the GSDML file.
appears.
• Select the file to install and click [Install] to install the
CV-X Series GSDML file.
A GSDML file can be created by selecting
Reference
the CV-X Series [Global] - [Communications
& I/O] - [PROFINET] and then selecting
[Create GSDML File] on the settings screen
that appears.

CV-X UM_A 6-195


Typical setting procedure for PROFINET

11 From [Hardware Catalog] on the [HW Config] 13In [Device name], enter the same character string
screen, open [PROFINET IO] - [Additional Field as the PROFINET name for the connected CV-X
Devices] - [Sensors] - [Keyence Machine Vision Series.
System], then drag & drop [CV-X1XX], [CV-X2XX],
[CV-X3XX], [CV-X4XX] or [CV-X3H4H-CA-NPN20E]
into [PROFINET-IO-System] in the Station Window.
Control and data output by PROFINET

• PROFINET Name: cv-x100, cv-x200, cv-x300, cv-x400


or cv-x3h4h-ca-npn20e

14Click [Ethernet].
The CV-X100, CV-X200, CV-X300, CV-X400 or CV-X is The [Properties - Ethernet interface cv-x100] screen,
added to the Station Window, and all modules that can [Properties - Ethernet interface cv-x200] screen,
be used with the CV-X Series are automatically added. [Properties - Ethernet interface cv-x300] screen,
[Properties - Ethernet interface cv-x400] screen or
If [PROFINET-IO-System] does not appear
Reference [Properties - Ethernet interface cv-x3h4h-ca-npn20e]
in the Station Window, right-click on CPU
[PN-IO] and select [Insert PROFINET IO screen appears.
System].
15In [IP address], enter the IP address to set for the
connected CV-X Series.

12Double click the CV-X100, CV-X200, CV-X300, CV-


X400 or CV-X icon on the [HW Config] screen.
The [Properties - cv-x100] screen, [Properties - cv-x200]
screen, [Properties - cv-x300] screen, [Properties - cv- • IP Address: 192.168.0.10
x400] screen or [Properties -cv-x3h4h-ca-npn20e]
16Click [OK].
screen appears.
17Click [OK].
18From the [HW config] screen, select [Station] -
[Save and Compile] to save the settings.

19From the [HW config] screen, select [PLC] -


[Download] to download to the CPU.

20Switch the CPU mode switch to [RUN].


If the connection is successful, the CPU RUN LED
(green) illuminates.
The connection can be checked from
Reference
[Communication Status] on the PROFINET
memory monitor or on the PROFINET
settings in the global settings.

6-196 CV-X UM_A


Typical setting procedure for PROFINET

If the RUN LED is off


• It is possible that PROFINET is not correctly set, the Outputting measured values and judged
cable is not correctly connected, or the CV-X Series is values
not started.
• When the communication status becomes [Not 1. Setting the output data (Output Settings)
Connected], the RUN LED turns off. In this case, Use the output settings (Page 3-113) to output the
execute MRES with the CPU mode switch, then switch to measured values and judged values. The example here
run mode again. explains the procedure for allocating the measured values
and judged values below for output.
• Total status value
• T100: Position Adjustment with Pattern Match (Shading)
(position X)
• T100: Position Adjustment with Pattern Match (Shading)
(position XY)

Control and data output by PROFINET


• T101: Area
• T102: OCR (Recognize Strings)
• T100: Position Adjustment with Pattern Match (Shading)
(tool judgment value)
• T101: Area (tool judgment value)
• Program Time
• Date & Time

1 From the [Output Settings] screen (Page 3-97), left-


click [PROFINET]
The PROFINET output settings screen appears.

2 Left-click the [Byte Allocation Area] tab.

3 Left-click [Select Data] and select the items to


output, then left-click [Add].

4 Check the byte address for output.


• When allocating output data, the destination byte
address is automatically displayed in [Address].
• The byte address starting position is the location
allocated to [Result Data1] on the [Data
Configurations] setting screen of ([Global] -
[Communications & I/O] - [PROFINET]. (In the
example above, it is byte address 0048.)

CV-X UM_A 6-197


Typical setting procedure for PROFINET

2. Check the format for output to the byte 3 From [Global], select [Communications & I/O] -
address, and the relationship between the byte [PROFINET], and left-click [Set] in [Data Settings].
address and I address, then set the Variable The [Communication Data Structure] screen appears.
Table. 4 Left-click [View List] in [Send-Data].
1 Check an example of result data storage into the The contents that are allocated to controller send-data
byte address. can be checked.
The PROFINET output settings are set so that the results
data shown below are output.
• Total status value
• T100: Position Adjustment with Pattern Match
(Shading) (position X)
• T100: Position Adjustment with Pattern Match
(Shading) (position XY)
• T101: Area
Control and data output by PROFINET

• T102: OCR (Recognize Strings)


• T100: Position Adjustment with Pattern Match
(Shading) (tool judgment value)
• T101: Area (tool judgment value)
• Program Time • By default, [Result Data1] (first results output) is set
• Date & Time for byte address 0048, and the results data is
2 On the [HW Config] screen in STEP 7, check the allocated there.
relationship between the byte address and I address. • Because results data is output in 32-bit units, 4-byte
Click the CV-X100, CV-X200, CV-X300, CV-X400 or CV- addresses are used for 1 results data (1 character in
X3H4H-CA-NPN20E icon on the [HW Config] screen, the case of text).
and check the status of the controller sending byte 5 Restart the controller.
device allocation.
6 In the SIMATIC Manager project tree, right-click [S7
Program: and select [Insert New Object] - [Variable
Table].

• Check the sending byte area range of the CV-X


Series controller.
• Controller sending byte addresses 0012 - 0139 are
allocated to I424 - 551. Controller sending byte
addresses 0140 - 0299 are allocated to I264 - 423.
The address allocation varies depending on
Reference
the settings.

6-198 CV-X UM_A


Typical setting procedure for PROFINET

The [Properties - Variable Table] screen appears. 10Select Variable Table [Variable] - [Monitor] to select
monitor mode, then input the trigger to the CV-X
Series and check the output results.
Check the current value beginning with address I460.

7 Click [OK].
The Variable Table is added to SIMATIC Manager
[Blocks].

Control and data output by PROFINET


• Judged value OK=0, NG=1 is stored using 2 words.
8 Select [Blocks] in the SIMATIC Manager Object • Decimal fraction data is multiplied by 1000 and
Hierarchy, then double click the added Variable stored using 2 words:
Table [VAT_1]. 124.121 124121
• When XY data is output, it is stored in order XY using
2 words each.
• Integer data is stored unchanged using 2 words.
• Text data is stored in ASCII code using 2 words per
character.
The [Var - VAT_1] screen appears. - When outputting with [String], the number of devices

9 The I address corresponding to controller sending


used varies depending on the set character string. In
this example, because the OCR unit [Detected String]
byte addresses 0048 - 0139 are added to the
is output, the character string is "KEYENCE" (7
Variable Table in units of 2 words (4 bytes) each.
characters), however because 10 was set for
Enter the destination address in [Address] and specify
[Characters] in [Block Set], the 20 words (for 10
the output data display format in [Display Format].
characters) from PID480 to PID519 are used.
- When the [Characters] setting is changed, the
device used changes, therefore when there is the
possibility of a change occurring, it is recommended
that it be set at the end of the output data.
• Judged value OK=0, NG=1 is stored using 2 words.
• System variables are integer data and are stored
unchanged. Decimal fraction data is multiplied by
1000. Both are stored using 2 words.

CV-X UM_A 6-199


Typical setting procedure for PROFINET

Flow of typical results output (handshake ON)


Controlling the controller
Controller (CV-X series) PLC

The inspection is executed


1. Checking the CV-X Series global settings
Execute inspection
by the trigger signal.
1 From [Global], select [Communications & I/O] -
[PROFINET].
Confirm that Result ack flag is
turned off. 2 Click [Set] in [Data Settings].
The [Communication Data Structure] screen appears.
Write data to Result Data and
Result OR flag, Tool Judge 3 Left-click [View List] in [Send-Data] and [Receive-
Value. Data] to check the status of byte address and bit
Check the completion of data
When the data writing is writing by confirming that address allocation for the items that are necessary
completed, turn on Result Result ready flag changes to for controller control.
ready flag. on, and then reference the data.
Control and data output by PROFINET

Check completion of the data Turn on Result ack flag.


reading by confirming that
Result ack flag is turned on.
The change of Result ready
Turn off Result ready flag. flag to off is confirmed.

Turn off Result ack flag.

• If results output is executed when the "Result ack flag" is still


ON, the data is stored in the output buffer, however, it is not
written to ResultData. When the "Result ack flag" turns OFF, the
data in the buffer is written. Be aware that if the inspection flow
continues to be executed when the "Result ack flag" remains
ON, overflow of the output buffer will occur and output will be
skipped. Receive-Data (PLC to Controller: OUT)
• Command request flag: Turns OFFON when a
Flow of typical results output (handshake OFF) command is executed (bit).
• Command Number: Sets the command No. of the
Controller (CV-X series) PLC
command to execute (double word).
The inspection is executed • Command Parameter#: Sets the No. # argument for
Execute inspection
by the trigger signal.
the command (double word). (Whether or not there
[Data output] Read the I address (PID) data are arguments depends on the command.)
Write data to Result Data. after a certain period of time
from the trigger input.
Send-Data (Controller to PLC: IN)
• Command complete flag: Turns ON when the
command process is completed (bit).
• Command error flag: Turns OFF when the command
process is completed, and ON when a failure occurs
(bit).
• Command ready flag: Turns ON when ready to
receive the command process (bit).
• Command Result: Sets the command execution
results (0: Success, <Error code>: Failure) (double
word).
• Command Data#: Sets the command No. #
response data (double word). (Whether or not there
is response data depends on the command.)

4 Click [OK].
The changed settings are saved.

5 Restart the controller.

6-200 CV-X UM_A


Typical setting procedure for PROFINET

2. Sample command execution procedure: 3 Define the following symbols.


Changing the program No. (PW)
This is a typical example of a command execution
procedure. This example explains a case of a PW
command (changing the program No.) that uses
command parameters.

1 On the [HW Config] screen in STEP 7, check the


relationship between the address that is used for 4 Open the Step 7 Variable Table, then enter the
the command and the I address / Q address. following I address / Q address in [Address].

Control and data output by PROFINET


For Command Number, Command Parameter1, and
Command Result, because the value is displayed in
decimal numbers, change [Display format] to [DEC].

5 Enter the command No. for the Q address allocated


to Command Number, and enter the command
parameter for the Q address allocated to Command
Parameter1.

Click the CV-X100, CV-X200, CV-X300 or CV-X400 icon


on the [HW Config] screen, and check the status of
address allocation shown below.
The relationships between the items required for
command control are as shown below.
• Command Number (controller receive-data output
address 0016): PQD428
• Command Parameter1 (controller receive-data Here, [24] is entered for the command No., [1] for
output address 0020): PQD432 Command Parameter1, and [11] for Command
• Command request flag (controller receive-data Parameter2 in order to execute the PW command
output address 0000 bit0): Q0.0 (change to SD1 program No. 11).
• Command complete flag (controller send-data
6 Select Variable Table [Variable] - [Monitor] to select
address 0000 bit0): I0.0
monitor mode.
• Command error flag (controller send-data input
address 0000 bit1): I0.1 7 Select Variable Table [Variable] - [Activate Modify
• Command Result (controller send-data input Values] to apply the entered values.
address 0020): PID432
8 Enter 1 (true) for the Q address allocated to the
The address allocation varies depending on "Command request flag" (here Q0.0).
Reference
the settings.

2 From the [Step 7] Object Hierarchy, select [S7


Program] then double click [Symbols].

The [Symbol Editor] screen appears.

CV-X UM_A 6-201


Typical setting procedure for PROFINET

9 Select Variable Table [Variable] - [Activate Modify


Values] to apply the entered values. Connecting to a Siemens S7-300 Series
The PW command is executed. When a Siemens CPU is connected, the controller is able
10Check that the value of the I address allocated to to use the following communication.
the "Command complete flag" has changed. • Cyclic communication data size: Maximum 1408 bytes
• Command succeeded: The I address allocated to (1252 bytes: When using the communications expansion
the "Command complete flag" (here, I0.0) changes unit)
to 1 (true). • Record data communication (acyclic communication):
• Command failed: The I address allocated to the Reading of controller send/receive byte data of up to
"Command error flag" (here, I0.1) changes to 1 1024 bytes by "RDREC" (SFB 52).
(true), and an error code is written to the I address • Writing of controller receive byte data of up to 1024
allocated to Command Result (PID432). bytes by "WRREC" (SFB 53)

Typical command process flow


Changing the cyclic communication settings
Control and data output by PROFINET

Controller (CV-X series) PLC For details of the CPU unit configuration, and of the setting
Set the command No. and procedure needed for communication with the CPU, refer
command parameters of a to the CPU instruction manual.
desired instruction in
the Command Number and
Command Parameter 1 From [Hardware Catalog] on the STEP 7 [HW Config]
When the controller detects respectively.
that Command request flag is
screen, select CV-X100, CV-X200, CV-X300, CV-X400
turned on, it reads the
Confirm that Command or CV-X3H4H-CA-NPN20E and drag & drop it into
command from the
ready flag is turned on and [PROFINET-IO-System] in the Station Window.
Command Number and the
then turn on Command request
command parameters from
flag.
the Command Parameter and
executes the command, and
then it turns off the Command
ready flag.

When the command execution


is completed, the response
data is written to Command
Data and the error status is Confirm completion of the
set in Command error flag. command execution by
detecting that Command
complete flag has turned on.
Command complete flag Reference the response data
turns on. and command execution result.

When the controller confirms Turn off Command request


that Command request flag is flag.
turned off, it turns off
Command complete flag and
Command error flag and turns
on Command ready flag.

If the CV-X Series GSDML file is not


Reference
installed, the CV-X100, CV-X200, CV-X300,
CV-X400 or CV-X3H4H-CA-NPN20E will not
appear in [Hardware Catalog]. When setting
up the CV-X Series for the first time, install
the GSDML file by selecting [Options] -
[Install GSD File].

6-202 CV-X UM_A


Typical setting procedure for PROFINET

2 Double-click the CV-X100, CV-X200, CV-X300, 4 Change the size of [Parameter Byte Modules] and
CV-X400 or CV-X icon on the [HW Config] screen [Result Byte Modules].
and set [Device name] and [IP address]. When the default setting, right-click the module to
change then select [Delete] to delete the module.

Control and data output by PROFINET


3 To change the cyclic communication update time,
double-click the CV-X100, CV-X200, CV-X300,
CV-X400 or CV-X icon in the [HW Config] screen,
then double-click [Interface] and set [Update time] From [Hardware Catalog], drag & drop the [Parameter
on the [Properties - Interface] screen. Byte Modules] or [Result Byte Modules: of the size to
set.

Correct operation will not occur if any of the


Reference
Bit Modules (Slot 1 - 5, Slot 12 - 16) is
deleted. Do not delete the Bit Modules.

5 In order to apply the settings to the CPU, execute


[Station] - [Save and Compile] on the [HW Config]
screen, then set [PLC] - [Download] to download
the settings to the CPU.
After the settings have been downloaded, PROFINET
communications will be enabled when the CPU is
switched to run mode.
Depending on the CV-X Series measurement
Reference
settings, there may be effects on screen
displays, external I/O, and other performance
even with a value of 4 ms or more (1 ms or
more when using the communication
expansion unit) set.
Be sure to verify operating performance
before operation.

CV-X UM_A 6-203


Typical setting procedure for PROFINET

Changing the record data communication settings 3 From the [Step 7] Object Hierarchy, select [Blocks]
then double-click [OB1].
After performing "Changing the cyclic communication
settings" (Page 6-202), use the "RDREC" (SFB 52) block in
the ladder program to perform record data
communication.
The CV-X series supports the following record commands.

Index Description Attribute


1 Parameter (CV-X series output Read/Write The [Properties - Organization Block] screen appears.
address 0012 - 1035) possible
2 Parameter (CV-X series output Read/Write
address 1036 - 2059) possible
10 Result Data (CV-X series input Read only
address 0012 - 1035)
Control and data output by PROFINET

11 Result Data (CV-X series input Read only


address 1036 - 2059)
12 Result Data (CV-X series input Read only
address 2060 - 3083)
13 Result Data (CV-X series input Read only
address 3084 - 4107)

Here 10 is specified for Index, and "RDREC" (SFB 52) is


4 For [Created in Language], select [LAD] then click
[OK].
used to read 1024 bytes of data from CV-X series sending
addresses 0012 - 1035. 5 On the [LAD/STL/FBD - OB1] screen, from
[Overview] - [Libraries] - [Standard Library] -
1 From the [Step 7] Object Hierarchy, select [S7
[System Function Blocks], drag & drop [SFB52
Program] then double-click [Symbols].
RDREC DP] into the ladder network.

The [Symbol Editor] screen appears.

2 Define the following symbols.

6-204 CV-X UM_A


Typical setting procedure for PROFINET

6 The following ladder is created.

• For the ID, a hexadecimal value


Reference

Control and data output by PROFINET


corresponding to the [Diagnostic
address] of the command destination
CV-X Series must be set.
• [Diagnostic address] can be checked on
the Step 7 [HW Config] screen. In this
example, the diagnostic address is 2043
(0x7FB in hexadecimal).

7 Download the settings file to the CPU, then switch


the CPU to run mode.
In some cases, the setting changes may not
Reference
be applied to the CPU even after the
download operation is performed on the
[LAD/STL/FBD] screen. In such cases,
perform the download operation from the
[SIMATIC Manager] screen.

8 Open the Step 7 Variable Table and add the


following variables.

9 Select Variable Table [Variable] - [Monitor] to start


monitor mode.

10In the Variable Table, enter 1 (true) for [Modify


Value] of Read Data (M200.0).

11 In the Variable Table, select [Variable] - [Active


Modify Values] to apply the entered values to the
CPU memory.
"RDREC" (SFB 52) is executed, and the values in
controller sending byte area addresses 0012 - 1035 are
read into MD1000 - 2020.

CV-X UM_A 6-205


Troubleshooting

Troubleshooting

When correct operation does not occur

Checking whether or not the PROFINET The Ethernet settings (IP address, etc.) were
connection is correct unintentionally changed.
Select the controller [Global] - [Communications & I/O] - With PROFINET, the IP address that is set for the controller
[PROFINET], then check [Cyclic Communication Status:] on the PLC side is applied by overwriting the Ethernet
at the bottom of the [PROFINET] screen. If [Not settings (IP address, etc.) on the controller side when
Connected] is displayed here, then communication has communication starts. Set the controller Ethernet settings
failed. Check the cable connection, IP address, on the PLC side.
communications settings on the PLC side, and other items
Control and data output by PROFINET

again. A different operation from the module address


allocated to the PLC occurs.
"Result OR flag" is not output. If a bit module is deleted, an operation that is different from
The "Result OR flag" is updated in coordination with results the address set at the PLC side may occur.
output with PROFINET as the output destination. When the Do not delete the bit modules.
"Result OR flag" is used, it is necessary that 1 or more data
item is output via PROFINET.

"Result ready flag" remains ON and does not


change.
There is the possibility that "Result ack flag" control is not
being performed correctly. The "Result ready flag" turns OFF
when the "Result ack flag" rise is recognized in sending
(controller receiving). This is the same regardless of whether
handshake is ON or OFF.

Data cannot be acquired correctly when reading


data based on the change in the rise of STO output
from an external terminal.
STO is the data strobe signal for terminal output. Therefore,
it cannot be used as the strobe signal for any other data
output.
Refer to the "Result ready flag" for the timing as to when to
read data by PROFINET.

6-206 CV-X UM_A


Troubleshooting

Error Message

Message Cause Corrective Action Error


cause No.
PROFINET communication Communication was interrupted. (When • Check that the Ethernet cable is connected
failed. recovery is possible, recovery occurs correctly.
automatically.) • Check whether both the controller and the
master side were restarted after the
communications settings were updated.
• Change the cyclic communication cycle and
timeout time on the PLC side.
• In the PROFINET global settings, change 13701
[Process Priority] (Page 6-187) from [Image First]
to [Transmission First]. If the [Image First] setting
will continue to be used, review the flow contents

Control and data output by PROFINET


and trigger interval.
• With the factory default, ERROR output is not
set. Set this on the [ERROR Output Settings]
screen (Page 5-32).
PROFINET output failed due to The output buffer for output via Change the update time setting on the PLC side
a full buffer. PROFINET is full. so the data is output via PROFINET at a faster rate
than it builds up. Or, extend the time between 13702
triggers. Note: Results data are not written when
the buffer is full.
The delay of the handshake When the PROFINET handshake is ON, • Check that handshake is controlled properly.
control causes skipping of the delayed handshake caused results • Clear the data in the output buffer using the
13703
PROFINET communication output via PROFINET to be skipped. TEST terminal (bit) or reset input.
result output.
PROFINET module The PROFINET module was not • Check that the PROFINET module is attached
disconnected. recognized and the controller cannot use correctly.
the PROFINET communications. • Check that the PROFINET module is not
13704
damaged.
• Do not attach or detach the PROFINET module
while the controller and unit are powered on.

CV-X UM_A 6-207


Control and data output Overview of control and
by EtherCAT data output by EtherCAT
The communication using EtherCAT is supported by this
Control/data output system.
via commands EtherCAT is an open real-time Ethernet communication
standard originally developed by Beckhoff. This system
operates as an EtherCAT slave, and the functions shown
Control/data output below can be realized by way of EtherCAT communication.
via the PLC-Link
Process data object communication
Control/data output (Cyclic communication)
Control and data output by EtherCAT

via I/O terminals Cyclic communication at update time intervals allows high-
speed control at intervals of several ms to several tens of
ms. In addition, because it is possible to control the
Control and data output controller by referencing and updating variables and
by EtherNet/IP devices in the PLC without considering the
communication, it allows programs to be written easily on
the PLC side.
Control and data output
• Control controller: Control the controller by using cyclic
by PROFINET communication to send the commands for execution.
• Results data output: Data can be output by cyclic
Control and data output communication when the items for output from EtherCAT
q are set in the output settings (Page 3-115).
by EtherCAT
• Change execute condition number: The controller can
be controlled by specifying the execute condition
number by cyclic communication.
• Set a cyclic communication update time of
Reference
500 μs or more.
• Even when a cyclic communication update
time of 500 μs or more is set, due to the
controller measurement settings, dialog box
operations, commands, combined use with
FTP, remote desktop, or other
communications, the controller may
temporarily or continuously be subject to
excessive load, causing delays in processing
or temporary interruption of communications
due to timeout. In such cases, it is necessary
to review the cyclic communication settings
and service conditions. Be sure to verify that
there are no problems with operating
performance, including the issues above,
prior to operation.
• In a network where many devices are
connected, including EtherCAT devices, if a
large load is constantly or temporarily applied
to the network, then delays and packet loss
may occur. Be sure to perform sufficient
verification prior to operation.
• EtherCAT and PLC-Link, EtherNet/IP, or
PROFINET cannot be used at the same time
(EtherCAT cannot be used when PLC-Link,
EtherNet/IP or PROFINET is enabled).

6-208 CV-X UM_A


Overview of control and data output by EtherCAT

Mailbox communication
Operation flow
(acyclic communication)
This can be used for communication applications that do Checking the specifications (Page 6-210)
not require punctuality as is needed with cyclic
• Check whether or not the connected PLC is a model
communications. With this communication method, special
that supports EtherCAT connections.
commands are used to read and write from/to data records
• Check the allocation conditions of the input and output
, and it is possible to access areas that exceed the
data.
maximum size (536 bytes for input and 532 bytes for
output) for cyclic communications. 
Changing the EtherCAT settings (Page 6-218)
• Configure the controller settings for EtherCAT
connection.
Main setting items: Input/output data assignments

Control and data output by EtherCAT


Establishing EtherCAT communications
• To check whether or not EtherCAT communications have
been established, check [Cyclic Communication Status] in
the EtherCAT memory monitor, or check [Cyclic
Communication Status] from the [Global] - [Communications
& I/O] - [EtherCAT] screen.

Executing the necessary processes
Data output (Page 6-220)
• The data specified in the output settings is written to
the results output area.
• The "Result ready flag" is used to check the completion
of data writing.
• The "Result ack flag" is turned ON to report that reading
was completed.

Command control (Page 6-222)


• Communication control commands (Page 6-2) can be
executed.
• Enter the command code and command parameters in
the command input area and turn the "Command
request flag" ON to execute the command.
• When the "Command ready flag" is ON, the command
can be executed.
• The "Command complete flag" is used to check that
command execution was completed.

Changing the execute condition No. (Page 6-224)


• Change the Exec Cond No. to change the execute
condition No.

CV-X UM_A 6-209


Preparing the EtherCAT Connection

Preparing the EtherCAT Connection

Installing the EtherCAT Module CA-NEC20E EtherCAT Module


Specifications
The optional EtherCAT module CA-NEC20E is used when
communicating over EtherCAT.
Remove the protective cover from the expansion unit Standard specifications
connector on the right side of the controller and install the
EtherCAT module as shown below. Item

Point • The controller must be turned off before Compliant standard IEEE802.3u (100BASE-TX)
connecting or disconnecting the CA-NEC20E. Communication speed 100 Mbps (100BASE-TX)
Control and data output by EtherCAT

• Restart the controller and master station after Communication cycle 500 μs shortest
changing the EtherCAT settings.
Connection cable Category 5e or greater shielded twisted
pair (STP) cable
Node interval 100 m
Communication port RJ45 connector × 2
Communication size 536 bytes (input), 532 bytes (output)
Supported functions Process data object communication
(cyclic communication)
Mailbox communication (acyclic
communication)
Supports CoE
Explicit Device Identification
Conformance test Compliant with Version.2.2.1.0
version
When Using the Illumination Expansion
Unit and EtherCAT Module Together
Mount the camera input unit directly to the controller, then Wiring diagram (IN port/OUT port)
mount the illumination expansion unit and EtherCAT
module to the right side of the camera input unit.

No. Signal name Function


1 TX + Transmission data (+)
2 TX - Transmission data (-)
3 RX + Reception data (+)
Camera input unit 4 - 75 Ω terminating resistance connected
CA-E100
5 - 75 Ω terminating resistance connected
Illumination 6 RX - Reception data (-)
expansion unit
CA-DC40E 7 - 75 Ω terminating resistance connected
EtherCAT module 8 - 75 Ω terminating resistance connected
CA-NEC20E

Point Illumination expansion units and EtherCAT modules


cannot be installed between camera input units
and controllers.

6-210 CV-X UM_A


Preparing the EtherCAT Connection

Connecting to an EtherCAT Network


Connect the master-side network cable to the IN port RJ
connector. If a slave unit is present downstream of this unit,
connect the network cable to the OUT port RJ connector.

Point Use a category 5e or greater STP (shielded twisted


pair) cable for the network cable. You can use
either a straight cable or a crossover cable.
Connect the master-side
network cable.
(IN port)

Connect the slave-side


network cable.
(OUT port)

Control and data output by EtherCAT


Models supporting EtherCAT connections
For details of the setting procedures for each PLC, refer to "Typical setting procedure for EtherCAT" (Page 6-225) and to the
instruction manual provided with the PLC.

Beckhoff PLC

PLC model EtherCAT Firmware version Software used Version of software used
communications unit
C6920-0050 (TwinCAT) - (Built-in in PLC CPU Unit) Windows7 Ultimate TwinCAT3 v3.1.4020(Build4020)
Service Pack1

Omron PLC

PLC model EtherCAT Firmware version Software used Version of software used
communications unit
NJ101-9000 - (Built-in in PLC CPU Unit) 1.1.521 Sysmac Studio Ver.1.15
NJ301-1100 - (Built-in in PLC CPU Unit) 1.1.521 Sysmac Studio Ver.1.15

CV-X UM_A 6-211


Controller EtherCAT communication specifications

Controller EtherCAT communication specifications

Standard specifications

The EtherCAT communication of this system supports two types of communication: "Process data object communication
(cyclic communication)" and "Mailbox communication (acyclic communication)."

Process data object communication (cyclic communication)


This is a function to make periodic communication at specified update time intervals and is suitable for real time control.
The update time and communication size depend on the connection settings on the PLC (the maximum size for cyclic
Control and data output by EtherCAT

communication is 536 bytes for input and 532 bytes for output).
See "Typical setting procedure for EtherCAT" (Page 6-225) for more details.

Mailbox communication (acyclic communication)


This is a communication method to use dedicated commands to access to an "object" which is a piece of byte information
divided in the unit of 1000 bytes.
• Commands such as that for reading (SDO Upload) and writing (SDO Download) are available. When these commands
are executed, a response to the command is returned.
• This method can be used for communication which does not require real time processing.
• It is possible to access to the addresses exceeding the maximum size allowed for the cyclic communication (input: 536
bytes, output: 532 bytes).
• Each object is assigned with an index. Data is accessed based on the specified index and size.
The accessible ranges for each piece of byte information are as follows:

Output data (received by the controller) - Read/write

Index Accessible address


2019H 0020 to 1019
201AH 1020 to 2019
201BH 2020 to 2055

Input data (sent from the controller) - Read only

Index Accessible address


200CH 0024 to 1023
200DH 1024 to 2023
200EH 2024 to 3023
200FH 3024 to 4023
2010H 4024 to 4103

If the SDO Download command is issued while the Parameter module is being written in the cyclic communication,
Point
memory area conflict may occur. Design the use of the SDO Download command to avoid the memory area conflict with
the cyclic communication.

6-212 CV-X UM_A


Controller EtherCAT communication specifications

Process Data Object Map


The data that can be assigned as process data objects are shown below.
Use the configuration software to select the indexes to assign as process data objects.

Index Initial Size Name Assignable Data Index


(Hex) Assignment (Bytes) (Hex)
1600H  4 ControlBit 2011: 01 to 20 This is without exception assigned as PDO.
1601H  4 OutBit 2012: 01 to 20 This is without exception assigned as PDO.
1602H  4 Command Number 2013 This is without exception assigned as PDO.
1603H 32 Parameter 32Byte 2014: 01 to 08 Objects from 1603H to 1607H cannot be
1604H 64 Parameter 64Byte 2015: 01 to 10 assigned at the same time. Select and
assign one object at a time.
1605H  128 Parameter 128Byte 2016: 01 to 20
1606H 256 Parameter 256Byte 2017: 01 to 40

Control and data output by EtherCAT


1607H 512 Parameter 512Byte 2018: 01 to 80
1A00H  4 StatusBit 2001: 01 to 20 This is without exception assigned as PDO.
1A01H  4 InBit 2002: 01 to 20 This is without exception assigned as PDO.
1A02H  2 Error 0 code 2003 This is without exception assigned as PDO.
1A03H  2 Error 1 code 2004 This is without exception assigned as PDO.
1A04H  4 Total count 2005 This is without exception assigned as PDO.
1A05H  4 Command Result 2006 This is without exception assigned as PDO.
1A06H 32 Result Data 32Byte 2007: 01 to 08 Objects from 1A06H to 1A0AH cannot be
1A07H 64 Result Data 64Byte 2008: 01 to 10 assigned at the same time. Select and
assign one object at a time.
1A08H  128 Result Data 128Byte 2009: 01 to 20
1A09H 256 Result Data 256Byte 200A: 01 to 40
1A0AH 512 Result Data 512Byte 200B: 01 to 80

CV-X UM_A 6-213


Controller EtherCAT communication specifications

Cyclic communication data allocation conditions

Example of controller send-data settings (CV-X Series to Beckhoff C6920-0050)


Example when 1 CV-X Series is connected to a Beckhoff C6920-0050, and the command response output area is set to 24
bytes (BIT**.*/**.* in the table are Beckhoff C6920-0050 Address (Input) allocation examples. The leading address varies
depending on the settings.)

Setting Address 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0bit
status (byte)
Bit 0000 BIT Reserved BIT Reserved BIT Reserved BIT Result OR BIT Result BIT Cmd BIT Cmd Error BIT Cmd
area 39.7 39.6 39.5 39.4 39.3 Ready 39.2 Ready 39.1 39.0 Complete
0001 BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT READY4 BIT READY3 BIT READY2 BIT READY1
40.7 40.6 40.5 40.4 40.3 40.2 40.1 40.0
0002 BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT ACK4 BIT ACK3 BIT ACK2 BIT ACK1
41.7 41.6 41.5 41.4 41.3 41.2 41.1 41.0
0003 BIT OUTPUT BIT OUTPUT BIT Reserved BIT Reserved BIT RUN BIT Reserved BIT ERROR BIT BUSY
Control and data output by EtherCAT

42.7 _IMG 42.6 _IMG 42.5 42.4 42.3 42.2 42.1 42.0
_STATUS _BUSY
0004 BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge
43.7 Value7 43.6 Value6 43.5 Value5 43.4 Value4 43.3 Value3 43.2 Value2 43.1 Value1 43.0 Value0
0005 BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge
44.7 Value15 44.6 Value14 44.5 Value13 44.4 Value12 44.3 Value11 44.2 Value10 44.1 Value9 44.0 Value8
0006 BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge
45.7 Value23 45.6 Value22 45.5 Value21 45.4 Value20 45.3 Value19 45.2 Value18 45.1 Value17 45.0 Value16
0007 BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge
46.7 Value31 46.6 Value30 46.5 Value29 46.4 Value28 46.3 Value27 46.2 Value26 46.1 Value25 46.0 Value24
0008 BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge
47.7 Value39 47.6 Value38 47.5 Value37 47.4 Value36 47.3 Value35 47.2 Value34 47.1 Value33 47.0 Value32
0009 BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge
48.7 Value47 48.6 Value46 48.5 Value45 48.4 Value44 48.3 Value43 48.2 Value42 48.1 Value41 48.0 Value40
0010 BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge
49.7 Value55 49.6 Value54 49.5 Value53 49.4 Value52 49.3 Value51 49.2 Value50 49.1 Value49 49.0 Value48
0011 BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge BIT Tool Judge
50.7 Value63 50.6 Value62 50.5 Value61 50.4 Value60 50.3 Value59 50.2 Value58 50.1 Value57 50.0 Value56

Error 0012 51.0 Error code


code 0013
area
Mea- 0016 53.0 Total count
surement 0017
count
0018
area
0019
Command 0020 57.0 Command Result
output 0021
area
0022
0023
0024 61.0 Command Data 1
0025
0026
0027
0028 65.0 Command Data 2
0029
0030
0031

0044 81.0 Command Data 6


0045
0046
0047
Results 0048 85.0 Result Data 1
output 0049
area
0050
0051
0052 89.0 Result Data 2
0053
0054
0055

6-214 CV-X UM_A


Controller EtherCAT communication specifications

Names and Operations of Input Signals

Allocated area Name Remarks


Bit area Cmd Complete Turns on when command processing is complete.
Cmd Err Turns off when command processing is successful and turns on when it fails.
Cmd Ready Turns on when command processes can be received.
Result Ready Turns on when data transmission is complete.
Result OR Used to output the OR result for the judged value of tools specified in the output
settings.
READY1 Output when trigger n input is acceptable.
READY2
READY3
READY4
ACK1 Becomes ON when Trigger 1 input is accepted. Becomes OFF when Trigger 1 input
is set to OFF.
ACK2 Becomes ON when Trigger 2 input is accepted. Becomes OFF when Trigger 2 input
is set to OFF.

Control and data output by EtherCAT


ACK3 Becomes ON when Trigger 3 input is accepted. Becomes OFF when Trigger 3 input
is set to OFF.
ACK4 Becomes ON when Trigger 4 input is accepted. Becomes OFF when Trigger 4 input
is set to OFF.
BUSY This signal is output during image processing or command processing.
ERROR This signal is output while any of system errors occur with the dialog displayed on the
screen.
For details on typical system errors, see "Error messages" (Page 9-96).
In [ERROR Output Settings] (Page 5-32) in the Global Settings, enabling or disabling
the error output for the SD card-related errors, etc. can be specified.
RUN This signal is output when the controller is in Run mode.
OUTPUT_IMG_BUSY This signal is output when the image output is in progress.
OUTPUT_IMG_STATUS This signal is output when an image or images that should have been output remain
in the image output buffer.
Tool judgment area Tool Judge Value0 Returns the judgment value allocated to the bit allocation region (Address 0004:bit0).
Tool Judge Value1 Returns the judgment value allocated to the bit allocation region (Address 0004:bit1).
··· ···
Tool Judge Value63 Returns the judgment value allocated to the bit allocation region (Address 0011:bit7).
Error code area Error Code Error code corresponding to the error cause.
Measurement count area Total Count Displays the measurement count.
Command output area Command Result Indicates the command execution results.
Command Data 1 Returns the command execution result data 1.
Command Data 2 Returns the command execution result data 2.
··· ···
Command Data6 Returns the command execution result data 6.
Result output area Result Data 1 Returns the measurement result data 1.
Result Data 2 Returns the measurement result data 2.
··· ···

CV-X UM_A 6-215


Controller EtherCAT communication specifications

Example of controller receive-data settings (Beckhoff C6920-0050 to CV-X Series)


Example when 1 CV-X Series is connected to a Beckhoff C6920-0050 (BIT**.*/**.* in the table are Beckhoff C6920-0050
Address (Output) allocation examples. The leading address varies depending on the settings.)

Setting Address 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0bit
status (byte)
Bit 0000 BIT Reserved BIT Reserved BIT Reserved BIT Error reset BIT Result BIT Reserved BIT Reserved BIT Cmd
39.7 39.6 39.5 39.4 39.3 39.2 39.1 39.0
area request ack Request
Reserved 0001 BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT TRG4 BIT TRG3 BIT TRG2 BIT TRG1
area 40.7 40.6 40.5 40.4 40.3 40.2 40.1 40.0

0002 BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT TEST BIT EXT BIT RESET
41.7 41.6 41.5 41.4 41.3 41.2 41.1 41.0

0003 BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved
42.7 42.6 42.5 42.4 42.3 42.2 42.1 42.0

0004 BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved
43.7 43.6 43.5 43.4 43.3 43.2 43.1 43.0

0005 BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved
Control and data output by EtherCAT

44.7 44.6 44.5 44.4 44.3 44.2 44.1 44.0

0006 BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved
45.7 45.6 45.5 45.4 45.3 45.2 45.1 45.0

0007 BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved
46.7 46.6 46.5 46.4 46.3 46.2 46.1 46.0

0008 BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved
47.7 47.6 47.5 47.4 47.3 47.2 47.1 47.0

0009 BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved
48.7 48.6 48.5 48.4 48.3 48.2 48.1 48.0

0010 BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved
49.7 49.6 49.5 49.4 49.3 49.2 49.1 49.0

0011 BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved BIT Reserved
50.7 50.6 50.5 50.4 50.3 50.2 50.1 50.0

Execution 0012 51.0 ExecCondNo


condition 0013
No.
Command 0016 53.0 Command Number
input 0017
area
0018
0019
0020 57.0 Cmd Parameter1
0021
0022
0023
0024 61.0 Cmd Parameter2
0025
0026
0027
0028 65.0 Cmd Parameter3
0029
0030
0031

As the content of ExecCondNo is read into the controller only when there is a change in it, rewriting of the execute
Reference
condition number by issuing a command can also be used concurrently.

6-216 CV-X UM_A


Controller EtherCAT communication specifications

Names and Operations of Output Signals

Allocated area Name Remarks


Bit area Cmd Request Requests command execution when the signal switches from OFF to ON.
Result ack Provides notification of data acquisition when the signal switches from OFF to ON.
Error reset request Clears Error when the signal switches from OFF to ON.
TRG1 Allows the camera assigned to trigger n to capture images (leading edge synchronization).
TRG2 The input is accepted while READYn is ON.
TRG3
TRG4
RESET Used to perform reset operation.
• The Result OR output will become 0.
• The measurement count returns to 0.
• All of archived image data are deleted.
• All of the data in the output buffer are reset.
• A new measurement result output destination file is created. A new image output

Control and data output by EtherCAT


destination folder is created.
• The trigger waiting state of individual triggers is canceled.
EXT Used to suspend the occurrence of internal triggers and the acceptance of external
triggers. While this is on, READY1 to 4 are forced to be off to stop the acceptance of
all triggers (level synchronization).
TEST Used to suspend the status output and other outputs for trial run or any other
reasons.
• The result data not output at the time of input are deleted.
• Resets the Result OR output during input.
• As soon as the input turns off, result outputs for the processed images will resume.
Command input area Command number The command No. is written.
Cmd Parameter1 The command argument 1 is written.
Cmd Parameter2 The command argument 2 is written.
Cmd Parameter3 The command argument 3 is written.
··· ···

CV-X UM_A 6-217


Changing the EtherCAT settings

Changing the EtherCAT settings

Displaying the EtherCAT settings EtherCAT setting items that can be


screen set with this system
On the [Global] - [Communications & I/O] - [EtherCAT]
Enable EtherCAT
screen, various settings can be changed for input and
output of various data by EtherCAT using the EtherCAT Select whether or not to use EtherCAT. Check this box to
module (CA-NEC20E: Option) connected to the controller. enable it.
The EtherCAT cannot be used while the PLC-
Reference
Link (Page 6-41), EtherNet/IP (Page 6-134), or
Control and data output by EtherCAT

PROFINET (Page 6-176) is enabled. One of


them must be disabled.

Data Settings

Data Configurations
Left-click [Set] to display the overview of the data
allocations in the EtherCAT cyclic data communication. For
a command returning a text string, the response data may
be large. When such command is used, ensure a certain
larger size for “Command Response Output Area”.
If the EtherCAT settings were changed, it is
Reference (Default: 24 byte) Clicking “View List” shows the detailed
necessary to restart the controller in order to
apply the settings. allocation statuses of the receive-data and send-data.

1 From [Global], select [Communications & I/O] -


[EtherCAT].
The [EtherCAT] screen appears.

2 Left-click [Enable EtherCAT] to check the box.

3 Change the settings as required.


See "EtherCAT setting items that can be set with this
system" (Page 6-218) for details of the settings for each
item.

4 Left-click [OK]. • Receive-Data: Displays an overview of the allocations


for data received by the controller from the PLC.
• Send-Data: Displays an overview of the allocations for
data sent from the controller to the PLC. The range for
the command response output area in the byte
allocation area can be specified.

6-218 CV-X UM_A


Changing the EtherCAT settings

Decimal Point
Select the data representation method for when handling
the decimal numbers in the results data output or
command controls.
• Fixed-point (default): The original data is multiplied by
1000, and handled as a signed 32-bit integer data.
• Floating-point: The data is handled as 32-bit single-
precision floating decimal point data.
• For details on the data that are output in decimal in
Reference
results data output, see "Operation symbol/output
item comparison table (Measured Value/Judgment
Value)" (Page 3-61)
• For details on the data that handle decimal
numbers in command controls, see "Control/data
output via commands" (Page 6-2)

Control and data output by EtherCAT


Other Settings

Enable Handshake
The Handshake keeps this controller from loading its
measurement result output data to the memory until it
acknowledges that the PLC has received the last output
data. When “Enable Handshake” box is checked, the
controller turns on “Result ready flag” after the completion
of a measurement result output. Upon reception of the
ready flag, the PLC reads the output data and turns on
“Result ack flag”. And then, the controller turns off its ready
flag after recognizing the ack flag of the PLC. The PLC
turns off “Result ack flag” to request the controller to load
next output data.

Create ESI File


Outputs an ESI file that includes information related to the
controller EtherCAT functions. The naming rule for this file
is as shown below.
• File output path: SD2:/cv-x/ESI
• ESI file name Keyence: CV-X3h4h_CA-NEC20E.xml
Because the ESI file does not contain the
Reference
information that was set or changed in the controller
global settings, the created ESI file will always
contain the same information.

CV-X UM_A 6-219


Output of measurement data using EtherCAT cyclic communications (Data Output)

Output of measurement data using EtherCAT


cyclic communications (Data Output)
Change the output settings for data output using EtherCAT.

Data output flow (example of connection with PLC EtherCAT module)


Set the data and address for output in the output settings.
The controller outputs data via EtherCAT in the following manner.

• Data output via EtherCAT is performed only in run mode. Data is not output in setup mode.
Reference
• With EtherCAT, images and other binary data cannot be output.
Control and data output by EtherCAT

Controller (CV-X series) PLC

The image processing is completed in the


controller, the result data is stored.

b
a
Confirm that Result ack flag is turned off.*1
Turn off Result ack flag.

c c
Write data to ResultData and Result OR flag, The data is written to the ResultData and Result
Tool Judge Value. OR flag, Tool Judge Value.

d
d
Check the completion of data writing by
When the data writing is completed, turn on
confirming that Result ready flag changes to on,
Result ready flag.
and then reference the data.

e
e
Check completion of the data reading by
Turn on Result ack flag.
detecting that Result ack flag is turned on.

f f
Turn off Result ready flag. The change of Result ready flag to off is detected.

a
Turn off Result ack flag.

*1 When handshake is OFF, output data is overwritten and updated without checking whether the Result ack flag is OFF. To take the rise
of Result ready flag as a data reference synchronization signal, turn the Result ack flag ON at each output, which will turn the Result
ready flag OFF.

6-220 CV-X UM_A


Output of measurement data using EtherCAT cyclic communications (Data Output)

Timing Chart

Image processing Image


processing

Result ack flag The PLC writes.

Result ready flag The controller writes.


A

Result OR flag The controller writes.

ResultData The controller writes.

Tool Judge Value The controller writes.

햲 햴 햵 햶 햷 햲

Control and data output by EtherCAT


A: 0 ms or more (depends on the link scan speed)

• The "Result OR flag" is updated in coordination with results output with EtherCAT as the output destination. When the
Reference
"Result OR flag" is used, it is necessary to configure the output setting so that 1 or more data item is output via
EtherCAT.
• If asynchronous trigger capture (Page 3-19) is enabled, the output of judgment value and measurement result are
implemented by camera. In order to check which camera’s measurement results the output data are, change the settings so
that they include the CAM * Execute Status in the output data.

CV-X UM_A 6-221


Controlling the controller with EtherCAT cyclic communication (Command Control)

Controlling the controller with EtherCAT cyclic


communication (Command Control)
The communication control commands can be executed at any time.

Flow of command process using EtherCAT (Example of connection with PLC


EtherCAT module)
The controller performs command control via EtherCAT in the following manner.

Controller (CV-X series) PLC


Control and data output by EtherCAT

a
Write the command number to be executed to the
Command Number and the command parameter
to the Command Parameter.

c b
When the controller detects that the Command Confirm that Command ready flag is turned on
request flag is turned on, it reads the command and then turn on Command request flag.
from the Command Number and the command
parameters from the Command Parameter and
Confirm the start of command execution by
executes the command, and then it turns off the
detecting that Command ready flag has turned off.
Command ready flag.

d
When the command execution is completed,
the response data is written to Command Data The response data is written to the Command
and the error status is set in Command error flag. Data*1
e
e Confirm completion of the command execution by
detecting that Command complete flag has
Command complete flag turns on. turned on. Reference the response data and
g command execution result.

When the controller confirms that Command f


request flag is turned off, it turns off Command
Turn off Command request flag.
complete flag and Command error flag and turns
on Command ready flag.

*1 In the case of a command for which there is no response data, data is not output in response to the Command Data.

When an error occurs, the command execution results are written to Command Result. (0: Success, <Error code>:
Reference
Failure). Error codes are as specified in "When an error occurs on command acceptance" (Page 6-3).

6-222 CV-X UM_A


Controlling the controller with EtherCAT cyclic communication (Command Control)

Timing Chart

Command Execute Conditions Command


execution

Command request flag A A The PLC writes.

Command ready flag A The controller writes.

Command complete flag A The controller writes.

Command error flag The controller writes.

Command Number The PLC writes.

Control and data output by EtherCAT


Command Parameter The PLC writes.

Command Data The controller writes.

햲햳햴 햵햶 햷햸

A: 0 ms or more (depends on the link scan speed)

CV-X UM_A 6-223


Changing the execute condition No. using EtherCAT cyclic communication (Execute Condition No. Change)

Changing the execute condition No. using EtherCAT


cyclic communication (Execute Condition No. Change)
The execute condition No. can be changed at any time.

Flow of execute condition No. change using EtherCAT (Example of connection with
PLC EtherCAT module)
The controller changes the execute condition No. value using EtherCAT in the following manner.
The changed value is applied at the next measurement.
Control and data output by EtherCAT

Controller (CV-X series) PLC

Reference the ExecCondNo value and change


the execute condition number accordingly Write data to ExecCondNo.

6-224 CV-X UM_A


Typical setting procedure for EtherCAT

Typical setting procedure for EtherCAT

This section explains an operation example that shows 2. Changing the C6920-0050 settings
how to connect the CV-X Series to a C6920-0050 made by
Beckhoff via EtherCAT and to establish communication.
1 Start the C6920-0050, and then copy the ESI file for the
CV-X Series "Keyence CV-X3h4h_CA-NEC20E.xml" to
Connecting to the CPU the folder shown below.
(In the following path, the "x" part of the "3.x" folder
1. Checking the CV-X Series global settings varies depending on the version of TwinCAT3 that you
are using. Change this part to match your
1 From [Global], select [Communications & I/O] -
environment.)

Control and data output by EtherCAT


[EtherCAT].
C:\TwinCAT\3.x\Config\Io\EtherCAT
2 Change the EtherCAT settings, then left-click [OK]. Reference To create the ESI file, on the CV-X Series
[Global] menu, select [Communications & I/O]
- [EtherCAT] to display the settings screen,
and then select [Create ESI File].

2 Start TwinCAT3. On the [File] menu, select [New] -


[Project].

3 Check that [Installed] - [Templates] - [TwinCAT


Projects] has been selected, and then enter the
project name in the [Name] field and click [OK].
In this example, we have entered "TwinCAT Project1."

As an example here, the following settings are made.


(Change the settings according to the connected
device.)
• Enable EtherCAT: Checked
• Data Configurations: Set the desired data
allocations and allocation offset for the bit address
and byte address.
• Decimal Point: Fixed-point
• Enable Handshake: Unchecked

3 Restart the controller.

4 On the [TwinCAT] menu, select [Restart TwinCAT


(Config Mode)]. Alternatively, click [Restart
TwinCAT (Config Mode)].
The [Restart TwinCAT System in Config Mode] screen
is displayed.

5 Click [OK].

CV-X UM_A 6-225


Typical setting procedure for EtherCAT

6 Use an Ethernet cable to connect the C6920-0050 3. Checking the status of the cyclic
and the CV-X Series.
communication
In this example, we have connected the network cable
from the C6920-0050 to the IN port of the CA-NEC20E, Checking from the CV-X Series (CA-NEC20E)
as shown below.

If the indicator (RUN) on the CV-X Series (CA-NEC20E)


is lit, the connection has been established and cyclic
communication is being performed.

C6920-0050 Checking from TwinCAT3


To the IN port
of the CA-NEC20E
1 In [Solution Explorer], double-click [TwinCAT
Project1] - [I/O] - [Devices] - [Device3 (EtherCAT)] -
[Box1 (CV-X3h4h_CA-NEC20E)], and then open the
Control and data output by EtherCAT

7 In [Solution Explorer], right-click [TwinCAT [Online] tab on the displayed screen.


Project1] - [I/O] - [Devices], and then select [Scan]
on the shortcut menu that is displayed. 2 Check the display of the [Current State] field.
The [HINT: Not all types of devices can be found If [OP] is displayed, cyclic communication is being
automatically] screen is displayed. performed.

8 Select [OK].
The [2 new I/O devices found] screen is displayed.

9 Check that the check box for the same device as


the network interface name of the port of the
C6920-0050 connected to the CV-X Series is
selected, and then click [OK].

The [Scan for boxes] screen is displayed.

10Click [Yes].
The [Activate Free Run] screen is displayed.

11 Click [Yes].

6-226 CV-X UM_A


Typical setting procedure for EtherCAT

Outputting measured values and judged 2. Using TwinCAT to check the data output
values by the CV-X Series.

1. Setting the output data (Output Settings) In [Solution Explorer], open [TwinCAT Project1] - [I/O] -
[Devices] - [Device 3 (EtherCAT)] - [Box1 (CV-
Use the output settings (Page 3-115) to output the
measured values and judged values. The example here X3h4h_CA-NEC20E)] - [Module1 (Result Data
explains the procedure for allocating the measured values 128Byte)], and then double-click [Result Data
and judged values below for output. 128Byte].
• Total status value A list of the byte data output by the CV-X Series is
• T100: Position Adjustment with Pattern Match (Shading) displayed.
(position X)
• T100: Position Adjustment with Pattern Match (Shading)
(position XY)

Control and data output by EtherCAT


• T100: Position Adjustment with Pattern Match (Shading)
(tool judgment value)
• Program Time
• Date & Time

1 From the [Output Settings] screen (Page 3-97), left-


click [EtherCAT]
The [EtherCAT Output Settings] screen appears.

2 Left-click the [Byte Allocation Area] tab.

• In the [Result Data 128Byte] field, the data output by


the CV-X Series is displayed starting with Command
Data1.
• In this example, the command area size has been
set to 92 bytes. So, with the 4 bytes of the Command
Result part subtracted, 88 bytes (Command Data1
to Command Data22) are displayed in Result Data1
to Result Data22.
• The data to be output set in the Output Settings unit
is displayed starting with Result Data23.

Reference You can check the CV-X Series output data


other than the above data by double-clicking
3 Left-click [Select Data] and select the item to
([Status Bit] to [Command Result]) under
output, then left-click [Add].
[Box1 (CV-X3h4h_CA-NEC20E)].
4 Check the byte address for output.
• When allocating output data, the destination byte
address is automatically displayed in [Address].
• The byte address starting position is the location
allocated to [Result Data1] on the [Data
Configurations] setting screen of [Global] -
[Communications & I/O] - [EtherCAT]. (In the
example above, it is byte address 0048.)

CV-X UM_A 6-227


Typical setting procedure for EtherCAT

Flow of typical results output (handshake ON)


Controlling the controller
Controller (CV-X series) PLC

The inspection is executed


1. Checking the CV-X Series global settings
Execute inspection
by the trigger signal.
1 From [Global], select [Communications & I/O] -
[EtherCAT].
Confirm that Result ack flag is
turned off.* 2 Left-click [Set] in [Data Settings].
The [Communication Data Structure] screen appears.
Write data to Result Data and
Result OR flag, Tool Judge 3 Left-click [View List] in [Send-Data] and [Receive-
Value. Data] to check the status of byte address and bit
Check the completion of data
When the data writing is writing by confirming that address allocation for the items that are necessary
completed, turn on Result Result ready flag changes to for controller control.
ready flag. on, and then reference the data.
Control and data output by EtherCAT

Check completion of the data Turn on Result ack flag.


reading by confirming that
Result ack flag is turned on.
The change of Result ready
Turn off Result ready flag. flag to off is confirmed.

Turn off Result ack flag.

* If results output is executed when the "Result ack flag" is still


ON, the data is stored in the output buffer, however, it is not
written to Result Data. When the "Result ack flag" turns OFF, the
data in the buffer is written. Be aware that if the inspection flow
continues to be executed when the "Result ack flag" remains
ON, overflow of the output buffer will occur and output will be Receive-Data (PLC to Controller: OUT)
skipped.
• Command request flag: Turns OFFON when a
Flow of typical results output (handshake OFF) command is to be executed (bit).
• Command Number: Sets the command No. of the
Controller (CV-X series) PLC command to execute (double word).
The inspection is executed • Command Parameter#: Sets the No. # argument for
Execute inspection
by the trigger signal. the command (double word). (Whether or not there
[Data output] Read the I address (PID) data
are arguments depends on the command.)
Write data to Result Data. after a certain period of time
from the trigger input. Send-Data (Controller to PLC: IN)
• Command complete flag: Turns ON when the
command processing is completed (bit).
• Command error flag: Turns OFF when the command
processing was successful, and ON when a failure
occurs (bit).
• Command ready flag: Turns ON when ready to
receive the command process (bit).
• Command Result: Sets the command execution
result (0: Success, <Error code>: Failure) (double
word).
• Command Data#: Sets the command's No. #
response data (double word). (Whether or not there
is response data depends on the command.)

4 Left-click [OK].
The changed settings are saved.

5 Restart the controller.

6-228 CV-X UM_A


Typical setting procedure for EtherCAT

2. Example of command execution 5 Right-click [Parameter1] displayed on the [TwinCAT


procedure: Switch program No. (PW) Project1] tab, and then select [Online Write] on the
The following is a typical example of the command shortcut menu that is displayed.
execution procedure. This example uses the PW command
(Switch program No.) which uses a command parameter. 6 In the [Set Value Dialog] dialog box that is
displayed, enter [1] in the [Dec] field as the first
1 In [Solution Explorer], open [TwinCAT Project1] -
parameter (the number of the program setting to
[I/O] - [Devices] - [Device 3 (EtherCAT)] - [Box1
switch to) of the PW command, and then click [OK].
(CV-X3h4h_CA-NEC20E)], and then double-click
[Command Number].

Reference If the [TwinCAT Project1] tab is already open,


7 In [Solution Explorer], open [TwinCAT Project1] -
switch to the [Command Number] screen not [I/O] - [Devices] - [Device 3 (EtherCAT)] - [Box1
by double-clicking it but by clicking it. (CV-X3h4h_CA-NEC20E)], and then click [StatusBit].
A list of the bit data output by the CV-X Series is
2 Right-click [Command Number] displayed on the displayed.

Control and data output by EtherCAT


[TwinCAT Project1] tab, and then select [Online
Write] on the shortcut menu that is displayed. 8 Check that the CV-X Series is in a state in which a
command can be executed by confirming that the
3 In the [Set Value Dialog] dialog box that is [Command ready flag] displayed on the [TwinCAT
displayed, enter [24] (the PW command number) in Project1] tab is [1] .
the [Dec] field, and then click [OK].

9 In [Solution Explorer], open [TwinCAT Project1] -


[I/O] - [Devices] - [Device 3 (EtherCAT)] - [Box1
(CV-X3h4h_CA-NEC20E)], and then click [ControlBit].
A list of the bit data to input into the CV-X Series is
displayed.

10Right-click [Command request flag] displayed on


the [TwinCAT Project1] tab, and then select [Online
4 In [Solution Explorer], open [TwinCAT Project1] - Write '1'] on the shortcut menu that is displayed.
[I/O] - [Devices] - [Device 3 (EtherCAT)] - [Box1 After detecting that the [Command request flag] value
(CV-X3h4h_CA-NEC20E)] - [Module2 (Parameter has changed from 0 to 1, the CV-X Series executes the
128Byte)], and then click [Parameter 128Byte]. PW command (switches the number of the SD1
A list of the byte data to input into the CV-X Series is program setting).
displayed.

11 In [Solution Explorer], open [TwinCAT Project1] -


[I/O] - [Devices] - [Device 3 (EtherCAT)] - [Box1
(CV-X3h4h_CA-NEC20E)], and then click [StatusBit].
• When the command was executed successfully, the
[Command complete flag] is set to 1, and the
[Command error flag] is set to 0.
• When the command execution failed, the
[Command error flag] is set to 1, and the error code
is written to [Command Result].
• After the command is executed, the [Command
ready flag] is set to 0.
• Returning the [Command request flag] from 1 to 0
causes the [Command ready flag] to be set to 1,
• Starting with Parameter1, the data Command which switches the state to one in which the next
Parameter1 and so on to input into the CV-X Series is command can be executed.
stored in [Parameter 128Byte].
• In this example, the command area size has been
set to 68 bytes. So, with the 4 bytes of the Command
Number part subtracted, 64 bytes (Command
Parameter1 to Command Parameter16) are stored in
Parameter1 to Parameter16.
CV-X UM_A 6-229
Typical setting procedure for EtherCAT

Typical command process flow


Using Mailbox Communication
Controller (CV-X series) PLC

Set the command No. and


command parameters of a Using TwinCAT3 Functions to Check the
desired instruction in
the Command Number and Values of Mailbox Communication Data
Command Parameter
When the controller detects respectively.
that Command request flag is
turned on, it reads the Confirm that Command
1 In [Solution Explorer], double-click [TwinCAT
command from the ready flag is turned on and Project1] - [I/O] - [Devices] - [Device3 (EtherCAT)] -
Command Number and the then turn on Command request
command parameters from flag. [Box1 (CV-X3h4h_CA-NEC20E)], and then open the
the Command Parameter and
executes the command, and [CoE - Online] tab on the displayed screen.
then it turns off the Command
ready flag. The list of data that can be read with mailbox
communication is displayed.
When the command execution
is completed, the response When you click the [CoE - Online] tab, all the
Reference
data is written to Command
Control and data output by EtherCAT

Data and the error status is Confirm completion of the data within the CV-X Series that can be read
set in Command error flag. command execution by
detecting that Command are read automatically (this operation may take
complete flag has turned on. some time).
Command complete flag Reference the response data
turns on. and command execution result.

When the controller confirms Turn off Command request


2 Click the data to read in order to check it.
that Command request flag is flag. • Data for which a [+] mark is displayed to the left of
turned off, it turns off
Command complete flag and [Index] is array type data. You can click the [+] mark
Command error flag and turns
on Command ready flag. to check the value of each data within the array.
• The value displayed in the [Value] field for data that
has a [+] mark indicates the number of elements in
the array.
• You can select [Update List] to manually update the
data.
• When the [Auto Update] check box is selected, the
data is updated automatically.

Using TwinCAT3 Functions to Change the


Mailbox Communication Data

1 Double-click the data to change.


The [Set Value Dialog] screen is displayed.

2 Enter the value in the [Dec], [Hex], [Float], [Bool], or


[Binary] field, and then click [OK].

6-230 CV-X UM_A


Typical setting procedure for EtherCAT

1. Using TwinCAT3 Functions to Check the


Accessing the Byte Data Area
Byte Information Values
through Mailbox Communication
Mailbox communication is used to access "objects" in 1 In [Solution Explorer], double-click [TwinCAT
which byte information is divided into units of 1000 bytes. Project1] - [I/O] - [Devices] - [Device3 (EtherCAT)] -
• This method can be used for communication which [Box1 (CV-X3h4h_CA-NEC20E)], and then open the
does not require real time processing. [CoE - Online] tab on the displayed screen.
• It is possible to access areas exceeding the maximum The list of data that can be read with mailbox
size allowed for cyclic communication (536 bytes for communication is displayed.
input and 532 bytes for output).
Reference When you click the [CoE - Online] tab, all the
• Each object is assigned an index and a sub-index, data within the CV-X Series that can be read
which are then specified in order to access the data. are read automatically (this operation may take
some time).

Control and data output by EtherCAT


Accessible Ranges for Each Piece of Byte 2 Click the data to read in order to check it.
Information In this example, 1000 bytes from input address 3024 to
input address 4023 on the CV-X Series are checked.
Output data (received by the controller)

Index (Hexadecimal) Accessible address 3 Click the [+] next to index 200FH to expand the list.
2019H 0020 to 1019 The value of each address is displayed under [Value].
201AH 1020 to 2019
201BH 2020 to 2055

Input data (sent from the controller)

Index (Hexadecimal) Accessible address


200CH 0024 to 1023
200DH 1024 to 2023
200EH 2024 to 3023
200FH 3024 to 4023
2010H 4024 to 4103

CV-X UM_A 6-231


Typical setting procedure for EtherCAT

2. Using TwinCAT3 Functions to Change


the Byte Information Values
In this example, output address 1020 on the CV-X Series is
changed.

Point Before using mailbox communication to change an


output address value, check that the address is
not assigned to cyclic communication. If you use
this method to change the value of an output
address assigned to cyclic communication, a
memory area conflict will occur.

1 Click the [+] next to index 201AH to expand the list.


The value of each address is displayed under [Value].
Control and data output by EtherCAT

2 Double-click [201A:01 (sub-index 01H of index


201AH)].
The [Set Value Dialog] screen is displayed.

3 Enter the value in the [Dec], [Hex], [Float], [Bool], or


[Binary] field, and then click [OK].

4 Check the value of [201A:01] under [Value].

6-232 CV-X UM_A


Troubleshooting

Troubleshooting

When correct operation does not occur

Checking whether or not the EtherCAT


connection is properly established
Select the controller [Global] - [Communications & I/O] -
[EtherCAT], then check [Cyclic Communication Status:] at
the bottom of the [EtherCAT] screen. If [Not Connected] is
displayed here, then communication has failed. Check the

Control and data output by EtherCAT


cable connection, communications settings on the PLC
side, and other items again.

"Result OR flag" is not output.


The "Result OR flag" is updated in coordination with results
output with EtherCAT as the output destination. When the
"Result OR flag" is used, it is necessary that 1 or more data
item is output via EtherCAT.

"Result ready flag" remains ON and does not


change.
There is the possibility that "Result ack flag" control is not
being performed correctly. The "Result ready flag" turns OFF
when the "Result ack flag" rise is recognized in sending
(controller receiving). This is the same regardless of whether
handshake is ON or OFF.

Data cannot be acquired correctly when reading


data based on the change in the rise of STO output
from an external terminal.
STO is the data strobe signal for terminal output. Therefore,
it cannot be used as the strobe signal for any other data
output.
Refer to the "Result ready flag" for the timing as to when to
read data by EtherCAT.

CV-X UM_A 6-233


Troubleshooting

Error Message

Message Cause Corrective Action Error


cause No.
EtherCAT communication Cyclic communication was interrupted. • Check that the Ethernet cable is connected
failed. (When recovery is possible, recovery correctly.
occurs automatically.) • Check whether both the controller and the
master side were restarted after the
communications settings were updated.
13801
• Change the cyclic communication cycle and
timeout time on the PLC side.
• With the factory default, ERROR output is not
set. Set this on the [ERROR Output Settings]
screen (Page 5-32).
EtherCAT output failed due to The controller output buffer for outputting • Check that handshake is controlled properly.
Control and data output by EtherCAT

a full buffer. via EtherCAT is full. • Clear the data in the output buffer using the 13802
TEST terminal (bit) or reset input.
The delay of the handshake When the EtherCAT handshake is ON, • Check that handshake is controlled properly.
control causes skipping of the delayed handshake caused results • Clear the data in the output buffer using the
13803
EtherCAT communication output via EtherCAT to be skipped. TEST terminal (bit) or reset input.
result output.
EtherCAT module The EtherCAT module was not • Check that the EtherCAT module is attached
disconnected. recognized and the controller cannot use correctly.
the EtherCAT communications. • Check that the EtherCAT module is not
13804
damaged.
• Do not attach or detach the EtherCAT module
while the controller and unit are powered on.

6-234 CV-X UM_A 2061-2

You might also like