Omron ZS Operating manual

CompoWay/F Communication
Cat. No. Z231-E1-02
Smart Sensors
ZS Series
Command Reference

Introduction
Thank you for purchasing the ZS Series. This manual provides information regarding
operations and input/output formats for the communication between ZS Series controllers
and external devices using the Omron proprietary protocol, CompoWay/F.
This manual provides information for the following models and versions.
Model Firmware Version
ZS-LDC v2.000 or later
ZS-HLDC v1.000 or later
ZS-MDC v2.000 or later
ZS-DSU v2.000 or later
* Different firmware versions may cause communication errors, unintended setting
overwrite, and damages on the controller. Please make sure to use the controller with
the correct software version.
If your software version is not listed in the table above, please update the software
using the SmartMonitorZS firmware update software, such as WarpEngineZS, to
match the software version.
When using the ZS Series, be sure to observe the following:
- The ZS Series must be operated by personnel knowledgeable in electrical engineering.
- To ensure correct use, please read this manual thoroughly to deepen your
understanding of the product.
- Please keep this manual in a safe place so that it can be referred to whenever
necessary.

1
ZS Series
CompoWay/F Communication Command Reference
Contents
Contents
Contents 1
Section 1 About Communication Commands 1-1
How Communication Works 1-2
Setting the Communication Specifications 1-3
Command Formats 1-4
Response Formats 1-6
Examples of Abnormal End 1-8
Section 2 Details of Commands 2-1
About General Information of Communication Commands 2-2
Reading Parameter Areas 2-3
List of Parameter Area Reading Commands 2-3
Commands and Responses 2-4
Writing Parameter Areas 2-6
List of Parameter Area Writing Commands 2-6
Commands and Responses 2-7
Reading Variable Areas 2-9
List of Variable Area Reading Commands 2-9
Commands and Responses 2-9
Reading Controller Information 2-11
Operation Instructions 2-12
List of Operation Instruction Commands 2-12
Commands and Responses 2-12
Section 3 Unit No. and Parameter No. 3-1
Measurement Result Obtaining Command 3-2
Setting Value Obtaining and Changing Command 3-4
Parameter List (ZS-LDC) 3-4
Parameter List (ZS-HLDC) 3-11
Parameter List (ZS-MDC) 3-18
Parameter List (ZS-DSU) 3-27

2
ZS Series
CompoWa
y
/F Communication Command Reference
Contents
Section 4 How to Obtain Flow Data 4-1
About Obtaining Flow Data 4-2
Setting Procedures for Data Obtaining Conditions 4-3
Setting Parameters 4-8
Buffer Size and Buffer Interval 4-8
Logging Data Type 4-8
Flow Data Response 4-11
Format 4-11
Composition of Response 4-11

1-1
Section 1
About Communication Commands
ZS Series
CompoWay/F Communication Command Reference
Section 1
About Communication Commands
How Communication Works 1-2
Setting the Communication Specifications 1-3
Command Formats 1-4
Response Formats 1-6
Examples of Abnormal End 1-8

1-2
Section 1
How Communication Works
ZS Series
CompoWay/F Communication Command Reference
Section 1 About Communication Commands
How Communication Works
ZS Series controllers have communication functions with external devices. Use this function to
read the data in ZS Series controllers from the host and to write the setting data.
Communication is achieved via the Command and Response Method based on the
CompoWay/F, which is Omron's proprietary communication protocol. Controllers perform
processing according to the command sent from the host, and then return the result to the host
which sent the command as a response.
Host ZS Series Controller (RUN mode)
Programmable Controller
Personal Computer
H
LDONZEROENABLE
P
L
H
LDONZEROENABLE
P
L
Entering Commands Executing Commands
Controllers are in a
non-measurement state
when executing
commands.
Receives the results of the execution
of commands.
Outputs the result of the execution of
commands.

