Table of Contents Revision History ..........................3 Software License Agreement (translation) ..................3 Introduction ............................4 3.1. Introduction ..........................4 3.2. Terms and Conditions Agreement ..................... 5 3.2.1. Warranty, Limitations of Liability ................... 5 3.2.2. Application Considerations ....................6 3.2.3. Disclaimers ..........................
Page 3
8.2. Structure Definitions of Data Classes ..................21 8.3. Interface of the Delegate Method ..................... 30 8.4. Propaty ............................30 Functions ............................31 9.1. List of Methods .......................... 31 9.1.1. Methods Relating to Class ....................31 9.1.2. Establishment and Disconnection of Communication Path to the Controller .... 31 9.1.3.
All title, ownership rights and intellectual property rights in and to the Software and any copies thereof remain the sole property of OMRON or its third party suppliers and shall not be assigned to the User under this Agreement.
INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT OR USE OF THE SOFTWARE. 8. OMRON shall have no liability for any claim of patent, trade secret or copyright infringement based on the use of the Software. 9. If the User breaches this Agreement, OMRON may terminate this Agreement upon notice to the User.
Omron’s exclusive warranty is that the Products will be free from defects in materials and workmanship for a period of twelve months from the date of sale by Omron (or such other period expressed in writing by Omron). Omron disclaims all other warranties, express or implied.
IN ANY WAY CONNECTED WITH THE PRODUCTS, WHETHER SUCH CLAIM IS BASED IN CONTRACT, WARRANTY, NEGLIGENCE OR STRICT LIABILITY. Further, in no event shall liability of Omron Companies exceed the individual price of the Product on which liability is asserted.
Performance Data ◼ Data presented in Omron Company websites, catalogs and other materials is provided as a guide for the user in determining suitability and does not constitute a warranty. It may represent the result of Omron’s test conditions, and the user must correlate it to actual application requirements. Actual performance is subject to the Omron’s Warranty and Limitations of Liability.
Confocal Fiber Type Displacement Sensor User's Manual (Z362-E1-01) 3.7. Copyrights and Trademarks •Sysmac is a trademark or registered trademark of OMRON corporation in Japan and other countries for our FA equipment products. • Windows, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows11 and Windows Embedded are registered trademarks of Microsoft Corporation in the USA and other countries.
Z362 Confocal Fiber Type Describes To learn how to set-up of Confocal Displacement Sensor set-up of Fiber ZW-8000/7000/5000 series User's Confocal Fiber Type Type Displacement Manual Displacement Sensor Sensor ZW-8000/7000/5000 of ZW- series. 7000/5000 series. Z363 Confocal Fiber Type Describes how to use To learn how to use Displacement Sensor communication...
2GB or more Main memory 4GB or more is recommended. Hard disk Free disk space of 1.6GB or more Communication port Ethernet port Supported languages Japanese, English *1: DLL Software Ver.3.001 operates identically to DLL Software Ver.3.000. 4.1.1. Runtime Environment Here is the environment that is necessary to run an application that makes use of the ZW-8000/7000/5000 series communication library.
5. File Composition 5.1. Windows DSComm.dll DLL body Source Source is a folder of sample source by C#. Sample Sample is a folder of sample software(.exe). Document is a folder. Document Documents related sample program cleated by C# is stored. 5.2.
Step3 6.2.2. Swift 6.2.2.1. Reference In the reference settings on the project, select "DisplacementSensorSDK(DSComm.dll)." Select “General” – “Embedded Binaries” , and add “DSComm.framework”. Step.1 Select...
Page 15
Step.2 Add DSComm.framework And check the check box Select Step.3 Confirm DSComm is added...
7. Datatype This document is based on the assumption that the datatype of the variables are defined as follows: 7.1. Windows bool Boolean value (true or false) byte Unsigned 8bit integer short Signed 16bit integer ushort Unsigned 16bit integer Signed 32bit integer uint Unsigned 32bit integer string...
8. Structure Definitions of Constants and Data Classes 8.1. Constant Definitions Name Version number specification enum Version { Definition ZW2, (Windows) enum Version: Int32 { Definition case ZW2 // ZW2 (MacOS) Description Used for specifying the corresponding version in creating an instance of DSComm. Remark ―...
Page 18
B5 = 4, // BANK 5 B6 = 5, // BANK 6 B7 = 6, // BANK 7 B8 = 7, // BANK 8 B9 = 8, // BANK 9 B10 = 9, // BANK 10 B11 = 10, // BANK 11 B12 = 11, // BANK 12 B13 = 12,...
Page 19
case B9 = 8, // BANK 9 case B10 = 9, // BANK 10 case B11 = 10, // BANK 11 case B12 = 11, // BANK 12 case B13 = 12, // BANK 13 case B14 = 13, // BANK 14 case B15 = 14, // BANK 15 case B16 = 15,...
Page 20
Name Flag specification enum Flag { Definition OFF = 0, // OFF (Windows) ON = 1, // ON enum Flag: Int32 { Definition case OFF = 0, // OFF (MacOS) case ON = 1, // ON Description Used for control by ON/OFF. Remark ―...
Page 21
Name Output data specification enum Out { O1 = 0, // OUT 1 Definition O2 = 1, // OUT 2 (Windows) O3 = 2, // OUT 3 O4 = 3, // OUT 4 enum Out: Int32 { case O1 = 0, // OUT 1 Definition case O2 = 1, // OUT 2 (MacOS)
8.2. Structure Definitions of Data Classes Name Measured waveform information class MeasureWaveData { ushort BankNo; // Bank number byte AreaMode; // 2 area mode ushort AreaNo; // Area number int RecivedLight1; // Amount of received light (1st surface in Area1) int RecivedLight2;...
Page 23
int AbsoluteDistance; // Distance int Task1Result; // Measurement result of TASK1 (nm) int Task2Result; // Measurement result of TASK2 (nm) int Task3Result; // Measurement result of TASK3 (nm) int Task4Result; // Measurement result of TASK4 (nm) int Task1Resolution; // Resolution of TASK1 int Task2Resolution;...
Page 27
RecivedLight2:Int32 // Amount of received light (2nd surface in Area1) RecivedLight3:Int32 // Amount of received light (3rd surface in Area1) RecivedLight4:Int32 // Amount of received light (4th surface in Area1) MeasurementValuePIX1:Uint16 // Measurement value (1st surface in Area1) (PIX) MeasurementValuePIX2:Uint16 // Measurement value (2nd surface in Area1) (PIX) MeasurementValuePIX3:Uint16...
Page 28
Task1UpperLimitValue:Int32 // Upper limit of TASK1 Task2UpperLimitValue:Int32 // Upper limit of TASK2 Task3UpperLimitValue:Int32 // Upper limit of TASK3 Task4UpperLimitValue:Int32 // Upper limit of TASK4 Task1LowerLimitValue:Int32 // Lower limit of TASK1 Task2LowerLimitValue:Int32 // Lower limit of TASK2 Task3LowerLimitValue:Int32 // Lower limit of TASK3 Task4LowerLimitValue:Int32 // Lower limit of TASK4 ErrorNo:Uint8...
Page 29
Name Flow data class FlowData { uint OutNo; // OUT number bool Timing; // Parallel input:TIMING bool Reset; // Parallel input:RESET bool LEDOff; // Parallel input:LEDOFF bool Zero; // Parallel input:ZERO bool Logging; // Parallel input:LOGGING bool Sync; // Parallel input:SYNC bool Busy;...
Page 30
LogErr:Bool // Parallel output:LOGERR SyncFlg:Bool // Parallel output:SYNCFLG Stability:Bool // Parallel output:STABILITY BufferErr:Bool // Overflow the high-speed data communication bit FlowStop:Bool // Stop the high-speed data communication MeasureData:Int32 // Measurement data Description Information relating to flow data. Measurement data The unit of measurement data depends on the value of the decimal point information (DecimalInfo).
8.3. Interface of the Delegate Method Format(Windows) void DisConnectDelegate() protocol DisConnectDelegate { Format(MacOS) func DisConnectDelegate () Parameters None Return values ― Description Method to be called when the communication to the Sensor Controller is disconnected. Supported ZW-8000/7000/5000 series and ver2.00, or later version Format(Windows) void LoggingDataDelegate(List<FlowData>...
9. Functions 9.1. List of Methods 9.1.1. Methods Relating to Class Even if the Sensor Controller is in the system error state, the processing is performed normally. Method name General description DSComm Constructor Dispose Destruction of an object 9.1.2. Establishment and Disconnection of Communication Path to the Controller Even if the Sensor Controller is in the system error state, the processing is performed normally.
9.1.4. Measurement Control If the Sensor Controller is in the system error state, the processing fails. Method name General description ZeroReset To issue the zero reset Timing To issue the timing Reset To issue the reset ClearMemory To initialize the internal memory TurnLight To turn off or light up the measurement light CalibrationSensor...
9.1.7. Related to Internal Logging Function If the Sensor Controller is in the system error state, the processing fails. Method name General description StartStorage To start Internal logging StopStorage To stop Internal logging GetStorageStatus To obtain the status of Internal logging GetStorageData To obtain the measured value after Internal logging 9.1.8.
9.2. Method Reference 9.2.1. Handling Relating to Class All the return values of the functions in which an error can occur are of the integer type. In a normal state, 0 (OK) is returned. The return code is represented as a common error code. For the return codes common to functions, refer to Section 9.1 Common Error Codes.
Page 36
9.2.2. Establishment and Disconnection of Communication Path to the Sensor Controller ◼ ◼ Ethernet communication Format(Windows int Open(byte[] ipAddress, DisConnectDelegate method) Format(MacOS) func Open(ipAddress: [UInt8]) -> Int32 ipAddress (in) Specify the IP address of the destination. Set it on each octet. <Windows>...
version ◼ Disconnection of communication path Format int Close() (Windows) Format func Close() -> Int32 (MacOS) Parameters ― Return values ERR_APPLICATION Disconnects the connection of Ethernet. Description A call with no connection established does not result in an error. Supported ZW-8000/7000/5000 series and ver2.00, or later version 9.2.3.
Page 38
◼ Return to factory default Format int RetrunToFactorySetting() (Windows) Format func ReturnToFactorySetting() -> Int32 (MacOS) Parameters ― ERR_COMMUNICATION Return values ERR_PARAM ERR_TIME_OUT ERR_APPLICATION Description Returns all the settings of the Sensor Controller to the factory default. Supported ZW-8000/7000/5000 series and ver2.00, or later version...
Page 39
◼ Acquisition of version Format int GetSoftwareVersion(out string version) (Windows) Format func GetSoftwareVersion(version: inout String) -> Int32 (MacOS) version (out) Version information of the Sensor Controller (8bytes) Parameters “ ” ERR_COMMUNICATION Return values ERR_PARAM ERR_TIME_OUT ERR_APPLICATION Description Obtains the full name of the version. Supported ZW-8000/7000/5000 series and ver2.00, or later version...
Page 40
◼ Acquisition of Sensor Controller name Format int GetSensorName(out string sensorName) (Windows) Format func GetSensorName(sensorName: inout String) -> Int32 (MacOS) sensorName (out) Name of the displacement sensor (up to 32bytes) Parameters “ ” ERR_COMMUNICATION Return values ERR_PARAM ERR_TIME_OUT ERR_APPLICATION Description Obtains the Sensor Controller name.
◼ Acquisition of system error number Format int GetError(out ushort systemErrorNum) (Windows) Format func GetError(systemErrorNum: inout UInt16) -> Int32 (MacOS) systemErrorNum (out) Parameters System error number ERR_COMMUNICATION ERR_PARAM Return values ERR_TIME_OUT ERR_RUN_MODE ERR_APPLICATION Description Obtains the system error number of the Sensor Controller. Supported ZW-8000/7000/5000 series and ver2.00, or later version...
Page 42
■ Timing issue Format int Timing(Flag flag) (Windows) Format func Timing(flag: Flag) -> Int32 (MacOS) flag (in) Parameters ON: Timing ON request, OFF: OFF request ERR_COMMUNICATION ERR_PARAM Return values ERR_TIME_OUT ERR_RUN_MODE ERR_APPLICATION Description Issues a timing request. Supported ZW-8000/7000/5000 series and ver2.00, or later version ◼...
Page 43
◼ Internal memory clear Format int ClearMemory() (Windows) Format func ClearMemory() -> Int32 (MacOS) Parameters ― ERR_COMMUNICATION ERR_PARAM Return values ERR_TIME_OUT ERR_RUN_MODE ERR_APPLICATION Description Initializes the internal memory. Supported ZW-8000/7000/5000 series and ver2.00, or later version ◼ Measurement light illumination Format int TurnLight(Flag flag) (Windows)
◼ Sensor head calibration Format int CalibrateSensor() (Windows) Format func CalibrateSensor() -> Int32 (MacOS) Parameters ― ERR_COMMUNICATION ERR_PARAM Return values ERR_TIME_OUT ERR_RUN_MODE ERR_APPLICATION Description Calibrates the sensor head by measurement sensing. Supported ZW-8000/7000/5000 series and ver2.00, or later version 9.2.5. Related to Setting Change and Read Processing ◼...
Page 45
◼ Transmission of system data setting value Format int SetSystemData(int dataNo, int value) (Windows) Format func SetSystemData(dataNo: Int32, value: Int32) -> Int32 (MacOS) dataNo (in) Data number Parameters value (in) Value to be reflected ERR_COMMUNICATION ERR_PARAM Return values ERR_TIME_OUT ERR_RUN_MODE ERR_APPLICATION Sends the setting value to the specified item of the system data.
Page 46
Description Obtains the specified item of bank data from the Sensor Controller. Supported ZW-8000/7000/5000 series and ver2.00, or later version ◼ Transmission of bank data setting value Format int SetBankData(int unitNo, int dataNo, int value) (Windows) Format func SetBankData(unitNo: Int32, dataNo: Int32, value: Int32) -> Int32 (MacOS) unitNo (in) Unit number...
Page 47
ERR_PARAM ERR_TIME_OUT ERR_RUN_MODE ERR_APPLICATION Description To get all bank data and system data at once. Supported ZW-8000/7000/5000 series and ver2.00, or later version ◼ Transmission of all bank data and system data Format int SetBackupData(byte[] binaryData) (Windows) Format func SetBackupData(binaryData: [UInt8]) -> Int32 (MacOS) binaryData (in) Parameters...
Page 48
◼ Set value initialization Format int InitializeSetting() (Windows) Format func InitializeSetting() -> Int32 (MacOS) Parameters ― ERR_COMMUNICATION ERR_PARAM Return values ERR_TIME_OUT ERR_RUN_MODE ERR_APPLICATION Description Initializes all the settings. Supported ZW-8000/7000/5000 series and ver2.00, or later version ◼ Current bank initialization Format int InitializeCurrentBankSetting() (Windows)
Page 49
◼ Set value save Format int SaveSettings() (Windows) Format func SaveSettings() -> Int32 (MacOS) Parameters ― ERR_COMMUNICATION ERR_PARAM Return values ERR_TIME_OUT ERR_RUN_MODE ERR_APPLICATION Description Saves all the settings to the internal memory. Supported ZW-8000/7000/5000 series and ver2.00, or later version ◼...
Page 50
◼ Active bank acquisition Format int GetActiveBank(out Bank bankNo) (Windows) Format func GetActiveBank(srcBankNo: inout Bank) -> Int32 (MacOS) bankNo (out) Parameters Valid bank number ERR_COMMUNICATION ERR_PARAM Return values ERR_TIME_OUT ERR_RUN_MODE ERR_APPLICATION Description Obtains the valid bank number. Supported ZW-8000/7000/5000 series and ver2.00, or later version ◼...
9.2.6. Acquisition of Measurement Results ◼ Acquisition of measurement values Format int GetMeasurementValue(Task task, out int[] measureValue) (Windows) Format func GetMeasurementValue(task: Task, measureValue: inout [Int32]) -> Int32 (MacOS) task (in) Task number for the measurement results to be obtained Valid values: T1 to T4, ALL measureValue (out) Including unmeasured tasks, the data of four tasks is stored.
Page 52
Acquisition of measured waveform Format int GetMeasureWaveData(Area area, out MeasureWaveData waveData) (Windows) Format func GetMeasureWaveData(area: Area, waveData: inout MeasureWaveData) -> Int32 (MacOS) area (in) Area where the acquisition is performed Parameters waveData (out) Data of the measured waveform ERR_COMMUNICATION ERR_PARAM Return values ERR_TIME_OUT ERR_RUN_MODE...
Page 53
For ZW-8000 When called this function under connected the ZW-7000/5000, it will be returned “ERR_NONCOMPLIANT_METHODS” Supported version ◼ Acquisition of judgement results Format int GetJudgementValue(Task task, out int[] judgementValue) (Windows) Format func GetJudgementValue(task: Task, judgementValue: inout [Int32]) -> Int32 (MacOS) task (in) Task number for the judgement results to be obtained Valid values: T1 to T4, ALL...
Page 54
◼ Acquisition of received light waveform Format (Windows) int GetRawImageData(Area area, out MeasureWaveData waveData) Format (MacOS) func GetMeasureWaveData(area: Area, waveData: inout MeasureWaveData) -> Int32 area (in) Area where the acquisition is performed Parameters waveData (out) Data of the received light waveform ERR_COMMUNICATION ERR_PARAM Return values...
9.2.7. Related to Internal Logging ◼ Start internal logging Format int StartStorage(int cycle, int count) (Windows) Format func StartStorage(cycle: Int32, count: Int32, clear: Bool = true) -> Int32 (MacOS) cycle (in) Period in which logging data is saved Valid values: 1 to 1000 Parameters count (in) Maximum number of logging...
Page 56
Obtains the internal logging information. The operating status and the number of saved Description logging data are obtained. Supported ZW-8000/7000/5000 series and ver2.00, or later version Format int GetStorageStatus(out int status, out int count, out int labelCount) (Windows) Format func GetStorageStatus(status: inout Int32, count: inout Int32, labelCount: inout Int32) -> Int32 (MacOS) status (out) The operating status of logging (0: Stop, 1: In operation) is returned.
Page 57
The number of label is returned. ERR_COMMUNICATION ERR_PARAM Return values ERR_TIME_OUT ERR_RUN_MODE ERR_APPLICATION Obtains the internal logging information. The operating status and the number of saved Description logging data and label are obtained. Supported ZW-8000/7000/5000 series and ver2.10, or later version ◼...
Page 58
◼ Acquisition of internal logging Format int GetStorageData(Out outNo, out int[] data) (Windows) Format func GetStorageData(outNo: Out, data: inout [Int32]) -> Int32 (MacOS) outNo (in) Output data number for the internal logging data to be obtained Valid values: O1 to O4 data (out) Parameters The internal logging data corresponding to an output data number specified at "outNo"...
Page 59
ERR_COMMUNICATION ERR_PARAM ERR_TIME_OUT ERR_RUN_MODE ERR_APPLICATION Description Obtains the internal logging data of all label. Supported ZW-8000/7000/5000 series and ver2.10, or later version Format int GetStorageData(Out outNo, int labelNo, out int[] data) (Windows) Format func GetStorageData(outNo: Out, labelNo: Int32, data: inout [Int32]) -> Int32 (MacOS) outNo (in) Output data number for the internal logging data to be obtained...
9.2.8. Related to High-Speed Data Communication ◼ Preparation for the start of the high-speed data communication Format int PreStartHighSpeedDataCommunication(bool[] logCtrlFlag, int thinningNum, int (Windows) saveNum) Format func PreStartHighSpeedDataCommunication(logCtrlFlag: inout [Bool], thinningNum: Int32, (MacOS) saveNum: Int32) -> Int32 logCtrlFlag (in) True: Target of high-speed output false: Extension of high-speed output Array size: 4 Indexes of the array...
Page 61
◼ High-speed data communication start Format int StartHighSpeedDataCommunication(LoggingDataDelegate method) (Windows) Format func StartHighSpeedDataCommunication(method: LoggingDataDelegate) -> Int32 (MacOS) method Flow data acquisition delegate method Parameters delegate void LoggingDataDelegate(List<FlowData> flowDataList) flowDataList: Flow data for each task ERR_COMMUNICATION ERR_PARAM Return values ERR_TIME_OUT ERR_RUN_MODE ERR_APPLICATION Starts the high-speed data communication.
Page 62
◼ High-speed data communication start (single) Format int SingleHighSpeedDataCommunication(out List<FlowData> flowDataList) flowDataList (out) Parameters Flow data for each task ERR_COMMUNICATION ERR_PARAM Return values ERR_TIME_OUT ERR_RUN_MODE ERR_APPLICATION Starts the high-speed data communication (single). Description Upon completion of the measurement for the set number of sampling, the communication stops.
10. Common Codes 10.1. Common Error Codes The return values of the IF functions described in "Chapter 8 Functions" are defined as follows: Definition name Data Cause 0x00000000 Successful completion ERR_PARAM 0x01080610 An error in the set parameters ERR_RUN_MODE 0x01FF2204 An error in the operation mode ERR_COMMUNICATION 0x02110100...
Appendices 11.1. List of System Data Data Minimum Maximum Unit Note Bank number 0: 1 area mode 2 area mode 1: 2 area mode 0: waveform (area0) Area number 1: waveform (area1) Amount of received 4096 Gradation light (1st surface in Area1) 4096 Gradation Amount of received...
Page 65
Mask area (end) Graph axis of 255*256 pixel (1/256)[pixel /div] coordinate 1 255*256 pixel (1/256)[pixel /div] Graph axis of coordinate 2 Graph axis of 255*256 pixel (1/256)[pixel/div] coordinate 3 Graph axis of 255*256 pixel (1/256)[pixel /div] coordinate 4 255*256 pixel (1/256)[pixel /div] Graph axis of coordinate 5...
Page 66
Upper limit of TASK2 -999999999 999999999 Upper limit of TASK3 -999999999 999999999 -999999999 Upper limit of TASK4 999999999 -999999999 Lower limit of TASK1 999999999 -999999999 Lower limit of TASK2 999999999 Lower limit of TASK3 -999999999 999999999 Lower limit of TASK4 -999999999 999999999 Error Information...
11.2. Flow Data Data Minimum Maximum Unit Note 0: OUT1 information OUT number 1: OUT2 information 2: OUT3 information 3: OUT4 information 0: TIMING input OFF TIMING input 1: TIMING input ON 0: RESET input OFF RESET input 1: RESET input ON LIGHTOFF input 0: LIGHT input OFF 1: LIGHT input ON...
Page 68
1: STABLTY output ON Overflow the 0: No data communication high-speed data 1: data communication <Note> communication When the data communication bit(BUFFER_ERR) occurs, number of saved data at the preparation of high-seed data communication may be overflowed. Stop the high-speed 0: ENABLES output OF data communication 1: ENABLES output ON...
Sample Program Describes the sample program which attached an example of application creation using communication library. 12.1. User Interface Specification 12.1.1. Window to Enter the IP Address Enter the IP address of ZW-8000/7000/5000 series Sensor Controller to communicate. ・Pane Layout ・Function Item Describe...
12.1.2. Main Pane ・Function Item Description Monitor of Received light waveform Displays the received light waveform. Measurement monitor Displays the selected measurement data. Average count (TASK1) Set the average count of TASK1. Measurement cycle [μs] Displays the Measurement cycle of setting item. Control of Internal logging Control the internal logging.
Need help?
Do you have a question about the Sysmac ZW-8000 Series and is the answer not in the manual?
Questions and answers