About General Information of Communication Commands2-2
Reading Parameter Areas2-3
List of Parameter Area Read Commands2-3
Commands and Responses2-4
Writing Parameter Areas2-6
List of Parameter Area Writing Commands2-6
Commands and Responses2-7
Reading Controller Information2-8
Operation Instructions2-9
List of Operation Instruction Commands2-9
Commands and Responses2-9
Section 3
Unit Nos. and Parameter Nos.3-1
Setting Value Acquisition/Change Commands3-2
CompoWay/F Communication Command Reference
ZFV-C
1
Contents
MEMO
ZFV-C
2
CompoWay/F Communication Command Reference
Section 1
About Communication Commands
How Communication Works1-2
Setting the Communication Specifications1-3
Command Formats1-4
Response Formats1-6
Examples of Abnormal End1-8
Section 1 About Communication Commands
CompoWay/F Communication Command Reference
ZFV-C
1-1
Section 1
How Communication Works
How Communication Works
Section 1 About Communication Commands
ZFV-C controllers have a function for communicating with external devices. Use this
function to read the data in ZFV-C controllers from the host and to write the setting data.
Communication is achieved via the Command and Response Method based on
CompoWay/F, OMRON's proprietary communication protocol. Controllers execute
processing according to the command sent from the host, and then return the result as a
response to the host that sent the command.
Host
Programmable Controller
ZFV-C controller (RUN mode)
Personal Computer
The command is entered.
The result of command
execution is received.
The command is
executed.
During command
execution,
the controller is in a
non-measurement
state.
The execution result
is output.
1-2
ZFV-C
CompoWay/F Communication Command Reference
Section 1
Setting the Communication Specifications
Setting the Communication Specifications
Change the settings of the controller communication specifications for communicating with
the external device by CompoWay/F protocol.
Use a USB cable or RS-232C cable to connect ZFV-C controllers to external devices.
For the USB cable connection, download and install the USB driver beforehand.
For the USB driver, please contact your OMRON representative.
1. Switch the controller to [MENU].
2. Select [System2] - [Communication] to set the appropriate communication
specifications for the external device.
3. Switch the controller to [RUN]. (This executes the save.)
Section 1 About Communication Commands
CompoWay/F Communication Command Reference
ZFV-C
1-3
Section 1
Command Formats
Command Formats
Section 1 About Communication Commands
The command format of the communication commands is shown below.
In the following section, numerical values appended with "Hex" (e.g. 02Hex) indicate
hexadecimal numbers. Those annotated by " " or only numeral values indicate ASCII
characters.
(Text)
STX
02Hex
fixed
1 byte
Node No.
1
(x 10
2 bytes
) (x 100)
Subaddress
"00"
fixed
2 bytes
SID
"0"
fixed
1 byte
BCC calculating range
Command textETX
MRC SRC03Hex
fixed
1 byte
BCC
1 byte
* In the example format, 1 byte = 1 ASCII character.
ElementDescription
STXThis code indicates the start of a communication frame (02Hex).
Be 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 identifying the destination. It should be fixed to "00."
* About node No.
This node No. indicates the connection group No. as seen from the host
device (PLC). Not only ZFV-C but also two or more devices can be
connected to the programmable controller. The No. assigned to devices
connected to a PLC such as this is referred to as a node No.
SubaddressThis should be fixed to "00."
SID (service ID)This should be fixed to "0."
Command textThis is the text section of the command.
"Section 2 - Details of Commands" describes these sections by each individual
command.
ETXThis code indicates the end of the text (03Hex).
BCCThis is the block check character.
The exclusive OR (XOR) of values from node No. to ETX per single byte is
BCC.
Parameter typeSpecify parameters corresponding to the data to be acquired.
Read start addressSpecify the machine No. (i.e. CH No.) of the controller to read data from by
Number of elementsSpecify the number of elements corresponding to the parameter type.
SRCParameter typeRead start addressNumber of elements
"01"
ElementDescription
List of Parameter Area Read Commands, p.2-3
using an ASCII code expressed in hexadecimal.
Note that the format in the case of a "processing unit data read" command is
XXYYh (where, XX: unit No., YY: machine No.)
Unit Nos. and Parameter Nos., p.3-4
List of Parameter Area Read Commands, p.2-3
2-4
ZFV-C
CompoWay/F Communication Command Reference
● Response
Section 2
Reading Parameter Areas
MRC
"02"
2 bytes2 bytes4 bytes4 bytes
Number of elements
Response codeIndicates the controller status for the command. Data to be read is not returned
Data to be readData to be read is expressed by using an ASCII code annotated in
SRCParameter type
"01"
4 bytes
ElementDescription
Response codeRead start address
4 bytes
Data to be read
Requested data
(depending on command)
when an error occurs.
hexadecimal.
The data length varies depending on commands.
List of Parameter Area Read Commands, p.2-3
Response code for a normal end
Response codeNameDescription
Response codeNormal endNo errors occurred.
Section 2 Details of Commands
Response codes when an error occurs
Response codeError nameCause
"1001"Long command lengthThe command is too long.
"1002"Short command lengthThe command is too short.
"1003"Inconsistent number of
elements/data
"1101"Area type errorThe parameter type is wrong.
"1103"Start address outside of
range error
"1104"End address outside of
range error
"2203"Operating errorThis is a read error.
"2204"Operating errorThe sensor's operating mode is other than RUN.
"2205"Operating errorThis is an invalid command.
The number of elements and data do not match.
The read start address is out of range.
The read start address specifies the sensor of the
unconnected Machine No.
The bit position is other than "00."
The specified number of elements is out of range.
ZFV-C
CompoWay/F Communication Command Reference
2-5
Section 2
Writing Parameter Areas
Writing Parameter Areas
The following describes writing of parameter areas.
List of Parameter Area Writing Commands
Section 2 Details of Commands
Data name MRC
Bank
switching
Writing
processing
unit data
Parameter
SRC
02h02h 8000h<Machine No.>8001hbank No. (1 to 8)16
02h02h C000h+
*1 This refers to the ASCII character length. For details, refer to p.2-2.
type
<Parameter
No.>
Write start
address
XXYYh
(XX: <unit No.>,
YY: <machine
No.>)
Specification
of number of
elements
8000h +
<Number of
elements>
Data to be written
Data to be written32
Data
length
*1
For details on the unit No. and parameter No. of each processing unit, refer to "Section 3
- Unit Nos. and Parameter Nos."
Example 1: To switch the bank of a 2CH controller to "2", assign a command as follows:
[Machine No.]=0002h, [Data to be written]=0002h
MRCSRCParameter typeRead start address
02h02h8000h0002h8001h0002h
Example 2: To set the threshold value of a 1CH controller (ITEM=match), assign a command as follows:
[Data No.]=28h, [Unit No.]=02h, [Machine No.]=01h, [Data to be written]=00000050h
MRCSRCParameter typeRead start address
02h02hC028h0201h8001h00000050h
Number of
elements
Number of
elements
Data to be
written
Data to be
written
2-6
ZFV-C
CompoWay/F Communication Command Reference
Commands and Responses
● Command
Section 2
Writing Parameter Areas
MRC
"02"
2 bytes2 bytes4 bytes4 bytes
Number of elements
ElementDescription
Parameter typeSpecify parameters corresponding to the data to be written.
SRCParameter typeWrite start address
"02"
Data to be written
"8001"
4 bytes
4 bytes
List of Parameter Area Write Commands, p.2-6
Write start addressSpecify the machine No. (=CH No.) of the controller to write data to using an
ASCII code expressed in hexadecimal.
Note that the format in the case of a "processing unit data write" command is
XXYYh (where, XX: unit No., YY: machine No.)
Unit Nos. and Parameter Nos., p.3-4
Number of elementsSpecify the number of elements corresponding to the parameter type.
List of Parameter Area Write Commands, p.2-3
Section 2 Details of Commands
Data to be writtenData to be written is specified by using an ASCII code expressed in hexadecimal.
The data length varies depending on commands.
• List of Parameter Area Write Commands, p.2-6
• Do not issue commands other than specified parameter
types. Issuing wrong commands may rewrite internal
parameters. If the internal parameters of connected
sensors are rewritten, execute the operation instruction
command "EEPROM initialization."
ZFV-C
CompoWay/F Communication Command Reference
2-7
Section 2
Reading Controller Information
Reading Controller Information
The following describes reading of ZFC-V model, for example.
● Command
Section 2 Details of Commands
● Response
Response codeIndicates the controller status for the command. Data to be read is not returned
ModelThe model is expressed by 20 ASCII characters.
VersionThe version is expressed by 20 ASCII characters.
Response code for a normal end
"0000"Normal endNo errors occurred.
MRC
"05"
2 bytes2 bytes
MRC
"05"
2 bytes2 bytes
Response codeNameDescription
SRC
"01"
SRC
"01"
ElementDescription
Responsecode
4 bytes
when an error occurs.
Model
20 bytes
Version
20 bytes
2-8
Response codes when an error occurs
Response codeError nameCause
"1001"Long command lengthThe command is too long.
"1002"Short command lengthThe command is too short.
ZFV-C
CompoWay/F Communication Command Reference
Section 2
Operation Instructions
Operation Instructions
The following describes execution of operation instructions that are issued to controllers.