1-3
ZS Series
CompoWay/F Communication Command Reference
Section 1
Setting the Communication Specifications
Section 1
About Communication Commands
Setting the Communication Specifications
Change the settings of the controller communication specifications for communicating with the
external device by CompoWay/F protocol.
Use USB cable or RS-232C cable to connect ZS Series controllers to external
devices.
For USB cable connection, install Smart Monitor ZS and USB driver beforehand. After
installing Smart Monitor ZS, USB ports are recognized as standard COM ports, and
communication is achieved as with the RS-232C. (Setting the communication
specifications including baud rate is not necessary.)
For details on how to connect cable, refer to the User's Manual for each controller.
1. Set the mode switch to "FUN"
2. Select [System] - [Communication] - [Mode] menu.
3. Select [CompoWay/F].
4. For RS-232C cable connection, select [System] - [Communication] -
[RS-232C] menu to set the appropriate communication
specifications for the external device.
5. Save the settings.

1-4 ZS Series
CompoWay/F Communication Command Reference
Section 1
Command Formats
Section 1 About Communication Commands
Command Formats
The command format of the communication commands is shown below.
In the following section, items described with "Hex" after numerical values (ex. 02Hex) indicate
hexadecimal numbers. Those described with " " or only with numeral values indicate ASCII
characters.
(Text)
STX NODE No. Subaddress SID Command text ETX BCC
02Hex
FIXED (x101) (x100) "00"
FIXED
"0"
FIXED MRC SRC 03Hex
FIXED
1 byte 2 bytes 2 bytes 1 byte 1 byte 1 byte
BCC calculating range
* In the example format, 1 byte = 1 ASCII character.
Elements Details
STX This is a code to indicate the first part of communication frames (02Hex).
Make sure to set the first byte to 02Hex.
When a controller receives STX while receiving a command, it receives the
command again starting from where it received STX.
NODE No. This is the Node No. for the identification of the destination.
* About Node No.
It refers to the connection group No. as seen from the host device (PLC). Not
only the ZS Series but other multiple devices are connected to the PLC. The
number assigned to devices connected to a PLC such as this is referred to as a
Node No.
Subaddress This should be fixed to "00."
SID (Service ID) This should be fixed to "0."
Command text This is the text part of the command.
"Section 2 – Details of Commands" describes these parts by command.
ETX This is a code to indicate the end of the text (03Hex).
BCC This is a block check character.
The exclusive OR (XOR) of values from Node No. to ETX per byte is BCC.

1-5
ZS Series
CompoWay/F Communication Command Reference
Section 1
Command Formats
Section 1
About Communication Commands
Example of BCC calculation
STX NODE No. Subaddress SID Command text ETX BCC
02Hex "0"
(30Hex )
"0"
(30Hex )
"00"
(3030Hex)
"0"
(30Hex )
"30053001"
(3330303533303031Hex) 03Hex 37Hex
Set the result of calculation, which is "37Hex," to BCC.
<Calculation>
BCC = 30Hex + 30Hex + 30Hex + 30Hex + 30Hex + 33Hex +30Hex + 30Hex +35Hex + 33Hex +
30Hex +30Hex +31Hex +03Hex = 37Hex
"+" indicates the exclusive OR (XOR) operation.

1-6 ZS Series
CompoWay/F Communication Command Reference
Section 1
Response Formats
Section 1 About Communication Commands
Response Formats
The response format of the communication commands is shown below.
In the following section, items described with "Hex" after numerical values (ex. 02Hex) indicate
hexadecimal numbers. Those described with " " or only with numeral values indicate ASCII
characters.
STX NODE No. Subaddress End code Response text ETX BCC
02Hex
Fixed
(×101)
(×100)
"00"
Fixed
MRC SRC 03Hex
Fixed
1 byte 2 bytes 2 bytes 2 bytes 1 byte 1 byte
Elements Details
STX
NODE No.
Subaddress
Command Formats - page 1 - 4
End code Refer to the next page.
Response text This is the response text part of the command.
"Section 2 – Details of Commands" describes these parts by command.
ETX
BCC Command Formats - page 1 - 4

