Page 1
Cat. No. Z231-E1-02 Smart Sensors ZS Series CompoWay/F Communication Command Reference...
Page 2
- 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.
Command Formats Response Formats Examples of Abnormal End Section 2 Details of Commands About General Information of Communication Commands Reading Parameter Areas List of Parameter Area Reading Commands Commands and Responses Writing Parameter Areas List of Parameter Area Writing Commands...
Page 4
Section 4 How to Obtain Flow Data About Obtaining Flow Data Setting Procedures for Data Obtaining Conditions Setting Parameters Buffer Size and Buffer Interval Logging Data Type Flow Data Response 4-11 Format 4-11 Composition of Response 4-11 ZS Series CompoWay/F Communication Command Reference...
Section 1 About Communication Commands How Communication Works Setting the Communication Specifications Command Formats Response Formats Examples of Abnormal End ZS Series CompoWay/F Communication Command Reference...
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.
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. Set the mode switch to "FUN" Select [System] - [Communication] - [Mode] menu.
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.
Page 9
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.
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.
Page 11
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.
Section 1 Examples of Abnormal End Examples of Abnormal End This section shows the examples of end codes for abnormal ends while receiving commands. Invalid subaddress, and no SID and command text exist Command NODE No. Subaddress 02Hex "0" "A"...
Section 2 Details of Commands About General Information of Communication Commands Reading Parameter Areas List of Parameter Area Reading Commands Commands and Responses Writing Parameter Areas List of Parameter Area Writing Commands Commands and Responses Reading Variable Areas List of Variable Area Reading Commands...
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. •...
* 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.
Reading start Number of address elements 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 Parameter Type Reading start Number of address elements...
Page 17
(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 Data to be read is expressed by using an ASCII code in hexadecimal numbers.
* 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.
Section 2 Reading Parameter Areas 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 Parameter Type Writing start Number of Data to be written...
Page 20
Specified number of elements is other than "8001." error "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.
Specify variables depending on the data to be obtained. List of Variable Area Reading Commands page 2-9 Reading start address Specify the Machine No. (=CH No.) of the controller to read data by using an ASCII code expressed in hexadecimal numbers. Unit No. and Parameter No. page 3-4 Bit position ZS Series does not support bit access.
Page 22
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 Data length is number of elements x 4 ASCII characters. Since the data reading part of the flow data obtaining commands use special formats, refer to "Section 4: How...
20 bytes 20 bytes Elements Details Response Code Indicates controller status for the command. Data to be read is not returned when an error occurs. Model Model is expressed with 20 ASCII characters. Version Version is expressed with 20 ASCII characters.
CLEAR (which clears banks) initializes current banks' sensing settings and measurement settings. Settings of other banks and system settings are not initialized. Complete INIT initializes all settings (settings of all banks and system settings). Example: To execute Complete INIT of the 2CH controller, assign a command as follows: [Related information1]=02h Instruction...
Page 25
4 bytes Elements Details Response Code Indicates controller status for the command. Instruction Code The code which is the same as the transmitted will be returned. Related Information 1 Related Information 2 Response code for normal end Response Code Name Details "0000"...
Page 26
Section 2 Operation Instructions MEMO ZS Series 2-14 CompoWay/F Communication Command Reference...
Section 3 Unit No. and Parameter No. Measurement Result Obtaining Command Setting Value Obtaining and Changing Command Parameter List (ZS-LDC) Parameter List (ZS-HLDC) 3-11 Parameter List (ZS-MDC) 3-18 Parameter List (ZS-DSU) 3-27 ZS Series CompoWay/F Communication Command Reference...
Section 3 Measurement Result Obtaining Command Measurement Result Obtaining Command Parameter List (ZS-LDC) When selecting a mode other than “THICK/GAP - FILM/OTHERS - TRANSFER" mode (when no 2-area measurement is performed): Unit No. Data No. Parameter Description Measurement result (=Main digital display value) When selecting “THICK/GAP - FILM/OTHERS - TRANSFER"...
Page 29
Example1: When obtaining a measurement result of ZS-LDC (2CH) (and when no 2-area measurement is performed): 02h 01h (C000h + 20h (Data No.)) 30h (Unit No.) 02h (CH No.) (8000h + 1h (Number of elements)) In the command section, the value is shown as below:...
Section 3 Setting Value Obtaining and Changing Command Setting Value Obtaining and Changing Command Parameter List (ZS-LDC) Sensing Setting (common for all TASKs) Data Setting range/ Unit No. Parameter Remarks output range Measurement mode 0: STANDARD 1: HI-RESO 2: HI-SPEED...
Page 31
Section 3 Setting Value Obtaining and Changing Command Data Setting range/ Unit No. Parameter Remarks output range Image smoothing level 0: None 1: Filter size 2 2: Filter size 4 3: Filter size 8 4: Filter size 16 Background removing...
Page 32
(Third surface) Note 1: When no 2-area measurement is performed, Unit No. 2 is valid and Unit No. 7 and 8 are invalid. When a 2-area measurement is performed, Unit No. 2 is invalid and Unit No. 7 and 8 are valid.
Page 33
Section 3 Setting Value Obtaining and Changing Command Measurement Setting 1 (Settings per TASK) (Note 2) Unit No. Data Parameter Setting range/output range Remarks (Note 3) Scaling mode 0: OFF 1: ON Span value -20000 to 20000 (X0.0001) Offset value...
Page 34
Example1: When reading the setting values of the average number of times (when ZS-LDC is 1CH, and no 2-area measurement is performed): Since the average number of times is 2Bh for Unit No., and 02h for Data No., values are shown as below: 02h 01h (C000h + 02h (Data No.)) 2Bh (Unit No.) 01h (CH No.) (8000h + 1h (Number of elements))
Page 35
Section 3 Setting Value Obtaining and Changing Command Measurement Setting 2 (common to all TASKs) Unit No. Data No. Parameter Setting range/output range Remarks Non-measurement settings 0: Keep 1: Clamp Output at CLAMP 0: MAX 1: 20mA 2: 12mA 3: 4mA...
Page 36
Therefore, to send a command related to inputs, the external input mode should be set to “Parallel input OFF.” Once ON is written to the timing input, reset input, and LD-OFF input parameters, the ON state is kept until OFF is written next.
0 to 639 (pix) End position of area 1 0 to 639 (pix) Start line of area 1 0 to (Number of additional lines - End line of area 1 0 to (Number of additional lines - Start position of area 2...
Page 38
Section 3 Setting Value Obtaining and Changing Command Unit No. Data No. Parameter Setting range/output range Remarks Surface to be controlled 0: Peak for light amount 1: First surface 2: Second surface 3: Third surface LD power when fixed 0 to 800 (1div:0.1%) Lower limit of LD power 0 to 800 (1div:0.1%)
Page 39
Section 3 Setting Value Obtaining and Changing Command Unit No. Data No. Parameter Setting range/output range Remarks Parameter X 0: None 1: TASK1 2: TASK2 3: TASK3 4: TASK4 Parameter Y 0: None 1: TASK1 2: TASK2 3: TASK3 4: TASK4...
Page 40
Section 3 Setting Value Obtaining and Changing Command Unit No. Data No. Parameter Setting range/output range Remarks Average 0: 1 time 1: 2 times 2: 4 times 3: 8 times 4: 16 times 5: 32 times 6: 64 times 7: 128 times...
Page 41
Section 3 Setting Value Obtaining and Changing Command If GLASS/MODE 2 or GLASS THICKNESS/MODE 2 is selected, a process using multiple tasks will be performed, as in multi-task mode. The following processes are assigned to the respective tasks: Calculates Area 1 displacement value...
Page 42
Section 3 Setting Value Obtaining and Changing Command Unit No. Data No. Parameter Setting range/output range Remarks Output at CLAMP Voltage output 0: MAX 1: 10V 2: 9V 3: 8V 4: 7V 5: 6V 6: 5V 7: 4V 8: 3V...
Page 43
Section 3 Setting Value Obtaining and Changing Command Unit No. Data No. Parameter Setting range/output range Remarks Output TASK(When the 0: TASK1 Digital measurement value is output) 1: TASK2 Output 2: TASK3 3: TASK4 4: Consecutively Output mode 0: OFF...
Section 3 Setting Value Obtaining and Changing Command Parameter List (ZS-MDC) Input Setting (common to all TASKs) Unit No. Data No. Parameter Setting range/output range Remarks Data A input 0 to 11 (CH) destination CH Data B input destination CH...
Page 45
Setting Value Obtaining and Changing Command Example 1: When assigning (writing) input A to CH3: To assign input A to CH3, input destination CH of data A should be set to 3CH and input mode of data A should be ON.
Page 46
Section 3 Setting Value Obtaining and Changing Command Measurement Setting 1 (Setting per TASK) Unit No. Setting range/output Data No. Parameter Remarks (Note 1) range Mode 0: OFF 1: INDIV 2: OPERATION Input selection 0: Input A Parameters when 1: Input B...
Page 47
Section 3 Setting Value Obtaining and Changing Command Unit No. Setting range/output Data No. Parameter Remarks (Note 1) range Input A setting 0: OFF Parameters when (AVE, MAX-MIN) 1: ON [Expression]= [AVE] and [MAX-MIN] Input B setting (AVE, MAX-MIN) Input C setting...
Page 48
-1) to the Unit No. and multiplying it by 14h for another reference or setting. Example 1: When reading the setting values of the average number of times for TASK 1: Since the average number of times is 2Bh for Unit No., and 02h for Data No., values are shown as below: 02h 01h (C000h + 02h (Data No.)) 2Bh (Unit No.) 00h (CH No.) (8000h + 1h (Number of elements))
Page 49
Usually, the high threshold value is 30h for Unit No., and 03h for Data No. However, Unit No. is 6Ch (= 30h + (4-1) x 14h) because TASK4 is set this time. Besides, 100mm thickness is expressed as 05F5E100h in a hexadecimal number because 100 mm is 100,000,000nm.
Page 50
Section 3 Setting Value Obtaining and Changing Command Measurement Setting 2 (common to all TASKs) Unit No. Data No. Parameter Setting range/ output range Remarks Non-measurement 0: Keep settings 1: Clamp Output upon clamp 0: MAX 1: 20mA 2: 12mA...
Page 51
Monitor focus distance value 1 Monitor focus distance value 2 Monitor focus current value 1 Monitor focus current value 2 In addition, set outputs (current and voltage), which are set by the analog output switch in the controller. 3-25 ZS Series...
Page 52
Therefore, to send a command related to inputs, the external input mode should be set to “Parallel input OFF.” Once ON is written to the timing input, reset input, and LD-OFF input parameters, the ON state is kept until OFF is written next.
Section 3 Setting Value Obtaining and Changing Command Parameter List (ZS-DSU) Setting range/ output Unit No. Data No. Parameter Remarks range Source A Input CH 0: 1CH 1: 2CH Source B Input CH 2: 3CH Source C Input CH 3: 4CH...
Section 3 Setting Value Obtaining and Changing Command Unit No. Data No. Parameter Setting range/output range Remarks Obtained result A -999999999 to 999999999 (nm) Obtained result B Obtained result C Obtained result D Obtained result E Obtained result F Obtained result G...
Page 55
Section 3 Setting Value Obtaining and Changing Command Unit No. Data No. Parameter Setting range/output range Remarks Start trigger, I/O result, I/O 0: IN 0 selection 1: IN 1 2: IN 2 3: IN 3 4: OUT 0 5: OUT 1...
Page 56
0: COLUMN 1: ROW Line feed input 0: Ignored 1: Enabled * About label input and time setting The label input and time setting cannot be set or referred to. Judgment-related Unit No. Data No. Parameter Setting range/output range Remarks...
Section 4 How to Obtain Flow Data About Obtaining Flow Data Setting Procedures for Data Obtaining Conditions Setting Parameters Buffer Size and Buffer Interval Logging Data Type Flow Data Response 4-11 Format 4-11 Composition of Response 4-11 ZS Series CompoWay/F Communication Command Reference...
To handle the measurement data with external devices, it is necessary to obtain a large volume of data. The ZS series provides a system to handle measurement data as a bunch of any number of data items and to obtain data in units of bunches.
A measurement cycle changes from 112 microseconds to 142 microseconds upon setting the accumulation mode to ON when the ZS-LDC is used in the high speed mode. That is to say, the LDC itself as a single unit cannot obtain measurement data at every 112 microseconds via communications. To...
Page 60
Data No. 5 through 13 of Unit No. 124 (=7Ch). (*) The example here describes the case of ZS-MDC. In the case of ZS-LDC, Data No. 5 to 7 can be specified because only accumulate data areas from 1 to 3 exist.
Page 61
Setting Procedures for Data Obtaining Conditions Specify the buffer interval. A number of skips, which is referred to as a “buffer interval”, can be set to the controller upon data accumulation. Calculate and set an optimal value according to the sampling interval to be obtained.
Page 62
Setting Procedures for Data Obtaining Conditions Request and receive data. Setting is completed. All the data items are returned at once when the flow data request command is sent in the status above. Example: When sending a request command to the ZS-MDC (0ch), the...
Page 63
The “flow data overflow bit,” which is described in Section, “Data Composition of Flow Data” and other sections, is enabled when sending a command is delayed due to the delay of processing at the master side of the communication devices, such as a personal computer.
This section describes buffer size, buffer interval, and logging data. Buffer Size and Buffer Interval Buffer size of the measurement data to be accumulated in the ZS controller and its buffer interval can be changed. To change buffer size and buffer interval, change the parameters below: * Use DATAGET and DATASET commands to change and view the parameter.
Page 65
Accumulation of result of area 1 Accumulation of result of area 2 Accumulation of result of glass surface or glass thickness - When a mode other than the above is selected for the measurement object Unit No. Data No. Parameter...
Page 66
Accumulation data 8 12: Input H 13Dh Accumulation data 9 13: Input I Increasing the accumulation data lengthens the measurement cycle of the ZS controller. Check the "System - Information - Cycle" after setting. ZS Series 4-10 CompoWay/F Communication Command Reference...
Data section (4-byte) For details, refer to “Composition of Flow Data.” Response data of the flow data is composed by binary data for the purpose of giving top priority to speed. Therefore, response data may not be received by generic communication tools, such as hyper terminal.
Page 68
Channel No. of the data source Unit status (input) Indicates ON/OFF status of each input wire. (*2) • All the data items are 1 when no flow data is sent afterward (or always 1 upon single request). • FlowData stop bit...
Page 69
Original production Commands compatible with ZS-LDC (v2.000), ZS-MDC Oct. 2004 (v2.000), and ZS-DSU (v1.000) are added and matched. "Section 4 How to Obtain Flow Data" is added. Dec. 2004 • Commands and parameters compatible with ZS-DSU June 2004 (v2.000) are added.
Need help?
Do you have a question about the ZS and is the answer not in the manual?
Questions and answers