1-7
ZS Series
CompoWay/F Communication Command Reference
Section 1
Response Formats
Section 1
About Communication Commands
End codes of responses are shown below.
End
code Name Details
"00" Normal end Command ends successfully.
"0F" Command error Specified command is not executed.
Refer to the response code for details of the non-execution.
"10" Parity error Parity error occurred with any character while receiving a command.
"11" Framing error Framing error occurred with any character while receiving a
command.
"12" Overrun error Overrun error occurred with any character while receiving a
command.
"13" BCC error Received an invalid BCC.
"14" Format error •Occurs when characters other than 0 to 9 or A to F are used for
command text parts. (Except during echo back tests)
•No SID and command texts exist.
Or no command text exists.
•Either MRC or SRC is missing in the command text.
"16" Subaddress error •Subaddress of the receiving frame is invalid (not supported).
•No subaddress, SID, and command texts exist.
•Subaddress is shorter than two characters, and no SID and
command texts exist.
"18" Frame length error Receiving frame exceeds the supported number of bytes.
One end code is returned after receiving one complete command frame to the node.
No response is made when ETX or BCC characters are missing.
Noises may cause response errors or no response.
Make sure to retry from the host.
It may take three seconds at longest from sending a command to receiving a response. If no
response is returned, make sure to send another command after waiting for more than three
seconds.

1-8 ZS Series
CompoWay/F Communication Command Reference
Section 1
Examples of Abnormal End
Section 1 About Communication Commands
Examples of Abnormal End
This section shows the examples of end codes for abnormal ends while receiving commands.
yInvalid subaddress, and no SID and command text exist
Command
STX NODE No. Subaddress ETX BCC
02Hex "0" "A" 03Hex
Response
STX NODE No. Subaddress End code ETX BCC
02Hex "0" "A" "1" "6" 03Hex
End code is "16" (Subaddress error).
•This response occurred because subaddress errors are prioritized over format
errors.
yNo command text exists in the command
Command
STX NODE No. Subaddress SID ETX BCC
02Hex "0" "0" "0" 03Hex
Response
STX NODE No. Subaddress End code ETX BCC
02Hex "0" "0" "1" "4" 03Hex
End code is "14" (Format error).
yNode No. is missing
Command
STX ETX BCC
02Hex 03Hex
One character is missing for the Node No.
Response
No response is returned.
yNo subaddress exists, and an invalid BCC is used
Command
STX NODE No. ETX BCC
02Hex 03Hex Err
Response
STX NODE No. Subaddress End code ETX BCC
02Hex "0" "0" "1" "3" 03Hex
Subaddress is "00" and end code is "13" (BCC error).

2-1
ZS Series
CompoWa
y
/F Communication Command Reference
Section 2
Details of Commands
Section 2
Details of Commands
About General Information of Communication Commands 2-2
Reading Parameter Areas 2-3
List of Parameter Area Reading Commands 2-3
Commands and Responses 2-4
Writing Parameter Areas 2-6
List of Parameter Area Writing Commands 2-6
Commands and Responses 2-7
Reading Variable Areas 2-9
List of Variable Area Reading Commands 2-9
Commands and Responses 2-9
Reading Controller Information 2-11
Operation Instructions 2-12
List of Operation Instruction Commands 2-12
Commands and Responses 2-12

2-2
Section 2
About General Information of Communication Commands
ZS Series
CompoWay/F Communication Command Reference
Section 2 Details of Commands
About General Information of Communication Commands
Communication commands are categorized into the groups and meanings as in the following
table:
Groups Meanings Pages for
Reference
System- related Read setting values related to the target CH system. Page 2-3
Reading parameter
areas Measurement-
related
Read measurement-related setting values and
results of measurements. Obtain data by specifying
Unit No. and Data No.
(Refer to Section 3
for Unit No. and Data
No.)
System- related Write setting values related to the target CH system. -
Writing parameter
areas Measurement-
related
Write measurement-related setting values and results
of measurements. Write data by specifying Unit No.
and Data No.
(Refer to Section 3
for Unit No. and Data
No.)
Reading variable areas Read particular kinds of data in the target CH system. Page 2-9
Reading controller information Read information on the models connected with a
cable.
Page 2-11
Operation instructions Operate data of each bank or all banks. Page 2-12
[Notes on the exchange of communication data]
•Number of elements indicates the size of data to be exchanged. ASCII character length per
element is determined depending on parameter type codes. Specifically,
8000h to BFFFh : 4 characters per element
From C000h: 8 characters per element
Number of elements = 1 for all commands in this manual. Please enter "8001h" to specify
number of elements.
•Machine No. indicates channel No. of the destination controller.
•All data is exchanged in hexadecimal numbers. Therefore, "15" of the decimal number
should be expressed as "0000000Eh." (*1)
•Distance values should be expressed in the unit of [nm]. Therefore, note that "100
(=00000064h)" indicates "100nm 0.1um" and not 100mm. (*1)
•Negative values are expressed as the complements of 2. For example, "-100" should be
expressed as "FFFFFF9Ch." (*1)
•In the case that the measured values such as distance are abnormal values, data parts are
expressed as "7FFFFFFXh" ("X" varies depending on the case.) (*1)
*1: This is an example for 8 characters per element.

3
2-3
ZS Series
CompoWay/F Communication Command Reference
Section 2
Reading Parameter Areas
Section 2
Details of Commands
Reading Parameter Areas
Read parameter areas.
List of Parameter Area Reading Commands
Data Name MRC SRC Parameter
Type
Reading start
address
Specification
of element
numbers
Data to be read
Data
Length
*2
Bank switching 02h 01h 8000h <Machine No.> 8001h 0 to 3 4
Keylock 02h 01h A002h <Machine No.> 8001h 0 : OFF, 1 : ON 4
Version
Information
02h 01h A021h <Machine No.> 8001h Software Version 4
Controller type
Information
02h 01h A022h <Machine No.> 8001h 0 : ZS-LDC, 1 :
ZS-MDC,
2: ZS-DSU
4
RS-232C Data
Length Setting
02h 01h A030h <Machine No.> 8001h 0 : 7 bits, 1 : 8 bits 4
RS-232C Parity
Setting
02h 01h A031h <Machine No.> 8001h 0 : None,
1 : Odd Number,
2 : Even Number
4
Stop bits setting 02h 01h A032h <Machine No.> 8001h 0 : 1 bit, 1 : 2 bits 4
Communication
node setting
02h 01h A033h <Machine No.> 8001h 0 to 64 4
Digits after
decimal point
02h 01h A040 <Machine No.> 8001h 0 : 1 digit, 1 : 2 digits,
2 : 3 digits,
3 : 4 digits, 4 : 5 digits
4
Digital "Eco"
mode
02h 01h A041h <Machine No.> 8001h 0 : NORMAL, 1 : ECO1,
2 : OFF
4
LCD ON/OFF 02h 01h A042h <Machine No.> 8001h 0 : OFF, 1 : AUTOOFF,
2 : ON
4
LCD Backlight 02h 01h A043h <Machine No.> 8001h 0 : OFF, 1 : AUTOOFF,
2 : ON
4
Sensor Load 02h 01h A050h <Machine No.> 8001h 0 : LOAD every time,
1 : SAVE
4
Language 02h 01h A051h <Machine No.> 8001h 0 : Japanese,
1 : English
4
Reading
processing unit
data *1
02h 01h C000h+
<Data
No.>
XXYYh
XX : Unit No.
YY : Machine No.
8000h
+ <No. of
Elements>
Data to be read 8
* 1 - All reading/writing operations on processing units are assigned by using this command.
* 2 - Indicates ASCII character length. Refer to page 2-2 for details.
Refer to "Section 3 - Unit No. and Parameter No." for Unit No. and Parameter No.
for each processing unit.

2-4 ZS Series
CompoWay/F Communication Command Reference
Section 2
Reading Parameter Areas
Section 2 Details of Commands
Example 1:To read the "language" information from the 2CH controller, assign a command as
follows:
[Machine No.]=0002h
MRC SRC Parameter Type Reading start
address
Number of
elements
02h 01h A051h 0002h 8001h
Example 2: To read the final measured value from the 1CH controller, assign a command as follows:
[Data No.]=20h, [Unit No.]=30h, [Machine No.]=01h
MRC SRC Parameter Type Reading start
address
Number of
elements
02h 01h C020h 3001 8001h
Commands and Responses
Command
MRC SRC Parameter Type
Reading start
address
Number of
elements
"02" "01"
2 bytes 2 bytes 4 bytes 4 bytes 4 bytes
Elements Details
Specify parameters depending on the data to be obtained.
Parameter Type
List of Parameter Area Reading Commands page 2-3
Specify the Machine No. (=CH No.) of the controller to read data by using an ASCII
code expressed in hexadecimal numbers.
Please note that the format of "processing unit data reading" commands is XXYYh
(XX : <Unit No.>, YY : <Machine No.>)
Reading start address
Unit No. and Parameter No. page 3-4
Specify number of elements depending on the Parameter Type.
Number of elements
List of Parameter Area Reading Commands page 2-3

5
2-5
ZS Series
CompoWay/F Communication Command Reference
Section 2
Reading Parameter Areas
Section 2
Details of Commands
Response
MRC SRC Response Code Parameter Type Reading start
address
"02" "01"
2 bytes 2 bytes 4 bytes 4 bytes 4 bytes
Number of
elements Data to be read
4 bytes Requested data
(depending on commands)
Elements Details
Response Code Indicates controller status for the command. Data to be read is not returned when an
error occurs.
Data to be read is expressed by using an ASCII code in hexadecimal numbers.
Data length varies depending on commands.
Data to be read
List of Parameter Area Reading Commands page 2-3
Response code for normal end
Response Code Name Details
"0000" Normal end No errors.
Response code when an error occurs
Response Code Error name Cause
"1001" Long command length Command length is too long.
"1002" Short command length Command length is too short.
"1003" Inconsistent number of
elements/data
Number of elements and data do not match.
"1101" Area type error Parameter type is wrong.
"1103" Start address outside of range
error
Reading start address is out of range.
Reading start address specifies the sensor of the
unconnected Machine No.
Bit position is other than "00."
"1104" End address outside of range
error
Specified number of elements is out of range.
"2203" Operating error Reading error.
"2204" Operating error Operating mode of sensor is other than RUN.
"2205" Operating error Invalid command.

2-6 ZS Series
CompoWay/F Communication Command Reference
Section 2
Writing Parameter Areas
Section 2 Details of Commands
Writing Parameter Areas
Write parameter areas.
List of Parameter Area Writing Commands
Data Name MRC SRC Parameter
Type
Writing start
address
Specification
of element
numbers
Data to be written Data
Length
*2
Bank switching 02h 02h 8000h <Machine No.> 8001h 0 to 3 4
KEYLOCK 02h 02h A002h <Machine No.> 8001h 0 : OFF, 1 : ON 4
RS-232C Data
Length Setting
02h 02h A030h <Machine No.> 8001h 0 : 7 bits, 1 : 8 bits 4
RS-232C Parity
Setting
02h 02h A031h <Machine No.> 8001h 0 : None, 1 : Odd Number,
2 : Even Number
4
Stop bits setting 02h 02h A032h <Machine No.> 8001h 0 : 1 bit, 1 : 2 bits 4
Communication
node setting
02h 02h A033h <Machine No.> 8001h 0 to 64 4
Digits after
decimal point
02h 02h A040 <Machine No.> 8001h 0 : 1 digit, 1 : 2 digits, 2 : 3
digits, 3 : 4 digits, 4 : 5
digits
4
Digital "Eco" mode 02h 02h A041h <Machine No.> 8001h 0 : NORMAL, 1 : ECO1,
2 : OFF
4
LCD ON/OFF 02h 02h A042h <Machine No.> 8001h 0 : OFF, 1 : AUTOOFF,
2 : ON
4
LCD Backlight 02h 02h A043h <Machine No.> 8001h 0 : OFF, 1 : AUTOOFF,
2 : ON
4
Sensor Load 02h 02h A050h <Machine No.> 8001h 0 : LOAD, 1 : SAVE 4
Language 02h 02h A051h <Machine No.> 8001h 0 : Japanese, 1 : English 4
Writing processing
unit data *1
02h 02h C000h+
<Data No.>
XXYYh
XX : Unit No.
YY : Machine No.
8000h
+ <No. of
Elements>
Data to be written 8
* 1 - All reading/writing operations on processing units are assigned by using this command.
* 2 - Indicates ASCII character length. Refer to page 2-2 for details.
Refer to "Section 3 - Unit No. and Parameter No." for Unit No. and Parameter No. for
each processing unit.
Example 1: To turn on the "KEYLOCK" of the 2CH controller, assign a command as follows:
[Machine No.]=0002h, [Data to be written]=0001h
MRC SRC Parameter Type Reading start
address
Number of
elements
Data to be written
02h 02h A002h 0002h 8001h 0001h

7
2-7
ZS Series
CompoWay/F Communication Command Reference
Section 2
Reading Parameter Areas
Section 2
Details of Commands
Example 2: To set the peak hold mode for the 1CH controller, assign a command as follows:
[Data No.]=02h, [Unit No.]=2Dh, [Machine No.]=01h, [Data to be written]=00000001h
MRC SRC Parameter Type Writing start
address
Number of
elements
Data to be written
02h 02h C002h 2D01 8001h 00000001h
Commands and Responses
Command
MRC SRC Parameter Type Writing start
address
"02" "02"
2 bytes 2 bytes 4 bytes 4 bytes
Number of
elements Data to be written
"8001"
4 bytes 4 bytes
Elements Details
Specify parameters depending on the data to be written.
Parameter Type
List of Parameter Area Writing Commands page 2-6
Specify the Machine No. (=CH No.) of the controller to write data by using an ASCII
code expressed in hexadecimal numbers.
Please note that the format of "processing unit data writing" commands is XXYYh
(XX : <Unit No.>, YY : <Machine No.>)
Writing start address
Unit No. and Parameter No. page 3-4
Specify number of elements depending on the Parameter Type.
Number of elements
List of Parameter Area Writing Commands page 2-6
Data to be written is specified by using an ASCII code in hexadecimal numbers.
Data length varies depending on commands.
Data to be written
• List of Parameter Area Writing Commands page 2-6
• Do not issue commands other than specified parameter types.
Issuing wrong commands may rewrite internal parameters. In the
case that internal parameters of connected sensors are rewritten,
execute "EEPROM initialization" of operation instruction
commands.

2-8 ZS Series
CompoWay/F Communication Command Reference
Section 2
Writing Parameter Areas
Section 2 Details of Commands
Response
MRC SRC Response Code
"02" "02"
2 bytes 2 bytes 4 bytes
Elements Details
Response Code Indicates controller status for the command.
Response code for normal end
Response Code Name Details
"0000" Normal end No errors.
Response code when an error occurs
Response Code Error name Cause
"1001" Long command length Command length is too long.
"1002" Short command length Command length is too short.
"1003" Inconsistent number of
elements/data
Number of elements and data do not match.
"1100" Parameter error Data to be written is out of specified range.
"1101" Area type error Parameter type is wrong.
"1103" Start address outside of range
error
Writing start address is out of range.
Writing start address specifies the sensor of the
unconnected Machine No.
"1104" End address outside of range
error
Specified number of elements is other than "8001."
"2203" Operating error Setting is abnormal.
Refer to the User's Manual of the ZS Series for setting
error conditions of thresholds and the hysteresis width.
"2204" Operating error Operating mode of sensor is other than RUN.
"2205" Operating error Invalid command.
Other manuals for ZS
2
This manual suits for next models
5
Table of contents
Other Omron Accessories manuals

Omron
Omron E3X-DA-SE-S User manual

Omron
Omron E3X-HD0 User manual

Omron
Omron CJ - 12-2004 User manual

Omron
Omron ZS-HLDS5T User manual

Omron
Omron D6FZ Series User manual

Omron
Omron ZS-L - User manual

Omron
Omron E3T-C User manual

Omron
Omron 2JCIE-BL01-P1 User manual

Omron
Omron E3JK User manual

Omron
Omron MS4800E User manual

Omron
Omron E3NW-DS User manual

Omron
Omron ZX-E - User manual

Omron
Omron E3JK-T series User manual

Omron
Omron E3NT-R User manual

Omron
Omron E2EC - User manual

Omron
Omron A - DATASHEET 2 User manual

Omron
Omron FQ-CR2 Series User manual

Omron
Omron ZFX-C User manual

Omron
Omron B5WC User manual

Omron
Omron E2KQ-X User manual