Omron SYSMAC FH Series User Manual

Omron SYSMAC FH Series User Manual

Vision sensor vision system
Hide thumbs Also See for SYSMAC FH Series:
Table of Contents

Advertisement

Quick Links

Vision Sensor
FH/FZ5 Series
Vision System
User's Manual
FH-1@@@
FH-3@@@
FZ5-L35@
FZ5-6@@
FZ5-11@@
Z340-E1-07
WWW.NNC.IR

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SYSMAC FH Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Omron SYSMAC FH Series

  • Page 1 Vision Sensor FH/FZ5 Series Vision System User’s Manual FH-1@@@ FH-3@@@ FZ5-L35@ FZ5-6@@ FZ5-11@@ Z340-E1-07 WWW.NNC.IR...
  • Page 2 IJG Code is copyright (C) 1991, 2011, Thomas G. Lane, Guido Vollbeding. This software is based in part on the work of the Independent JPEG Group. • Sysmac and SYSMAC are trademarks or registered trademarks of OMRON Corporation in Japan and other countries for OMRON factory automation products.
  • Page 3: Fh/Fz5 Manual Configuration

    The symbols used in this manual have the following meanings. Indicates relevant operational precautions that must be followed. IMPORTANT Indicates operation-related suggestions from OMRON. Note Use of Quotation Marks and Brackets In this manual, menus and other items are indicated as follows.
  • Page 4: Definitions Of Basic Terms

    Definitions of Basic Terms Term Definition measurement flow A continuous flow of measurement processing. A measurement flow consists of a scene (abbreviated as “flow”) created from a combination of processing items. measurement processing Executing processing items for inspections and measurements. Any of the individual items for vision inspections that are partitioned and packaged so that they can be flexibly combined.
  • Page 5 Term Definition Single-line A high-speed mode that processes the measurement flow for the first trigger and then High-speed processes the measurement flow in parallel for the second trigger to achieve a high-speed Mode trigger input interval. It is used together with the multi-input function. A trigger mode that allows you to independently processing multiple measurement flows.
  • Page 6 Term Definition When the location and direction of measured objects are not fixed, the positional deviation between reference position and current position is calculated and measurement is performed after correcting. Please select processing items that are appropriate to the measurement object from processing items that are related to position compensation.
  • Page 7 Term Definition Binary numbers are generally used to represent negative numbers. Negative numbers are expressed by "Inverting all bits of a positive number and adding 1 to the result". (Example) "−1" is expressed as 2's complement "−1" can be calculated by "0-1". (In the case of 1, minus 1) 00000000 (= 0) −...
  • Page 8 Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 9: Table Of Contents

    Contents FH/FZ5 Manual Configuration ......................1 Conventions Used in This Manual ......................1 Definitions of Basic Terms ........................2 Terms and Conditions Agreement ...................... 13 Meanings of Signal Words ........................15 Precautions for Safe Use ........................17 Precautions for Correct Use ....................... 18 1.
  • Page 10 3. Performing Test Measurement/Starting Operation ..............67 Adjustment Windows and Run Windows ....................68 Main Window (Layout 0): Adjustment Window (Default) ..............68 Main Window (Layout 1): Run Window (Default) ................69 Main Window (Layout 1): Changing to the Run Window ..............69 Main Window (Layout 1): Changing to the Adjustment Window ............
  • Page 11 4. Using Tools ..........................131 Using NG Analyzer ..........................132 Layout of NG Analyzer Window ......................133 Using Method of NG Analyzer ......................134 Updating the Reference Position ......................137 Using the User Data Tool ........................138 Setting Procedure for User Data ....................... 138 Creating Scene Group Data for More Than 128 Scenes ...............
  • Page 12 6. Saving and Loading Data ......................253 Saving Data to the FH/FZ5 ........................254 About Saving Areas .......................... 254 External Drive Names ........................255 Using External Memory Devices (FH and FZ5-11 Only) ............256 Shared folder on a computer connected to the network ..............256 Saving Settings Data to the Flash Memory and Restarting ..............
  • Page 13 8. Appendices ..........................301 Alignment ............................... 302 Overview ............................302 Execution of Calibration ........................305 Troubleshooting ..........................311 Alignment ............................312 Alignment Processing Items ......................319 Macro Reference ........................... 320 Error List ............................320 List of Reserved Words ........................322 System Data List ..........................327 List of I/O Modules ..........................
  • Page 14 MEMO Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 15: Terms And Conditions Agreement

    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.
  • Page 16 Disclaimers 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.
  • Page 17: Meanings Of Signal Words

    Meanings of Signal Words ● Symbols and the meanings for safety precautions described in this manual. In order for the product to be used safely, the following indications are used in this book to draw your attention to the cautions. The cautions with the indications describe the important contents for safety. Indicates a potentially hazardous situation which, if not avoided, will result in minor or moderate injury, or may result in serious injury or death.
  • Page 18 ● Alert statements in this Manual The following alert statements apply to the products in this manual. Each alert statement also appears at the locations needed in this manual to attact your attention. WARNING This product must be used according to the instruction manual. Failure to observe this may result in impairment of functions and performance of the product This product is not designed or rated for ensuring safety of persons.
  • Page 19: Precautions For Safe Use

    • Do not attempt to dismantle, repair, or modify the product. • Should you notice any abnormalities, immediately stop use, turn OFF the power supply, and contact your OMRON representative. • The FH Sensor Controller and camera case are hot while power is supplied or directly after the controller is turned off.
  • Page 20: Precautions For Correct Use

    • Do not drop, impose excessive vibration or shock on the product. Doing so may result in malfunction or burning. • Since a lithium battery is incorporated, there is a rare case when you are seriously injured due to firing or blowout.
  • Page 21 ● Maintenance • Turn OFF the power and take safety precautions before conducting inspections. Electrical shock can result from attempting safety inspections with the power turned ON. • Clean the lens with a lens-cleaning cloth or air brush. • Lightly wipe off dirt with a soft cloth. •...
  • Page 22 MEMO Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 23: Before Operation

    Before Operation This section describes the basic flow and preparations that are necessary to start operation. Overview................22 Flow of Application ............25 Windows................27 Checking the System Configuration........ 38 Saving Settings before Turning OFF the Power and Restarting................43 Initializing the Controller ..........
  • Page 24: Overview

    Overview Basic Mechanism for Measurements An FH/FZ5-series Sensor Controller uses pre-built packages that contain all the processing tasks (for image input, measurement processing, displays, outputs, etc.) that are required for vision inspections. You arrange these packaged processes in order of execution of the vision inspection. An FH/FZ5-series Controller executes vision inspections according to user-created flows.
  • Page 25: Support For A Variety Of Scenes And Measurement Lines

    Support for a Variety of Scenes and Measurement Lines You can have more than one setting for a measurement flow, depending on the inspections. This is called a scene and you can set up to 128 scenes. (Reference: What Is a Scene? (p.48)) You can also combine more than one scene into a scene group.
  • Page 26 If you have more than one measurement line, the FH allows you to selectively execute up to eight measurement lines. This allows you to maintain settings for the scenes and scene groups for every line from 0 to 7. You can connect up to eight Cameras to the FH, (four for the FZ5), and selectively control each Camera. (Reference: Multi-line Random-trigger Mode (p.273)) FH Controller...
  • Page 27: Flow Of Application

    Flow of Application The following table shows the flow for using the FH/FZ5. Procedure Description Reference FH Instruction Manual Installation and Wiring FZ5 Instruction Manual ↓ FH Instruction Manual Turning ON Power FZ5 Instruction Manual ↓ Reference: Selecting the Language Selection in Dialog Box (only when the Sensor Controller is Language: [Language started for the first time) Setting] (p.292)
  • Page 28 Procedure Description Reference ↓ In the Main Window (layout 0), edit the measurement flow. Reference: Setting Scenes • Register processing items. (Measurement Flows) (p.47) • Set the properties for each processing item. ↓ Reference: Saving Settings before Turning OFF Scene Editing the Power and Restarting (p.43) Click the [Data save] button.
  • Page 29: Windows

    Windows Types of Windows There are 9 windows (with layout numbers 0 to 8) that you can use to set and operate an FH/FZ5. Layout Application Layout 0 is the adjustment window by default. Layout 0 (Reference: Main Window (Layout 0): Adjustment Window (Default) (p.68)) Layout 1 is a run window by default.
  • Page 30: Overview Of Window Navigation

    Overview of Window Navigation Startup Startup Layout* Layout Layout switching switching Layouts 2 to 7 Layout 0 Layout 1 (You can create these (default: (default: run window) windows in Layout adjustment window) Modification Mode) Flow Editing Unit Setting Mode Properties Dialog Box Edit Flow Window (Reference: (Reference:...
  • Page 31: Main Window (Layout 0): Adjustment Window (Default)

    Main Window (Layout 0): Adjustment Window (Default) You use this window to set up a measurement process and perform test measurements to confirm whether the measurements are processed as intended. Based on the results of the test measurement, move to the property settings for each processing unit and make adjustments.
  • Page 32 2. Information Pane • Layout: The number of the currently display layout is displayed. • Processing time: The time required for the measurement process is displayed. • Scene group name and scene name: The scene group number and the scene number of the currently displayed scene are displayed. 3.
  • Page 33 5. Image Pane This pane shows the measured image. It also displays the selected processing unit name or the [Define displayed unit]. • Click on the left side of the processing unit name to display the Properties Dialog Box for the Image Pane.
  • Page 34 Edit Flow Window The edit flow window is used to create measurement flows. You use the edit buttons to arrange processing units in a scene, or to add or delete units. The right side shows the processing items that can be used as parts in the measurement flow. The left side shows the scene as the measurement flow.
  • Page 35 6. Processing Items Tree This area allows you to select an item to add to the flow. The items are displayed in tree format that is organized by type. Click the [+] button for each item to display the lower level items. Click the [-] button for each item to hide the lower level items.
  • Page 36 Properties Dialog Box This dialog box is used to set measurement parameters, judgement conditions, and other conditions for processing items that are registered as processing units in the measurement flow. 3. Image Display Area 1. Item Tab Area 2. Detail Area 4.
  • Page 37: Main Window (Layout 1): Run Window (Default)

    Main Window (Layout 1): Run Window (Default) This window is used to perform actual measurements. The measurement results are output through the communications interfaces. If the Controller is ready to perform measurements, the RUN signal turns ON. When this window is displayed, the FH/FZ5 is ready to perform measurements. If a measurement trigger is input from an external device, the FH/FZ5 begins execution of measurement processing according to the contents and sequence that is set in the measurement flow.
  • Page 38: Menu List

    Menu List The menu for the Main Window is described below. Main menu Command Description Reference Exits the FH/FZ5 System. File After you exit the system, restart the system or turn OFF the power supply. Reference: Executing Executes a test measurement (single or continuous Test Measurements (p.74) Measure measurement), or a re-measurement.
  • Page 39 Main menu Command Description Reference Transfers (copies) the settings for line 0 to line 1, and Transfer data then changes to the Non-stop Adjustment Mode. Reference: Non-stop Adjustment Mode (p.279) Transfers (copies) the settings for line 1 to line 0 in Non- Non-stop data transfer stop Adjustment Mode without affecting measurements.
  • Page 40: Checking The System Configuration

    Checking the System Configuration System Configuration The FH/FZ5 is a Vision Sensor that uses a controller to process measurements of objects that are imaged with a Camera. You connect an LCD for operations and monitoring, and various Cameras to the FH/FZ5-series Sensor Controller.
  • Page 41: Basic Configuration Models

    Basic Configuration Models FH Basic Configuration * Items indicated with an asterisk are dedicated items, and cannot be substituted. Sensor controller Camera cable The Controller performs the image processing specified by Camera cable the user settings and outputs the measurement results. FZ-VS (2m, 5m,10m, min.
  • Page 42 FZ-SFC/FZ-SF/ FZ-MEM2G FZ-SPC/FZ-SP/ FZ-MEM8G FZ-SHC/FZ-SH Intelligent compact camera Power Supply FZ-SQ010F/FZ-SQ050F/ Recommended Model FZ-SQ100F/FZ-SQ100N By OMRON Corporation Intelligent camera S8VS-12024 (FZ5-L35 ) FZ-SLC15/FZ-SLC100 S8VS-18024 (FZ5-L35 -10) Automatic focus camera FZ-SZC15/FZ-SZC100 Input Device Mouse, track ball (Commercially available USB devices) Camera with Lighting...
  • Page 43 FZ-VSL2 (15m min. bending radius: 93mm) Camera Detects workpieces as images. Touch pen (standard accessory) Standalone camera FZ-SC/FZ-S/ FZ-SC2M/FZ-S2M/ Power Supply Peripheral Device FZ-SFC/FZ-SF/ FZ-SPC/FZ-SP/ Recommended Model by OMRON: USB memory FZ-SHC/FZ-SH S8VS-18024 FZ-MEM2G FZ-SC5M2/FZ-S5M2 FZ-MEM8G Intelligent compact camera FZ-SQ010F/FZ-SQ050F/ FZ-SQ100F/FZ-SQ100N Power Supply...
  • Page 44: Functional Comparison Between The Fh-Series And Fz5-Series Controllers

    Functional Comparison between the FH-series and FZ5-series Controllers The following table shows the differences between the FH and FZ5. Controller model FH Series FZ5 Series FZ5-L35 -10 FZ5-L35 Function FH- 050-20 FH- 050-10 FH- 050 FZ5-11 -10 FZ5-11 FZ5-6 FZ5-6 Number of Camera connections Operation mode...
  • Page 45: Saving Settings Before Turning Off The Power And Restarting

    Saving Settings before Turning OFF the Power and Restarting Before you turn OFF the power supply to the Controller, save the data that you have set to the flash memory in the Controller. The settings data in the flash memory of the Controller are loaded everytime the Controller is restarted, so make sure to use the [Data save] command to save the settings data to the flash memory in the Controller.
  • Page 46: Turning Off The Lcd

    Turning OFF the LCD (This function is supported only by the FZ5-600/1100-series LCD-integrated Controllers.) You can turn OFF the LCD without turning OFF the Controller. Click the [LCD off] button that is located on the Measurement Manager Bar in the lower right corner of the window.
  • Page 47: Initializing The Controller

    Initializing the Controller You can restore all settings in the Controller to their default settings. Initializing the Controller: [System initialization] You can restore the Controller to the default settings. Before you initialize the Controller, back up any required data, such as scene data and system data. Reference: Saving and Loading Data (p.253) Select [System initialization] from the [Function] menu.
  • Page 48 MEMO Initializing the Controller Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 49: Setting Scenes (Measurement Flows)

    Setting Scenes (Measurement Flows) A measurement flow consist of a series of combined processing items and is called a scene. This section explains how to create and edit scenes. What Is a Scene? ............... 48 What Is a Scene Group? ........... 51 Creating a Scene ...............
  • Page 50: What Is A Scene

    What Is a Scene? Processing items for use with various measurement objects and measurement objectives are provided in the Sensor Controller. By combining and executing these processing items, measurement adapted to the purpose can be implemented. A combination of processing items is called a scene. Scenes can be easily created by combining processing items that are suited to the measurement purpose from the list of processing items that are provided.
  • Page 51: Example Of A Scene

    Example of a Scene The processing items registered to a scene are called processing units. In the edit flow window where you create scenes, select the processing items required for measurement and add them to the flow. The number at the top of the processing unit is called the unit number.
  • Page 52 Example: Adding Position Compensation for Two Measurement Objects in the Same Field of View START Visual Representation Capture image from Camera. Identify the shape. Perform position compensation for measurement object (1). Check for defects in measure- ment object (1). Return the image that was moved with the Position Compensation processing item to its original position.
  • Page 53: What Is A Scene Group

    What Is a Scene Group? A scene group is a collection of up to 128 separate scenes. Creating scene groups is convenient to increase the number of scenes and to manage scenes according to categories. For the FZ5-L3 or FZ5-6 , a USB memory is required to create scene groups.
  • Page 54: Creating A Scene

    Creating a Scene This section explains how to add processing units to a scene. In the Main Window (layout 0), display the scene to edit. Reference: Changing the Scene or Scene Group (p.60) Click the [Edit flow] button. The edit flow window is displayed. Select the processing item to add from the processing item tree.
  • Page 55: Editing Processing Units In Scenes

    Editing Processing Units in Scenes You use the edit buttons in the edit flow window to arrange processing units in a scene, or to delete processing units. • Searching for a Processing Unit ( Searches the measurement flow for the processing item that is selected in the processing item tree. •...
  • Page 56 • Renaming Processing Units ( Renames a processing unit in the scene. Unit names must begin with a character other than ° (semi- voiced sound symbol) and “ (voiced sound symbol). Also, unit names cannot consist of only a single-byte number, only a "+", or only a ".".
  • Page 57 Note • If a processing unit is inserted, the numbers for the subsequent processing units increase by one. With processing items related to results output or branch control, the numbers for processing units set as references also automatically increase by one. •...
  • Page 58: Displaying And Checking Processing Branches In A Scene

    Displaying and Checking Processing Branches in a Scene To see how a branch affects the processing flow after you edit a scene in the edit flow window, start the Flow Viewer. Select [Flow Viewer] from the [Tool] menu. Overview The Flow Viewer shows the flow of processing for the measurement flow that is currently being edited. This makes it easy to understand the relationship of branches and folders in the measurement flow.
  • Page 59 Window Configuration The window configuration for the Flow Viewer is shown below. Flow Builder View Image Display Area Flow Editor Button Processing items tree Edit and control buttons Image Display Area This area shows Camera images, figures, positions, and other graphic information. The measurement image is updated each time a unit is selected.
  • Page 60 Flow Editing Functions Repositioning a Unit within a Flow On the Flow Builder, drag the unit to the desired position. To insert a unit before another unit, drag it onto the desired unit. Right-click Menu The following popup menu is displayed when you right-click on a unit in the flow. The menu commands perform the same operations as the Edit and Control Buttons.
  • Page 61 Examples of Branch and Folder Views Examples: Edit Flow Window Flow Viewer Edit Flow Window Flow Viewer Conditional Branch View Selective Branch ⇒ ⇒ Folder View ⇒ Vision System FH/FZ5 Series Displaying and Checking Processing Branches in a Scene User’s Manual (Z340) WWW.NNC.IR...
  • Page 62: Changing The Scene Or Scene Group

    Changing the Scene or Scene Group You can change the scene to perform a process change. The default display is scene 0 when the power supply is turned ON. You can create many scenes (scenes 0 to 127). Also, if you use scene groups, you can set up to 4,096 scenes. You can also send commands from an external device to change the scene group or scene.
  • Page 63 Select whether the scene group should be saved when changing to another scene group. Set value Parameter Description [Factory default] When the scene group is changed, the data of the scene group [Selected] before changing is saved. Save scene group on switch scene The scene group data is not saved when you change to another Not selected...
  • Page 64: Editing Scenes

    Editing Scenes Copying Scenes Use the following procedure to copy and paste a scene within a scene group. This is convenient for reusing a scene and changing only the required parts. In the Main Window (layout 0), select [Scene maintenance] from the [Function] menu. The [Scene maintenance] dialog box is displayed.
  • Page 65: Renaming A Scene And Adding A Description

    Renaming a Scene and Adding a Description A user description can be added to each scene. This is convenient for making settings more easily understandable when managing many scenes. In the Main Window (layout 0), select [Scene maintenance] from the [Function] menu. The [Scene maintenance] dialog box is displayed.
  • Page 66: Editing Scene Groups

    Editing Scene Groups Copying or deleting can be done by scene group and scene groups can be renamed. Note For the FZ5-L3 or FZ5-6 , make sure to check that a USB memory device has been inserted before performing this operation.
  • Page 67: Changing The Scene Group Name

    Click the [Close] button. Changing the Scene Group Name Scene groups can be named with any desired text. This is convenient to make scene groups easier to identify when there are many scene groups to manage. In the Main Window (layout 0), select [Scene maintenance] from the [Function] menu. The [Scene maintenance] dialog box is displayed.
  • Page 68 MEMO Editing Scene Groups Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 69: Performing Test Measurement/Starting Operation

    Performing Test Measurement/Starting Operation This section describes test methods for checking whether correct measurement can be performed at the set conditions and describes useful functions for operation. Adjustment Windows and Run Windows ......68 Preparing the Controller and Cameras......70 Executing Test Measurements .........
  • Page 70: Adjustment Windows And Run Windows

    Adjustment Windows and Run Windows After test measurement and remeasurement are performed on the Main Window (layout 0), check the measurement results. If there are problems, adjust the processing item setting values of the processing units. When the measurement results are stable, change to the Main Window (layout 1) and perform measurements. This section describes the adjustment windows and run windows.
  • Page 71: Main Window (Layout 1): Run Window (Default)

    Main Window (Layout 1): Run Window (Default) Layout 1 is set as a run window by default. (This can be changed in Layout Modification Mode.) The flow, detailed results, and tool box are displayed in the Control Area. When processing takes a long time, it is necessary to check the processing items and setting values. The time required for measurement is also displayed with the measurement results, so use this for reference.
  • Page 72: Preparing The Controller And Cameras

    Preparing the Controller and Cameras Camera Setup FH/FZ5-series Sensor Controllers use the CameraLink standard for camera connection. At normal camera connection, a single camera cable is used for a single camera, and each camera is connected to the Sensor Controller in the CameraLink base configuration. Starting from camera connector 0 on the Sensor Controller, connect cameras to the camera connectors you want to use in ascending order of camera connector number.
  • Page 73: Preparing A Controller

    Camera numbers for multiple-line random trigger mode The table below shows the camera connector and camera number assignments when the operation mode is the multi-line random trigger mode. This table is an example showing the camera number assignments when the number of lines is two.
  • Page 74: Adjusting The Camera

    Adjusting the Camera Check the images that are being taken. Adjust the position of measurement objects and the focus of the lens. Click the upper left corner of the Image Pane, and then select [Image mode] − [▼] − [Through]. The through image from the Camera is displayed in the Image Pane.
  • Page 75: Intelligent Camera (With Lighting)

    Intelligent Camera (with Lighting) Proper lighting is of crucial importance to a Vision System. If an Intelligent Camera is connected, lighting can be controlled from the Controller. Features of Intelligent Cameras are as follows: • A single Camera enables testing of illumination from various angles, so it is possible to shorten the lighting setting time and test measurement time.
  • Page 76: Executing Test Measurements

    Executing Test Measurements Test whether the intended measurement processing can be performed with the current setting contents. Look at test results and adjust the property settings of each processing unit. Perform measurement according to the conditions set for the displayed scene. In the Main Window (layout 0), click the [Camera image meas.] button in the Measurement Pane.
  • Page 77: Key Points For Adjustment

    Key Points for Adjustment This section describes key points for adjustment to improve measurement precision and shorten measurement time. Stabilizing Measurements This section describes key points for adjustment when measurements are not stable. There are two methods for improving measurement precision: Performing processing of images loaded from the Camera (filtering) or adjusting settings and parameters.
  • Page 78: Shortening Processing Time

    Measurement Images with Low Contrast When Unidentifiable Shapes Are Present (Defect Inspection Is Unstable) The Extract Vertical Edges, Extract Horizontal Edges, The Edge Extraction filtering item is effective. and Extract Edges filtering items are effective. • Edge Extraction • Extract Vertical Edges This is used to make the profile clearer and the This extracts the vertical edges of an image.
  • Page 79 Shortening the Processing Time for the Overall Measurement Flow You can use parallel processing to shorten the processing time. Parallel processing reduces the processing time of the overall measurement flow. It uses a multi-core CPU to process different parts of the measurement flow in parallel at the same time. Reference: Parallel Processing (p.282) Vision System FH/FZ5 Series...
  • Page 80: Arranging Windows

    Arranging Windows Arranging Window Elements (Layout Modification) Configuration elements for the Main Windows (called window objects) can be laid out and displayed anywhere. You can create a maximum of 9 Main Windows from layout 0 to layout 8. Main Windows Layout 8 Layout 1 Layout 0...
  • Page 81 Modifying Layouts Select [Layout modification] from the [Window] menu in the Main Window for layout 0. The display changes to Layout Modification Mode, and the [Layout modification] dialog box is displayed as shown below. icon will appear on the upper right corner of each object. This indicates that the Layout Modification Mode is active.
  • Page 82 The [Layout modification] dialog box displays the following elements. Item Description [Factory default] Select the number of the layout to edit. Layout number Layout 0 to layout 8 This function is exclusively for an FH Sensor Controller. Specify whether to always display the Main Window at its maximized state. •...
  • Page 83 Adding Window Objects Right-click somewhere in the gray area outside the window objects and select the name of the object to add. Deleting Window Objects FH/FZ5-11 Right-click the window object and click [Delete the window]. FZ5-L35 /FZ5-6 Click in the upper right corner of the window object.
  • Page 84 Window Objects That Can Be Laid Out or Changed Layout 0 (in Default State) and Layouts 2 to 8 Information Toolbox Measurement Pane Judgement Pane Pane Pane Flow Display Pane Image Pane Detail Result Pane Layout 1 (in Default State) Judgement Information Pane...
  • Page 85 You can place the following panes anywhere on a single layout. You cannot have more than one pane of the same type. Name displayed when a pane is added in Pane Pane Customization Mode Error Pane FZ_PanDA.ErrorWindow Flow Display Pane FZ_PanDA.FlowWindow Image Pane FZ_PanDA.ImageContainerWindow...
  • Page 86 Measurement Pane This pane is for measuring and re-measuring. The following elements are displayed. There are no editable elements. • [Camera image meas.] tab page: [Measure] button • [Image file meas.] tab page: [Selection image] button, [Re-meas.] button, [Auto Re-meas.] check box, and the [Judgement result monitor] check box •...
  • Page 87 • To Specify the Unit Number in the Detail Result Pane Click the upper right corner of the Detail Result Pane. Click the upper right corner. The following dialog box is displayed. Use this to specify the display mode for the Detail Result Pane.
  • Page 88 Editable items Description [Factory default] [Define displayed unit] or Each unit number If the [Define displayed unit] option is selected, the measurement image for the selected unit in the flow display is displayed. If you select another unit in the flow display, the measurement Unit No.
  • Page 89 Click the [Add Image Pane] button to add an Image Pane with the specified number to the display. Then click the [Align] button to align the Image Panes. Example: To display Image Pane numbers 0 to 5. Drag each pane to move or change its size. Click the button in the upper right corner of the Image Pane to delete it.
  • Page 90 • To Limit the Number of Image Panes Assignable to Each Layout You can use layout modification to limit the range of Image Pane numbers that can be used on each layout. When the Layout Modification Pane is active, click the icon in the upper right corner of the Image Display Pane.
  • Page 91 • Clearing the Error Display In the state where you have exited layout modifications, click the upper left corner of the Error Pane. Click the upper left corner. The following dialog box is displayed. Click the [Clear] button. Click the [Close] button on the settings dialog box to close the dialog. Vision System FH/FZ5 Series Arranging Windows User’s Manual (Z340)
  • Page 92: Setting The Behavior Of Output Signals For Each Layout (Layout Settings)

    Setting the Behavior of Output Signals for Each Layout (Layout Settings) For each layout, you can set the behavior of output signals after the layout is changed. Select [Layout setup] from the [Window] Menu for the main window for layout 0. The following [Layout setup] dialog box is displayed.
  • Page 93: Troubleshooting

    Troubleshooting Symptom Setting Correction The RUN signal is not Select [Layout setup] from the [Window] menu and select the [RUN signal Layout setup output. output] check box for the layout to be used. The layout of the Image Click the button in the upper right corner of the Image Display Area if the Display Area cannot be Layout Modification Pane is not visible in the Main Window.
  • Page 94: Arranging The Window Display

    Arranging the Window Display Changing the Image Mode and Other Display Contents The display contents of the Image Display Pane can be changed in order to make the measurement status easier to understand. Click the upper left corner of the Image Click here.
  • Page 95 Image Mode List You can change the following items on the Main Window (layout 0). Item Description The latest image is always loaded from the Camera and displayed. Through When a through image is selected, saved images cannot be called up for measurement. The image that was scanned in the immediately preceding measurement is displayed.
  • Page 96: Custom Dialogs

    Custom Dialogs You can create a customized settings dialog box on the Sensor Controller and display it instead of the normal settings dialog boxes for each processing item. This allows you to hide parameter settings that must not be changed during normal operation, and show only the parameters that are necessary.
  • Page 97: Custom Dialog Tool

    Custom Dialog Tool Use the following procedure to create a custom dialog box. In the Main Window, select [Custom dialog tool] from the [Tool] menu. The [List of dialog] display area is displayed. The Custom Dialog Tool has the following display areas: Dialog Box List Display Area, Dialog Box Properties Display Area, and Preview Area.
  • Page 98 Edit and Control Buttons for the List of Dialog Box Display Area. Icon button Function Description Add dialog Adds a dialog box. The [Select dialog] list is displayed. Copy dialog Copies the selected dialog box. Paste dialog Pastes the copied dialog box to the end of the list. Delete dialog Deletes the selected dialog box.
  • Page 99 The types of dialog boxes that you can create are listed below. Dialog kind Description This is a custom dialog box that you create with numeric input boxes, buttons, and Normal dialog other items. This dialog box sets the measurement region for a processing item, such as the Region setting dialog region setting for Search and Defect.
  • Page 100 Note If [Dialog kind] is set to [Normal dialog], click the [Edit normal dialog] button ( ) to edit the dialog box. Reference: Editing a Normal Dialog Box (p.101) Edit the settings, and click the [Preview] button ( ) as necessary to confirm the edited dialog box.
  • Page 101 Parameter Set value [Factory default] Description This specifies the number of the unit for which the dialog box is to be displayed instead of the default settings dialog box. The unit that can be specified depends on the type of the dialog This is set to the unit that can box.
  • Page 102 Parameter Set value [Factory default] Description −1 to 999999999 Specifies the R’s data number for the difference in the unit to Scattering R's data No. [−1] use for color extraction. −1 to 999999999 Specifies the G’s data number for the difference in the unit to Scattering G's data No.
  • Page 103 Editing a Normal Dialog Box If [Dialog kind] is [Normal dialog], you can freely place objects, such as numeric entry boxes and buttons, anywhere in the Edit Dialog Box Area. In the Dialog Box List Display Area, select a dialog box that is of the normal dialog box type. Click the [Edit normal dialog] button ( The [Edit Dialog] area is displayed.
  • Page 104 Edit and Control Buttons for the Edit Normal Dialog Box Window. Icon button Function Description Change mode Changes between the Design Pane and the List Pane. Adds an item. The [Select item] dialog box is displayed. Add item Click the [OK] button to add the selected item to the end of the list.
  • Page 105 The types of items that you can place on a normal dialog box are listed below. Item kind Description This setting object is used to enter numeric values. Numeric Box From the processing items, select the numeric data to use as the target for the entered numeric value.
  • Page 106 To move the position where an added item is displayed in the Design Pane, drag the item to the desired position. Drag the ❍ part of the border of the added item to change its display size. Every item can be clicked, dragged, or selected as a group of items. Selected items are shown with a blue border.
  • Page 107 Edit the settings for the item. Some settings are common for all items, and some are specific to individual items. Example: Item Properties Display Area for a Numeric Box Refer to Settings in the Item Properties Display Area (p.105) that is described later in this section for details on all settings.
  • Page 108 Parameter Set value [Factory default] Description −999999.9999 to Enter the minimum value that can be entered with the Min value 999999.9999 numeric setting. [−999999.9999] Limit Box Setting Region Parameter Set value [Factory default] Description Specify the unit to be the target for the upper/lower limit setting.
  • Page 109 Radio Button Setting Region Parameter Set value [Factory default] Description Specify the unit to be the target for the radio button setting. 0 to Number of units in the The units that are registered for the scene that is the target Target unit No.
  • Page 110: Launching Your Custom Dialog Box

    Parameter Set value [Factory default] Description Set the item name and the data that corresponds to the item name to display in the combo box. Make sure the number of items and the number of data match. [Item setting] button •...
  • Page 111: Useful Functions For Operation

    Useful Functions for Operation Remeasuring Saved Images Images from when measurements are performed, including test measurements, can be saved. Remeasurement can be performed with saved images after conditions are adjusted in order to check whether the adjustment is appropriate. The logging function is used to save images. Reference: Logging Measurement Values and Measurement Images (p.113) Images that can be remeasured include images saved in the Controller and images saved in external memory.
  • Page 112: Improving Adjustment Efficiency

    IMPORTANT When remeasuring an image with the Controller, it is necessary to have a Camera connected that is appropriate to the image size. For example, if the image file for remeasurement contains 2-megapixel images and a 0.3-megapixel Camera is connected to the Controller or if a Camera is not connected, measurement will not be performed correctly due to a memory deficiency.
  • Page 113: Changing Judgement Conditions Without Stopping Measurement

    Changing Judgement Conditions without Stopping Measurement Using the simplified non-stop adjustment function makes it possible to change the judgement conditions of processing units for the currently displayed scene without stopping the measurement processing. Using the Simplified Non-stop Adjustment Mode Select [Layout modification] from the [Window] menu. In the Layout Modification Mode, select the layout number to use the Simplified Non-stop Adjustment Mode.
  • Page 114: Changing Regions As A Batch [Shift Area]

    Changing Regions as a Batch [Shift area] Figure data for multiple processing items can be changed as a batch. In the edit flow window, click the [Shift area] button. The [Shift area] dialog box is displayed. Select the processing item in which to change the region.
  • Page 115: Logging Measurement Values And Measurement Images

    Note • If the measurement value is within the alarm range, the [Warning] message is displayed. • If a result output-related processing item is used, this allows for output to external devices when a warning occurs. • Through trend monitor judgement, trends can be managed and NG error images can be saved. To save only NG error images identified by trend monitor judgement, create settings so that overall judgements from processing units other than [Trend Monitor] are not included in the judgement.
  • Page 116 specify the format of the saved image (BMP or JPG). Data Logging Measurement data is saved. System Logging There are 2 different logging methods. Logging Images That Are Currently Displayed Reference: Logging Current Image [Save Last Logging Image] (p.114) Automatically Logging Images During Measurements Reference: Setting Logging Conditions [Logging Setting] (p.115) Images and measurement data can be saved in external memory, which makes them useful for the following...
  • Page 117 Setting Logging Conditions [Logging Setting] Set the logging timing and the save destination. In the Main Window, select [System settings] − [Other] − [Logging setting] from the [Tool] menu. The [Logging settings] dialog box is displayed. Set the image logging conditions. Parameter Set value [Factory default] Description...
  • Page 118 When [Save to memory + file] in [Destination] is selected, set the destination and file names. Parameter Set value [Factory default] Description Specify the image file save destination (RAM disk or external • [RAM Disk] memory). Logged images are saved in the specified save Folder name •...
  • Page 119 Set the data logging conditions. The data format is set with the Data Logging processing item. Parameter Set value [Factory default] Description [None] Measurement data is not saved. Measurement data is saved when an NG error occurs in a unit Data logging Only NG before a [Data Logging] unit.
  • Page 120 Note Image Logging • When the number of files in the save destination folder increases, the time needed to save images increases. • If image transfer is disabled using the Camera selection setting for the [Camera Image Input] unit, black images are saved instead of images from the disabled Camera.
  • Page 121 Calculating the Measuring Interval ([Logging]) If the [Logging priority] is set to [Logging] (default), all target images that are measured are logged. This may extend the processing time by the time that is required to generate the image files. The method that is used to calculate the measurement interval that allows logging without affecting the processing time is described below.
  • Page 122 Specifying Logging Conditions for Images If you need to specify conditions for logging images, you should use the processing item logging function. For example, the system logging function logs all images if the overall judgement is NG or OK. Processing item logging (image logging), logs images only when a condition is met. The following examples illustrate how processing item logging can be used.
  • Page 123: Analyzing Logged Data

    Analyzing Logged Data Acquired data is referred to and processed, and settings are analyzed. Checking Logged Data with a Computer This section uses the example of saving logging data in USB memory. Copy the logged data in the external memory to the computer. Open the copied data in the folder using an application associated with the extension (.csv).
  • Page 124: Clearing Measurement Results

    Comparing Logged Data and Logged Images Compare image and measurement data to confirm correctness and to make analyzing trends for when NG occurs easier. The measurement data and image data stored with the logging functions are associated through measurement IDs based on the measurement date and time. One image data file contains the Camera image data of all the connected units.
  • Page 125: Clearing Saved Images

    Clearing Saved Images Use the following procedure to clear all of the images that are currently logged in the Controller. In the Main Window (layout 0), select [Clear logging image] from the [Function] menu. A confirmation dialog box is displayed. Click [OK].
  • Page 126 Saving Captured Images Click the [Capture] button that is displayed on the Measurement Manager Bar that is located in the bottom right corner. IMPORTANT The capture takes a few seconds and measurement cannot be performed at this time. Note • An alternative operation is to select [Screen capture] from the [Function] menu. •...
  • Page 127: Using The Operation Log

    Using the Operation Log The operation log automatically saves the contents of Controller operations and setting changes in a unique file delimited with semicolons (;). Setting content changes are recorded as a time series, which makes change management possible. Setting the Operation Log Set the destination to save the operation log.
  • Page 128 Checking and Changing the Operation Log Status Use the following procedure to check the current operation log function status In the Main Window, select [Operation log] from the [Function] menu. The current operation log status is displayed. To change the current operation log status, click either [Start] or [Stop]. To close the dialog box without changing the current operation log status, click the [Cancel] button.
  • Page 129: Operation Log Format

    Specify the destination. Click [OK]. For details on operation logs, refer to Operation Log Format (p.127) IMPORTANT • The contents of operation log files cannot be checked on the Controller. On a computer, open the file with a text editor or change the delimiter characters to semicolons (;) with spreadsheet software.
  • Page 130: Saving Data To An External Device

    Saving Data to an External Device To Save Logged Image Files to a Computer (FTP) The FTP is useful when you need to save logged image files to a computer. For example, if you need to move logged images to a computer before the RAM disk or external memory device becomes full, you can use the FTP to access the FH Controller through a browser and directly specify the files in the RAM disk or an external memory device to move.
  • Page 131 Saving Logged Data Directly to a Shared Folder on a Computer ([Network Drive Function]) The network drive function is useful when you need to log image data or measurement data directly to a computer that is connected by Ethernet. You can specify the shared folder on a computer that is connected by Ethernet as the destination for logged images or logged data.
  • Page 132 MEMO Useful Functions for Operation Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 133: Using Tools

    Using Tools This section describes adjustments during startup and convenient tools for operation. Using NG Analyzer ............132 Updating the Reference Position ........137 Creating Scene Group Data for More Than 128 Scenes ................ 140 Outputting a List of Scene Data Set Values ....143 Saving Image Files to a RAM Disk or External Memory Device ..........
  • Page 134: Using Ng Analyzer

    Using NG Analyzer Start the NG analyzer by selecting [Tool] - [NG analyzer] from the Controller menu. This tool, which analyzes setting flows, is used mainly in 2 ways. • Adjustment of measurement set values during start-up Use sample workpiece images to analyze optimal set values for the processing flow. •...
  • Page 135: Layout Of Ng Analyzer Window

    Layout of NG Analyzer Window a. Analysis result display area 1. List of units A list of units currently set is shown together with analysis results. 2. Details of unit Detailed analysis results of each unit are shown. 3. Details of data Detailed results of analysis data are shown.
  • Page 136: Using Method Of Ng Analyzer

    Images can be displayed by directly clicking the analysis result window. b. Control area 1. Target Sets images to be measured. 2. Standard image Standard image 3. Execute batch measurement All of the specified target images are measured continuously. 4. Measurement data Display the desired unit in the list of units and select the unit based on details of unit and details of data.
  • Page 137 Measurement results are displayed. The results in the OK folder are shown first, followed by the results in the NG folder. Green indicates OK, while red indicates NG. These results judged as NG in the OK folder and Results in Results in the OK folder results judged as OK in the NG...
  • Page 138 Adjust the processing item by referring to the displayed content. In the following example, Correlation values are clearly lower on some images. Based on the revealed cause of incorrect judgement, use the [Set up(Std.)] and [Set up(Select)] buttons to change the set values of the processing unit. Repeat steps 5 to 8 to correct the set values corresponding to all causes of incorrect judgement.
  • Page 139: Updating The Reference Position

    Updating the Reference Position This section describes the use of a table to set or change the reference position for more than one processing unit that you specify in the measurement flow. To open the Update Standard Position Tool, select [Update standard position tool] from the [Tool] menu. Items That Can Be Updated with the Update Standard Position Tool You can specify the following processing items.
  • Page 140: Using The User Data Tool

    Using the User Data Tool This tool is used to share data within the Controller. The data set as user data is shared between scenes or scene groups. Data sharing across lines is not allowed in Multi-line Random Trigger Mode. The data variables that are created are stored in the user data region on the Controller.
  • Page 141 Enter the comment for the data. The entered comment will be displayed in the [Comment] column of the User Data processing item. Item Set value [Factory default] Description 64 characters max. Comment Set the comment for the specified user data. [Space] Repeat steps 2 to 4 to set the user data.
  • Page 142: Creating Scene Group Data For More Than 128 Scenes

    Creating Scene Group Data for More Than 128 Scenes You can increase the number of scenes in a scene group to more than 128 scenes. To start the Conversion Scene Group Data Tool, select [Conversion scene group data tool] from the [Tool] menu. Overview Normally, there are 128 scenes in a scene group.
  • Page 143 Use the following procedure and the guidance in the dialog boxes to perform the conversion process. Select [Conversion scene group data tool] from the [Tool] menu. The Conversion Scene Group Data Tool is started. Click the [Load] button. The [STEP 1] dialog box is displayed. Vision System FH/FZ5 Series Creating Scene Group Data for More Than 128 Scenes User’s Manual (Z340)
  • Page 144 Specify the target data file to convert, the destination data file, and the destination. Then click the [Next >>] button. The [STEP 2] dialog box is displayed. Edit the scene in the converted scene group. Click the [>>] button to copy the conversion source to the conversion destination. Click the [<<] button to copy the conversion destination to the conversion source.
  • Page 145: Outputting A List Of Scene Data Set Values

    Outputting a List of Scene Data Set Values To create a list of the set values for scene data, use the Settings Download and Upload Tools. With the set value download function, the specified scene data set values can be output to a CSV file. Different set values in multiple scene data can be easily checked by opening the CSV files in an editor.
  • Page 146 Double-byte characters are enclosed in the double quotation marks ("). Refer to the individual processing items and the external reference tables in the Vision System FH/FZ5 Series Processing Item Function Reference Manual (Cat No. Z341) for the parameters for all data. Only data that can be read and written can be downloaded.
  • Page 147: Uploading Set Values

    Uploading Set Values Use the following procedure to upload the CSV file to which you downloaded the set values. Change to the scene group that contains the scene with the set values to be uploaded. When reading from external memory, insert an external memory device into the Sensor Controller.
  • Page 148: Saving Image Files To A Ram Disk Or External Memory Device

    Saving Image Files to a RAM Disk or External Memory Device This section describes how to save logged images and image files that are saved in the Controller to a RAM disk or external memory device in the Controller. The storage format (bitmap or Jpeg) can be specified when the images are saved.
  • Page 149 Saving Image Files When saving data to external memory, insert an external memory device into the Sensor Controller. In the Main Window, select [Image file save] from the [Tool] menu. The [Image file save] dialog box is displayed. Click the [Image files] tab to select the image files to save.
  • Page 150: Using The Registered Image Manager

    Using the Registered Image Manager You can save images used for model registration and reference registration as registration images and can reference them later and use them for re-registration and adjustment of reference positions. You can register the [Latest logging image], [Logging image], and [Image file]. IMPORTANT •...
  • Page 151: Loading An Image

    Deleting Images Use the following procedure to delete registered images. In the Main Window, select [Registered Image Manager] from the [Tool] menu. The [Registered Image Manager] dialog box is displayed. Click the [Image registration>>] button. Select the registered image number of the image to delete.
  • Page 152: Using Accounts

    Using Accounts You can restrict access to the Sensor Controller for specific users and user groups. Because you can set a password for each user and can enable or disable operations for each user group, you can flexibly manage users to match the way they use the system, for example system administrators, onsite managers, and system operators.
  • Page 153 Parameter Description Enter a user name of 1 to 20 single-byte alphanumeric characters. The names are case User name sensitive. Select the user group (UG0 to UG7) to which the user being added will belong. User group ID If you select [UG0], the user can use all functions. Reference: Setting User Group Operation Restrictions (p.153) Enter the login password for the user being added.
  • Page 154: Setting Layout Restrictions

    Setting Automatic Logout Use the following procedure to set the length of time before an account is automatically logged out when no operation is performed. In the Main Window, select [Security settings] from the [Tool] menu. The [Security settings] dialog box is displayed. Click [Account list] in the Item Tab Area.
  • Page 155: Setting User Group Operation Restrictions

    Click the [Layout restrictions] tab in the Item Tab Area. The layout restriction settings are changed. Click the [Close] button. Setting User Group Operation Restrictions You can restrict the functions that can be used by each user group. You can set restrictions for the following items. Security setting item Security setting item Tool button setting...
  • Page 156: Saving/Loading/Deleting The Security Settings

    In the Main Window, select [Security settings] from the [Tool] menu. The [Security settings] dialog box is displayed. Click the [Operating restrictions] tab in the Item Tab Area. Select the operations to restrict. Operations that are not selected are not restricted. Select the operations to be permitted by user groups (UG1 to UG7) on the right side Operations that are not selected cannot be used by users belonging to that group.
  • Page 157 When saving data to external memory, insert an external memory device into the Sensor Controller. In the Main Window, select [Security settings] from the [Tool] menu. The [Security settings] dialog box is displayed. Click the [Setting data] tab in the Item Tab Area. Specify the destination folder and file name in the [Save to file] area.
  • Page 158 Deleting Security Settings Use the following procedure to delete saved user accounts and user groups settings. IMPORTANT The current security settings are all deleted. In the Main Window, select [Security settings] from the [Tool] menu. The [Security settings] dialog box is displayed. Click the [Setting] tab in the Item Tab Area.
  • Page 159: Changing Between User Accounts

    Changing between User Accounts After a user account is set up, you can log in and log out with the registered user account. If you try to execute an operation you do not have the right to use, the login dialog box is displayed even though you are already logged in.
  • Page 160: Remotely Operating The Controller (Remote Operation)

    Controller from a network computer. This function is enabled only with Ethernet connection. Contact your OMRON sales representative to obtain a copy of the FZ_FH Remote Operation Tool CD-ROM. IMPORTANT A Controller window cannot be operated or displayed simultaneously on multiple PCs on the network.
  • Page 161: Operation Environment Condition

    Operation Environment Condition The following is required on both the Controller and on the remote operation PC to start the remote operation. • Controller side = Set up a server to achieve the remote operation. • Remote operation PC side = Prepare a communications environment and a GUI environment for remote operation.
  • Page 162 Click the [Data save] button to save the settings, and then restart the Controller. Set the IP address. In the Main Window, select [System settings] − [Communications] − [Ethernet (*****)] from the [Tool] menu, and then set the IP address. The “(*****)”...
  • Page 163: How To Start

    How to Start From the Start button located in the lower left area of the window of the remote operation PC, select [Start] − [All Programs] − [OMRON] − [FZ_FH Simulator] and then select and launch [FZ_FH Remote Operation Tool].
  • Page 164 Press the [Start] button. Once a remote operation is established, the remotely operated dialog box is displayed on the Sensor Controller. Click the OK button on this dialog box to terminate the remote operation from the Sensor Controller. The dialog box on which the remote operation is disconnected is displayed on the remote operation PC.
  • Page 165 Differences from Local Operation and Limitations There is no fundamental difference between local operation on the Sensor Controller and a remote operation. The remote operation PC windows, however, are not the windows of the Sensor Controller themselves, and thus, the following types of operational differences can be caused. Major differences are listed as follows: Description Functions to be noted...
  • Page 166: Using Communication Command Macro

    Using Communication Command Macro You can define your own communications commands for the Sensor Controller. You use this to create functionality that is not available in the standard communications commands, or to perform more than one process with a single communications command. Example: To tell the Controller to change scenes and then execute a measurement from an external device.
  • Page 167: Flow Viewer

    Flow Viewer The Flow Viewer shows the flow of processing for the measurement flow that is currently being edited. When you edit a flow, the Flow Viewer is useful when you need to check the relationship of branches and folders. Refer to the following reference for information on the Flow Viewer.
  • Page 168: Custom Dialog Boxes

    Custom Dialog Boxes You can create a customized settings dialog box and display it instead of the normal settings dialog box that is provided for each processing item. This allows you to create settings dialog boxes that match your application. Refer to the following reference for information on custom dialog boxes.
  • Page 169: Calibration Support Tool

    Calibration Support Tool The Calibration Support Tool provides a graphic display of the calibration setting results (relationship of the positions of the Camera coordinates and the actual coordinates) when you set the alignment function. This allows you to check for major errors in the calibration results. Refer to the following reference for information on the Calibration Support Tool.
  • Page 170: Saving Scene Groups In External Memory

    Saving Scene Groups in External Memory The scene group storage location specification function lets you specify a location other than the Sensor Controller’s flash memory for saving scene group data. After specifying the desired storage location with this function, menus and buttons such as “Data save”save set data in the specified external memory instead of in the Sensor Controller’s flash memory.
  • Page 171 Set each item in the [External memory device settings] area. Variable name Set value [Factory default] Content This setting is valid when [Save all scene group data in the external memory device] or [Save after the next scene External memory group data in the external memory device] is selected for device settings [Scene Group Saving Destination Setting].
  • Page 172 MEMO Saving Scene Groups in External Memory Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 173: Optimizing Scenes (Measurement Flows) (Macro Customize Functions)

    Optimizing Scenes (Measurement Flows) (Macro Customize Functions) Basic Knowledge For Macro Customize Functions ..173 What are the Macro Customize Functions?..... 173 List of Macro Customize Functions..... 173 Structure of This Chapter ........175 How to use Macro Customize Functions ....176 Components of the Macro Customize Functions ...............
  • Page 174 Operator ..............213 Expression ............. 215 How to Write Advanced Programs......217 Data Types Related to Processing Units ..... 217 Data Types Related to the System ....... 222 Scope of Data and Save Area....... 225 State Transitions and Execution Timing ..... 227 Exclusive Control in a Process......
  • Page 175: Basic Knowledge For Macro Customize Functions

    Basic Knowledge For Macro Customize Functions In the FH/FZ5 series, the macro customize functions can be used to realize finely adjusted and expandable image processing. What are the Macro Customize Functions? The macro customize functions enable you to perform various types of calculations that are more advanced than normal "Calculation"...
  • Page 176 FH/FZ5 Scene Measurement Flows Scene Scene Communication Scene Scene control macro command Scene control macro macro control macro Camera PLC or other Image input external device Search Defect Unit Macro Unit Calculation Macro Output Unit In the following cases, a macro customize function is used. Macro customize In this case function that is used...
  • Page 177: Structure Of This Chapter

    Structure of This Chapter The relation between the contents of this chapter and the macro customize functions is shown below. Refer to function items that you need to use. Macro customize function Unit Communication Item name Scene Control Calculation Command Unit Macro Macro Macro...
  • Page 178: How To Use Macro Customize Functions

    How to use Macro Customize Functions Communication Scene Control Unit Calculation Unit Macro Necessity of referring Command Macro Macro Macro to this manual Required You can use the macro customize functions to program processes that you want to add or expand. On a sensor controller, you can execute the macro customize functions and debug the programs of the macro customize functions.
  • Page 179: Procedures For Using The Macro Customize Functions

    Function Description Setting screen of each function in the macro customize functions. The contents of the program editing screen vary by function. Program editing screen Use the program editing screen to create programs. You can create and edit programs, and use input auxiliary functions. Reference: Components of the Program Editing Screen (p.181) Console window that shows the system status as text.
  • Page 180 Item name Step Description Register processing items that enable use of macro customize Function registration Register a function and display the functions in the measurement flow, and open tool screens. and preparation setting screen The specific procedure depends on the each functions. ↓...
  • Page 181 Procedure for Using the Scene Control Macro Tool The usage flow for the scene control macro tool and the basic usage procedures are described below. Item name Step Description Starting the Scene Control Macro Start the scene control macro tool from the external tools. Tool ↓...
  • Page 182 Item name Step Description Check operation Check if your settings operate as expected. ↓ Program debug (Reference: How to Debug the program. Use the Debug Debug helps you identify the cause of the unexpected Function (p.235)) Debug operation and correct the program to make the communication command macro operate as expected.
  • Page 183: Components Of The Screens And How To Configure Settings

    Components of the Screens and How to Configure Settings Communication Scene Control Unit Calculation Unit Macro Necessity of referring Command Macro Macro Macro to this manual Required The setting screens of the macro customize function consist of a program editing screen that is shared by all macro customize functions, and individual setting screens for each function.
  • Page 184 Display (color) Description ↓ (gray) Indicates a line break. @ (gray) Indicates a double-byte space. → (gray) Indicates the tab character. Note If a function entered in a program cannot be used, the function name is shown in red. Whether or not a function can be used depends on the macro customize function that is used. For details, refer to Macro Function Reference.
  • Page 185 Button Description Delete Deletes a reference variable that has been selected in the reference variable list. Displays the setting screen of a reference variable selected in the reference variable list. You Edit can change the settings of the reference variable in the setting screen. Displays the save file screen.
  • Page 186 Display option To add the contents of the program area and make the program easier to view, change the program area display settings. The settings in the display option screen are described below. Setting value Setting item Description [Factory default] Highlights the program in the program input area with •...
  • Page 187: Description Of The System Status Console Window

    Description of the System Status Console Window Use the system status console window to debug macro customize programs and check error descriptions. Structure of the System Status Console Window The information shown in the system status console window is described below. Display area Description Shows the system status as text.
  • Page 188: Description Of The Setting Screen For The "Unit Calculation Macro" Processing Item And How To Configure Settings

    Description of the Setting Screen for the "Unit Calculation Macro" Processing Item and How to Configure Settings The components of the properties screen of the "Unit Calculation Macro" processing item are described below. Selection of Operators (Unit Calculation Macro) 32 calculation processes from "DT0" to "DT31" can be set per unit. Note •...
  • Page 189 Editing Operator (Unit Calculation Macro) The calculation processing you have set can be copied or cleared. From the list, click the operator of the calculation processing whose setting is to be edited. Select each operation in the "Edit" area. The Unit Calculation Macro settings screen is displayed.
  • Page 190 Judgement Condition Settings (Unit Calculation Macro) Set judgement conditions in the "Settings" area. Setting value Setting item Description [Factory default] Enter a comment on the calculation processing you have selected from Comment the list. Select whether to use a figure or macro judgement for the calculation result. Judgement •...
  • Page 191 Nothing happens when [DEL], [BS], [Enter], etc., is clicked Parameter to be adjusted Troubleshooting Nothing happens while the focus is not on the code window (key entry cursor is not displayed). Click the position you want to operate, and then click the button. Want to include a line feed code in a string Parameter to be adjusted Troubleshooting...
  • Page 192: Description Of The Setting Screen Of The Scene Control Macro Tool And How To Configure Settings

    Description of the Setting Screen of the Scene Control Macro Tool and How to Configure Settings The setting screen for the scene control macro tool is the same as program editing screen. For details on the setting screen, refer to Program Editing Screen. Reference: Reference: Components of the Screens and How to Configure Settings (p.181) Reference Variable Settings (Scene Control Macro)
  • Page 193 Click "..." and set the unit label name. You will return to the setting screen for the scene control macro tool. Setting item Setting value Description Set the unit label name. The unit label set here is used by the Ut Unit Label 1 to 32 characters function.
  • Page 194: Components Of The Setting Screen Of The Communication Command Macro Tool And How To Configure Settings

    Components of the Setting Screen of the Communication Command Macro Tool and How to Configure Settings The components of the setting screen of the communication command macro tool are indicated below. Setting Procedure for Communication Command Macro You can create and edit communication command macros. You can create up to 256 (from 0 to 255) communication command macros.
  • Page 195 Selection of the Communication Command Macro to be Used (Communication Command Macro) Select the command to define in the [No.] column. Only the command numbers that are selected are enabled. Communication Command Macro Name Setting (Communication Command Macro) In the [Command name] field in the Settings Area, enter the command name to use with the non-procedure communications protocol.
  • Page 196 • For 128 to 255: Use the terminal offset command DIOFFSET to add the difference from 0 to 127 with the seven bits from DI0 to DI6. Example: For command number 150, the binary notation for 150 is 1001 0110, which requires eight bits. In this case, you use the terminal offset command DIOFFSET to add, for instance, half of 150, or 75.
  • Page 197 Common Behavior of Custom Commands Basic sequence Normally, each of IO commands are processed in the sequence as below : Check input command and parameters are valid (range or type) Body of the procedure Output the result or response The way of input/output command, parameters and response depends on the type of IO modules. For detail, please refer the pages shown below.
  • Page 198 Standard IO commands When the same command name / command id of standard IO commands are used for customize IO commands, customize IO command has the priority and the standard IO commands are not executed. If you execute the standard IO commands after execution of customize IO commands, please add the line as below.
  • Page 199 Creating serial command Command parameters Received text string is split by space character(" ") into command and parameters, and stored in the predefined variables shown below: Variable name Type Content ArgumentsLength& Integer Number of parameters (0 to 32) Array of parameters (string) ArgumentString$() Array of text string Allocate a number of array elements equal to the number...
  • Page 200 Creating Parallel Command Response output Result of the command procedure can be returned to the system by setting the value on these variables. Variable name Type Content Command execution result • 0 : Command processing successful ResponseCode& Integer • Other than 0 : Command processing failed (The ERROR signal turns on.) Creating PLC Link Command Command parameters...
  • Page 201: Description Of The Setting Screen Of The "Unit Macro" Processing Item And How To Configure Settings

    Description of the Setting Screen of the "Unit Macro" Processing Item and How to Configure Settings The properties screen of the "Unit Macro" processing item is the same as the program editing screen. For details on the setting screen, refer to Program Editing Screen. Reference: Components of the Program Editing Screen (p.181) Reference Variable Settings (Unit Macro)
  • Page 202 If Unit is selected Select the processing item to be referenced, and then select the data to be referenced from the list. If Global is selected Click [...] to set the variable value. If System is selected Place a check at applicable [Select] to select the type of system variable, and then select the variable to be referenced from the list.
  • Page 203 Set the operand. Setting value Setting item Description [Factory default] Select this option if you want to enter an operand freely. [Free input] Click [...] to set the operand. Operand input Select this option if you want to select an operand from variables. method Click [ ] to select the variable.
  • Page 204 Key Points for Test Measurement and Adjustment (Unit Macro) To increase the speed and precision of measurement, you can adjust the parameters by performing and checking the results of test measurements. The following content is displayed in the "Detail result" area as text. Displayed items Description Judge...
  • Page 205: Saving And Loading Programs

    Measurement Results For Which Output is Possible (Unit Macro) To output the measurement result of the unit macro, assign the value of the unit macro calculation result to data output or the calculation processing item and output externally. External Reference Table (Unit Macro) The external reference table of the unit macro does not contain any data that can be referenced.
  • Page 206 Saving and Loading Programs in the Communication Command Macro In the communication command macro tool, a program can be saved when "Data save" is executed, and a standalone program can be saved and loaded in the tool setting screen. • Saving a program Click [Export] in the file area.
  • Page 207: Basic Method For Writing Programs

    Basic Method for Writing Programs Communication Scene Control Unit Calculation Unit Macro Necessity of referring Command Macro Macro Macro to this manual Required The macro customize functions of the FH/FZ5 series use an interpreter-type programming language. Unlike a compiler-type language, programs can be created in an interpreter programming language without the need for a special development environment to compile the program.
  • Page 208 Character Alphabetical characters, numbers, symbols, and the special marks below can be used as characters. Lower case alphabetical characters are only recognized as lower case when enclosed by double quotation marks ("). Lower case and upper case are not distinguished anywhere else. With the exception of text enclosed by double quotations (") and comments described below, use only half-width alphanumeric characters and half- width symbols.
  • Page 209 Statement The program processing text written on each line is called a statement. A statement is mainly composed of expressions of minimum processing units. A statement can be up to 245 characters in length. If a statement is longer than 245 characters, an error will occur and program execution will stop. Three types of statements exist, as shown below.
  • Page 210: Constant

    Constant Among the values and character strings used in programming, a constant is a value that never changes and has a unique assigned name. Use constants for fixed numeric values and character strings that you want to use repeatedly in a program. How to Use Constants Constants are used as shown below.
  • Page 211: Variable

    Variable Among the values and character strings used in programming, a variable has a unique assigned name and is used for data that changes. Use a variable for a numeric value or character string that you want to use repeatedly in a program, but whose specific value or character string changes. How to Use Variables Variables are used as shown below.
  • Page 212 Variable Data Types Before a variable can be used, the data area that will hold the data must be allocated. A data type defines the size of the data area to be allocated and how the data is handled. Data types and data ranges of variables that can be used in macro customize functions are described below. Select the data type based on the use and objective of the variable.
  • Page 213 A& = 1 Double precision real number A# = 12.34 Character string AA$ = ”OMRON” IMPORTANT The type identifier cannot be omitted. Always add a type identifier to the end of the variable name. • Array Variable When you want to handle multiple data items of the same data type as a group, you can assign numbers to temporary variables.
  • Page 214 Double precision real number A@ = 12.34 Character string AA@ = ”OMRON” IMPORTANT • The data type (integer, real number, etc.) can be identified from the type identifier of a regular variable, however, identification of the data type from the type identifier is not possible with a reference variable. When using a reference variable, check the data type of the allocated data before using the variable.
  • Page 215: Operator

    Operator A symbol that indicates an operation in a program is referred to as an operator. Operators are used to add a process to a variable, as well as to calculate and compare variables and constants. How to Use Operators Operators are used as shown below.
  • Page 216 2. Arithmetic Operator An arithmetic operator performs an arithmetic operation, exponent operation, or remainder operation on numerical value data, Division by 0 results in an error. If the interim result of an arithmetic operation such as addition, subtraction, or multiplication is outside the range -1.0e30 to 1.0e30, an error will result. Arithmetic operators that can be used in macro customize functions are shown below.
  • Page 217: Expression

    Multiple character expressions can be joined by enclosing the expressions in parentheses. (Example of a character expression) B$ = "OMRON" + "FH" Vision System FH/FZ5 Series Basic Knowledge For Macro Customize User’s Manual (Z340)
  • Page 218 Relational expression An expression that joins two numerical expressions by a relational operator is referred to as a relational expression. (Example of a relational expression) If A& < 10 Then EndIf Logical Expression An expression that joins multiple relational expressions by a logical operator is referred to as a logical expression.
  • Page 219: How To Write Advanced Programs

    How to Write Advanced Programs Macro customize functions can be used for a variety of purposes depending on the content being programmed. This section explains programming techniques that can be used together with the basic program writing methods to widen the range of application of the macro customize functions. Data Types Related to Processing Units Communication Scene Control...
  • Page 220 • Acquisition of Data External reference data is acquired by the methods below. Example:Acquiring External Reference Data No. 5 (correlation value) of the Unit No. 1 Search processing unit. Rem The correlation value is a real number, and thus the variable type identifier is # GetUnitData 1, 5, DATA# Example:Acquiring External Reference Data No.
  • Page 221 • Format of Figure Data Figure data is specified using an array variable. The elements of the array are described below. Array element Description Description This is figure data header information. Includes the number of figures and figure data size information. Upper 16 bits: Number of figures Lower 16 bits: Number of bytes of figure data size (figure array length x 4) Figure data header information = Number of bytes of figure data size +...
  • Page 222 • Data Settings The method of setting figure data is as follows. Example:Changing the upper left coordinates of Figure Data No. 1 (region figure) of the Unit No. 1 Search processing unit to (100, 50). Dim FIGURE&10 GetUnitFigure 1, 1, FIGURE&() FIGURE&(2) = 100 FIGURE&(3) = 50 SetUnitFigure 1, 1, FIGURE&()
  • Page 223 • Data Settings The data setting method is as follows. Example:Re-registering the model of the Unit No. 1 Search processing unit (model figure: rectangle) in the current measurement image, and changing the reference position (0, 0) and detection point coordinates (320, 240). Dim FIGURE&(5) GetUnitFigure 1, 0, FIGURE&() Rem Re-register the model by setting the model figure...
  • Page 224: Data Types Related To The System

    • Data Settings The image data setting method is as follows. Example:Setting Image Data No. 0 (filtered image) of the Unit No. 2 filtering processing unit in Filtered Image No. 0, and enabling use as a measurement image by following processing units SetMeasureImage 0, 2, 0 Data Types Related to the System Communication...
  • Page 225 • Acquisition of Data Global data is acquired by the method below. Example:Acquiring the data identification name "GData" value Rem Register the default value 10 for the global data whose data identification name is "GData" AddGlobalData "GData", 10 Rem Acquire global data with the data identification name "GData" GetGlobalData "GData", GDATA&...
  • Page 226 System data System data is data that can be set or acquired from a different scene using a macro function. Use system data to set or acquire numerical values or character strings that you want to be retained even if a power interruption occurs or restart is performed.
  • Page 227: Scope Of Data And Save Area

    Scope of Data and Save Area Communication Scene Control Unit Calculation Unit Macro Necessity of referring Command Macro Macro Macro to this manual As needed In macro customize functions, many types of data can be used as needed for the objective, and variables and macro functions can be used to set and acquire data.
  • Page 228 Data Save Area Some data that can be used in the macro customize functions is only saved temporarily in memory, and some data is saved as scene or system data. The area where data is saved is called the "save area", and each data item has a specific save area.
  • Page 229: State Transitions And Execution Timing

    Can be saved? ❍: Yes Variable and Data Types Scope Data save area ✕: No Temporary variable (array variable) Within a processing unit Reference: Temporary variable (p.211) ✕ Within a communication command Temporary data Reference variables macro Reference: Reference variables (p.212) External reference data Reference: External reference data (p.217)
  • Page 230 Execution timing and corresponding subroutines are shown below. For a description of each execution timing, refer to the execution timing details. Reference: Details of subroutine execution timing (p.231) Commun Unit Scene Execution timing of Pre-defined ication Unit Calculati Control Description subroutine subroutine name Comman...
  • Page 231 System Status Transitions and Possibility of Execution There are processes that cannot be executed in certain system statuses in a macro customize program. The following types of system status exist. Status type Description Measurement instructions and communication commands cannot be accepted in this state. Measurement The measurement prohibited state generally occurs during startup, as well as changes of prohibited state...
  • Page 232 The relation between sensor controller screen transitions and program execution timing is shown below. Screen transition Pre-defined subroutine Execution timing of subroutine name Original screen New screen Splash screen Main screen Properties screen Flow edit screen (macro customize Main screen Program initialization *MCRINIT functions)
  • Page 233 Menu Operations and Execution Timing In addition to screen transitions and process transitions, the timing of macro customize program execution is also related to the type of menu operation being executed. The relation between process type and program execution timing is shown below. Timing of Timing of Process...
  • Page 234 • Measurement Initialization (*MEASUREINIT) The measurement initialization subroutine is executed before starting measurements. The process is executed at the timing below. Details of subroutine Main cases of execution execution timing • When the flow edit screen is closed • When the system settings screen is closed Screen transition to main screen •...
  • Page 235 • Text display (*MEASUREDISPT) The text display subroutine is executed when text display is executed. The process is executed at the timing below. Details of subroutine Main cases of execution execution timing • When measurement is executed • When the text window settings are changed When the text display is updated •...
  • Page 236: Exclusive Control In A Process

    Exclusive Control in a Process Communication Scene Control Unit Calculation Unit Macro Necessity of referring Command Macro Macro Macro to this manual Not required Not required As needed This primarily uses the communication command macro and scene control macro. Macro customize functions can be used to perform exclusive control in a process when a program is executed. Exclusive control must be performed during measurement and communication in order to prevent incorrect processing, such as a communication command or screen operation accidentally changing the scene during measurement, or subsequently received data overwriting the currently received data.
  • Page 237: How To Use The Debug Function

    Exclusive Control in a Communication Process In communication with external devices, the FH/FZ5 series uses a polling process to monitor statuses and data transmission/reception. When sending or receiving data, stop the communication polling process before sending/receiving the data. If data transmission/reception is executed without stopping the polling process, there is a risk that inconsistencies may occur in the received data, such as data other than the intended data being received from the external device.
  • Page 238 IMPORTANT Specify the program execution mode individually for each function and unit. • Unit calculation macro, unit macro: specify by processing unit • Scene control macro: specify by scene • Communication command macro: specify by communication macro Macro Functions Used for Debugging Some of the macro functions are effective for debugging.
  • Page 239 When performing debugging, you can enter macro functions for debugging in the system console window and execute the program. This allows you to conveniently execute and stop the program in the system status console window without the need to edit the program. Macro functions for debugging that are convenient to use in the system status console window are described below.
  • Page 240: Debug Procedure

    Debug Procedure When an error occurs in the program, follow the steps below to correct the program. Item name Step Description An error occurs during program execution and the program Error occurs execution process is forcibly stopped. ↓ Checking Why an A brief description of the error appears in the system status Check the console window Error Occurred...
  • Page 241 Checking the System Status Console Window When an error occurs in the program, error information appears in the system status console window. You can check this information to determine the type of error and the location of the error in the program. 1.
  • Page 242: Starting Debug

    Identifying the Error Based on the error message that appears in the system status console window, check the error in the error list. If this gives you sufficient information to identify the cause of the error, remove the error. Reference: Error List (p.320) IMPORTANT If you specified 0 or 16 for the debug function parameter, the error information will not appear in the system status console...
  • Page 243: Identifying The Cause Of An Error

    Identifying the Cause of an Error After changing the usage mode to debug mode, identify the cause of the error. Identifying the location of the error To identify the cause of the error, determine where the error occurred. Enter the Stop function in the program editing screen. Example:Enter the Stop function immediately before the measurement process in the *MEASUREPROC subroutine of the Unit Macro.
  • Page 244 Hit [Enter] on your keyboard. One line of the program is executed. The program stops at the next line. Macro(U3)210 *MEASUREPROC Macro(U3)220 Stop Macro(U3)>cont 1 Macro(U3)230 POS.X#=(POS0.X@ + POS1.X@) / 2 Macro(U3)> Continue to step through the program unit until the line that contains the error is executed.
  • Page 245 Stopping the Program When a Specific Condition is Met The program can also be stopped when a specific condition is met. Setting an appropriate condition allows the location of an error to be identified more efficiently than with the Stop function. *MCRINIT Debug 18 Rem Use the SetStop function to set the program stop condition so that the program stops when the Stop function...
  • Page 246: Removing The Error

    Removing the Error Once you have identified the cause of the error, correct the program to remove the error. After correcting the program, check operation and verify that the error has been removed. Example:Use "If" to prevent the denominator from becoming 0 in the *MEASUREPROC subroutine of the Unit Macro.
  • Page 247: Troubleshooting

    Troubleshooting Communication Scene Control Unit Calculation Unit Macro Necessity of referring Command Macro Macro Macro to this manual As needed When a unit macro customize function does not operate correctly, refer to the following to correct settings or operation. Troubleshooting for Programming Problems that are commonly encountered when creating programs with the macro customize functions are described below, along with the actions to take.
  • Page 248 Problem Cause Action A program that exceeds the maximum number of When loading a program created The program may exceed the characters that can be entered will not load correctly. with the text editor on a maximum number of characters Check the remaining number of characters that can be computer, only part of the that can be entered.
  • Page 249 Troubleshooting when checking the operation of the communication command macro Problem Cause Action Check the error message and correct the error. Reference: Error List (p.320) An error message appears in the An error occurred during If it is difficult to identify the error, use Debug to system status console window program execution.
  • Page 250 Problem Cause Action The communication command macro settings are not saved in the backup data (.bkd). Consider one of the The communication command You may be attempting to save following methods: macro settings cannot be saved. the settings with [Save to file]. •...
  • Page 251 Problem Cause Action If executed with the display process subroutine in the An error such as "Illegal function unmeasured state, a data acquire process such as It is possible that a value is used call" or "zero divide" occurs GetGlobalData may fail, or a variable may be used that has not been initialized in when the sensor controller is without a set value.
  • Page 252 Problem Cause Action It is possible that a statement A statement is sometimes not executed correctly when and a comment are written on written on the same line as a comment. the same line. Write the comment on a separate line. When release mode is specified in the Debug function, A specific program line does not functions such as the Stop function and DebugPrint...
  • Page 253 Problem Cause Action An "Illegal function call" error occurs if there are 0 An "Illegal function call" error detections in the measurement process of the search sometimes occurs when search It is possible that no objects process unit executed with the MeasureProc function. process unit measurement is were found in the search Use the Try - Catch - End Try function to create a...
  • Page 254 MEMO Basic Knowledge For Macro Customize Functions Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 255: Saving And Loading Data

    Saving and Loading Data This section explains the methods for saving and loading settings and image data. Saving Data to the FH/FZ5 ..........254 Saving Settings Data to the Flash Memory and Restarting................. 257 Saving Settings Data to the Controller RAM Disk or an External Memory Device..........
  • Page 256: Saving Data To The Fh/Fz5

    Saving Data to the FH/FZ5 This section describes how to save and load setting data and logged image data. About Saving Areas The following saving areas can be used with the Sensor Controller. Saving area Description Save operation The settings data (system data, scene data, and scene group data) Flash memory is saved to this area when you click the [Data save] button.
  • Page 257: External Drive Names

    The following table shows the data that is retained or cleared and the data that is saved when the power supply is turned OFF. Target data Settings data At power Last input Logged data Saving area (system data, Logged Capture image and last (measure- scene data, and...
  • Page 258: Using External Memory Devices (Fh And Fz5-11 Only)

    Drive Name of SD Memory Card The FH has a slot for an SD memory card. This is a fixed drive and is assigned as drive M:\. IMPORTANT Box-type Controllers If USB memory devices are separately connected to adjacent USB connectors, the contact between USB memory devices may possibly lead to failure or damage.
  • Page 259: Saving Settings Data To The Flash Memory And Restarting

    Saving Settings Data to the Flash Memory and Restarting This section describes the procedure to save settings data (system data, scene data, and scene group data) in the flash memory of the Sensor Controller. Make sure to save setting data when settings have been changed. Every time you restart the Sensor Controller, the data in the memory is loaded and enabled.
  • Page 260: Saving Settings Data To The Controller Ram Disk Or An External Memory Device

    Saving Settings Data to the Controller RAM Disk or an External Memory Device Setting data files are saved to the RAM disk or to an external memory device. The following table lists the data that can be saved. Data Description This is the setting data, such as the [System] menu setting contents, that is shared System data (*.ini) within the Controller.
  • Page 261: Saving Logged Images In The Controller Memory (Ram) To A Ram Disk Or An External Memory Device

    Saving Logged Images in the Controller Memory (RAM) to a RAM Disk or an External Memory Device Use the following procedure to save image data that was logged in the Controller memory (RAM) to the Controller RAM disk or an external memory device. Reference: About Saving Areas (p.254) When saving data to external memory, insert an external memory device into the Sensor...
  • Page 262: Copying Or Moving Files Between The Controller Ram Disk And An External Memory Device

    Copying or Moving Files between the Controller RAM Disk and an External Memory Device You can copy or move files between the Controller RAM disk and an external memory device. Images and data saved on the RAM disk are deleted if the power supply is turned OFF. To keep these images and data, copy or move them to an external memory device.
  • Page 263: Loading Settings Data From The Controller Ram Disk Or An External Memory Device To The Sensor Controller

    Loading Settings Data from the Controller RAM Disk or an External Memory Device to the Sensor Controller Use the following procedure to load settings data that is saved in the Controller RAM disk or an external memory device to the Sensor Controller The scene name and scene group name that have been loaded are displayed in the Measurement Information Display Area.
  • Page 264 MEMO Loading Settings Data from the Controller RAM Disk or an External Memory Vision System FH/FZ5 Series Device to the Sensor Controller User’s Manual (Z340) WWW.NNC.IR...
  • Page 265: Changing The System Environment

    Changing the System Environment This section describes the settings that are related to the system environment of the Controller. Setting the Camera Conditions ........264 Setting the Conditions That Are Related to Operation during Measurement ............267 Setting the Operation Mode..........268 Parallel Processing ............
  • Page 266: Setting The Camera Conditions

    Setting the Camera Conditions Checking the Camera Connections: [Camera Connection] You can check whether a Camera is connected. There are no settings. In the Main Window, select [System settings] − [Camera] − [Camera Connection] from the [Tool] menu. The Camera Connection Settings View is displayed. Check the connection status.
  • Page 267: Setting The Shtout Signal: [Output Signal Settings]

    In the Main Window, select [System settings] − [Camera] − [Inter-camera setting] from the [Tool] menu The Inter-camera Settings View is displayed. Click a camera number to set the delay between STEP-cameras and then specify the delay count value. Item Set value [Factory default] Description Sets the delay time from when the STEP signal is received to when...
  • Page 268 In the Main Window, select [Camera] − [Output Signal Setting] from the [Tool] menu. The settings dialog box for the output signals is displayed. Note • If the [Output Signal Selection] is set to [SHTOUT], the SHTOUT signal is output according to the settings in the [Individual Line Settings].
  • Page 269: Setting The Conditions That Are Related To Operation During Measurement

    Setting the Conditions That Are Related to Operation during Measurement You can change the following items of operation during measurement. • Operation when the next STEP signal is input during measurement • Whether the scene group is saved when you change to another scene group •...
  • Page 270: Setting The Operation Mode

    Setting the Operation Mode This section describes the operation mode (FH and FZ5-11 only). You can use a multi-core CPU to set the operation mode according to the application conditions. This helps to reduce the takt time and downtime. The operation mode is set in the startup settings.
  • Page 271: Single-Line High-Speed Mode

    Single-line High-speed Mode You can execute the measurement process with a multi-core CPU to inspect more measurement targets in the same amount of time than conventional processing would allow. This Single-line High-speed Mode uses up to four CPU cores (or eight threads) on a CPU that take turns in the execution of a single inspection flow every time the STEP signal is input.
  • Page 272 Example: Normal processing with a single core CPU STEP STEP Shortest takt time Camera processing Measurement processing Camera processing Measurement processing Measurement processing is never executed in parallel. Example: Processing using the Single-line High-speed Mode with dual-core CPU Camera processing STEP STEP STEP...
  • Page 273 IMPORTANT • Click the upper left of the Image Display Pane and set the [Image mode] to [Freeze Image]. Reference: Changing the Image Mode and Other Display Contents (p.92) • If images are taken consecutively at high speed, the number of images that you will be able to take will be limited. If the maximum number of images have been taken, the READY signal will not turn ON until the current processing is completed.
  • Page 274 The following processing items are supported in the single-line high-speed mode: OK:Supported processing item, RST: Processing item with restricted support, ---:Unsupported processing item Processing item Support Processing item Support Processing item Support Camera Image Input Glue Bead Inspection Statistics Camera Image Input FH Position Compensation Reference Calib Data Camera Image Input HDR...
  • Page 275: Multi-Line Random-Trigger Mode

    Multi-line Random-trigger Mode You use the Multi-line Random-trigger Mode when you want to measure more than one line with a single Controller. You can measure the inputs from different Cameras on up to eight independent lines. You can set a scene group data and scene data for each line.
  • Page 276 FH Series You can assign any of up to eight Cameras to each line. Use the following procedure to assign Cameras to each line. In the Main Window, select [System settings] − [Startup] − [Startup settings] from the [Tool] menu. Select [Multi-line random-trigger mode] for the operation mode on the [Operation Mode] tab page.
  • Page 277 Functional Limitations of Multi-line Random-trigger Mode Keep the following points in mind when using Multi-line Random-trigger Mode. Item FH Series FZ5 Series • If the STEP signal is input at the exact same • If the STEP signal is input at the exact time for lines 0 and 1, the measurement on same time across lines 0 to 7, the the other lines may be delayed (roughly by...
  • Page 278 Item FH Series FZ5 Series The value of the STEP signal filter for the The value of the STEP signal filter for each line STEP setting most recently set line is applied to all lines. is applied to each line. •...
  • Page 279 Number of lines 1 line 2 lines 3 to 4 lines 5 to 8 lines ERROR (shared by all ERROR ERROR0 ERROR0 or ERROR1 ERROR0 to ERROR3 lines) READY READY0 READY0 or READY1 READY0 to READY3 READY0 to READY7 Line 0: D00 to D07 DO0 to DO15 No output Line 1: D8 to D15...
  • Page 280 The following processing items are supported in the multi-line random trigger mode: OK:Supported processing item, RST: Processing item with restricted support, ---:Unsupported processing item Processing item Support Processing item Support Processing item Support Camera Image Input Glue Bead Inspection Statistics Camera Image Input FH Position Compensation Reference Calib Data...
  • Page 281: Non-Stop Adjustment Mode

    Non-stop Adjustment Mode Non-stop Adjustment Mode allows you to change and adjust the measurement flow without having to stop the measurement processing during operation. You use saved image files to adjust measurement flows. You can apply a modified measurement flow while the Controller is in RUN mode.
  • Page 282 In the Main Window for line 1, select [Non-stop data transfer] from the [Function] menu. The changes to the settings for line 1 are saved as the settings for line 0 without affecting the measurement. Click the [Switch Screen] button to display the Main Window for line 0. IMPORTANT •...
  • Page 283: High-Speed Logging Mode

    OK:Supported processing item, RST: Processing item with restricted support, ---:Unsupported processing item Processing item Support Processing item Support Processing item Scan Edge Width Precise Calibration Control Flow Parallel RST(*3) Circular Scan Edge Position User Data Control Flow Fieldbus RST(*3) Circular Scan Edge Width Set Unit Data Selective Branch Color Data...
  • Page 284: Parallel Processing

    Parallel Processing There are two types of processings in the Parallel processing: The automatic parallelization and the manual parallelization The automatic parallelization automatically parallelize a measurement flow if [Parallel Execute] under [Operation mode setting] is turned ON. The manual parallelization allows you to use the processing items for the parallel processings to freely edit a measurement flow after automatic parallelization.
  • Page 285 Concept of a Parallelized Measurement Flow Actual Measurement Flow Processing item Parallel processing started. Start of parallel processing Range of parallel processing Parallel process A Parallelize Task Parallelize Task Parallel Parallel Processing item Processing item process process Processing item Processing item Parallel process B Parallelize End Parallel processing ended.
  • Page 286: Specific Example Of Parallel Processing

    Specific Example of Parallel Processing You can use the automatic parallelization in conbination with the manual parallelization to parallelize the following example flow. First, use the automatic parallelization to parallelize three inspection items, 3. Search, 5. Search, and 7. Search. Then, use the manual parallelization to parallelize two inspection items, 9. Camera Switching and 10.
  • Page 287: Restrictions

    Restrictions Flow of Images • The image at the start of parallel processing is passed on to the next item for use in each task block. • The image for the start of parallel operation is also the image that is used after the Parallelize End processing item.
  • Page 288 Nesting • Parallel blocks can be nested. Example: Parallel Block Start of parallel processing Parallelize Task Parallelize Task Search Filtering Parallel Block Parallelize Search Search Parallelize Task Parallelize Task Search Filtering Search Position Search Compensation Parallelize End Search Parallelize End Processing Order The processing order for Parallelize Task processing items is not defined.
  • Page 289: Setting Procedures

    Getting and Setting Data • Do not get or set user data and system data inside task blocks. • When inside the range of a Parallelize Task processing item, do not get or set unit data from a processing unit that is under a different Parallelize Task processing item. •...
  • Page 290 Editing the Measurement Flow In the Main Window (layout 0), select [Function] − [Edit Flow]. Drag the following processing items from under [Inspection and measurement support items], or click the [Insert] button. • Parallelize • Parallelize Task Program the processing items to execute in parallel between two Parallelize Task processing items.
  • Page 291 Processing Items That Supports Automatic Parallelization The following table lists the processing items that support the automatic parallelization. Parallel- Parallel- Parallel- Processing item ize pro- Processing item ize pro- Processing item ize pro- cessing cessing cessing Camera Image Input Glue Bead Inspection Statistics Camera Image Input FH Position Compensation...
  • Page 292 Troubleshooting Symptom Correction An error message is Refer to the error message list. displayed on the console. Insertion position for a unit to Do not place items between the Parallelize item and Parallelize Task item. parallelize Any process units that are placed in that position will not be executed. Insertion position of a Always insert the Parallelize Task processing item between Parallelize and Parallelize End parallelize processing items...
  • Page 293: Setting The Operating Environment Of The System

    Setting the Operating Environment of the System This section describes how to set the operating environment of the Controller. The following settings are available. • Reference: Setting the Date and Time: [Date-time Setting] (p.291) • Reference: Selecting the Language: [Language Setting] (p.292) •...
  • Page 294: Selecting The Language: [Language Setting]

    Selecting the Language: [Language Setting] You can set the language to use for the characters displayed on the displays. Information about the application software will be displayed in the selected language. Note • When a Controller with default settings is started, the [Language setting] dialog box is automatically displayed. •...
  • Page 295: Setting The Status At Startup: [Startup Settings]

    Setting the Status at Startup: [Startup Settings] You can set the status when the power supply is turned ON. Inspection can be set to start immediately after the power supply is turned ON by setting the number of the scene in which the measurement contents are set. In addition, settings can be done so that the [Camera setting] dialog box is not displayed during startup.
  • Page 296 Set value Item Description [Factory default] Measurement initialization is performed immediately after changing the scene or editing the flow. You can specify whether measurement trigger reception or display refresh processing has priority during measurement initialization. Measurement trigger reception is given priority even during [Measurement Measurement initialization priority measurement initialization processing.
  • Page 297 IMPORTANT • Do not set [EtherNet/IP] and [PLC Link] at the same time. They cannot be used at the same time. Example: Set [Serial (Ethernet)] to [PLC Link] and [Fieldbus] to [EtherNet/IP] at the same time. Set [Serial (RS-232C/422)] to [PLC Link] and [Fieldbus] to [EtherNet/IP] at the same time. Set both [Serial (Ethernet)] and [Serial (RS-232C/422)] to [PLC Link], and set [Fieldbus] to [EtherNet/IP] at the same time.
  • Page 298: Setting The Encoder Trigger: [Encoder Trigger Setting]

    Setting the Encoder Trigger: [Encoder Trigger Setting] In the Main Window, select [System setting] − [Other] − [Encoder trigger setting] from the [Tool] menu. Set the target encoder. Set value Parameter Description [Factory default] • Selected Use encoder trigger Set whether to use an encoder trigger. •...
  • Page 299: Setting The Step Input Detection Pulse Width: [Step Setting]

    Set value Parameter Description [Factory default] Phase A Set the timing for starting the pulse count. • [ENABLE start] ENABLE start: Counts the pulses input during the measurement trigger receipt period. Enable timing • STEP start STEP start: The pulses are not counted even during the measurement trigger receipt period until the STEP signal is input.
  • Page 300: Setting A Network Drive: [Network Drive Setting]

    In the Main Window, select [System settings] − [Other] − [Controller] − [STEP setting] from the [Tool] menu. Set the filter width in the [STEP setting] area. Parameter Set value [Factory default] Description • [100] • 200 STEP signal filter width [μs] •...
  • Page 301 Enter the information to be allocated to the network drive (shared name), such as the shared folder, user name, and password. Set value Parameter Description [Factory default] This is the name to be recognized by the Controller as a network drive.
  • Page 302: Checking System Information: [System Information]

    Checking System Information: [System Information] The Controller model and measurement application version can be checked. You can check the external memory status only on the FH and the FZ5-11 Reference: Using External Memory Devices (FH and FZ5-11 Only) (p.256) In the Main Window, select [System information] from the [Function] menu.
  • Page 303: Appendices

    Appendices Alignment ................. 302 Macro Reference.............. 320 About Lenses..............811 Error Messages and Troubleshooting ......827 FAQ ................... 831 Measurement Mechanism..........835 Basic Knowledge about Operations ......844 Setting Figures ..............848 About Number of Logging Images......... 856 About Limits on the Number of Image Input Processing Items Used ...........
  • Page 304: Alignment

    Alignment An FH/FZ5-series Controller has an alignment function that you can use to position workpieces for stage and robot applications (hereafter called external devices). Alignment executes a combination of more than one processing item. This section gives an overview of alignment, and provides details on its use in general. Refer to the Vision System FH/FZ5 Series Processing Item Function Reference Manual (Cat No.
  • Page 305 Supported External Devices Alignment is supported for the following external devices. Type Camera axis movement: None Camera axis movement: X axis θ axis: Direct drive Camera axis movement: Y axis Camera axis movement: XY axes XYθ Camera axis movement: None Camera axis movement: X axis θ...
  • Page 306 Using Alignment ● Calibration The Camera and external device both have their own coordinates, so it is necessary to calculate the relationship of the coordinates of the Camera and the external device in advance. This process is called calibration. The FH/FZ5-series Controller uses the external device to move the workpiece and measure it. This is repeated to calculate the calibration parameter.
  • Page 307: Execution Of Calibration

    Execution of Calibration This section uses two Cameras and a stage as the external device to describe an example for setting the calibration flow and executing calibration. Example: Calibration Flow Example for 2 Cameras Camera Image Input processing item · · · Select Camera 0. ↓...
  • Page 308 Settings for the External Device to Use Set the parameters that describe the type and specifications of the external device to use. Add the following machine setting processing item to the flow. ● Stage Data If you are using a stage, use this processing item. Refer to Stage Data of the Vision System FH/FZ5 Series Processing Item Function Reference Manual (Cat No.
  • Page 309 Settings for the Calibration To Execute Add the following Calibration processing items to the flow. ● Vision Master Calibration This processing item calculates the axis movement that is necessary to perform the most accurate calibration within the range of movement of the external device. This routine is performed repeatedly to create very precise calibration parameters: Output the calculated axis movement to the PLC, the PLC moves the external device, the PLC sends a measurement command to the FH/FZ5-series Controller.
  • Page 310 Executing Calibration ● Vision Master Calibration External device FH/FZ5 1: Return to origin Return to origin completion response 2: Clear measurement Clear completion response The processing in the frame is 3: Measurement request repeated until the Calibration 3.1: Measurement Completion Flag turns ON. processing Data output •...
  • Page 311 ● PLC Master Calibration • Standard Mode The numbers in parenthesis are the external reference numbers that are used when commands are executed for the PLC Master Calibration processing unit. Refer to External Reference Table under PLC Master Calibration in the Vision System FH/FZ5 Series Processing Item Function Reference Manual (Cat No.
  • Page 312 • Easy Mode The Calibration Execution Flag and movement in actual coordinates must be set in advance in the PLC Master Calibration settings dialog box. FH/FZ5 External device 1: An origin return is performed, and the calibration workpiece is moved to the reference position. 2: Execution of the measurement command Loop (Iterations ≤...
  • Page 313: Troubleshooting

    Troubleshooting PLC Master Calibration Refer to Key Points for Adjustment under PLC Master Calibration in the Vision System FH/FZ5 Series Processing Item Function Reference Manual (Cat No. Z341). Vision Master Calibration Refer to Key Points for Adjustment under Vision Master Calibration in the Vision System FH/FZ5 Series Processing Item Function Reference Manual (Cat No.
  • Page 314: Alignment

    Alignment This section will use two Cameras to describe the procedures for setting the alignment flow and executing alignment. Example 1: Alignment Flow Example (Position Data Calculation and Axis Movement Conversion) for Two Cameras Camera Image Input processing item · · · Select Camera 0. ↓...
  • Page 315 Convert Axis Movement processing item · · · Set the machine setting processing item to reference. Then set the expressions for the two Position Data Calculation processing items, [Calculate position XY] and [Calculate angle TH], in the [Reference position XY] and [Reference angle], and the [Measurement position XY] and [Measurement angle] in the Movement Single Position processing item.
  • Page 316 Settings for Position Alignment ● Convert Position Data + Movement Single Position Use these settings to align the measured position and measured angle with the reference position and reference angle. The movement that is required to align each axis of the external device is calculated and output. Refer to Convert Position Data and Movement Single Position in the Vision System FH/FZ5 Series Processing Item Function Reference Manual (Cat No.
  • Page 317 Other Alignment Functions ● Checking the Calibration Results The Calibration Support Tool uses the calibration parameters to graphically display the relationship of the positions that are represented by the Camera coordinates and the actual coordinates. You can compare the relationship of the displayed position with the actual position of the equipment.
  • Page 318 Refer to the Vision System FH/FZ5 Series Processing Function Reference Manual (Cat No. Z341) for further information on the alignment processing items. Alignment Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 319 ● Machine Simulator The Machine Simulator processing item allows you to see how the alignment marks move on the image while each axes of the stage or robot is being controlled. You can use it to verify the operation of the alignment processing items even if the actual stage or robot is not available.
  • Page 320 ↓ Position measurement processing item · · · Measure the position of the alignment marks or the position of a special feature of the workpiece from the image in Camera 1. To output the position on the image, set [Calibration] on the [Output parameter] tab page to OFF.
  • Page 321: Alignment Processing Items

    Alignment Processing Items The following processing items can be used as alignment processing items. Refer to the following manual for details on processing items. Reference: Vision System FH/FZ5 Series Processing Item Function Reference Manual (Cat No. Z341). Processing Sub category Processing item name Description item category...
  • Page 322: Macro Reference

    Macro Reference Error List If an error occurs during execution of the program of a macro customize function, you can identify the cause of the error from the error number and error message that are displayed. The error messages that may appear are described below.
  • Page 323 Error Message Explanation Action Declare the array variable with a Dim instruction before Undefined array An undefined array is used. using the array. An attempt was made to input more Generally occurs when one line of data is received by Line buffer overflow than the allowed character limit (255 serial communication or from a memory card.
  • Page 324: List Of Reserved Words

    IMPORTANT • When an error occurs in a process other than a communication command macro or Try - Catch - End Try, the error number cannot be used to check the error. Determine the nature of the error from the error message that appears in the system status console window.
  • Page 325 DATACOUNT& Date$ Debug DebugPrint Delete DeleteUnit DisplaySubNo DISPLAYTEXT$ DisplayUnitNo Dposline DrawArc DrawArcW DrawBox DrawCircle DrawCircleW DrawCursor DrawEllipse DrawFigure DrawFillImage DrawJudgeText DrawLine DrawLineW DrawMeasureImage DrawPoint DrawPolygon DrawSearchFigure DrawText DrawTextG DrawUnitImage Dskf ElapsedTime Else Elseif EndIf Erase Errcmnd$ Errno Error ExecuteImageLogging Exit ExitFzProcess FALSE Fcopy...
  • Page 326 ImageFormat ImageUpdate initialLayoutNo initialRemoteLayoutNo Input Input$ InsertUnit IOIDENT$ IsFile ItemCount ItemIdent$ ItemInfo ItemTitle$ JGINDEX& JUDGE& JUDGE_ERROR JUDGE_IMAGEERROR JUDGE_MEMORYERROR JUDGE_MODELERROR JUDGE_NC JUDGE_NG JUDGE_OK JUDGELOWER# JUDGEMACROFLAG& JudgeOut JUDGEUPPER# Keyword Kill Layout?_Title Layout?_WindowSetting Layout?_output (? represents a number) (? represents a number) (? represents a number) Layout?_runout LayoutSetting?_? LCase$...
  • Page 327 ParallelExecute PARAOFFSET& Piece$ PLCRCVDATA& PLCSNDDATA& Print PS_DASH PS_DASHDOT PS_DASHDOTDOT PS_DOT PS_INSIDEFRAME PS_NULL PS_SOLID PutAll PutPort RaiseOptionEvent ReadPlcMemory ReceiveData RefreshImageWindow RefreshJudgeWindow RefreshTextWindow RefreshTimeWindow Remeasure RenumUnitNo RESPONSEAREA& RESPONSECODE& RESPONSEMEMORYADDRESS& RESPONSESTRING$ RESPONSEVALUE& RESULTDATA# RESULTJUDGE& Return Right$ Rmdir Save SaveBackupData SaveData SaveImage SaveMeasureImage SaveScene SaveSceneGroup SaveSystemData SaveUnitData...
  • Page 328 TA_BASELINE TA_BOTTOM TA_CENTER TA_LEFT TA_NOUPDATECP TA_RIGHT TA_RTLREADING TA_TOP TA_UPDATECP Task Then Time$ Timer TJGFLAG& TotalJudge TransformAngle TransformArea TransformDist TransformLine TransformXY TRUE UCase$ UnitCount UnitData UnitData$ UnitData2 UnitInfo UnitItemIdent$ UnitJudge UnitNo UnitTitle$ VarList VarPop VarPtr VarPush VarSave Wait While WritePlcMemory List of Reserved Global Data Words Global data that is reserved in the FH/FZ5 series is shown below.
  • Page 329: System Data List

    System Data List The ID information and ID names required to set or acquire system data are indicated below. Identifier information 0 Identifier information 1 Data identifier name Configuration Language Sets the display language. jpn: Japanese deu: German eng: English fra: French Language chs: Simplified Chinese...
  • Page 330 Identifier information 0 Identifier information 1 Data identifier name IoModule Serial (Ethernet) UdpNormal: Normal (UDP) TcpNormal: Normal (TCP) TcpClient: Normal (TCP Client) ioIdent2 UdpNormal2: Normal (UDP) (Fxxx series method) UdpPlcLink: PLC Link (SYSMAC CS/CJ/CP/One) UdpPlcLinkM: PLC Link (MELSEC QnU/Q/QnAS series) UdpPlcLinkY: PLC Link (JEPMC MP) Serial (RS-232C/422) SerialNormal: Normal...
  • Page 331 Identifier information 0 Identifier information 1 Data identifier name CameraControl STEP - camera 0 delay cameraDelay0 STEP - camera 1 delay cameraDelay1 STEP - camera 2 delay cameraDelay2 STEP - camera 3 delay cameraDelay3 STEP - camera 4 delay cameraDelay4 STEP - camera 5 delay cameraDelay5 STEP - camera 6 delay...
  • Page 332 Identifier information 0 Identifier information 1 Data identifier name ParallelIo Output polarity 0: ON at NG polarity 1: ON at OK Output control 0: OFF handshake 1: Handshaking 2: Synchronization output Output cycle cycleTime Parallel Gate ON delay riseTime Output time outputTime Timeout timeout...
  • Page 333 Identifier information 0 Identifier information 1 Data identifier name SerialNormal2 Timeout timeout Interface 0: RS-232C rsMode 1: RS-422 Baud rate (2,400, 4,800, 9,600, 19,200, 38,400, 57,600, baudRate 115,200) Data length (7 or 8) byteSize Parity 0: OFF Normal (Fxxx series method) parity 1: Odd 2: Even...
  • Page 334 Identifier information 0 Identifier information 1 Data identifier name Asynchronous output 0: OFF outputBuffering RS-232C/422 PLC Link 1: ON (SYSMAC CS/CJ/CP/One) Retry interval responseTimeout Polling cycle pollingMinCycle SerialPlcLinkM Output control 0: OFF handshake 1: Handshaking Timeout timeout Interface 0: RS-232C rsMode 1: RS-422 Baud rate (2,400, 4,800, 9,600, 19,200, 38,400, 57,600, 115,200) baudRate...
  • Page 335 Identifier information 0 Identifier information 1 Data identifier name Data Output Area type outputArea Data Output Area address outputMemoryAddress Asynchronous output 0: OFF outputBuffering 1: ON Retry interval responseTimeout Retry interval 2 responseTimeout2 Polling cycle pollingMinCycle Automatic Ethernet PLC Link 0: OFF enableDhcp (SYSMAC CS/CJ/CP/One)
  • Page 336 Identifier information 0 Identifier information 1 Data identifier name UdpNormal Automatic 0: OFF enableDhcp 1: ON IP address ipAddress Subnet mask subnetMask Normal (UDP) Default gateway defaultGateway DNS server Output IP address destIpAddress Input port number portNo Output port number portNo2 TcpNormal Automatic...
  • Page 337 Identifier information 0 Identifier information 1 Data identifier name UdpNormal2 Automatic 0: OFF enableDhcp 1: ON IP address ipAddress Subnet mask subnetMask Normal Default gateway defaultGateway (UDP Fxxx series method) DNS server Output IP address destIpAddress Input port number portNo Output port number portNo2 Connect to...
  • Page 338 Identifier information 0 Identifier information 1 Data identifier name Data output number for line 0 (number of data output items for line 0) 32: Result Data Format 0 (8 DINT) 64: Result Data Format 1 (16 DINT) 128: Result Data Format 2 (32 DINT) 256: Result Data Format 3 (64 DINT) 2097152: Result Data Format 4 (4 LREAL) outputDataSize0...
  • Page 339 Identifier information 0 Identifier information 1 Data identifier name Data output number for line 3 (number of data output items for line 3) 32: Result Data Format 0 (8 DINT) 64: Result Data Format 1 (16 DINT) 128: Result Data Format 2 (32 DINT) 256: Result Data Format 3 (64 DINT) 2097152: Result Data Format 4 (4 LREAL) outputDataSize3...
  • Page 340 Identifier information 0 Identifier information 1 Data identifier name Data output number for line 6 (number of data output items for line 6) 32: Result Data Format 0 (8 DINT) 64: Result Data Format 1 (16 DINT) 128: Result Data Format 2 (32 DINT) 256: Result Data Format 3 (64 DINT) 2097152: Result Data Format 4 (4 LREAL) outputDataSize6...
  • Page 341 Identifier information 0 Identifier information 1 Data identifier name Trigger STEP signal filter width 5: 100 11: 200 digitalFilter 18: 300 24: 400 30: 500 Use Encoder trigger 0: Not used encoderEnabled 1 : Used Encoder input selection 0: Open collector encoderInputPulse 1: Line driver Phase A resolution...
  • Page 342 Identifier information 0 Identifier information 1 Data identifier name Destination Specify the image file save destination (RAM disk or USB imageLoggingDirectory memory). Prefix imageLoggingHeader Switch saving folder by scene 0: Disabled imageLoggingScene 1: Enabled Switch saving folder by judge 0: Disabled imageLoggingJudge Logging setting 1: Enabled...
  • Page 343: List Of I/O Modules

    List of I/O Modules I/O module settings required for communication with external devices are indicated below. Identification name IO module name References EtherNetIP EtherNet/IP Interface communication Reference: Details (p.341) ParallelIo Parallel Interface communication Reference: Details (p.343) SerialNormal Serial Interface Normal communication Reference: Details (p.344) SerialNormal2 (Fxxx series method) Serial Interface PLC Link (MELSEC QnU/Q/QnAS)
  • Page 344 BusyOut JudgeOut RunOut GetAll Reference: GetAll (p.528) PutAll Reference: PutAll (p.643) ReceiveData Reference: ReceiveData (p.651) SendData Reference: SendData (p.696) SendString Reference: SendString (p.698) ReadPlcMemory WritePlcMemory SetPlcData GetPlcData Example Receive data Dim data&(256) Dim ipaddr&(4) ' Gets the five data. ReceiveData "UdpPlcLink", data5&(), 4*5, size& Transmit data.
  • Page 345 ParallelIo Parallel Interface communication IoModule identification name ParallelIo Overview This is a module is for sending and receiving commands and data via the Parallel interface. System data Identification Meaning Initial value Output polarity polarity 0: ON when NG 1: ON when OK Output control 0: None handshake...
  • Page 346 Example Receive data A parameter of ReceiveData, the parameter size are unnecessary. Dim data&(256) 'Gets the five data. ReceiveData "ParallelIo", data&(), 4*5, size& Send data A parameter of SendData, the parameter size are unnecessary. Dim data&(256) 'Transmit the five data. SendData "ParallelIo", data&(), 4*5 SerialNormal Serial Interface Normal communication...
  • Page 347 Supported functions IoInitialize GetPort Reference: GetPort (p.542) PutPort Reference: PutPort (p.645) BusyOut JudgeOut RunOut GetAll Reference: GetAll (p.528) PutAll Reference: PutAll (p.643) ReceiveData Reference: ReceiveData (p.651) SendData Reference: SendData (p.696) SendString Reference: SendString (p.698) ReadPlcMemory WritePlcMemory SetPlcData GetPlcData Example Receive data A parameter of ReceiveData, the parameter size are unnecessary.
  • Page 348 SerialPlcLinkM Serial Interface PLC Link (MELSEC QnU/Q/QnAS) communication IoModule identification name SerialPlcLinkM Overview This is a module is for sending and receiving commands and data via the serial PLC Link interface. System data Identification Meaning Initial value Interface rsMode 0: RS-232C 1: RS-422 baudRate Baud rate [bps]...
  • Page 349 Area classification Area classification name Area classification number Data register File register Link register Supported functions IoInitialize GetPort Reference: GetPort (p.542) PutPort Reference: PutPort (p.645) BusyOut JudgeOut RunOut GetAll Reference: GetAll (p.528) PutAll Reference: PutAll (p.643) ReceiveData Reference: ReceiveData (p.651) SendData Reference: SendData (p.696)
  • Page 350 SerialPlcLink Serial Interface PLC Link (SYSMAC CS/CJ/CP/One) communication IoModule identification name SerialPlcLink Overview This is a module is for sending and receiving commands and data via the serial PLC Link interface. System data Identification Meaning Initial value Interface rsMode 0: RS-232C 1: RS-422 baudRate Baud rate [bps]...
  • Page 351 Area classification Area classification name Area classification number CIO Area (CIO) Work Area (WR) Holding Bit Area(HR) Auxiliary Bit Area (AR) DM Area (DM) EM Area (EM0) EM Area (EM1) EM Area (EM2) EM Area (EM3) EM Area (EM4) EM Area (EM5) EM Area (EM6) EM Area (EM7) EM Area (EM8)
  • Page 352 SetPlcData "SerialPlcLink", writeData&(), 0, 8, 123.45 'Set the data (20) of the integer type. SetPlcData "SerialPlcLink", writeData&(), 32, 4, 20 'Set the data (OMRON) of the character type. SetPlcData "SerialPlcLink", writeData&(), 36, 5, "OMRON" 'Write in data for 7ch from 10ch of the DM area.
  • Page 353 TcpClient TCP Client Normal communication IoModule identification name TcpClient Overview This is a module is for sending and receiving commands and data by Ethernet TCP Client protocol. System data Identification Meaning Initial value Enable DHCP enableDhcp 0: Disabled 1: Enabled ipAddress IP address of the system 10.5.5.100...
  • Page 354 Example Receive data. Set an IP address and parameter size (*4 integer type domain) in a parameter to use an Ethernet. Dim data&(256) Dim ipaddr&(4) 'Set the IP address of the destination. ipaddr&(0) = 10 ipaddr&(1) = 5 ipaddr&(2) = 5 ipaddr&(3) = 101 'Gets the five data.
  • Page 355 Supported functions IoInitialize GetPort Reference: GetPort (p.542) PutPort Reference: PutPort (p.645) BusyOut JudgeOut RunOut GetAll Reference: GetAll (p.528) PutAll Reference: PutAll (p.643) ReceiveData Reference: ReceiveData (p.651) SendData Reference: SendData (p.696) SendString Reference: SendString (p.698) ReadPlcMemory WritePlcMemory SetPlcData GetPlcData Example Receive data Set an IP address and parameter size (*4 integer type domain) in a parameter to use an Ethernet.
  • Page 356 UdpNormal TCP Normal communication IoModule identification name UdpNormal UdpNormal2 (Fxxx series method) Overview This is a module is for sending and receiving commands and data by Ethernet UDP protocol. System data Identification Meaning Initial value Enable DHCP enableDhcp 0: Disabled 1: Enabled ipAddress IP address of the system...
  • Page 357 Example Receive data Set an IP address and parameter size (*4 integer type domain) in a parameter to use an Ethernet. Dim data&(256) Dim ipaddr&(4) 'Set the IP address of the destination. ipaddr&(0) = 10 ipaddr&(1) = 5 ipaddr&(2) = 5 ipaddr&(3) = 101 'Gets the five data.
  • Page 358 UdpPlcLinkM PLC Link (MELSEC QnU/Q/QnAS) communication IoModule identification name UdpPlcLinkM Overview This is a module is for sending and receiving commands and data by Ethernet PLC Link protocol. System data Identification Meaning Initial value Enable DHCP enableDhcp 0: Disabled 1: Enabled ipAddress IP address of the system 10.5.5.100...
  • Page 359 Supported functions IoInitialize GetPort Reference: GetPort (p.542) PutPort Reference: PutPort (p.645) BusyOut JudgeOut RunOut GetAll Reference: GetAll (p.528) PutAll Reference: PutAll (p.643) ReceiveData Reference: ReceiveData (p.651) SendData Reference: SendData (p.696) SendString Reference: SendString (p.698) ReadPlcMemory Reference: ReadPlcMemory (p.649) WritePlcMemory Reference: WritePlcMemory (p.807) SetPlcData Reference:...
  • Page 360 'Set the data (20) of the integer type. SetPlcData "UdpPlcLinkM", writeData&(), 32, 4, 20 'Set the data (OMRON) of the character type. SetPlcData "UdpPlcLinkM", writeData&(), 36, 5, "OMRON" 'Write in data for 7ch from 10ch of the Data register area.
  • Page 361 PLC Link data Identification Meaning Initial value commandArea Command area Area Data register commandMemoryAddress Command area Address responseArea Response area Area Data register responseMemoryAddress Response area Address outputArea Data Output area Area Data register outputMemoryAddress Data Output area Address handshake Handshaking responseTimeout Retry interval [ms]...
  • Page 362 'Set the data (20) of the integer type. SetPlcData "UdpPlcLinkY", writeData&(), 32, 4, 20 'Set the data (OMRON) of the character type. SetPlcData "UdpPlcLinkY", writeData&(), 36, 5, "OMRON" 'Write in data for 7ch from 10ch of the Data register area.
  • Page 363 UdpPlcLink PLC Link (SYSMAC CS/CJ/CP/One) communication IoModule identification name UdpPlcLink Overview This is a module is for sending and receiving commands and data by Ethernet PLC Link protocol. System data Identification Meaning Initial value Enable DHCP enableDhcp 0: Disabled 1: Enabled ipAddress IP address of the system 10.5.5.100...
  • Page 364 Area classification Area classification name Area classification number CIO Area (CIO) Work Area (WR) Holding Bit Area (HR) Auxiliary Bit Area (AR) DM Area (DM) EM Area (EM0) EM Area (EM1) EM Area (EM2) EM Area (EM3) EM Area (EM4) EM Area (EM5) EM Area (EM6) EM Area (EM7)
  • Page 365 SetPlcData "UdpPlcLink", writeData&(), 0, 8, 123.45 'Set the data (20) of the integer type. SetPlcData "UdpPlcLink", writeData&(), 32, 4, 20 'Set the data (OMRON) of the character type. SetPlcData "UdpPlcLink", writeData&(), 36, 5, "OMRON" 'Write in data for 7ch from 10ch of the DM area.
  • Page 366 Figure Data List To set or acquire a model figure or region figure held in a processing unit, use an array to specify the figure data to be set or acquired Figure Data Structure List The structure of figure data is indicated below. Array element Description Description...
  • Page 367 Figure Array Figure Description kind element figure(0) Figure data header information figure(1) Figure type information figure(2) First point X Wide line figure(3) First point Y figure(4) Second point X figure(5) Second point Y figure(6) Width figure(0) Figure data header information figure(1) Figure type information figure(2)
  • Page 368: List Of Figure Numbers

    Figure Array Figure Description kind element figure(0) Figure data header information figure(1) Figure type information figure(2) X-coordinate of center figure(3) Y-coordinate of center Wide arc figure(4) Radius figure(5) Start angle figure(6) End angle figure(7) Width figure(0) Figure data header information figure(1) Figure type information figure(2)
  • Page 369 Figure Parameter Description number Model registration figure(model registration) Measurement region figure (region setting) ECM Search Mask registration figure (model registration) Model registration figure (error model registration) Mask registration figure(error model registration) Model registration figure(model registration) EC Circle Search Measurement region figure (region setting) Model registration figure(model registration) Shape Search II Measurement region figure (region setting)
  • Page 370 Figure Parameter Description number Gravity and Area Measurement region figure (region setting) Labeling Measurement region figure (region setting) Label Data No figure Defect Measurement region figure (region setting) Precise Defect Measurement region figure (region setting) Fine Matching Model registration figure(model registration) Character inspection Measurement region figure (region setting) Date Verification...
  • Page 371: Model Number List

    Figure Parameter Description number Advanced filter Measurement region figure (region setting) Panorama No figure Trapezoidal Correction + Measurement region figure (region setting) Stripes Removal Filter + Measurement region figure (region setting) Halation suppression + Measurement region figure (region setting) Model Number List When you need to re-register the processing unit model, specify the number of the model to be re-registered.
  • Page 372 Modle Parameter Description number Edge Position Edge model Edge Pitch Edge model Scan Edge Position Edge model Scan Edge Width Edge model Circular Scan Edge Position Edge model Circular Scan Edge Width Edge model Intersection Edge model Color Data Color Data model Gravity and Area Gravity and Area model Labeling...
  • Page 373: Image Number List

    Image Number List When you need to access image data in a processing unit, specify the number of the image that you want to access. The image numbers and images of each processing item are shown below. Item Image number Description Search No image...
  • Page 374 Item Image number Description Camera Image Input FH Camera image Camera Image Input HDR Camera image Camera Image Input HDR Lite Camera image Camera Switching Camera image Measurement Image Switching - No image Position Compensation Position compensated image Filtering Filtered image Background Suppression Background suppressed image Brightness Correct Filter...
  • Page 375 Item Image number Description Image Conversion Logging No image Data Logging No image Elapsed Time No image Wait No image Focus No image Iris No image Parallelize No image Parallelize Task No image Statistics No image Reference Calib Data Corrected image Position Data Calculation No image Stage Data...
  • Page 376: List Of Sub-Image Numbers

    List of Sub-Image Numbers In addition to measurement images, the processing unit also contains images being processed and images that have been processed, and these can be displayed in the image window as sub-images. To display a sub-image, specify the number of the sub-image. The sub-image numbers and sub-images of each processing item are shown below.
  • Page 377 Item Sub-image Description Measurement image Defect Masked defect profile image (with area measurement) Measurement image Precise Defect Masked defect profile image (with area measurement) Measurement image Fine Matching Difference image Character Inspection Measurement image Date Verification Measurement image Model Dictionary Measurement image 2DCode Measurement image...
  • Page 378 Item Sub-image Description Circle image Polar Transformation Measurement image Trapezoidal Correction Trapezoidal corrected image Machine Simulator Axis shifted image Subtraction image Image Subtraction Measurement image Advanced filter image Output image 0 Output image 1 Advanced filter Output image 2 Output image 3 Output image Panorama Panorama image...
  • Page 379 Item Sub-image Description Graph display corresponding to "Data number" in setting data Data graph display of data 0 Data graph display of data 1 Data graph display of data 2 Statistics Data graph display of data 3 Data graph display of data 4 Data graph display of data 5 Data graph display of data 6 Data graph display of data 7...
  • Page 380 Item Sub-image Description Last NG 1st preceding NG image (when two or more images are saved) Most recent NG image (when less than two images are saved) Display Last NG Image 2nd preceding NG image (when three or more images are saved) Most recent NG image (when less than three images are saved) 3rd preceding NG image (when four or more images are saved) Most recent NG image (when less than four images are saved)
  • Page 381: Memory Usage Guidance For Processing Items

    Memory Usage Guidance For Processing Items Free space is required in the application memory in order to add a processing unit to the measurement flow. The amount of free space required in application memory consists of both the amount necessary to add a processing unit to the measurement flow, and the amount necessary to configure settings for the added unit and execute measurement.
  • Page 382 Approximate amount of application memory used Main settings that affect change of Item Adding to memory used Change due to settings measurement flow Measurement region figure, selected region Color Data Approx. 1KB Approx. 25MB figure of static mask, image size. Measurement region figure, selected region Gravity and Area Approx.
  • Page 383 Approximate amount of application memory used Main settings that affect change of Item Adding to memory used Change due to settings measurement flow Model registration figure of calibration Camera Image Approx. 9MB (for monochrome image) Approx. 3KB settings, image size, whether image is color Input HDR Approx.
  • Page 384 Approximate amount of application memory used Main settings that affect change of Item Adding to memory used Change due to settings measurement flow Measurement region figure, image size, Precise Calibration Approx. 660KB Approx. 51MB specified calibration method. Number and length of calculation User Data Approx.
  • Page 385 Approximate amount of application memory used Main settings that affect change of Item Adding to memory used Change due to settings measurement flow Camera Calibration Approx. 7KB No change Number and length of calculation Data Save Approx. 1KB Approx. 1MB expressions, number and length of comments.
  • Page 386: Macro Function List

    Macro Function List Macro functions that can be used in macro customize functions are shown below. Alphabetical Order Commu Unit Scene nication Command Calculat Unit Function Classification Control Comma References Name Macro Macro Macro Macro Gets the absolute value of the Arithmetic Reference: specified expression...
  • Page 387 Commu Unit Scene nication Command Calculat Unit Function Classification Control Comma References Name Macro Macro Macro Macro Resumes execution of the Debug Reference: Cont program after it has been Command Details (p.436) stopped Copies the measurement image CopyMeasur Processing unit Reference: as an image of the Unit Macro eImage...
  • Page 388 Commu Unit Scene nication Command Calculat Unit Function Classification Control Comma References Name Macro Macro Macro Macro Draw the wide arc on the image Image Window Reference: DrawArcW window Control Details (p.471) Reference: Draws a rectangle on the image Image Window DrawBox window Control...
  • Page 389 Commu Unit Scene nication Command Calculat Unit Function Classification Control Comma References Name Macro Macro Macro Macro Get the function name of the General Reference: Errcmnd$ macro where an error occurred instruction Details (p.513) General Reference: Errno Gets the error number instruction Details (p.515) ExecuteImag...
  • Page 390 Commu Unit Scene nication Command Calculat Unit Function Classification Control Comma References Name Macro Macro Macro Macro GetUnitFigur Gets figure data to the Processing unit Reference: processing unit control Details (p.554) Reference: General Gosub Operate the specified subroutine instruction Details (p.556) Moves the process to the General Reference:...
  • Page 391 Commu Unit Scene nication Command Calculat Unit Function Classification Control Comma References Name Macro Macro Macro Macro Gets the length of the specified String Reference: character string Operation Details (p.593) Reads the data of one line from Reference: Line Input# File Control the file Details (p.595)
  • Page 392 Commu Unit Scene nication Command Calculat Unit Function Classification Control Comma References Name Macro Macro Macro Macro Open For Reference: Open the file in append mode File Control Append As# Details (p.627) Reference: Open For Open the file in reading mode File Control Input As# Details (p.629)
  • Page 393 Commu Unit Scene nication Command Calculat Unit Function Classification Control Comma References Name Macro Macro Macro Macro Extracts the specified length of String Reference: Right$ characters from the right side of Operation Details (p.664) character string Reference: Rmdir Deletes a directory File Control Details (p.666) Sets the output state of the RUN...
  • Page 394 Commu Unit Scene nication Command Calculat Unit Function Classification Control Comma References Name Macro Macro Macro Macro IO Module Reference: SendString Sends the character string data Control Details (p.698) Sets the processing unit number SetDisplayUn Reference: in the flow window to the Display control itNo Details (p.699)
  • Page 395 Commu Unit Scene nication Command Calculat Unit Function Classification Control Comma References Name Macro Macro Macro Macro Register a user-defined function SetUserSubr Debug Reference: that has been defined in the outine Command Details (p.739) external DDL file Sets all variables with the Reference: SetVar Others...
  • Page 396 Commu Unit Scene nication Command Calculat Unit Function Classification Control Comma References Name Macro Macro Macro Macro Gets the number of registered Reference: UnitCount Flow control processing units Details (p.777) Reference: Gets the numerical data of a Processing unit UnitData processing unit control Details (p.778)
  • Page 397: Function-Based Index

    Function-based Index General Instructions Command Function References Defines the array variable. Reference: Details (p.461) Repeatedly executes the statements between Do and Do Loop While Reference: Details (p.465) Loop while the specified condition meets. Erase Releases array variable. Reference: Details (p.512) Get the function name of the macro where an error Errcmnd$ Reference:...
  • Page 398 Command Function References Gets the color value. Reference: Details (p.662) Gets the sine of the specified expression. Reference: Details (p.743) Determining the square root. Reference: Details (p.745) Gets the tangent of the specified expression. Reference: Details (p.755) Time$ Reads out the clock time from the internal clock. Reference: Details (p.757) Gets the exclusive disjunction (XOR) of two expressions.
  • Page 399 Command Function References Gets a processing unit number based on the specified unit Reference: Details (p.793) label. Scene Group Controls Command Function References ChangeSceneGroup Changes the scene group. Reference: Details (p.424) ClearSceneGroup Clears scene group data. Reference: Details (p.431) CopySceneGroup Copies scene group data.
  • Page 400 Command Function References GetUnitFigure Gets figure data to the processing unit. Reference: Details (p.554) ImageFormat Gets the image format of the image in the processing unit. Reference: Details (p.566) Executes display of the measurement result of the MeasureDispG Reference: Details (p.614) processing unit.
  • Page 401 Command Function References Sets the external output setting for the measurement SetMeasureOut Reference: Details (p.708) result. IO Module Controls Command Function References BusyOut Sets the output state of the processing busy signal. Reference: Details (p.419) GetAll Gets the input states of all input terminals. Reference: Details (p.528) GetPlcData...
  • Page 402 Command Function References DrawArc Draw the arc on the image window. Reference: Details (p.469) DrawArcW Draw the wide arc on the image window. Reference: Details (p.471) DrawBox Draws a rectangle on the image window. Reference: Details (p.473) DrawCircle Draw a circle on the image window. Reference: Details (p.475) DrawCircleW...
  • Page 403 Data Save/Load Command Function References LoadBackupData Loads the system + scene group 0 data. Reference: Details (p.599) LoadScene Loads the scene data. Reference: Details (p.601) LoadSceneGroup Loads the scene group data. Reference: Details (p.603) LoadSystemData Loads the system data. Reference: Details (p.605) LoadUnitData Loads the processing unit data.
  • Page 404 Debug Commands Command Function References Call Executes the registered user-defined function. Reference: Details (p.421) Resumes execution of the program after it has been Cont Reference: Details (p.436) stopped. Set the program execution form and information output Debug Reference: Details (p.456) method.
  • Page 405: Macro Command Reference

    Macro Command Reference Gets the absolute value of the specified expression. Format Abs(<expression>) Parameter Parameter Data type Description name Integer type Double <expression> precision real Expression to get the absolute value number data type Return value Returns a double precision real absolute value. Description Gets the absolute value of the expression specified in the <expression>...
  • Page 406 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items GetUnitData (Reference: Details (p.552)) UnitData (Reference: Details (p.778)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 407 AddGlobalData Adds the global data. Format AddGlobalData <dataIdent>, <data> Parameter Parameter Data type Description name Character <dataIdent> Identification name of the global data to add string type Integer type Double precision real <data> number data Value added in the global data type Character string type...
  • Page 408 Supported Versions Version 3.50 or later Related Items GetGlobalData (Reference: Details (p.530)) SetGlobalData (Reference: Details (p.702)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 409 AddSystemData Adds the system data. Format AddSystemData <dataIdent0>, <dataIdent1>, <data> Parameter Parameter Data type Description name Character Data identification name of identification information 0 of system data to be added <dataIdent0> string type (specify "PanDA") Character <dataIdent1> Data identification name of identification information 1 of system data to be added string type Integer type Double...
  • Page 410 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items AddGlobalData (Reference: Details (p.405)) GetSystemData (Reference: Details (p.546)) SetSystemData (Reference: Details (p.725)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 411 Gets the logical product of two expressions. Format <expression1> AND <expression2> Parameter Parameter Data type Description name <expression1> Integer type Expression to calculate the logical product <expression2> Integer type Expression to calculate the logical product Return value Returns the logical product as an integer value. Description Gets the logical product by bit of the expression specified in the <expression1>...
  • Page 412 Supported Versions Version 3.50 or later Related Items GetUnitData (Reference: Details (p.552)) NOT (Reference: Details (p.626)) OR (Reference: Details (p.635)) UnitData (Reference: Details (p.778)) XOR (Reference: Details (p.809)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 413 ApproximationCircle Gets the approximate circle. Format ApproximationCircle <count>, <x()>, <y()>, <centerX>, <centerY>, <radius> Parameter Parameter Data type Description name <count> Integer type Number of the specified coordinate Integer array Double <x()> 1D array stored each point of the X-coordinate precision real number array Integer array Double...
  • Page 414 Usage Cautions • None. Example Calculates the approximate circle and getting the center coordinates and radius from each of the three points (50, 50), (100, 100), and (150, 50). Dim X&(3), Y&(3) Rem Assign the three values of the coordinate value to the array. X&(0) = 50 Y&(0) = 50 X&(1) = 100...
  • Page 415 Gets the character code of the specified character. Format Asc <string> Parameter Parameter Data type Description name Character <string> Character string that requests the character code. string type Return value Returns the integer type character code value in decimal. Description Gets the character code of the first character in a character string specified in the <string>...
  • Page 416 Related Items Chr$ (Reference: Details (p.427)) Hex$ (Reference: Details (p.560)) LCase$ (Reference: Details (p.589)) Left$ (Reference: Details (p.591)) Len (Reference: Details (p.593)) Mid$ (Reference: Details (p.621)) Piece$ (Reference: Details (p.637)) Right$ (Reference: Details (p.664)) Str$ (Reference: Details (p.749)) Str2$ (Reference: Details (p.751)) UCase$ (Reference: Details (p.775))
  • Page 417 AssignUnit Registers the processing unit. Format AssignUnit <unitNo>, <itemIdent> Parameter Parameter Data type Description name Processing unit number on the measurement flow to register the processing unit (0 to <unitNo> Integer type the enrollment number of the processing units at the current scene) Character <itemIdent>...
  • Page 418 Related Items CheckUnit (Reference: Details (p.425)) CopyUnit (Reference: Details (p.442)) DeleteUnit (Reference: Details (p.460)) InsertUnit (Reference: Details (p.573)) MeasureStart (Reference: Details (p.617)) MeasureStop (Reference: Details (p.619)) MoveUnit (Reference: Details (p.625)) UnitCount (Reference: Details (p.777)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 419 Getting the arctangent of the specified expression. Format Atn(<expression>) Parameter Parameter Data type Description name Integer type Double <expression> precision real Expression that gets the arc tangent number data type Return value Returns the arctangent as a double precision real value in the range -π/2 to π/2 radians. Description Gets the arctangent of the expression specified in the <expression>...
  • Page 420 Related Items Cos (Reference: Details (p.450)) GetUnitData (Reference: Details (p.552)) Sin (Reference: Details (p.743)) Tan (Reference: Details (p.755)) UnitData (Reference: Details (p.778)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 421 BusyOut Sets the output state of the processing busy signal. Format BusyOut <ioIdent>, <state> Parameter Parameter Data type Description name Character Identification name of the communication module to be used ("ParallelIo" or "EtherCAT") <ioIdent> string type (Reference: List of I/O Modules (p.341)) Output state of terminal <state>...
  • Page 422 Related Items GetAll (Reference: Details (p.528)) GetPort (Reference: Details (p.542)) JudgeOut (Reference: Details (p.585)) PutAll (Reference: Details (p.643)) PutPort (Reference: Details (p.645)) RunOut (Reference: Details (p.667)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 423 Call Executes the registered user-defined function. Format Call <subroutineIdent>[; | , <argument>...] Parameter Parameter Data type Description name Character <subroutineIdent> Identification name of the user-defined function that has been registered string type Integer type Double precision real <argument> number data Argument of the user-defined function that has been registered type Character...
  • Page 424 Usage Cautions • Only the user-defined functions that have been defined in programmed DLL files by the supported interfaces are accepted to this macro function. If other DLL files or user-defined functions than above is used, unexpected operation may occur such as a measurement error or the Sensor Controller abnormal termination.
  • Page 425 ChangeScene Change the scene. Format ChangeScene <sceneNo> Parameter Parameter Data type Description name <sceneNo> Integer type Scene number to change (0 to 127) Return value None. Description Changes the current scene to the scene with the scene number specified in the <sceneNo> parameter. If an incorrect data type is specified for a parameter, a "Type mismatch"...
  • Page 426 ChangeSceneGroup Changes the scene group. Format ChangeSceneGroup <sceneGroupNo>, <sceneNo> Parameter Parameter Data type Description name <sceneGroupNo> Integer type New scene group (0 to 31) <sceneNo> Integer type Scene number to change (0 to 127) Return value None. Description Changes the current scene group to the scene specified in the <sceneNo> parameter, which belongs to the scene group specified in the <sceneGroupNo>...
  • Page 427 CheckUnit Checks the registration status of a processing unit. Format CheckUnit(<unitNo>) Parameter Parameter Data type Description name Processing unit number (0 to (number of processing units of current scene minus one)) <unitNo> Integer type of processing unit whose registration status is to be checked. Return value Returns the registration status as an integer.
  • Page 428 Related Items AssignUnit (Reference: Details (p.415)) CopyUnit (Reference: Details (p.442)) DeleteUnit (Reference: Details (p.460)) InsertUnit (Reference: Details (p.573)) MeasureStart (Reference: Details (p.617)) MeasureStop (Reference: Details (p.619)) MoveUnit (Reference: Details (p.625)) UnitCount (Reference: Details (p.777)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 429 Chr$ Determining the character of the specified character code. Format Chr$(<expression>) Parameter Parameter Data type Description name <expression> Integer type Expression to get the character (0 to 255) Return value Returns the character string type character. Description Gets the character of the ASCII character code specified in the <expression> parameter. ASCII control codes can also be specified in the <expression>...
  • Page 430 Supported Versions Version 3.50 or later Related Items Asc (Reference: Details (p.413)) Hex$ (Reference: Details (p.560)) LCase$ (Reference: Details (p.589)) Left$ (Reference: Details (p.591)) Len (Reference: Details (p.593)) Mid$ (Reference: Details (p.621)) Piece$ (Reference: Details (p.637)) Right$ (Reference: Details (p.664)) Str$ (Reference: Details (p.749)) Str2$ (Reference:...
  • Page 431 ClearMeasureData Clears the measurement results of the processing unit. Format ClearMeasureData [<unitNo>] Parameter Parameter Data type Description name Processing unit number (0 to (the number of registered processing units in the current <unitNo> Integer type scene minus one)) Return value None.
  • Page 432 ClearScene Clears the scene data. Format ClearScene <sceneNo> Parameter Parameter Data type Description name <sceneNo> Integer type Scene number of scene to be cleared (0 to 127) Return value None. Description Clears the setting information in the scene with the scene number specified in the <sceneNo> parameter, and restores the scene to the factory default state.
  • Page 433 ClearSceneGroup Clears scene group data. Format ClearSceneGroup <sceneGroupNo> Parameter Parameter Data type Description name Scene group whose scene group data is to be cleared <sceneGroupNo> Integer type 0 to 31: scene group number 0 to 31 -1: current scene group number Return value None.
  • Page 434 Close Closes up the file. Format Close [#<fileNo>[, #<fileNo>]...] Parameter Parameter Data type Description name <fileNo> Integer type File number (0 to 15) of closed file Return value None. Description Close the file number specified in the <fileNo> parameter. In the <fileNo> parameter, specify the specified file number in the Open function that has been used to open the file.
  • Page 435 Example Opens the file, writes the data in the file, and then closes the file. DATA& = 10 Rem Open the file Open "E:\input.dat" For Output As #1 Rem Write the data in the opened file Print #1 DATA& Rem Close the opened file Close #1 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro...
  • Page 436 CloseTextData Close up a messages file. Format CloseTextData [#<textDataNo>[, #<textDataNo>]...] Parameter Parameter Data type Description name <textDataNo> Integer type Text data number (0 to 15) of the closed message file Return value None. Description Close the messages file in the text data number specified in the <textDataNo> parameter. In the <textDataNo>...
  • Page 437 Example Uses the *MEASUREDISPT subroutine of the Unit Macro processing unit to display the measured correlation value by the search processing unit (Processing Unit number 5), along with the gotten text string from the prepared message file for the processing unit, in the text window. The correlation value can be gotten with External Reference Data number 5.
  • Page 438 Cont Resumes execution of the program after it has been stopped. Format Cont [<mode>] Parameter Parameter Data type Description name Resuming method of the stopped program This parameter can be omitted. Omitting the parameter resumes the program execution. After the resume, the program runs to the end unless an error occurs.
  • Page 439 Example After the execution of the Stop function in line 220 of the Unit Macro processing unit (Processing number 1), executes the next single line (line 230) Macro(U1) 220 Stop Macro(U1) Stop in 220 Macro(U1) 230 POS.X#=(POS0.X@ + POS1.X@) / 2 Macro(U1)>Cont 1 Macro(U1)>...
  • Page 440 CopyMeasureImage Copies the measurement image as an image of the Unit Macro processing unit. Format CopyMeasureImage <measureImageNo>, <myImageNo> Parameter Parameter Data type Description name <measureImageNo> Integer type Measurement image number (always 0) <myImageNo> Integer type Image number of copy destination (0 to 31) Return value None.
  • Page 441 Supported Versions Version 3.50 or later Related Items CopyUnitImage (Reference: Details (p.446)) SetMeasureImage (Reference: Details (p.707)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 442 CopyScene Copies scene data. Format CopyScene <srcSceneNo>, <destSceneNo> Parameter Parameter Data type Description name <srcSceneNo> Integer type Scene number (0 to 127) of the scene to be copied. <destSceneNo> Integer type Scene number (0 to 127) of destination scene. Return value None.
  • Page 443 CopySceneGroup Copies scene group data. Format CopySceneGroup <srcSceneGroupNo>, <destSceneGroupNo> Parameter Parameter Data type Description name <srcSceneGroupNo> Integer type Scene group number (0 to 31) of the scene group to be copied. <destSceneGroupNo> Integer type Scene group number (0 to 31) of the destination scene group. Return value None.
  • Page 444 CopyUnit Copies a processing unit. Format CopyUnit [<srcSceneNo>,] <srcUnitNo>, <destUnitNo>, <mode> Parameter Parameter Data type Description name <srcSceneNo> Integer type Scene number of the origin of copy (0 to 127) Processing unit number of copy source (0 to (number of scene processing units of copy <srcUnitNo>...
  • Page 445 Useable Modules Scene Control Macro / Communication Command Macro Supported Versions Version 3.50 or later Related Items AssignUnit (Reference: Details (p.415)) CheckUnit (Reference: Details (p.425)) DeleteUnit (Reference: Details (p.460)) InsertUnit (Reference: Details (p.573)) MeasureStart (Reference: Details (p.617)) MeasureStop (Reference: Details (p.619)) MoveUnit (Reference: Details (p.625)) UnitCount (Reference:...
  • Page 446 CopyUnitFigure Copies figure data to the processing unit. Format CopyUnitFigure <srcSceneNo>, <srcUnitNo>, <srcFigureNo>, <destUnitNo>, <destFigureNo> Parameter Parameter Data type Description name <srcSceneNo> Integer type Scene number of the origin of copy (0 to 127) Unit number of copy source (0 to (number of scene processing units of copy source <srcUnitNo>...
  • Page 447 Example Copies the measurement region figure of the Shape Search III processing unit of Processing Unit number 2 in the measurement flow of scene 0 to the measurement region of the Shape Search III processing unit of Processing Unit number 5. The measurement region figure of the Shape Search III processing item is figure Rem Copy the figure of the measurement region CopyUnitFigure 0, 2, 1, 5, 1 Useable Modules...
  • Page 448 CopyUnitImage Copies a processing unit image as a unit macro processing unit image. Format CopyUnitImage <unitNo>, <imageNo>, <myImageNo> Parameter Parameter Data type Description name Processing unit number that is to be copied (0 to (the number of registered processing <unitNo> Integer type units in the current scene -1)) <imageNo>...
  • Page 449 Example Stores the image of each measurement in order in the image buffer after filtering by the color gray filter processing unit of processing unit number 1. Rem Calculate the image buffer number MYIMAGENO& = MYIMAGENO& + 1 Rem Overwrite the 32nd and following images in order from the oldest image. If MYIMAGENO&...
  • Page 450 CopyUnitModel Copies the model data of a processing unit. Format CopyUnitModel <srcSceneNo>, <srcUnitNo>, <srcModelNo>, <destUnitNo>, <destModelNo> Parameter Parameter Data type Description name <srcSceneNo> Integer type Scene number of the origin of copy (0 to 127) Unit number of copy source (0 to (number of scene processing units of copy source <srcUnitNo>...
  • Page 451 Example Copies the Shape Search III processing unit model of Processing Unit number 2 to the Shape Search III processing unit of Processing Unit number 3. Rem Copy the model figure of Shape Search III. CopyUnitFigure 0, 2, 0, 3, 0 Rem Copy the detection point setting of Shape Search III GetUnitData 2, "detectionPosX", PosX# GetUnitData 2, "detectionPosY", PosY#...
  • Page 452 Gets the cosine of the specified expression. Format Cos(<expression>) Parameter Parameter Data type Description name Integer type Double <expression> precision real Expression to calculate the cosine number data type Return value Returns the cosine as a double precision real value in the range -1 to 1. Description Gets the cosine of the expression specified in the <expression>...
  • Page 453 Related Items Atn (Reference: Details (p.417)) GetUnitData (Reference: Details (p.552)) Sin (Reference: Details (p.743)) Tan (Reference: Details (p.755)) UnitData (Reference: Details (p.778)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 454 Crspoint Gets the intersection between 2 straight lines. Format Crspoint <line1()>, <line2()>, <x>, <y> Parameter Parameter Data type Description name Double <line1()> precision real Straight line component of the straight line 1 to get the intersection number array Double <line2()> precision real Straight line component of the straight line 2 to get the intersection number array...
  • Page 455 Example Gets the intersection point of two gotten lines. The two lines are respectively gotten using Processing Units 1 to 4 and Processing Units 5 to 8. Dim POS1X#(3), POS1Y#(3), POS2X#(3), POS2Y#(3), PARAM1#(2), PARAM2#(2) Rem Rem Initialize variables for straight line 1 For I&=0 To 3 GetUnitData I&+1, "X", POS1X#(I&) GetUnitData I&+1, "Y", POS1Y#(I&)
  • Page 456 Date$ Reads out the date from the internal clock. Format Date$ Parameter None. Return value Returns the date as a character string value. The date value is a character string of the internal clock date whose year (YY), month (MM), and day (DD) separated by a slash (/).
  • Page 457 Related Items GetSystemData (Reference: Details (p.546)) Mid$ (Reference: Details (p.621)) Piece$ (Reference: Details (p.637)) Print (Reference: Details (p.639)) SetSystemData (Reference: Details (p.725)) Time$ (Reference: Details (p.757)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 458 Debug Set the program execution form and information output method. Format Debug <mode> Parameter Parameter Data type Description name Execution form and information output method Release mode, no error description is output when an error occurs Release mode, an error description is output to the system status console window when an error occurs.
  • Page 459 Example Uses the MCRINIT subroutine in the unit macro processing unit to set the program execution form to "debug mode" and information output method so as to output error descriptions to the system status console window at an error occurrence. *MCRINIT Rem Output an error description to the system status console window when an error occurs in debug mode.
  • Page 460 DebugPrint Outputs debug information to the system status console window. Format DebugPrint <expression>[;|, <expression>...] Parameter Parameter Data type Description name Integer type Double precision real number data <expression> Numerical expression or character string to be output type Character string type Array Return value None.
  • Page 461 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 5.20 or later Related Items Cont (Reference: Details (p.436)) Debug (Reference: Details (p.456)) List (Reference: Details (p.597)) Print (Reference: Details (p.639)) SetStop (Reference: Details (p.723)) SetVar (Reference:...
  • Page 462 DeleteUnit Deletes a processing unit. Format DeleteUnit <unitNo> Parameter Parameter Data type Description name Processing unit number (0 to (number of processing units of current scene minus one)) <unitNo> Integer type of processing unit to be deleted. Return value None. Description Deletes the processing unit specified in the <unitNo>...
  • Page 463 Defines the array variable. Format Dim <arrayName>(<maxCount>[, <maxCount>[, <maxCount>[, <maxCount>]]]) Parameter Parameter Data type Description name <arrayName> --- Used array variable name <maxCount> Integer type Maximum value of the subscript Return value None. Description Defines a 1D to 4D array with maximum dimensional length specified in the <maxCount> parameter for each dimension.
  • Page 464 DisplaySubNo Get the sub-image number of the displayed sub-image. Format DisplaySubNo Parameter None. Return value Returns the sub-image number as an integer value. Description Gets the sub-image number of the displayed sub-image set in the image window on the main screen. If a value is assigned to the return value variable or the variable is not used in an expression, a "Syntax error"...
  • Page 465 Return Useable Modules Unit macro Supported Versions Version 3.50 or later Related Items DrawTextG (Reference: Details (p.502)) SetTextStyle (Reference: Details (p.727)) UnitJudge (Reference: Details (p.788)) UnitNo (Reference: Details (p.790)) UnitTitle$ (Reference: Details (p.791)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 466 DisplayUnitNo Gets the selection state of the processing unit number of the flow window. Format DisplayUnitNo Parameter None. Return value Returns the processing unit number as an integer value. Description Gets the processing unit number of the unit selected in the flow window. If a value is assigned to the return value variable or the variable is not used in an expression, a "Syntax error"...
  • Page 467 Do Loop While Repeatedly executes the statements between Do and Loop while the specified condition meets. Format <statement> Loop While <expression> Parameter Parameter Data type Description name <statement> Statement to be executed repeatedly Conditional logical expression for which gets a repetition of operation (Reference: <expression>...
  • Page 468 Supported Versions Version 3.50 or later Related Items For To Step Next (Reference: Details (p.526)) Print (Reference: Details (p.639)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 469 Dposline Gets the shortest distance between the line and point. Format Dposline (<x>, <y>, <line()>) Parameter Parameter Data type Description name Double precision real <x> X coordinate of the points to get the distance number data type Double precision real <y>...
  • Page 470 Example Gets the distribution and deviation for a line gotten from four points. Dim POSX#(3), POSY#(3), PARAM#(2), DIST#(3) Rem Initialize variables for straight line For I&=0 To 3 GetUnitData I&+1, "X", POSX#(I&) GetUnitData I&+1, "Y", POSY#(I&) Next Rem Get the straight line component. Lsqumeth 4, POSX#(), POSY#(), PARAM#() SUMDIST# = 0 For I&=0 To 3...
  • Page 471 DrawArc Draw the arc on the image window. Format DrawArc <x>, <y>, <radius>, <start>, <end>, <imageNo>[, <unitNo>] Parameter Parameter Data type Description name <x> Integer type The center X coordinate of the drawn arc <y> Integer type The center Y coordinate of the drawn arc <radius>...
  • Page 472 Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to draw an arc of the measured ° ° radius whose starting angle is -90 and ending angle is 180 at the measured center coordinates by the circular scan edge position processing unit (Processing Unit number 5). The measured X and Y coordinates and radius can be gotten with External Reference Data numbers 5 to 7 respectively.
  • Page 473 DrawArcW Draw the wide arc on the image window. Format DrawArc <x>, <y>, <radius>, <start>, <end>, <imageNo>[, <unitNo>] Parameter Parameter Data type Description name <x> Integer type The center X coordinate of the drawn wide arc <y> Integer type The center Y coordinate of the drawn wide arc <radius>...
  • Page 474 Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to draw an arc of the measured ° ° radius whose starting angle is -90 and ending angle is 180 at the measured center coordinates by the circular scan edge position processing unit (Processing Unit number 5). The displayed arc is a wide arc whose outer radius is the measured maximum radius and whose inner radius is the measured minimum radius.
  • Page 475 DrawBox Draws a rectangle on the image window. Format DrawBox <x0>, <y0>, <x1>, <y1>, <imageNo>[, <unitNo>] Parameter Parameter Data type Description name <x0> Integer type The upper-left corner X coordinate of the drawn rectangle <y0> Integer type The upper-left corner Y coordinate of the drawn rectangle <x1>...
  • Page 476 Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to display the rectangle whose upper-left and lower-right corner coordinates are the coordinates measured by the Processing Unit numbers 5 and 6 search processing units respectively. The measured X and Y coordinates can be gotten with External Reference Data numbers 6 and 7 respectively.
  • Page 477 DrawCircle Draw a circle on the image window. Format DrawCircle <x>, <y>, <radius>, <imageNo>[, <unitNo>] Parameter Parameter Data type Description name <x> Integer type The center X coordinate of the drawn circle <y> Integer type The center Y coordinate of the drawn circle <radius>...
  • Page 478 Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to draw a circle of the measured radius by the circular scan edge position processing unit (Processing Unit number 5) at the measured center coordinates by the same circular scan edge position processing unit used for measuring the radius. The measured X and Y coordinates and radius can be gotten with External Reference Data numbers 5 to 7 respectively.
  • Page 479 DrawCircleW Draw the wide circle on the image window. Format DrawCircleW <x>, <y>, <width>, <radius>, <imageNo>[, <unitNo>] Parameter Parameter Data type Description name <x> Integer type The center X coordinate of the drawn circle <y> Integer type The center Y coordinate of the drawn circle <width>...
  • Page 480 Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to draw a circle of the measured radius by the circular scan edge position processing unit (Processing Unit number 5) at the measured center coordinates by the same circular scan edge position processing unit used for measuring the radius. This wide circle has an outer radius of the measured maximum radius and an inner radius of the measured minimum radius.
  • Page 481 DrawCursor Draw the cross-hair cursor on the image window. Format DrawCursor <x>, <y>, <imageNo>[, <unitNo>] Parameter Parameter Data type Description name <x> Integer type The center X coordinate of the drawn cross-hair cursor <y> Integer type The center Y coordinate of the drawn cross-hair cursor <imageNo>...
  • Page 482 Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to draw a cross-hair cursor at the measured coordinates by the search processing unit (Processing Unit number 5). The measured X and Y coordinates can be gotten with External Reference Data numbers 6 and 7 respectively. To display the string at the fixed position regardless of the position compensation result, specify the assigned processing unit number to this Unit Macro processing unit (where the *MEASUREDISPG subroutine is used) for the <unitNo>...
  • Page 483 DrawEllipse Draw the ellipse on the image window. Format DrawCircle <x>, <y>, <radiusX>, <radiusY>, <imageNo>[, <unitNo>] Parameter Parameter Data type Description name <x> Integer type The center X coordinate of the drawn ellipse <y> Integer type The center Y coordinate of the drawn ellipse <radiusX>...
  • Page 484 Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to display the ellipse whose radii in the X and Y directions are the measured coordinates of the center of gravity by the labeling processing unit (Processing Unit number 5). In this example, set the judgement conditions for the labeling processing unit to "Gravity X", "Gravity Y", "Elliptic major axis", and "Elliptic minor axis"...
  • Page 485 DrawFigure Draw a figure on the image window. Format DrawFigure <figure()>, <imageNo>[, <unitNo>] Parameter Parameter Data type Description name 1D array that stores the drawn figure data (Reference: Figure Data Structure List <figure()> Integer array (p.364)) <imageNo> Integer type Measurement image number to draw on (always 0) Processing unit number to display the processing unit (0 to (the number of registered <unitNo>...
  • Page 486 Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to simultaneously display registered model figures for the search processing units (Processing Unit numbers 5, 6, 7, and 8). The model registration figure of the Search processing item is figure 0. (Reference: List of Figure Numbers (p.366) Use the Dim function to define an array with element number that is larger than the element number used for the figure data.
  • Page 487 DrawFillImage Draw the fill image on the image window. Format DrawFillImage <color> Parameter Parameter Data type Description name <color> Integer type Color value of the color to fill with (Reference: RGB (p.662)) Return value None. Description Draw the color filled image specified in the <color> parameter. In <color>...
  • Page 488 DrawJudgeText Draws the judgement result of the character string on the text display screen. Format DrawJudgeText <judge> Parameter Parameter Data type Description name Judgement results to be drawn JUDGE_NC: "No judgement (unmeasured)" JUDGE_OK: Judgement: OK JUDGE_NG: Judgement: NG <judge> Integer type JUDGE_IMAGEERROR: Judgement: NG (Image mismatch) JUDGE_MODELERROR: Judgement: NG (model not register) JUDGE_MEMORYERROR: Judgement: NG (Out of memory)
  • Page 489 Supported Versions Version 3.50 or later Related Items DrawText (Reference: Details (p.500)) GetUnitData (Reference: Details (p.552)) UnitData (Reference: Details (p.778)) UnitJudge (Reference: Details (p.788)) UnitNo (Reference: Details (p.790)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 490 DrawLine Draw a straight line on the image window. Format DrawBox <x0>, <y0>, <x1>, <y1>, <imageNo>[, <unitNo>] Parameter Parameter Data type Description name <x0> Integer type The starting point X coordinate of the drawn straight line <y0> Integer type The starting point Y coordinate of the drawn straight line <x1>...
  • Page 491 Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to display the line whose starting and ending point coordinates are the coordinates measured by the Processing Unit numbers 5 and 6 search processing units respectively. The measured X and Y coordinates can be gotten with External Reference Data numbers 6 and 7 respectively.
  • Page 492 DrawLineW Draw the wide straight line on the image window. Format DrawBox <x0>, <y0>, <x1>, <y1>, <imageNo>[, <unitNo>] Parameter Parameter Data type Description name <x0> Integer type The starting point X coordinate of the drawn straight line <y0> Integer type The starting point Y coordinate of the drawn straight line <x1>...
  • Page 493 Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to display the wide line with width of 10 whose starting and ending point coordinates are the coordinates measured by the Processing Unit numbers 5 and 6 search processing units respectively. The measured X and Y coordinates can be gotten with External Reference Data numbers 6 and 7 respectively.
  • Page 494 DrawMeasureImage Draw the measurement image on the image window. Format DrawMeasureImage <imageNo> Parameter Parameter Data type Description name <imageNo> Integer type Number of the measurement image to display (always 0) Return value None. Description Display an image that has been registered to the Unit Macro processing unit where this macro function is executed and whose image number is specified in the <imageNo>...
  • Page 495 DrawPoint Draw a point on the image window. Format DrawPoint <x>, <y>, <imageNo>[, <unitNo>] Parameter Parameter Data type Description name <x> Integer type The X coordinate of the drawn point <y> Integer type The Y coordinate of the drawn point <imageNo>...
  • Page 496 Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to draw a point at the measured coordinates by the search processing unit (Processing Unit number 5). The measured X and Y coordinates can be gotten with External Reference Data numbers 6 and 7 respectively. To display the string at the fixed position regardless of the position compensation result, specify the assigned processing unit number to this Unit Macro processing unit (where the *MEASUREDISPG subroutine is used) for the <unitNo>...
  • Page 497 DrawPolygon Draw a polygon on the image window. Format DrawPolygon <count>, <x()>, <y()>, <imageNo>[, <unitNo>] Parameter Parameter Data type Description name <count> Integer type Number of polygon vertices (0 or larger) to be drawn <x()> Integer array 1D array that stores the X coordinate of the drawn polygon <y()>...
  • Page 498 Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to draw a polygon whose vertices are at the measured positions by the search processing units (Processing unit numbers 5 to 7). The measured X and Y coordinates can be gotten with External Reference Data numbers 6 and 7 respectively. To display the string at the fixed position regardless of the position compensation result, specify the assigned processing unit number to this Unit Macro processing unit (where the *MEASUREDISPG subroutine is used) for the <unitNo>...
  • Page 499 DrawSearchFigure Draw the search figure on the image window. Format DrawSearchFigure <figure()>, <referenceX>, <referenceY>, <measureX>, <measureY>, <measureAngle>, <imageNo>, <unitNo> Parameter Parameter Data type Description name <figure()> Integer array 1D array that stores the drawn figure data (Reference: Figure Data List (p.364)) Double precision real <referenceX>...
  • Page 500 processing unit. Specify the corresponding Unit Macro processing unit number in the <unitNo> parameter to draw the image at the position coordinates before applying position compensation. If the <unitNo> parameter is omitted, the image is drawn at the position coordinates after applying position compensation. In the <figure()>...
  • Page 501 Useable Modules Unit macro Supported Versions Version 3.50 or later Related Items GetUnitData (Reference: Details (p.552)) Int (Reference: Details (p.575)) SetDrawStyle (Reference: Details (p.700)) UnitData (Reference: Details (p.778)) UnitNo (Reference: Details (p.790)) Ut (Reference: Details (p.793)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 502 DrawText Draw a character string on the text window. Format DrawText <string>, <color>, <newLine> Parameter Parameter Data type Description name Character <string> Character string to display string type Color value of character string color to be drawn JUDGE_NC: Unmeasured color (Grey) <color>...
  • Page 503 Example Uses the *MEASUREDISPT subroutine of the Unit Macro processing unit to display the provided measurement results by the search processing unit (Processing Unit number 5) in the text window. The measured X and Y coordinates and angle can be gotten with External Reference Data numbers 6, 7, and 8 respectively.
  • Page 504 DrawTextG Draw a character string on the image window. Format DrawTextG <string>, <x>, <y>, <imageNo>[, <unitNo>] Parameter Parameter Data type Description name Character <string> Character string to display string type <x> Integer type Upper left X coordinate value of the drawn area <y>...
  • Page 505 Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to display the string "OK" at fixed position coordinates (100, 100). To display the string at the fixed position regardless of the position compensation result, specify the assigned processing unit number to this Unit Macro processing unit (where the *MEASUREDISPG subroutine is used) for the <unitNo>...
  • Page 506 DrawUnitImage Display the "other unit image" on the image window. The "other unit image" refers to the held image by a processing unit for the judgement reference. Format DrawUnitImage <unitNo>, <imageNo> Parameter Parameter Data type Description name Processing unit number that holds the displayed image (0 to (the number of processing <unitNo>...
  • Page 507 Supported Versions Version 3.50 or later Related Items DrawFillImage (Reference: Details (p.485)) DrawMeasureImage (Reference: Details (p.492)) UnitNo (Reference: Details (p.790)) Ut (Reference: Details (p.793)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 508 Dskf Gets the free space on disk drives. Format Dskf(<driveName>) Parameter Parameter Data type Description name Character <driveName> Drive name whose free space is to be gotten string type Return value Returns free space (in bytes) on the disk drive as an integer value. Returns -1 when the specified disk drive does not exist.
  • Page 509 Related Items Fcopy (Reference: Details (p.522)) IsFile (Reference: Details (p.577)) Kill (Reference: Details (p.587)) Mkdir (Reference: Details (p.623)) PutPort (Reference: Details (p.645)) Rmdir (Reference: Details (p.666)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 510 ElapsedTime Gets the elapsed time since starting the measurement. Format ElapsedTime(<mode>) Parameter Parameter Data type Description name Unit of the elapse time to get <mode> Integer type 0: ms unit 1: μ unit Return value Returns the elapsed time as an integer value. Description Gets the elapsed time since starting the measurement with the unit specified in the <mode>...
  • Page 511 Return Useable Modules Unit Calculation Macro / Unit Macro Supported Versions Version 3.50 or later Related Items DrawText (Reference: Details (p.500)) StartTimer (Reference: Details (p.746)) Timer (Reference: Details (p.759)) Wait (Reference: Details (p.806)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 512 Examines the end of the file. Format Eof(<fileNo>) Parameter Parameter Data type Description name <fileNo> Integer type File number (0 to 15) of the examined file end. Return value Returns an integer value that notifies if the end of the file is reached. •...
  • Page 513 Next Rem Close up the file. Close #1 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items Close (Reference: Details (p.432)) Input# (Reference: Details (p.569)) Open For Append As# (Reference: Details (p.627)) Open For Input As# (Reference: Details (p.629))
  • Page 514 Erase Releases array variable. Format Erase <array>[, <array>...] Parameter Parameter Data type Description name <array> Released array variable Return value None. Description Releases the allocated memory area of the predefined array variable with the Dim function that is specified in the <array>...
  • Page 515 Errcmnd$ Get the function name of the macro where an error occurred. Format Errcmnd$ Parameter None. Return value Returns the character string type value of the upper case letters that represents the macro function name where the error occurred. Description Gets the character string of the macro function name where the error occurred at error occurrence in the program.
  • Page 516 Supported Versions Version 3.50 or later Related Items Errno (Reference: Details (p.515)) GetUnitData (Reference: Details (p.552)) Print (Reference: Details (p.639)) SetUnitData (Reference: Details (p.731)) Try Catch End Try (Reference: Details (p.773)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 517 Errno Gets the error number. Format Errno Parameter None. Return value Returns the error number as an integer value. (Reference: Error List (p.320)) Description Gets the error number of the error which occurred in the program. Use this macro function in the Try-Catch-End Try statement If a value is assigned to the return value variable or the variable is not used in an expression, a "Syntax error"...
  • Page 518 Related Items Errcmnd$ (Reference: Details (p.513)) Print (Reference: Details (p.639)) Try Catch End Try (Reference: Details (p.773)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 519 ExecuteImageLogging Executes image logging. Format ExecuteImageLogging <directory>, <header> Parameter Parameter Data type Description name Character <directory> Subdirectory name that saves the logging images string type Character <header> Header string added to the file name of the logged image string type Return value None.
  • Page 520 Example Uses the MEASUREPROC subroutine in the Unit Macro processing unit to save the logged images using the file names with a header "new_" in the subdirectory named "Image" under the "C:\temp" directory set as the logged files destination in the system settings. *MEASUREPROC Rem Execute image logging.
  • Page 521 ExitFzProcess Terminate the Sensor Controller. Format ExitFzProcess Parameter None. Return value None. Description Terminate the FH/FZ5 process execution. If this macro function macro is executed on the sensor controller, turn OFF the power to the sensor controller after the execution. Usage Cautions •...
  • Page 522 Gets the value of the exponential function of the base e natural logarithm. Format Exp(<expression>) Parameter Parameter Data type Description name Integer type Double <expression> precision real Expression to get the exponential value number data type Return value Returns the calculated exponent (power) as a double precision real number value. Description Calculates the exponent (power) of the base e natural logarithm of the expression specified in the <expression>...
  • Page 523 Related Items Cos (Reference: Details (p.450)) GetUnitData (Reference: Details (p.552)) Log (Reference: Details (p.609)) Sin (Reference: Details (p.743)) UnitData (Reference: Details (p.778)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 524 Fcopy Copies the file. Format Fcopy <srcPath>, <dstPath> Parameter Parameter Data type Description name Character <srcPath> Absolute path of the original file to be copied string type Character <dstPath> Absolute path for the copy destination file string type Return value None.
  • Page 525 Supported Versions Version 3.50 or later Related Items Dskf (Reference: Details (p.506)) IsFile (Reference: Details (p.577)) Kill (Reference: Details (p.587)) Mkdir (Reference: Details (p.623)) Rmdir (Reference: Details (p.666)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 526 Gets the integer of a value by rounding off digits to the right of the decimal point. Format Fix(<expression>) Parameter Parameter Data type Description name Double precision real <expression> Expression to truncate after the decimal point number data type Return value Returns an integer value gotten by rounding off digits to the right of the decimal point.
  • Page 527 Supported Versions Version 3.50 or later Related Items Int (Reference: Details (p.575)) GetUnitData (Reference: Details (p.552)) UnitData (Reference: Details (p.778)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 528 For To Step Next Repeats the statements between the For and Next statements. Format For <variable> = <startValue> To <endValue>[ Step <increment>] <statement> Next[ <variable>] Parameter Parameter Data type Description name <variable> Integer type Loop counter variable of repetition process <startValue>...
  • Page 529 Example Uses the *MEASUREPROC subroutine in the Unit Macro processing unit to set the gotten the edge position X values with the edge position processing units (Processing Unit numbers 1 to 4) for the upper limits of measure X of the search processing units (Processing Unit numbers 6 to 9) respectively. *MEASUREPROC Dim POS#(3) Rem Get the measurement result.
  • Page 530 GetAll Gets the input states of all input terminals. Format GetAll(<ioIdent>) Parameter Parameter Data type Description name Character Identification name of the communication module to be used (always "ParallelIo") <ioIdent> string type (Reference: List of I/O Modules (p.341)) Return value Returns the input states of all input terminals as integer values.
  • Page 531 Related Items BusyOut (Reference: Details (p.419)) GetPort (Reference: Details (p.542)) JudgeOut (Reference: Details (p.585)) PutAll (Reference: Details (p.643)) PutPort (Reference: Details (p.645)) RunOut (Reference: Details (p.667)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 532 GetGlobalData Gets the global data. Format GetGlobalData <dataIdent>, <data> Parameter Parameter Data type Description name Character <dataIdent> Identification name of the global data to get string type Integer type Double precision real <data> number data Gotten data type Character string type Return value None.
  • Page 533 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items AddGlobalData (Reference: Details (p.405)) SetGlobalData (Reference: Details (p.702)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 534 GetImageSize Gets the image size of the processing unit image. Format GetImageSize <unitNo>, <measureImageNo>, <sizeX>, <sizeY> Parameter Parameter Data type Description name Processing unit number (0 to (the number of registered processing units in the current <unitNo> Integer type scene minus one)) Image number of the current image to be gotten (Reference: List of Figure Numbers <measureImageNo>...
  • Page 535 GetImageWindow Get the state of the image window. Format [Scene Control Macro / Communication Command Macro] GetImageWindow <windowNo>, <locationX>, <locationY>, <width>, <height>, <unitNo>, <subNo>, <magnification>, <originX>, <originY>, <update>, <visible> [Unit Macro] GetImageWindow <locationX>, <locationY>, <width>, <height>, <unitNo>, <subNo>, <magnification>, <originX>, <originY>, <update>, <visible> Parameter Parameter Data type...
  • Page 536 coordinates of the image window. In the <width> parameter and <height> parameter, specify the variables that store the values of the gotten image window width and height. In the <unitNo> parameter, specify the variable that stores the value of the gotten processing unit number that is displayed.
  • Page 537 Example In the communication command macro, changes the image mode of image windows 0 to 3 to Through. Setting the BusyOn flag to ON in advance in the communication command macro. For I& = 0 To 3 Rem Get the state of the image window. GetImageWindow I&, LOCATIONX&, LOCATIONY&, WIDTH&, HEIGHT&, UNITNO&, SUBNO&,MAG#, ORIGINX&, ORIGINY&, UPDATE&, VISIBLE&...
  • Page 538 GetMeasureOut Gets the external output setting for measurement results. Format GetMeasureOut Parameter None. Return value Returns the external output setting as an integer value. 0: Not output externally 1: Output externally Description Gets the "External output" setting in the layout settings as the external output setting for measurement results.
  • Page 539 Related Items SendData (Reference: Details (p.696)) SendString (Reference: Details (p.698)) SetMeasureOut (Reference: Details (p.708)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 540 GetPlcData Gets data read with the ReadPlcMemory function. Format GetPlcData <ioIdent>, <readData()>, <offset>, <size>, <data> Parameter Parameter Data type Description name Character Identification name of the communication module to be used (Reference: List of I/O <ioIdent> string type Modules (p.341)) <readData()>...
  • Page 541 Example In the communication command macro, reads multiple data from the PLC connected by PLC link. IOMODULE$ = "UdpPlcLink" Rem Get the settings of the output data area. GetSystemData IOMODULE$, "outputArea", AREA& GetSystemData IOMODULE$, "outputMemoryAddress", ADDRESS& Rem Create the integer array variable to store the read data. Dim DATA&(1) Rem Load the data (4ch) from data output area.
  • Page 542 GetPollingState Gets the polling state of the communication module. Format GetPollingState(<ioIdent>) Parameter Parameter Data type Description name Character Identification name of communication module whose polling state is to be gotten <ioIdent> string type (Reference: List of I/O Modules (p.341)) Return value Returns the polling state as an integer value.
  • Page 543 Rem Attempting the data reception. ReceiveData IOMODULE$, BUFFER&(), 12, SIZE& Rem Once the data has been received, display the data size in the system status console window. If(SIZE& > 0) Then Print "Received data size = " + Str$(SIZE&) Endif Loop While SIZE&...
  • Page 544 GetPort Gets the input state of the specified input terminal. Format GetPort(<ioIdent>, <portNo>) Parameter Parameter Data type Description name Character Identification name of the communication module to be used (always "ParallelIo") <ioIdent> string type (Reference: List of I/O Modules (p.341)) Terminal number of input terminal whose input state is to be gotten.
  • Page 545 Example In the communication command macro, gets the input state of DI7 of parallel I/O. IOMODULE$ = "ParallelIo" Rem Get the input state. STATE& = GetPort(IOMODULE$, 7) Useable Modules Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items BusyOut (Reference:...
  • Page 546 GetSceneData Gets data related to the scene control macro. Format GetSceneData<dataldent>,<data> Parameter Parameter Data type Description name Character <dataIdent> Identification name of data to be gotten string type Integer type Double precision real <data> number data Gotten data type Character string type Return value None.
  • Page 547 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 5.20 or later Related Items SetSceneData (Reference: Details (p.713)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 548 GetSystemData Gets the system data. Format GetSystemData <dataIdent0>, <dataIdent1>, <data> Parameter Parameter Data type Description name Character <dataIdent0> Data identification name of identification information 0 of system data to be gotten string type Character <dataIdent1> Data identification name of identification information 1 of system data to be gotten string type Integer type Double...
  • Page 549 Example Gets the value set for the screen capture destination folder of identification information 1, "captureDirectory", which belongs to the measurement control settings of identification information 0, "Measure", and copies the Sample.bmp file to "C:\temp\bmp". Rem Get the screen capture destination folder that belongs to the measurement control settings. GetSystemData "Measure", "captureDirectory", DIRNAME$ Rem Get the file name, including the copy destination path, of the file to be copied.
  • Page 550 GetText$ Get a text data from a messages file. Format GetText$(#<textDataNo>, <textIdent>) Parameter Parameter Data type Description name <textDataNo> Integer type Text data number of the messages file (0 to 15) that contains the gotten text Character <textIdent> Identification name of the text data to be gotten string type Return value Returns an gotten text data value in character string type.
  • Page 551 Example Uses the *MEASUREDISPT subroutine of the Unit Macro processing unit to display the measured correlation value by the search processing unit (Processing Unit number 5), along with the gotten text string from the prepared message file for the processing unit, in the text window. The correlation value can be gotten with External Reference Data number 5.
  • Page 552 GetTextWindow Gets the state of the text window. Format GetTextWindow <unitNo>, <subNo>, <update>, <visible> Parameter Parameter Data type Description name <unitNo> Integer type Processing unit number of the target processing unit to display <subNo> Integer type Sub number of the target image to display <update>...
  • Page 553 Supported Versions Version 3.50 or later Related Items DisplayUnitNo (Reference: Details (p.464)) GetImageWindow (Reference: Details (p.533)) SetDisplayUnitNo (Reference: Details (p.699)) SetTextWindow (Reference: Details (p.729)) UnitNo (Reference: Details (p.790)) Ut (Reference: Details (p.793)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 554 GetUnitData Gets the data of a processing unit. Format GetUnitData <unitNo>, <dataNo>, <data> GetUnitData <unitNo>, <dataIdent>, <data> Parameter Parameter Data type Description name Processing unit number (0 to (the number of registered processing units in the current <unitNo> Integer type scene minus one)) External reference data of the processing unit data to get (reference: Vision System...
  • Page 555 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items GetUnitFigure (Reference: Details (p.554)) SetUnitData (Reference: Details (p.731)) SetUnitFigure (Reference: Details (p.733)) UnitData (Reference: Details (p.778)) UnitData$ (Reference: Details (p.780)) UnitData2 (Reference:...
  • Page 556 GetUnitFigure Gets figure data to the processing unit. Format GetUnitFigure <unitNo>, <figureNo>, <figure()> Parameter Parameter Data type Description name Processing unit number (0 to (the number of registered processing units in the current <unitNo> Integer type scene minus one)) <figureNo> Integer type Figure data to get (Reference: List of Figure Numbers (p.366))
  • Page 557 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items GetUnitFigure (Reference: Details (p.554)) SetUnitData (Reference: Details (p.731)) SetUnitFigure (Reference: Details (p.733)) UnitData (Reference: Details (p.778)) UnitNo (Reference: Details (p.790)) Ut (Reference:...
  • Page 558 Gosub Operate the specified subroutine. Format Gosub <label> Parameter Parameter Data type Description name Character <label> Label name for the executing subroutine string type Return value None. Description Execute the subroutine whose label name is specified in the <label> parameter. At the Return statement in the end of a subroutine, the program resumes the operation from the next statement of the Gosub statement in the calling subroutine.
  • Page 559 Supported Versions Version 3.50 or later Related Items Goto (Reference: Details (p.558)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 560 Goto Move the process to the statement line with a specified label. Format Goto <label> Parameter Parameter Data type Description name Integer type <label> Character Move destination line number or move destination label name string type Return value None. Description Move the process to the specified line number or label name in the <label>...
  • Page 561 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items Gosub (Reference: Details (p.556)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 562 Hex$ Converts the value in the expression to the hexadecimal value in character string format. Format Hex$(<expression>) Parameter Parameter Data type Description name <expression> Integer type Expression to be converted to a character string Return value Returns the character string type hexadecimal value. If the value in the expression is negative, the two's complement hexadecimal value is returned.
  • Page 563 Example Gets the read letter "A" with the OCR processing unit (Processing Unit number 5) using the unit calculation macro processing unit and converts the letter into a hexadecimal value. The read character string can be gotten with External Reference Data number 20 Rem Get the measurement result of the processing unit.
  • Page 564 If Then Else Controls the process flow according to the specified condition. Format If <expression> Then <statement>|<label>[ Else <statement>|<label>] Parameter Parameter Data type Description name <expression> --- Logical expression that controls the process flow. (Reference: Operator (p.213)) <statement> Processed statement Character <label>...
  • Page 565 Print "NG" Return Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items Gosub (Reference: Details (p.556)) If Then Elseif Else EndIf (Reference: Details (p.564)) Print (Reference: Details (p.639)) UnitJudge (Reference: Details (p.788))
  • Page 566 If Then Elseif Else EndIf Controls the process flow according to the specified condition. Format If <expression> Then <ifStatement> [Elseif <expression> Then <elseifStatement>] [Else <elseStatement>] EndIf Parameter Parameter Data type Description name <expression> --- Logical expression that controls the process flow. (Reference: Operator (p.213)) <ifStatement>...
  • Page 567 Usage Cautions • None. Example Uses the *MEASUREDISPG subroutine in the Unit Macro processing unit to output the measured correlation value with the search processing unit (Processing Unit number 1) to the system status console window. *MEASUREDISPT Rem Get the measurement result. GetUnitData 1, 5, RESULT&...
  • Page 568 ImageFormat Gets the image format of the image in the processing unit. Format ImageFormat(<unitNo>, <measureImageNo>) Parameter Parameter Data type Description name Processing unit number (0 to (the number of registered processing units in the current <unitNo> Integer type scene minus one)) <measureImageNo>...
  • Page 569 Example In the *MEASUREDISPT subroutine of the unit macro, displays the character string corresponding to the image format in the text window. *MEASUREDISPT Rem Get the judgement result of the processing unit. JUDGE& = UnitJudge(UnitNo) Rem Get the image format. FORMAT&...
  • Page 570 ImageUpdate Updates the image input from the camera. Format ImageUpdate Parameter None. Return value None. Description Updates the images of processing units related to image input in the measurement flow and processing units related to image conversion to the image that uses the most recent image from the camera. Usage Cautions •...
  • Page 571 Input# Reads data from the file. Format Input# <fileNo>, <data>[, <data>...] Parameter Parameter Data type Description name <fileNo> Integer type Read file number (0 to 15) Integer type Double precision real number data <data> Loaded data type Character string type Array Return value None.
  • Page 572 Example Reads the data until the end of the file. Dim ALLDATA$(255) Rem Open the file Open "E:\input.dat" For Input As #1 For I&=0 to 255 Rem Read line by line from the top of the file Input #1, DATA$ ALLDATA$(I&) = DATA$ Rem Check if the end of the file is reached If Eof(1) <>...
  • Page 573 Input$ Reads binary data from the file. Format Input$(<length>[, #<fikeNo>]) Parameter Parameter Data type Description name <length> Integer type Bytes number (0 to 255) of read data <fileNo> Integer type Read file number (0 to 15) Return value Returns the read binary data value in the character string format. Description Reads specified size of binary data whose read size is specified in the <length>...
  • Page 574 Example Reads 6 bytes of binary data from the file Rem Open the file Open "E:\input.dat" For Input As #1 Rem Read 6 bytes of data from the file. DATA$ = Input$(6, #1) Rem Close up the file. Close #1 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions...
  • Page 575 InsertUnit Inserts a processing unit. Format InsertUnit <unitNo>, <itemIdent> Parameter Parameter Data type Description name Processing unit number on the measurement flow to insert the processing unit (0 to the <unitNo> Integer type number of registered processing units in the current scene) Character <itemIdent>...
  • Page 576 Related Items AssignUnit (Reference: Details (p.415)) CheckUnit (Reference: Details (p.425)) CopyUnit (Reference: Details (p.442)) DeleteUnit (Reference: Details (p.460)) MeasureStart (Reference: Details (p.617)) MeasureStop (Reference: Details (p.619)) MoveUnit (Reference: Details (p.625)) UnitCount (Reference: Details (p.777)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 577 Converts numeric value to integer value. Format Int(<expression>) Parameter Parameter Data type Description name Double precision real <expression> Expression to get the integer value number data type Return value Returns an integer value. Description Rounds off digits to the right of the decimal point in the expression specified in the <expression> parameter, and converts the value to the maximum integer value that does not exceed the value of the specified expression.
  • Page 578 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items Fix (Reference: Details (p.524)) GetUnitData (Reference: Details (p.552)) UnitData (Reference: Details (p.778)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 579 Isfile Checks the attribute and the existence of the file. Format Isfile(<fileName>) Parameter Parameter Data type Description name Character <fileName> Absolute path of the file to be checked string type Return value Returns integer values representing the attribute and the existence of the file. •...
  • Page 580 Related Items Dskf (Reference: Details (p.506)) Fcopy (Reference: Details (p.522)) GetSystemData (Reference: Details (p.546)) Kill (Reference: Details (p.587)) Open For Append As# (Reference: Details (p.627)) Open For Input As# (Reference: Details (p.629)) Open For Output As# (Reference: Details (p.631)) Print (Reference: Details (p.639)) Macro Reference Vision System FH/FZ5 Series...
  • Page 581 ItemCount Gets the number of useable processing item types. Format ItemCount Parameter None. Return value Returns the number of usable processing item types as an integer value. Description Gets the number of processing item types that can be used on the sensor controller. If a value is assigned to the return value variable or the variable is not used in an expression, a "Syntax error"...
  • Page 582 ItemIdent$ Gets the identification name of the processing item. Format ItemIdent$(<itemNo>) Parameter Parameter Data type Description name <itemNo> Integer type Processing item number to get the identification name of the processing item Return value Returns the value of the processing item identification name as a character string. Description Gets the identification name of the processing item with the processing item number specified in the <itemNo>...
  • Page 583 Supported Versions Version 3.50 or later Related Items ItemCount (Reference: Details (p.579)) ItemInfo (Reference: Details (p.582)) ItemTitle$ (Reference: Details (p.584)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 584 ItemInfo Gets the processing item information. Format ItemInfo(<itemNo>, <kind>) Parameter Parameter Data type Description name <itemNo> Integer type Processing item number to get the information Type of information 0: Processing item type Number that indicates the processing item type. The values below can be gotten. 0: Inspect and Measure (measurement) 1: Input image (Image input) <kind>...
  • Page 585 Example Gets the number of processing item types, and by repeated processing, searches for search processing items and gets the processing item type of each search processing item. Rem Get the number of the available processing items. INUM& = ItemCount Rem Search for search processing items a number of times equal to the number of processing items For I&=0 To INUM&-1 If ItemIdent$(I&) = "Search"...
  • Page 586 ItemTitle$ Gets the processing item title. Format ItemTitle$(<itemNo>) Parameter Parameter Data type Description name <itemNo> Integer type Processing item number to get the title name Return value Returns the title as a character string. Description Gets the title of the processing item specified in the <itemNo> parameter. The title can be gotten in a language based on the language setting.
  • Page 587 JudgeOut Sets the output state of the overall judgement signal. Format JudgeOut <ioIdent>, <state> Parameter Parameter Data type Description name Character Identification name of the communication module to be used ("ParallelIo" or "EtherCAT") <ioIdent> string type (Reference: List of I/O Modules (p.341)) Total judgement result to be output JUDGE_OK: Total judgement result OK JUDGE_NG: Total judgement result NG...
  • Page 588 Supported Versions Version 3.50 or later Related Items BusyOut (Reference: Details (p.419)) GetAll (Reference: Details (p.528)) GetPort (Reference: Details (p.542)) RunOut (Reference: Details (p.667)) PutAll (Reference: Details (p.643)) PutPort (Reference: Details (p.645)) TotalJudge (Reference: Details (p.761)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 589 Kill Deletes a file. Format Kill <fileName> Parameter Parameter Data type Description name Character <fileName> Absolute path of the file to delete string type Return value None. Description Deletes the file of the file name specified in the <fileName> parameter. In the <fileName>...
  • Page 590 Example Deletes a file named "1280-720.bmp" under the directory "M:\" Kill "M:\1280-720.bmp" Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items Dskf (Reference: Details (p.506)) Fcopy (Reference: Details (p.522)) IsFile (Reference:...
  • Page 591 LCase$ Converts an upper case letter to a lower case letter. Format LCase$(<string>) Parameter Parameter Data type Description name Character <string> Character string contains an alphabet to be converted to lower case. string type Return value Returns the case converted character string type value. Description Converts the upper case letters in the character strings specified in the <string>...
  • Page 592 Related Items Asc (Reference: Details (p.413)) Chr$ (Reference: Details (p.427)) Hex$ (Reference: Details (p.560)) Left$ (Reference: Details (p.591)) Len (Reference: Details (p.593)) Mid$ (Reference: Details (p.621)) Piece$ (Reference: Details (p.637)) Right$ (Reference: Details (p.664)) Str$ (Reference: Details (p.749)) Str2$ (Reference: Details (p.751)) UCase$ (Reference: Details (p.775))
  • Page 593 Left$ Extracts the specified length of characters from the left side of character string. Format Left$(<string>, <length>) Parameter Parameter Data type Description name Character <string> Extraction target character string string type <length> Integer type Length of characters to be extracted (1 to the length of the target character string) Return value Returns the character string type value of the extracted character string.
  • Page 594 Example Extracts 11-byte length of characters from the left side of the character string. Because one half-width alphabet consumes single byte, this example extracts 11 characters from the character string. CHARA$ = "Measurement Result" Rem Extract 11-byte length of characters from the left side of the character string. TITLE$ = Left$(CHARA$, 11) The result is shown below.
  • Page 595 If the format is written incorrectly, such as writing the macro function name incorrectly, omitting a comma, or omitting a half-width space, a "Syntax error" error will occur. Usage Cautions • None. Example Gets the length of the character string "OMRON". CHRLEN& = Len("OMRON") The result is shown below. CHRLEN& = 5 Useable Modules...
  • Page 596 Related Items Asc (Reference: Details (p.413)) Chr$ (Reference: Details (p.427)) Hex$ (Reference: Details (p.560)) LCase$ (Reference: Details (p.589)) Left$ (Reference: Details (p.591)) Mid$ (Reference: Details (p.621)) Piece$ (Reference: Details (p.637)) Right$ (Reference: Details (p.664)) Str$ (Reference: Details (p.749)) Str2$ (Reference: Details (p.751)) UCase$ (Reference: Details (p.775))
  • Page 597 Line Input# Reads the data of one line from the file. Format Line Input #<fileNo>, <data> Parameter Parameter Data type Description name <fileNo> Integer type Read file number (0 to 15) Character <data> Loaded data string type Return value None. Description Read the data of one line separated by the line break code from the file of the file number specified in the <fileNo>...
  • Page 598 Example Reads the data until the end of the file. Dim ALLDATA$(255) Rem Open the file Open "E:\input.dat" For Input As #1 For I&=0 to 255 Rem Read line by line from the top of the file Line Input #1, DATA$ ALLDATA$(I&) = DATA$ Rem Check if the end of the file is reached If Eof(1) <>...
  • Page 599 List Outputs all or a part of program list in the system status console window. Format List [<lineNo1>][-<lineNo2>] Parameter Parameter Data type Description name <lineNo1> Integer type Line number where the output starts <lineNo2> Integer type Line number where the output ends Return value None.
  • Page 600 Supported Versions Version 3.50 or later Related Items Cont (Reference: Details (p.436)) Debug (Reference: Details (p.456)) DebugPrint (Reference: Details (p.458)) Print (Reference: Details (p.639)) SetStop (Reference: Details (p.723)) SetVar (Reference: Details (p.741)) Stop (Reference: Details (p.747)) VarList (Reference: Details (p.796)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340)
  • Page 601 LoadBackupData Loads the system + scene group 0 data. Format LoadBackupData(<fileName>) Parameter Parameter Data type Description name Character <fileName> File name of bkd file to read in (System data + scene group 0 data (*.bkd)) string type Return value None. Description Loads the system + scene group 0 data file specified in the <fileName>...
  • Page 602 Useable Modules Scene Control Macro / Communication Command Macro Supported Versions Version 3.50 or later Related Items GetSystemData (Reference: Details (p.546)) LoadScene (Reference: Details (p.601)) LoadSceneGroup (Reference: Details (p.603)) LoadSystemData (Reference: Details (p.605)) LoadUnitData (Reference: Details (p.607)) SaveBackupData (Reference: Details (p.669)) SaveData (Reference: Details (p.670)) SystemReset (Reference:...
  • Page 603 LoadScene Loads the scene data. Format LoadScene <sceneNo>, <fileName> Parameter Parameter Data type Description name <sceneNo> Integer type Scene number of the destination to read in (0 to 127) Character <fileName> File name of the scene data to read in (*.scn) string type Return value None.
  • Page 604 Supported Versions Version 3.50 or later Related Items ChangeScene (Reference: Details (p.423)) GetSystemData (Reference: Details (p.546)) LoadBackupData (Reference: Details (p.599)) LoadSceneGroup (Reference: Details (p.603)) LoadSystemData (Reference: Details (p.605)) LoadUnitData (Reference: Details (p.607)) SaveScene (Reference: Details (p.675)) SceneNo (Reference: Details (p.691)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340)
  • Page 605 LoadSceneGroup Loads the scene group data. Format LoadSceneGroup <sceneGroupNo>, <fileName> Parameter Parameter Data type Description name <sceneGroupNo> Integer type Scene group number of the destination to read in (0 to 31) Character <fileName> File name of the scene group data to read in (*.sgp) string type Return value None.
  • Page 606 Supported Versions Version 3.50 or later Related Items ChangeScene (Reference: Details (p.423)) GetSystemData (Reference: Details (p.546)) LoadBackupData (Reference: Details (p.599)) LoadScene (Reference: Details (p.601)) LoadSystemData (Reference: Details (p.605)) LoadUnitData (Reference: Details (p.607)) SaveSceneGroup (Reference: Details (p.677)) SceneGroupNo (Reference: Details (p.687)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340)
  • Page 607 LoadSystemData Loads the system data. Format LoadSystemData <fileName> Parameter Parameter Data type Description name Character <fileName> File name of the system data to read in (*.ini) string type Return value None. Description Loads the system data file specified in the <fileName> parameter. In the <fileName>...
  • Page 608 Example After loading the system data, executes "Save data". To apply the loaded settings in the sensor controller, restart the sensor controller. Rem Load the file of the system data LoadSystemData "C:\BACKDIR\backupsysset.ini" Rem Save to the controller. SaveData Rem Reboot the Sensor Controller. SystemReset Useable Modules Scene Control Macro / Communication Command Macro...
  • Page 609 LoadUnitData Loads the processing unit data. Format LoadUnitData <sceneNo>, <unitNo>, <unitCount>, <mode>, <fileName> Parameter Parameter Data type Description name <sceneNo> Integer type Scene number of the destination to read in (-1 to 127) Processing unit number to begin to read in (0 to (the number of registered processing <unitNo>...
  • Page 610 Example Loads a processing unit data file and inserting five of the same processing units between Processing Unit number 3 and Processing Unit number 4 of scene 2. Rem Load the file of the scene data. LoadUnitData 2, 4, 5, 1, "C:\BACKDIR\unitsave.unt" Useable Modules Scene Control Macro / Communication Command Macro Supported Versions...
  • Page 611 Gets the natural logarithm. Format Log(<expression>) Parameter Parameter Data type Description name Integer type Double <expression> precision real Expression to get the natural logarithm number data type Return value Returns the natural logarithm value as a double precision real number. Description Gets the value of the natural logarithm of the expression specified in the <expression>...
  • Page 612 Lsqumeth Gets the approximate straight line from the coordinates of multiple points using the least squares method. Format Lsqumeth <count>, <x()>, <y()>, <line()> Parameter Parameter Data type Description name <count> Integer type Number of coordinates calculated for the approximate line Array of double precision real 1D array that stores the X coordinates of the points from which the approximate straight...
  • Page 613 Example Gets the straight line of the edge of a workpiece from four edge points. Dim POSX#(3), POSY#(3), PARAM#(2) Rem Calculate the edge points from the measurement result. For I&=0 To 3 GetUnitData I&+1, "X", POSX#(I&) GetUnitData I&+1, "Y", POSY#(I&) Next Rem Get the straight line component.
  • Page 614 Measure Executes measurement processing. Format Measure[ <wait>] Parameter Parameter Data type Description name Recovery timing of macro function 0: Executes subsequent program lines without waiting for measurement to end. <wait> Integer type 1: Waits for measurement to end and then executes subsequent program lines. 2: Waits for measurement to end and measurement result display to end and then executes subsequent program lines.
  • Page 615 Useable Modules Scene Control Macro / Communication Command Macro Supported Versions Version 3.50 or later Related Items MeasureStart (Reference: Details (p.617)) MeasureStop (Reference: Details (p.619)) Remeasure (Reference: Details (p.658)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 616 MeasureDispG Executes display of the measurement result of the processing unit. Format MeasureDispG <unitNo>, <subNo> Parameter Parameter Data type Description name Processing unit number (0 to (the number of registered processing units in the current <unitNo> Integer type scene minus one)) Image display sub-number of the image window to be used for display (Reference: List <subNo>...
  • Page 617 MeasureId$ Gets the measurement identification. Format MeasureId$ Parameter None. Return value Returns the measurement identification as a character string. The measurement identification is a character string in the format (YYYY-MM-DD_HH-MM-SS-XXXX) that consists of the date and time of the internal clock at the time measurement was executed. The date consists of the year (YYYY), month (MM), and day (DD), separated by hyphens (-), and the time consists of the hour (HH), minute (MM), second (SS), and 100- sec (XXXX), separated by hyphens (-), with the two segments...
  • Page 618 MeasureProc Executes measurement processing in a processing unit. Format MeasureProc <unitNo> Parameter Parameter Data type Description name Processing unit number (0 to (the number of registered processing units in the current <unitNo> Integer type scene minus one)) Return value None. Description Executes measurement processing in the processing unit specified in the <unitNo>...
  • Page 619 MeasureStart Allows input of the measurement trigger. Format MeasureStart Parameter None. Return value None. Description Allows input of the measurement trigger and input of communication commands, and changes to the measurement allowed state. After setting the measurement prohibited state with the MeasureStop function, execute this macro function to return to the measurement allowed state.
  • Page 620 Example In the communication command macro, executes measurement on the Shape Search III processing unit of Processing Unit number 1 after input of the measurement trigger is allowed, and gets the measurement result. Sets the "BUSY ON" setting to ON in advance. Multi-point output is external reference data number 168, the measurement X coordinate is external reference data number 6, and the measurement Y coordinate is external reference data number 7.
  • Page 621 MeasureStop Prohibits input of the measurement trigger. Format MeasureStop[ <mode>] Parameter Parameter Data type Description name <mode> Integer type Measurement trigger input prohibited mode (always 0) Return value None. Description In the measurement trigger input prohibited mode specified in the <mode> parameter, prohibits measurement trigger input and communication command input, and sets the measurement prohibited state.
  • Page 622 Example In the communication command macro, executes measurement on the Shape Search III processing unit of Processing Unit number 1 after input of the measurement trigger is allowed, and gets the measurement result. Sets the "BUSY ON" setting to ON in advance. Multi-point output is external reference data number 168, the measurement X coordinate is external reference data number 6, and the measurement Y coordinate is external reference data number 7.
  • Page 623 Mid$ Extract a part from the character string. Format Mid$(<string>, <start>, <length>) Parameter Parameter Data type Description name Character <string> Extraction target character string string type <start> Integer type Starting position of extraction (1 to the length of the target character string) Length of characters to be extracted (1 to the remaining length from specified starting <length>...
  • Page 624 Example Extracts four characters from the second character and eight characters from the third character in the half- width alphanumeric character string. For the latter operation, because the specified length exceeds the target character string length of eight in this example, only five characters from the third to the end of the character string.
  • Page 625 Mkdir Build a directory Format Mkdir <directoryName> Parameter Parameter Data type Description name Character <directoryName> Directory name of built directory string type Return value None. Description Build the directory specified in the <directoryName> parameter. In the <directoryName> parameter, use an absolute path to specify the directory name of the directory to be built.
  • Page 626 Gets the remainder. Format <expression1> MOD <expression2> Parameter Parameter Data type Description name <expression1> Integer type Expression of the dividend to calculate the remainder <expression2> Integer type Expression of the divisor to calculate the remainder Return value Returns the remainder as an integer value. Description Gets the remainder from division of the expression specified in the <expression1>...
  • Page 627 MoveUnit Moves a processing unit. Format MoveUnit <srcUnitNo>, <destUnitNo> Parameter Parameter Data type Description name Processing unit number (0 to (number of processing units of current scene minus one)) <srcUnitNo> Integer type of source Processing unit number (0 to (number of processing units of current scene minus one)) <destUnitNo>...
  • Page 628 Gets the "not" result (negation) of the expression. Format NOT(<expression>) Parameter Parameter Data type Description name <expression> Integer type Expression to calculate the negation Return value Returns an integer "not" value. Description Gets the "not" result of the 32-digit binary value specified in the <expression> parameter by inverting each bit. If a double precision real number expression is specified in the <expression>...
  • Page 629 Open For Append As# Open the file in append mode. Format Open <fileName> For Append As #<fileNo> Parameter Parameter Data type Description name Character <fileName> Absolute path of the file to be opened string type <fileNo> Integer type Assigned file number (0 to 15) to the opened file Return value None.
  • Page 630 Example Opens the file named "input.txt" under the E drive and writes the data to the file. STRING$ = "Sample" Rem Open the file Open "E:\input.txt" For Append As #1 Print #1, STRING$ Rem Close up the file. Close #1 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions...
  • Page 631 Open For Input As# Open the file in reading mode. Format Open <fileName> For Input As #<fileNo> Parameter Parameter Data type Description name Character <fileName> Absolute path of the file to be opened string type <fileNo> Integer type Assigned file number (0 to 15) to the opened file Return value None.
  • Page 632 Example Reads the data until the end of the file. Dim ALLDATA$(255) Rem Open the file Open "E:\input.dat" For Input As #1 For I&=0 to 255 Rem Read line by line from the top of the file Input #1, DATA$ ALLDATA$(I&) = DATA$ Rem Check if the end of the file is reached If Eof(1) <>...
  • Page 633 Open For Output As# Opens the file in writing mode. Format Open <fileName> For Output As #<fileNo> Parameter Parameter Data type Description name Character <fileName> Absolute path of the file to be opened string type <fileNo> Integer type Assigned file number (0 to 15) to the opened file Return value None.
  • Page 634 Example Opens the file, writes the data in the file, and then closes the file. DATA& = 10 Rem Open the file Open "E:\input.dat" For Output As #1 Rem Write the data in the opened file Print #1 DATA& Rem Close the opened file Close #1 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro...
  • Page 635 OpenTextData Opens a messages file. Format OpenTextData <ident> As #<textDataNo> Parameter Parameter Data type Description name Character <ident> Identification name for the message file that is opened as text data string type <textDataNo> Integer type Text data number (0 to 15) that is assigned to the message file opened as text data. Return value None.
  • Page 636 Example Uses the *MEASUREDISPT subroutine of the Unit Macro processing unit to display the measured correlation value by the search processing unit (Processing Unit number 5), along with the gotten text string from the prepared message file for the processing unit, in the text window. The correlation value can be gotten with External Reference Data number 5.
  • Page 637 Gets the logical sum of two expressions. Format <expression1> OR <expression2> Parameter Parameter Data type Description name <expression1> Integer type Expression to calculate the logical sum <expression2> Integer type Expression to calculate the logical sum Return value Returns the logical sum as an integer value. Description Gets the logical sum by bit of the expression specified in the <expression1>...
  • Page 638 Supported Versions Version 3.50 or later Related Items AND (Reference: Details (p.409)) GetUnitData (Reference: Details (p.552)) UnitData (Reference: Details (p.778)) NOT (Reference: Details (p.626)) XOR (Reference: Details (p.809)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 639 Piece$ Extract the part of the character string which was separated by delimiter from the string. Format Piece$(<string>, <delimiter>, <start>, <end>) Parameter Parameter Data type Description name Character <string> Extraction target character string string type Character <delimiter> Character string delimiter string type Index number of the character string that the extraction is started (Number 1 to number <start>...
  • Page 640 Usage Cautions • None. Example Gets the part of the character string which was separated by a semicolon (;) delimiter from the string. INPUTSTR$ = "PIECE1;PIECE2;PIECE3;PIECE4" DELIMITER$ = ";" Rem Extract the first substring of the character string OUTPUTSTR1$ = Piece$(INPUTSTR$, DELIMITER$, 1, 1) Rem Extract the third and forth substrings from the character string OUTPUTSTR2$ = Piece$(INPUTSTR$, DELIMITER$, 3, 4) The result is shown below.
  • Page 641 Print Outputs data in the system status console window. Format Print <expression>[;|, <expression>...][;|,] Parameter Parameter Data type Description name Integer type Double precision real number data <expression> Numerical expression or character string to be output type Character string type Array Return value None.
  • Page 642 Example Gets the gotten values of "correlation value", "measurement coordinate X", and "measurement coordinate Y" by the search processing unit (Processing Unit number 2) and outputs to the system status console window. The correlation value, measured position coordinates X and Y can be gotten with External Reference Data numbers 5, 6, and 7 respectively.
  • Page 643 Print# Outputs data in a file. Format Print #<fileNo>[, <expression>[;|, <expression>...][;|,] Parameter Parameter Data type Description name <fileNo> Integer type File number (0 to 15) of the output destination file Integer type Double precision real number data <expression> Numerical expression or character string to be output type Character string type...
  • Page 644 Example Outputs a character string to the file "E:\input.txt". STRING$ = "Sample" Rem Open the file Open "E:\input.txt" For Append As #1 Print #1, STRING$ Rem Close up the file. Close #1 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items...
  • Page 645 PutAll Sets the output state of all output terminals. Format PutAll <ioIdent>, <state> Parameter Parameter Data type Description name Character Identification name of the communication module to be used (always "ParallelIo") <ioIdent> string type (Reference: List of I/O Modules (p.341)) <state>...
  • Page 646 Useable Modules Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items BusyOut (Reference: Details (p.419)) GetAll (Reference: Details (p.528)) GetPort (Reference: Details (p.542)) JudgeOut (Reference: Details (p.585)) PutPort (Reference: Details (p.645)) RunOut (Reference: Details (p.667)) Macro Reference...
  • Page 647 PutPort Sets the output state of the specified output terminal. Format PutPort <ioIdent>, <portNo>, <state> Parameter Parameter Data type Description name Character Identification name of the communication module to be used (always "ParallelIo") <ioIdent> string type (Reference: List of I/O Modules (p.341)) Terminal number of output terminal whose output state is to be set.
  • Page 648 Description Sets the state of the output terminal of the terminal number specified in the <portNo> parameter of the communication module specified in the <ioIdent> parameter to the output state specified in the <state> parameter. Normally "ParallelIo" should be specified in the <ioIdent> parameter. If an incorrect data type is specified for a parameter, a "Type mismatch"...
  • Page 649 RaiseOptionEvent Notifies option events to the UI screen. Format RaiseOptionEvent <eventNo>, <parameter> Parameter Parameter Data type Description name Event number to be notified 0xFF: Layout switch in the main screen of both sensor controller and remote operation <eventNo> Integer type tool 0x1FF: Layout switch in the main screen of the sensor controller 0x2FF: Layout switch in the main screen of the remote operation tool...
  • Page 650 Related Items None. Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 651 ReadPlcMemory Reads a value from the PLC memory area. Format ReadPlcMemory <ioIdent>, <area>, <channelOffset>, <channelCount>, <readData()> Parameter Parameter Data type Description name Character Identification name of the communication module to be used (Reference: List of I/O <ioIdent> string type Modules (p.341)) <area>...
  • Page 652 Example In the communication command macro, reads multiple data from the PLC connected by PLC link. IOMODULE$ = "UdpPlcLink" Rem Get the settings of the output data area. GetSystemData IOMODULE$, "outputArea", AREA& GetSystemData IOMODULE$, "outputMemoryAddress", ADDRESS& Rem Create the integer array variable to store the read data. Dim DATA&(1) Rem Load the data (4ch) from data output area.
  • Page 653 ReceiveData Receives data. Format ReceiveData <ioIdent>, <inputData()>, <inputMaxSize>, <inputSize>[, <parameter()>, <parameterSize>] Parameter Parameter Data type Description name Character Identification name of the communication module to be used (Reference: List of I/O <ioIdent> string type Modules (p.341)) <inutData()> Integer array Received data <inputMaxSize>...
  • Page 654 Example Receives data from an external device in the measurement process of the unit macro. Rem Prepare a buffer that can receive 12 bytes of data. Dim BUFFER&(11) IOMODULE$ = "TcpNormal" Rem Set the polling state of the communication module to stopped in order to receive the data. SetPollingState IOMODULE$, False Rem Executing the initialization of the reception data size.
  • Page 655 RefreshImageWindow Updates the image window. Format RefreshImageWindow Parameter None. Return value None. Description Updates the image window. Execute this macro function to update the display after executing the ImageUpdate function when a graphic is redrawn in the image window or the image is redrawn. Usage Cautions •...
  • Page 656 RefreshJudgeWindow Updates the judgement window. Format RefreshJudgeWindow Parameter None. Return value None. Description Updates the judgement window. Usage Cautions • None. Example Updates the judgement window in the communication command macro. RefreshJudgeWindow Useable Modules Communication Command Macro / Scene Control Macro Supported Versions Version 3.50 or later Related Items...
  • Page 657 RefreshTextWindow Updating the text display window. Format RefreshTextWindow Parameter None. Return value None. Description Updating the text display window. Execute this macro function to update the display after redrawing detailed results in the text window. Usage Cautions • None. Example In the communication macro, sets the value of the measurement result of calculation expression 0 of the calculation processing unit of Processing Unit number 5 of the current scene, and then updating the display of the text window."Calculation result of calculation expression 0"...
  • Page 658 RefreshTimeWindow Updates the display of the information window. Format RefreshTimeWindow Parameter None. Return value None. Description Updates the display of the information window. Usage Cautions • None. Example Updates the display of the information window in the communication macro. RefreshTimeWindow Useable Modules Communication Command Macro / Scene Control Macro Supported Versions...
  • Page 659 Put a comment in the program. Format Parameter None. Return value None. Description Add a comment or a description in the program. The readability of the program is improved by adding comments. For details on comment, refer to the "Comment" section. (Reference: Comment (p.207)) Usage Cautions •...
  • Page 660 Remeasure Executes remeasurement. Format Remeasure <preImageNo>[, <wait>] Remeasure <fileName>[, <wait>] Parameter Parameter Data type Description name Image logging number (-1 to (number of images in main unit already logged minus one)) <preImageNo> Integer type of image to be remeasured. Character <fileName>...
  • Page 661 Usage Cautions • Execute this macro function when a measurement-in-progress signal such as the BUSY signal is OFF and measurement is allowed. (Reference: State Transitions and Execution Timing (p.227)) Example In the communication command macro, gets the measurement X coordinate and measurement Y coordinate of the search processing unit of Processing Unit number 2 after remeasurement is executed using the most recent logging image.
  • Page 662 RenumUnitNo Gets the processing unit number after flow edit. Format RenumUnitNo(<oldUnitNo>) Parameter Parameter Data type Description name Processing unit number before edit (0 to (Processing unit number of current scene minus <oldUnitNo> Integer type one)) Return value Returns the processing unit number after update of measurement flow as an integer. Description Gets the processing unit number specified in the <oldUnitNo>...
  • Page 663 Supported Versions Version 3.50 or later Related Items DeleteUnit (Reference: Details (p.460)) InsertUnit (Reference: Details (p.573)) UnitNo (Reference: Details (p.790)) Ut (Reference: Details (p.793)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 664 Gets the color value. Format RGB(<red>, <green>, <blue>) Parameter Parameter Data type Description name <red> Integer type Red component of the color value being gotten (0 to 255) <green> Integer type Green component of the color value being gotten (0 to 255) <blue>...
  • Page 665 Supported Versions Version 3.50 or later Related Items DrawFillImage (Reference: Details (p.485)) DrawText (Reference: Details (p.500)) SetDrawStyle (Reference: Details (p.700)) SetTextStyle (Reference: Details (p.727)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 666 Right$ Extracts the specified length of characters from the right side of character string. Format Right$(<string>, <length>) Parameter Parameter Data type Description name Character <string> Extraction target character string string type <length> Integer type Length of characters to be extracted (1 to the length of the target character string) Return value Returns the character string type value of the extracted character string.
  • Page 667 Example Extracts 6-byte length of characters from the right side of the character string. Because one half-width alphabet consumes single byte, this example extracts 6 characters from the character string. CHARA$ = "Measurement Result" Rem Extract 6-byte length of characters from the right side of the character string. TITLE$ = Right$(CHARA$, 6) The result is shown below.
  • Page 668 Rmdir Deletes a directory. Format Rmdir <directoryName> Parameter Parameter Data type Description name Character <directoryName> Name of a directory to be deleted string type Return value None. Description Deletes the directory specified in the <directoryName> parameter. In the <directoryName> parameter, use an absolute path to specify the directory name of the directory to be deleted.
  • Page 669 RunOut Sets the output state of the RUN signal. Format RunOut <ioIdent>, <state> Parameter Parameter Data type Description name Character Identification name of the communication module to be used ("ParallelIo" or "EtherCAT") <ioIdent> string type (Reference: List of I/O Modules (p.341)) Output state of terminal <state>...
  • Page 670 Related Items BusyOut (Reference: Details (p.419)) GetAll (Reference: Details (p.528)) GetPort (Reference: Details (p.542)) JudgeOut (Reference: Details (p.585)) PutAll (Reference: Details (p.643)) PutPort (Reference: Details (p.645)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 671 SaveBackupData Saves the system + scene group 0 data. Format SaveBackupData(<fileName>) Parameter Parameter Data type Description name Character <fileName> File name of bkd file to save (system + scene group 0 data (*.bkd)) string type Return value None. Description Saves the system + scene group 0 in the file with the file name specified in the <fileName> parameter. In the <fileName>...
  • Page 672 SaveData Saves the data to the controller. Format SaveData Parameter None. Return value None. Description Saves the current system group data and the system data to the sensor controller. If the format is written incorrectly, such as writing the macro function name incorrectly, omitting a comma, or omitting a half-width space, a "Syntax error"...
  • Page 673 SaveImage Saves image data. Format SaveImage <preImageNo>, <fileName> Parameter Parameter Data type Description name Number (-1 to (number of images already logged in main unit minus one)) of main unit <preImageNo> Integer type logging image to be saved Character <fileName> File name of file to be saved string type Return value...
  • Page 674 Supported Versions Version 3.50 or later Related Items GetSystemData (Reference: Details (p.546)) Remeasure (Reference: Details (p.658)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 675 SaveMeasureImage Saves the measurement image of the processing unit. Format SaveMeasureImage <measureImageNo>, <fileName>, <imageFormat>[, <startX>, <startY>, <sizeX>, <sizeY>] Parameter Parameter Data type Description name <measureImageNo> Integer type Measurement image number of the measurement image to be saved (always 0) Character <fileName>...
  • Page 676 Example Saves the entire image of measurement image 0 in a file in BMP format. SaveMeasureImage 0, "C:\IMAGE\sample.bmp", 0 Useable Modules Unit macro Supported Versions Version 4.00 or later Related Items GetImageSize (Reference: Details (p.532)) GetSystemData (Reference: Details (p.546)) GetUnitData (Reference: Details (p.552)) Macro Reference Vision System FH/FZ5 Series...
  • Page 677 SaveScene Saves the scene data. Format SaveScene <sceneNo>, <fileName> Parameter Parameter Data type Description name <sceneNo> Integer type Scene number to save the scene (0 to 127) Character <fileName> File name of the scene data to save (*.scn) string type Return value None.
  • Page 678 Related Items GetSystemData (Reference: Details (p.546)) LoadScene (Reference: Details (p.601)) SaveBackupData (Reference: Details (p.669)) SaveData (Reference: Details (p.670)) SaveSceneGroup (Reference: Details (p.677)) SaveSystemData (Reference: Details (p.679)) SaveUnitData (Reference: Details (p.681)) SceneNo (Reference: Details (p.691)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 679 SaveSceneGroup Saves the scene group data. Format SaveSceneGroup <sceneGroupNo>, <fileName> Parameter Parameter Data type Description name <sceneGroupNo> Integer type Scene group number of the scene group to save (0 to 31) Character <fileName> File name of the scene group data to save (*.sgp) string type Return value None.
  • Page 680 Related Items GetSystemData (Reference: Details (p.546)) LoadSceneGroup (Reference: Details (p.603)) SaveBackupData (Reference: Details (p.669)) SaveData (Reference: Details (p.670)) SaveScene (Reference: Details (p.675)) SaveSystemData (Reference: Details (p.679)) SaveUnitData (Reference: Details (p.681)) SceneGroupNo (Reference: Details (p.687)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 681 SaveSystemData Saves the system data. Format SaveSystemData <fileName> Parameter Parameter Data type Description name Character <fileName> File name of the system data to save (*.ini) string type Return value None. Description Saves the system data in the file with the file name specified in the <fileName> parameter. In the <fileName>...
  • Page 682 Related Items GetSystemData (Reference: Details (p.546)) LoadSystemData (Reference: Details (p.605)) SaveBackupData (Reference: Details (p.669)) SaveData (Reference: Details (p.670)) SaveScene (Reference: Details (p.675)) SaveSceneGroup (Reference: Details (p.677)) SaveUnitData (Reference: Details (p.681)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 683 SaveUnitData Saves a processing unit. Format SaveUnitData <sceneNo>, <unitNo>, <unitCount>, <fileName> Parameter Parameter Data type Description name <sceneNo> Integer type Scene number to save the scene (-1 to 127) Processing unit number to begin to save (0 to (the number of registered processing units <unitNo>...
  • Page 684 Example Saves the processing units of Processing Unit number 2 to Processing Unit number 4 of the current scene in a processing unit data file. Rem Save Processing Unit number 2 to Processing Unit number 4 of the current scene in a processing unit data file. SaveUnitData -1, 2, 3, "C:\BACKDIR\unitsave.unt"...
  • Page 685 SceneCount Gets the number of scenes that can be used. Format SceneCount Parameter None. Return value Returns the number of scenes that can be used as an integer. Description Gets the number of scenes that can be used. If a value is assigned to the return value variable or the variable is not used in an expression, a "Syntax error" error will occur.
  • Page 686 SceneDescription$ Gets the scene description. Format SceneDescription$(<sceneNo>) Parameter Parameter Data type Description name <sceneNo> Integer type Scene number (0 to 127) of scene whose description is to be gotten. Return value Returns the scene description as a character string. Description Gets the description set in the scene of the scene number specified in the <sceneNo>...
  • Page 687 Related Items SceneMaker$ (Reference: Details (p.689)) SceneTitle$ (Reference: Details (p.692)) SetSceneDescription (Reference: Details (p.715)) SetSceneMaker (Reference: Details (p.719)) SetSceneTitle (Reference: Details (p.721)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 688 SceneGroupCount Gets the number of useable scene groups. Format SceneGroupCount Parameter None. Return value The number of useable scene groups is returned as an integer value. Description Gets the number of useable scene groups. If a value is assigned to the return value variable or the variable is not used in an expression, a "Syntax error" error will occur.
  • Page 689 SceneGroupNo Gets the scene group number of the current scene group. Format SceneGroupNo Parameter None. Return value The scene group number of the current scene group is returned as an integer value. Description Gets the scene group number of the current scene group. If a value is assigned to the return value variable or the variable is not used in an expression, a "Syntax error"...
  • Page 690 SceneGroupTitle$ Gets the title of the scene group. Format SceneGroupTitle$(<sceneGroupNo>) Parameter Parameter Data type Description name <sceneGroupNo> Integer type Scene group number (0 to 31) of the scene group whose scene group title is gotten. Return value Returns the title value of the character string scene group. Description Gets the title set in the scene group that has the scene group number specified in the <sceneGroupNo>...
  • Page 691 SceneMaker$ Gets the scene creator. Format SceneMaker$(<sceneNo>) Parameter Parameter Data type Description name <sceneNo> Integer type Scene number (0 to 127) of scene whose creator is to be gotten. Return value Returns the value of the scene creator as a character string. Description Gets the name of the creator set in the scene that has the screen number specified in the <sceneNo>...
  • Page 692 Related Items SceneDescription$ (Reference: Details (p.684)) SceneTitle$ (Reference: Details (p.692)) SetSceneDescription (Reference: Details (p.715)) SetSceneMaker (Reference: Details (p.719)) SetSceneTitle (Reference: Details (p.721)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 693 SceneNo Gets the scene number of the current scene. Format SceneNo Parameter None. Return value Returns the scene number of the current scene as an integer value. Description Gets the scene number of the current scene. If a value is assigned to the return value variable or the variable is not used in an expression, a "Syntax error" error will occur.
  • Page 694 SceneTitle$ Gets the scene title. Format SceneTitle$(<sceneNo>) Parameter Parameter Data type Description name <sceneNo> Integer type Scene number (0 to 127) of scene whose title is to be gotten Return value Returns the scene title as a character string. Description Gets the title set in the scene that has the scene number specified in the <sceneNo>...
  • Page 695 ScreenCapture Saves the capture of the screen. Format ScreenCapture <fileName> Parameter Parameter Data type Description name Character <fileName> File name that saves the capture of the screen. string type Return value None. Description Takes a screen capture of the sensor controller screen and saves it in BMP format with the file name specified in the <fileName>...
  • Page 696 Select Case Case Else End Select Controls the process flow according to the specified condition. Format Select <expression> [Case <value> <caseStatement>] [Case Else <elseStatement>] End Select Parameter Parameter Data type Description name <expression> Integer type Expression that controls the process flow. <value>...
  • Page 697 Example Uses the *MEASUREDISPG subroutine in the Unit Macro processing unit to change the display in the image window according to the set image display sub-number in the image window of the main screen. *MEASUREDISPG Rem Get the displayed sub-image number SUBNO&...
  • Page 698 SendData Sends data. Format SendData <ioIdent>, <outputData()>, <outputSize>[, <parameter()>, <parameterSize>] Parameter Parameter Data type Description name Character Identification name of the communication module to be used (Reference: List of I/O <ioIdent> string type Modules (p.341)) <outputData()> Integer array Data to send <outputSize>...
  • Page 699 Example In normal UDP communication, specifies the destination and sends data. Rem Create the destination address information (10.1.1.101) Dim IPADDR&(4) IPADDR&(0) = 10 IPADDR&(1) = 1 IPADDR&(2) = 1 IPADDR&(3) = 101 Rem Make the transmit data. Dim BUFFER&(4) BUFFER&(0) = 1 BUFFER&(1) = 2 BUFFER&(2) = 3 BUFFER&(3) = 4...
  • Page 700 SendString Sends the character string data. Format SendString <ioIdent>, <outputString> Parameter Parameter Data type Description name Character Identification name of the communication module to be used (Reference: List of I/O <ioIdent> string type Modules (p.341)) Character <outputString> Character string to send string type Return value None.
  • Page 701 SetDisplayUnitNo Sets the processing unit number in the flow window to the selected state. Format SetDisplayUnitNo <unitNo> Parameter Parameter Data type Description name <unitNo> Integer type Processing unit number to be selected Return value None. Description Sets the processing unit of the processing unit number specified in the <unitNo> parameter to the selected state in the flow window.
  • Page 702 SetDrawStyle Set the drawing attributes of the graphic figure. Format SetDrawStyle <style>, <width>, <color> Parameter Parameter Data type Description name Type of the drawn line PS_SOLID: Solid line PS_DASH: Dashed line (This selection is valid only when the specified line width is 1) PS_DOT: Dotted line PS_DASHDOT: One-dot chain line (This selection is valid only when the specified line <style>...
  • Page 703 Usage Cautions • This macro function can only be used in the *MEASUREDISPI subroutine or the *MEASUREDISPG subroutine. If used in another subroutine, an "Illegal function call" error will occur. Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to draw a straight line whose line type is "dashed line"...
  • Page 704 SetGlobalData Sets the global data. Format SetGlobalData <dataIdent>, <data> Parameter Parameter Data type Description name Character <dataIdent> Identification name of the global data to set the value string type Integer type Double precision real <data> number data Value set in the global data type Character string type...
  • Page 705 Supported Versions Version 3.50 or later Related Items AddGlobalData (Reference: Details (p.405)) GetGlobalData (Reference: Details (p.530)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 706 SetImageWindow Sets the state of the image window. Format [Scene Control Macro / Communication Command Macro] SetImageWindow <windowNo>, <locationX>, <locationY>, <width>, <height>, <unitNo>, <subNo>, <magnification>, <originX>, <originY>, <update>, <visible> [Unit Macro] SetImageWindow <magnification>, <originX>, <originY> Parameter Parameter Data type Description name <windowNo>...
  • Page 707 Description Sets the state of the image window specified in the <windowNo> parameter. When this macro function is used with the unit macro, the state of the image window displayed using the MEASUREDISPI subroutine is set. In the <locationX> parameter and <locationY> parameter, specify the relative coordinate values from the upper left coordinates of the gotten image container window to the upper left coordinates of the image window.
  • Page 708 Example In the communication command macro, changes the image mode of image windows 0 to 3 to Through. Sets the BusyOn flag to ON in advance in the communication command macro. For I& = 0 To 3 Rem Get the state of the image window. GetImageWindow I&, LOCATIONX&, LOCATIONY&, WIDTH&, HEIGHT&, UNITNO&, SUBNO&, MAG#, ORIGINX&, ORIGINY&, UPDATE&, VISIBLE&...
  • Page 709 SetMeasureImage Sets the measurement image of the processing unit. Format SetMeasureImage <measureImageNo>, <unitNo>, <imageNo> Parameter Parameter Data type Description name <measureImageNo> Integer type Measurement image number to set to the target image of the measurement (always 0) Processing unit number of the processing unit that holds the image to be set as the <unitNo>...
  • Page 710 SetMeasureOut Sets the external output setting for the measurement result. Format SetMeasureOut <mode> Parameter Parameter Data type Description name External output setting <mode> Integer type 0: Not output externally 1: Output externally Return value None. Description Sets the "External Output" value in the layout settings to the external output setting value specified in the <mode>...
  • Page 711 SetPlcData Creates the data that is written with the WritePlcMemory function. Format SetPlcData <ioIdent>, <writeData()>, <offset>, <size>, <data> Parameter Parameter Data type Description name Character Identification name of the communication module to be used (Reference: List of I/O <ioIdent> string type Modules (p.341)) <writeData()>...
  • Page 712 Example In the communication macro, writes measurement coordinate X and measurement coordinate Y of the search processing unit of Processing Unit number 2 to the PLC connected by PLC link. Measurement coordinate X is external data number 6, and measurement coordinate Y is external data number 7. IOMODULE$ = "UdpPlcLink"...
  • Page 713 SetPollingState Sets the execution status of the communication module. Format SetPollingState <ioIdent>, <state> Parameter Parameter Data type Description name Character Identification name of communication module whose polling state is to be set (Reference: <ioIdent> string type List of I/O Modules (p.341)) Execution status of the communication module to set <state>...
  • Page 714 Example Receives normal TCP communication data in the MEASUREPROC subroutine of the Unit Macro processing unit. Rem Prepare a buffer that can receive 12 bytes of data. Dim BUFFER&(11) IOMODULE$ = "TcpNormal" Rem Set the polling state of the communication module to stopped in order to receive the data. SetPollingState IOMODULE$, False Rem Executing the initialization of the reception data size.
  • Page 715 SetSceneData Sets data for the scene control macro. Format SetSceneData <dataIdent>, <data> Parameter Parameter Data type Description name Character <dataIdent> Identification name of data to be set string type Integer type Double precision real <data> number data Data to set type Character string type...
  • Page 716 Example Sets the communication command parameter received by the communication command macro in the variable of the scene control macro, and executes the subroutine that applies this value in the appropriate unit. Rem Set the parameter received by the communication command in the variable of the scene control macro SetSceneData "PARAM0&", ARGUMENTVALUE#(0) SetSceneData "PARAM1&", ARGUMENTVALUE#(1) Rem Execute the UPDATE_PARAM subroutine that has been defined in the scene control macro...
  • Page 717 SetSceneDescription Sets the scene description. Format SetSceneDescription <sceneNo>, <sceneDescription> Parameter Parameter Data type Description name <sceneNo> Integer type Scene number (0 to 127) of the scene for which the description is to be set. Character <sceneDescription> Scene description string type Return value None.
  • Page 718 Supported Versions Version 3.50 or later Related Items SceneMaker$ (Reference: Details (p.689)) SceneTitle$ (Reference: Details (p.692)) SceneDescription$ (Reference: Details (p.684)) SetSceneMaker (Reference: Details (p.719)) SetSceneTitle (Reference: Details (p.721)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 719 SetSceneGroupTitle Sets the title of the scene group. Format SetSceneGroupTitle <sceneGroupNo>, <title> Parameter Parameter Data type Description name <sceneGroupNo> Integer type Scene group number of the scene group whose title is to be set (-1 only) Character <title> Title of scene group string type Return value None.
  • Page 720 Related Items SceneGroupTitle$ (Reference: Details (p.688)) SceneTitle$ (Reference: Details (p.692)) SetSceneTitle (Reference: Details (p.721)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 721 SetSceneMaker Sets the creator of the scene. Format SetSceneMaker <sceneNo>, <sceneMaker> Parameter Parameter Data type Description name <sceneNo> Integer type Scene number (0 to 127) of the scene whose creator is to be set. Character <sceneMaker> Creator of the scene string type Return value None.
  • Page 722 Useable Modules Scene Control Macro / Communication Command Macro Supported Versions Version 3.50 or later Related Items SceneDescription$ (Reference: Details (p.684)) SceneMaker$ (Reference: Details (p.689)) SceneTitle$ (Reference: Details (p.692)) SetSceneDescription (Reference: Details (p.715)) SetSceneTitle (Reference: Details (p.721)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 723 SetSceneTitle Sets the title of a scene. Format SetSceneTitle <sceneNo>, <title> Parameter Parameter Data type Description name <sceneNo> Integer type Scene number (0 to 127) of the scene for which a title is to be set. Character <title> Scene title string type Return value None.
  • Page 724 Related Items SceneDescription$ (Reference: Details (p.684)) SceneMaker$ (Reference: Details (p.689)) SceneTitle$ (Reference: Details (p.692)) SetSceneDescription (Reference: Details (p.715)) SetSceneMaker (Reference: Details (p.719)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 725 SetStop Sets the conditions for stopping program execution. Format SetStop <string> Parameter Parameter Data type Description name Character <string> Execution stop condition label string type Return value None. Description Set the character string specified in the <string> parameter as the stop condition for stopping program execution with the Stop function.
  • Page 726 Example Stops the program execution using the specified condition using the SetStop function in debug mode. Rem Set the execution form to debug mode. Debug 18 SetStop "AA?" SetStop "B*" Rem If character string "AAB" specified in the Stop function argument matches pattern "AA?", the program stops. Stop "AAB"...
  • Page 727 SetSystemData Sets the system data. Format SetSystemData <dataIdent0>, <dataIdent1>, <data> Parameter Parameter Data type Description name Character <dataIdent0> Data identification name of identification information 0 of system data to be set. string type Character <dataIdent1> Data identification name of identification information 1 of system data to be set. string type Integer type Double...
  • Page 728 Example Sets the value "C:\temp\bmp" in the screen capture destination folder of identification information 1, "captureDirectory", which belongs to the measurement control settings of identification information 0, "Measure". Rem Get the destination path to be set as the screen capture destination folder. DIRNAME$ = "C:\temp\bmp"...
  • Page 729 SetTextStyle Set the draw attributes of the character string. Format SetTextStyle <fontSize>, <align>, <color>, <angle>, <style> Parameter Parameter Data type Description name <fontSize> Integer type Font size of the drawn character string Alignment of the drawn character string TA_BASELINE: Align baseline TA_BOTTOM: Align lower end TA_TOP: Align top TA_CENTER: Align horizontal center...
  • Page 730 Usage Cautions • This macro function can only be used in the *MEASUREDISPI subroutine or the *MEASUREDISPG subroutine. If used in another subroutine, an "Illegal function call" error will occur. Example Uses the *MEASUREDISPG subroutine of the Unit Macro processing unit to display a character string with its font size of 20, aligned to bottom and horizontally centered, colored by the "OK"...
  • Page 731 SetTextWindow Sets the state of the text window. Format SetTextWindow <unitNo>, <subNo>, <update>, <visible> Parameter Parameter Data type Description name <unitNo> Integer type Processing unit number of the target processing unit to display <subNo> Integer type Sub number of the target image to display <update>...
  • Page 732 Supported Versions Version 3.50 or later Related Items DisplaySubNo (Reference: Details (p.462)) DisplayUnitNo (Reference: Details (p.464)) GetTextWindow (Reference: Details (p.550)) RefreshTextWindow (Reference: Details (p.655)) SetDisplayUnitNo (Reference: Details (p.699)) SetImageWindow (Reference: Details (p.704)) UnitNo (Reference: Details (p.790)) Ut (Reference: Details (p.793)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340)
  • Page 733 SetUnitData Sets the data of a processing unit. Format SetUnitData <unitNo>, <dataNo>, <data> SetUnitData <unitNo>, <dataIdent>, <data> Parameter Parameter Data type Description name Processing unit number (0 to (the number of registered processing units in the current <unitNo> Integer type scene minus one)) External reference data of the processing unit data to set (reference: Vision System...
  • Page 734 Example Sets "Reflect to overall judgement" of the search processing unit of Processing Unit number 2 to "OFF". "Reflect to overall judgement" is external reference data number 103 and external reference data identification name "overallJudge". SetUnitData 2, 103, 1 Rem The same result will be gotten if "overallJudge" is specified instead of 103. SetUnitData 2, "overallJudge", 1 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro...
  • Page 735 SetUnitFigure Sets the figure data of the processing unit. Format SetUnitFigure <unitNo>, <figureNo>, <figure()> Parameter Parameter Data type Description name Processing unit number (0 to (the number of registered processing units in the current <unitNo> Integer type scene minus one)) <figureNo>...
  • Page 736 Example Changes the position of the region figure (rectangle) of the search processing unit of Processing Unit number Dim FIGURE&(5) Rem Get the figure data of the processing unit. GetUnitFigure 2, 1, FIGURE&() Rem Based on the gotten figure data, change the values of the upper left point XY coordinates and lower right point XY coordinates of the region figure.
  • Page 737 SetUnitJudge Sets the judgement result of a processing unit. Format SetUnitJudge <unitNo>, <judge>[, <totalJudgeRefrect>] Parameter Parameter Data type Description name Processing unit number (0 to (the number of registered processing units in the current <unitNo> Integer type scene minus one)) Judgement result to set JUDGE_NC: No judgement (unmeasured) JUDGE_OK: Judgement result OK...
  • Page 738 Example Sets the judgement result of the search processing unit of Processing Unit number 2 in Judgement Result SetUnitJudge 2, JUDGE_OK, True Useable Modules Unit Calculation Macro / Unit Macro Supported Versions Version 3.50 or later Related Items SetUnitData (Reference: Details (p.731)) TotalJudge (Reference: Details (p.761))
  • Page 739 SetUnitTitle Sets the title of a processing unit. Format SetUnitTitle <unitNo>, <title> Parameter Parameter Data type Description name Processing unit number (0 to (the number of registered processing units in the current <unitNo> Integer type scene minus one)) Character <title> Title of processing unit to be set (31 characters max.) string type Return value...
  • Page 740 Related Items MeasureStart (Reference: Details (p.617)) MeasureStop (Reference: Details (p.619)) UnitNo (Reference: Details (p.790)) UnitTitle$ (Reference: Details (p.791)) Ut (Reference: Details (p.793)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 741 SetUserSubroutine Register a user-defined function that has been defined in the external DDL file. Format SetUserSubroutine <subroutineIdent>, <dllFileName>, <functionName> Parameter Parameter Data type Description name Character <subroutineIdent> Identification name to the user-defined function to be registered string type Character <dllFileName> DLL file name string type Character...
  • Page 742 Usage Cautions • Only the user-defined functions that have been defined in programmed DLL files by the supported interfaces are accepted to This macro function only accepts the user-defined function that have been defined in programmed DLL files by the supported interfaces. Also, the DLL files must be saved in the same directory as the FZ-CoreRA.exe For user-defined functions creation, use the FH-AP1.
  • Page 743 SetVar Sets all variables with the specified variable names. Format SetVar <variableName>, <value> Parameter Parameter Data type Description name Character <variableName> Name of variable to be set string type Integer type Double precision real <value> number data Value to be set type Character string type...
  • Page 744 Usage Cautions • Execute this macro function when the BUSY signal or other measurement in progress signal is ON and measurement is prohibited. (Reference: State Transitions and Execution Timing (p.227)) • Use this macro function with the measurement image displayed after one or more measurements, or after the image file is specified and re-measured.
  • Page 745 Gets the sine of the specified expression. Format Sin(<expression>) Parameter Parameter Data type Description name Integer type Double <expression> precision real Expression to get the sine number data type Return value Returns the sine as a double precision real number value in the range -1 to 1. Description Gets the sine of the expression specified in the <expression>...
  • Page 746 Related Items Atn (Reference: Details (p.417)) Cos (Reference: Details (p.450)) GetUnitData (Reference: Details (p.552)) UnitData (Reference: Details (p.778)) Tan (Reference: Details (p.755)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 747 Determining the square root. Format Sqr(<expression>) Parameter Parameter Data type Description name Integer type Double <expression> precision real Expression to get the square root number data type Return value Returns the double precision real square root value. Description Gets the square root of the expression specified in the <expression> parameter. Specify 0 or positive number for the <expression>...
  • Page 748 StartTimer Starts the elapsed time measurement. Format StartTimer Parameter None. Return value Returns the elapsed time as a double precision type real number value. Description Starts the elapsed time measurement. After starting measurment of elapsed time with this macro function, get the elapsed time by executing the Timer function.
  • Page 749 Stop Stops program execution. Format Stop [<string>] Parameter Parameter Data type Description name Execution stop condition label Character This parameter can be omitted. <string> string type Without If the parameter is not specified, program execution stops at the point that this function is executed.
  • Page 750 Rem Set the execution form to debug mode. Debug 18 SetStop "ABC" Rem If character string "ABC" specified in the Stop function argument matches pattern "ABC", the program stops. Stop "ABC" Rem If character string "ABCD" specified in the Stop function argument does not match pattern "ABC", the program does not stop.
  • Page 751 Str$ Converts a numeric value in the numeric character string. Format Str$(<expression>) Parameter Parameter Data type Description name Integer type Double <expression> precision real Expression converted to a numerical character string number data type Return value Returns the character string type numeric value. Description Converts the specified expression in the <expression>...
  • Page 752 The result is shown below. 1,98.4 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items Asc (Reference: Details (p.413)) Chr$ (Reference: Details (p.427)) GetUnitData (Reference: Details (p.552)) Hex$ (Reference: Details (p.560))
  • Page 753 Str2$ Converts a value to a numeric character string in the specified formats. Format Str2$(<expression>, <integral>, <fixed>, <zeroSuppression>, <negative>) Parameter Parameter Data type Description name Integer type Double <expression> precision real Expression converted to a numerical character string number data type <integral>...
  • Page 754 in the <negative> parameter). Example: Specify the following parameters: Number of digits in the integer part: 3, number of digits in the decimal part: 3 When <expression> parameter is 999.999, the changed numerical character string is "999.999" When <expression> parameter is -999.999, the changed numerical character string is "-99.999" If 0 is specified in the <fixed>...
  • Page 755 The result is shown below. 150.000,359.000, 97 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items Asc (Reference: Details (p.413)) Chr$ (Reference: Details (p.427)) Hex$ (Reference: Details (p.560)) LCase$ (Reference: Details (p.589))
  • Page 756 SystemReset Reboots the Sensor Controller. Format SystemReset Parameter None. Return value None. Description Reboots the Sensor Controller. If this command is executed on the Sysmac Studio FH Tools, no action is taken and the process ends. Usage Cautions • None. Example After loading the system data, executes "Save data".
  • Page 757 Gets the tangent of the specified expression. Format Tan(<expression>) Parameter Parameter Data type Description name Integer type Double <expression> precision real Expression to get the tangent number data type Return value Returns the double precision real tangent value. Description Gets the tangent of the expression specified in the <expression> parameter. In the <expression>...
  • Page 758 Related Items Atn (Reference: Details (p.417)) Cos (Reference: Details (p.450)) GetUnitData (Reference: Details (p.552)) Sin (Reference: Details (p.743)) UnitData (Reference: Details (p.778)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 759 Time$ Reads out the clock time from the internal clock. Format Time$ Parameter None. Return value Returns the character string type time value. The time value is a character string of the internal clock time whose hour (HH), minute (MM), and second (SS) separated by a colon (:).
  • Page 760 Supported Versions Version 3.50 or later Related Items Date$ (Reference: Details (p.454)) GetSystemData (Reference: Details (p.546)) Mid$ (Reference: Details (p.621)) Piece$ (Reference: Details (p.637)) Print (Reference: Details (p.639)) SetSystemData (Reference: Details (p.725)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 761 Timer Gets the elapsed time. Format StartTimer(<start>, <mode>) Parameter Parameter Data type Description name Double precision real Rem Return value of the StartTimer function that started the measurement of the <start> number data elapsed time. type Unit of the elapse time to get <mode>...
  • Page 762 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items ElapsedTime (Reference: Details (p.508)) StartTimer (Reference: Details (p.746)) Wait (Reference: Details (p.806)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 763 TotalJudge Gets the total judgement result. Format TotalJudge Parameter None. Return value Returns the overall judgement result as an integer value. • 0: No judgement (unmeasured) • 1: Judgement result OK • -1: Judgement result NG Description Gets the overall judgement result that is the result of execution of the measurement flow. If a value is assigned to the return value variable or the variable is not used in an expression, a "Syntax error"...
  • Page 764 Supported Versions Version 3.50 or later Related Items DrawTextG (Reference: Details (p.502)) SetUnitJudge (Reference: Details (p.735)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 765 TransformAngle Applies the calibration result and position correction amount in the angle value. Format TransformAngle <unitNo>, <imageNo>, <mode>, <srcAngle>, <destAngle> Parameter Parameter Data type Description name Processing unit number (0 to (number of processing units of current scene minus one)) <unitNo>...
  • Page 766 Example Transforms the value of the measurement angle before calibration measured with the search processing unit of Processing Unit number 2 is applied, to the angle value after calibration is applied. "Measurement angle" is the external reference data identification name "angle". Rem Get the measurement result.
  • Page 767 TransformArea Applies the calibration result and position correction amount in the area value. Format TransformArea <unitNo>, <imageNo>, <mode>, <srcArea>, <destArea> Parameter Parameter Data type Description name Processing unit number (0 to (number of processing units of current scene minus one)) <unitNo>...
  • Page 768 Example Transforms the value of the area before calibration measured with the labeling processing unit of Processing Unit number 2 is applied, to the area value after calibration is applied. "Area" is the external reference data identification name "area". Rem Get the measurement result. GetUnitData 2, "area", BEFOREAREA# Rem Transform to the value after calibration is applied.
  • Page 769 TransformDist Applies a calibration result and position correction amount to a distance value. Format TransformDist <unitNo>, <imageNo>, <mode>, <srcDist>, <destDist> Parameter Parameter Data type Description name Processing unit number (0 to (number of processing units of current scene minus one)) of <unitNo>...
  • Page 770 Example Transforms the distance value of the average width before calibration is applied, which is measured with the scan edge width processing unit of Processing Unit number 2, to the distance value after calibration is applied. The "average width" is external reference data identification name "width ave". Rem Get the measurement result.
  • Page 771 TransformLine Applies the calibration result and position correction amount to a line component value. Format TransformLine <unitNo>, <imageNo>, <mode>, <srcA>, <srcB>, <srcC>, <destA>, <destB>, <destC> Parameter Parameter Data type Description name Processing unit number (0 to (number of processing units of current scene minus one)) of <unitNo>...
  • Page 772 Description Applies the transformation information specified in the <mode> parameter to the line components of the lines specified in the <srcA>, <srcB>, and <srcC> parameters on the image specified in the <imageNo> parameter, of the processing unit specified in the <unitNo> parameter. Specify 0, 1, or 10 in the <mode>...
  • Page 773 TransformXY Applies the calibration result and position correction amount to coordinate values. Format TransformXY <unitNo>, <imageNo>, <mode>, <srcX>, <srcY>, <destX>, <destY> Parameter Parameter Data type Description name Processing unit number (0 to (number of processing units of current scene minus one)) of <unitNo>...
  • Page 774 Usage Cautions • None. Example Transforms the pre-calibration measurement coordinates measured with the search processing unit of Processing Unit 2 to the measurement coordinates after calibration is applied. "Measurement coordinate X" is the external reference data identification name "positionX", and "measurement coordinate Y" is the external reference data identification name "positionY".
  • Page 775 Try Catch End Try Detects an error occurrence and executes an exception process. Format <statement> Catch <exceptionStatement>] End Try Parameter Parameter Data type Description name <statement> Statement that can make error occurs <exceptionstatement> --- Statement that is executed when an error occurred Return value None.
  • Page 776 Example Uses the Try Catch-End Try statement in the *MEASUREPROC subroutine of the Unit Macro processing unit to detect the error occurrence and get the detected error number. *MEASUREPROC WORK& = 0 SUMM& = 100 + 200 + 300 ANS& = SUMM& / WORK& Catch If Errno = 11 Then Rem Output the error number and the error content on the system status console window...
  • Page 777 UCase$ Converts an lower case letter to a upper case letter. Format UCase$(<string>) Parameter Parameter Data type Description name Character <string> Character string contains an alphabet to be converted to upper case. string type Return value Returns the case converted character string as a string type value. Description Converts the lower case letters in the character strings specified in the <string>...
  • Page 778 Related Items Asc (Reference: Details (p.413)) Chr$ (Reference: Details (p.427)) Hex$ (Reference: Details (p.560)) LCase$ (Reference: Details (p.589)) Left$ (Reference: Details (p.591)) Len (Reference: Details (p.593)) Mid$ (Reference: Details (p.621)) Piece$ (Reference: Details (p.637)) Right$ (Reference: Details (p.664)) Str$ (Reference: Details (p.749)) Str2$ (Reference: Details (p.751))
  • Page 779 UnitCount Gets the number of registered processing units. Format UnitCount Parameter None. Return value Returns the number of registered processing units as an integer value. Description Gets the number of processing units registered in the current scene. If a value is assigned to the return value variable or the variable is not used in an expression, a "Syntax error" error will occur.
  • Page 780 UnitData Gets the numerical data of a processing unit. Format UnitData(<unitNo>, <dataNo>) UnitData(<unitNo>, <dataIdent>) Parameter Parameter Data type Description name Processing unit number (0 to (the number of registered processing units in the current <unitNo> Integer type scene minus one)) External reference data of the processing unit data to get (reference: Vision System <dataNo>...
  • Page 781 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items GetUnitData (Reference: Details (p.552)) SetUnitData (Reference: Details (p.731)) UnitData$ (Reference: Details (p.780)) UnitData2 (Reference: Details (p.782)) UnitNo (Reference: Details (p.790)) Ut (Reference:...
  • Page 782 UnitData$ Gets the character string data of the specified processing unit. Format UnitData$(<unitNo>, <dataNo>) UnitData$(<unitNo>, <dataIdent>) Parameter Parameter Data type Description name Processing unit number (0 to (the number of registered processing units in the current <unitNo> Integer type scene minus one)) External reference data of the processing unit data to get (reference: Vision System <dataNo>...
  • Page 783 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items GetUnitData (Reference: Details (p.552)) SetUnitData (Reference: Details (p.731)) UnitData (Reference: Details (p.778)) UnitData2 (Reference: Details (p.782)) UnitNo (Reference: Details (p.790)) Ut (Reference:...
  • Page 784 UnitData2 Gets the drawing coordinate data of a processing unit. Format UnitData2(<unitNo>, <dataNo>) UnitData2(<unitNo>, <dataIdent>) Parameter Parameter Data type Description name Processing unit number (0 to (the number of registered processing units in the current <unitNo> Integer type scene minus one)) External reference data of the processing unit data to get (reference: Vision System <dataNo>...
  • Page 785 Example In the *MEASUREDISPG subroutine of the Unit Macro processing unit, gets the measurement X and Y coordinate values of the search processing unit of Processing Unit number 5 and displaying the cursor in the image coordinates. The measurement X coordinate is the external reference data number 8 and the external reference data identification name "X", and the measurement Y coordinate is the external reference data number 7 and the external reference data identification name "Y".
  • Page 786 UnitInfo Gets the processing unit information. Format UnitInfo(<unitNo>, <kind>) Parameter Parameter Data type Description name Processing unit number (0 to (number of processing units of current scene minus one)) of <unitNo> Integer type the processing unit whose information is to be gotten. Type of information 0: Processing item type Number that indicates the processing item type.
  • Page 787 Return value Returns processing unit information as an integer value. Returns -1 if information does not exist. Description Gets the information specified in the <kind> parameter of the processing unit specified in the <unitNo> parameter. If an incorrect data type is specified for a parameter, a "Type mismatch" error will occur. Even if a non-existent number, numerical value, or combination of data types or values is specified for the parameter, an error will not occur.
  • Page 788 UnitItemIdent$ Gets the processing item identification name of the specified processing unit. Format UnitItemIdent$(<unitNo>) Parameter Parameter Data type Description name Processing unit number (0 to (number of processing units of current scene minus one)) <unitNo> Integer type of processing unit whose processing item identification name is to be gotten. Return value Returns the value of the processing item identification name as a character string.
  • Page 789 Supported Versions Version 3.50 or later Related Items SetUnitData (Reference: Details (p.731)) UnitCount (Reference: Details (p.777)) UnitNo (Reference: Details (p.790)) Ut (Reference: Details (p.793)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 790 UnitJudge Gets the judgement result of a processing unit. Format UnitJudge(<unitNo>) Parameter Parameter Data type Description name Processing unit number to get the judgement result of the processing unit (0 to (the <unitNo> Integer type number of registered processing units in the current scene minus one)) Return value Returns the judgement result as an integer value.
  • Page 791 Related Items GetUnitData (Reference: Details (p.552)) SetUnitJudge (Reference: Details (p.735)) TotalJudge (Reference: Details (p.761)) UnitNo (Reference: Details (p.790)) Ut (Reference: Details (p.793)) Vision System FH/FZ5 Series Macro Reference User’s Manual (Z340) WWW.NNC.IR...
  • Page 792 UnitNo Gets the processing unit number. Format UnitNo Parameter None. Return value Returns the processing unit number as an integer value. Description Gets the processing unit number of the processing unit. If a value is assigned to the return value variable or the variable is not used in an expression, a "Syntax error" error will occur.
  • Page 793 UnitTitle$ Gets the title of a processing unit. Format UnitTitle$(<unitNo>) Parameter Parameter Data type Description name Processing unit number (0 to (number of processing units of current scene minus one)) <unitNo> Integer type of processing unit whose title is to be gotten. Return value Returns the title as a character string.
  • Page 794 Supported Versions Version 3.50 or later Related Items SetUnitData (Reference: Details (p.731)) SetUnitTitle (Reference: Details (p.737)) UnitCount (Reference: Details (p.777)) UnitNo (Reference: Details (p.790)) Ut (Reference: Details (p.793)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 795 Gets a processing unit number based on the specified unit label. Format Ut(<unitLabel>) Parameter Parameter Data type Description name Character <unitLabel> Unit label of processing unit string type Return value Returns the processing unit number as an integer value. Description Gets the processing unit number of the processing unit that has the set unit label specified in the <unitLabel>...
  • Page 796 Converts a numeric character string to numeric value. Format Val(<string>) Parameter Parameter Data type Description name Character <string> Numeric character string converted to numeric value string type Return value Returns the value as the double precision type real number. Description Converts the specified numeric character string in the <string>...
  • Page 797 VALUE1# = 123.456 VALUE2# = -123.456 VALUE3# = 0.123 VALUE4# = -0.456 VALUE5# = 123.456 VALUE6# = 123 Useable Modules Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro Supported Versions Version 3.50 or later Related Items Asc (Reference: Details (p.413))
  • Page 798 VarList Outputs a list of the values of the specified variables in the system status console window. Format VarList [<variableName>] Parameter Parameter Data type Description name Name of variable to be output. Character This parameter can be omitted. <variableName> string type When the parameter is not specified, a list of the values of the variables used in the current scope is output.
  • Page 799 Example Among the variables used by the Unit Macro processing unit of Processing Unit number 1 (AA&, AB#, BB&, ABC$, DEF#), outputs a list of the values of variables AA& and AB$, which start with "A" and consist of three characters including the type identifier.
  • Page 800 VarPop Restores the value of the variables that are saved temporarily. Format VarPop Parameter None. Return value None. Description Restore the values of all variables that were saved by the most recent VarPush function. If the VarPush function is executed more than once, the saved values are restored from the latest saved variable to the oldest saved variable.
  • Page 801 Example Uses the variables used in subroutines as local variables. *EXPA Rem Display the current value of the variable. Print A&, B&, C&, D#, E# Rem Use the EXPA subroutine to save the current values of the variables in order to prepare for treating the variable as local variables.
  • Page 802 Rem Use the EXPB subroutine to save the current values of the variables in order to prepare for treating the variable as local variables. Rem Values in variables A&, B&, C&, D#, E# are saved in different areas from Rem where the Varpush statement in the earlier part of the *EXPA subroutine saves. Rem This prevents the previously saved values from being overwritten.
  • Page 803 VarPush Saves the value of the variables that are saved temporarily. Format VarPush <variable>[, <variable>[,..., <variable>]] Parameter Parameter Data type Description name Character <variable> Variable name of the variable whose value is saved temporarily string type Return value None. Description Temporarily save the variable value specified in the <variable>...
  • Page 804 Example Uses the variables used in subroutines as local variables. *EXPA Rem Display the current value of the variable. Print A&, B&, C&, D#, E# Rem Use the EXPA subroutine to save the current values of the variables in order to prepare for treating the variable as local variables.
  • Page 805 Rem Use the EXPB subroutine to save the current values of the variables in order to prepare for treating the variable as local variables. Rem Values in variables A&, B&, C&, D#, E# are saved in different areas from Rem where the VarPush statement in the earlier part of the *EXPA subroutine saves. Rem This prevents the previously saved values from being overwritten.
  • Page 806 VarSave Saves the values of the variables in the scene data. Format VarSave <variableName> Parameter Parameter Data type Description name Character <variableName> Name of the variables to save string type Return value None. Description Saves the values of the variables specified in the <variableName> parameter to the scene data. Characters * (character string wildcard operator) and ? (single character wildcard operator) can be used as wildcards for the <variableName>...
  • Page 807 Example In SAVARPOC subroutine of scene control macro, saves the version information managed independently in scene data. *SAVEPROC Rem Create a variable to store the version information and set 100. Version& = 100 Rem Save the version information. VarSave "Version*" Return Useable Modules Scene Control Macro...
  • Page 808 Wait Pauses the program process for the specified amount of time elapses. Format Wait <time> Parameter Parameter Data type Description name <time> Integer type Standby time (ms) Return value None. Description Pauses the program process on the period of time specified in the <time> parameter. When the process is performed in the background while waiting, the background process will be performed without waiting.
  • Page 809 WritePlcMemory Writes values in the PLC memory area. Format WritePlcMemory <ioIdent>, <area>, <channelOffset>, <channelCount>, <writeData()> Parameter Parameter Data type Description name Character Identification name of the communication module to be used (Reference: List of I/O <ioIdent> string type Modules (p.341)) <area>...
  • Page 810 Example In the communication macro, writes measurement coordinate X and measurement coordinate Y of the search processing unit of Processing Unit number 2 to the PLC connected by PLC link. Measurement coordinate X is external data number 6, and measurement coordinate Y is external data number 7. IOMODULE$ = "UdpPlcLink"...
  • Page 811 Gets the exclusive disjunction (XOR) of two expressions. Format <expression1> XOR <expression2> Parameter Parameter Data type Description name <expression1> Integer type Expression to get the exclusive disjunction <expression2> Integer type Expression to get the exclusive disjunction Return value Returns the XOR value as an integer value. Description Gets the XOR value of the expressions specified in the <expression 1>...
  • Page 812 Supported Versions Version 3.50 or later Related Items AND (Reference: Details (p.409)) GetUnitData (Reference: Details (p.552)) NOT (Reference: Details (p.626)) OR (Reference: Details (p.635)) UnitData (Reference: Details (p.778)) Macro Reference Vision System FH/FZ5 Series User’s Manual (Z340) WWW.NNC.IR...
  • Page 813: About Lenses

    About Lenses When using a camera (single), refer to the following tables to prepare the lens and extension tube. The lens may vary depending on the size of measurement objects and the camera setting distance. Normal Lenses (Seven Types) Digital Camera (Standalone) FZ-S@, FZ-SH@, or FH-S@ (Using 3Z4S-LE SV-V) 10,000 3Z4S-LE SV-03514V...
  • Page 814 Digital CCD Camera (Standalone) FZ-S@5M2 (Using 3Z4S-LE SV-H) 10,000 3Z4S-LE 1,000 SV-0614H t30 t25 SV-0814H SV-1214H SV-1614H SV-2514H SV-3514H t0.5 SV-5014H SV-7525H t0.5 SV-10028H 1,000 Y field of view (mm) Small Digital CCD Camera FZ-SP@/FZ-SF@ (FZ-LE S Series) 10,000 10000 FZ-LES30 FZ-LES30 FZ-LES16...
  • Page 815 High-speed CMOS Camera (Standalone) FH-S@02 (Using 3Z4S-LE VS-H1) 10,000 3Z4S-LE VS-0618H1 VS-0814H1 VS-1214H1 VS-1614H1 VS-2514H1 VS-3514H1 1,000 VS-5014H1 SV-7525H SV-10028H t0.5 t0.5 t0.5 t0.5 1,000 Y field of view (mm) High-speed CMOS Camera (Standalone) FH-S@04 (Using 3Z4S-LE VS-H1) 10,000 3Z4S-LE VS-0618H1 VS-0814H1 VS-1214H1...
  • Page 816 High-speed CMOS Camera (Standalone) FH-S@12 (Using 3Z4S-LE VS-L/M42 Series) 10,000 3Z4S-LE VS-L1828/M42-10 VS-L2526/M42-10 VS-L3528/M42-10 VS-L5028/M42-10 1,000 VS-L8540/M42-10 VS-L10028/M42-10 1,000 Y field of view (mm) Diagram View The horizontal axis of the diagram indicates the Y field of view (mm), and vertical axis indicates camera setting distance (mm) or working distance (mm).
  • Page 817 Lens Types and Outside Diameters Max. O.D. Screws for filter 1-32 UNF (C-mount screw) Full length Lens for 3Z4S-LE SV-V Series Aperture Lens type Focal distance Max. O.D. Full length Filter size (F number) 3Z4S-LE SV-0614V 6.20 mm F1.4 28 mm dia. 30.0 mm M27 P0.5 3Z4S-LE SV-0813V...
  • Page 818 3Z4S-LE-VS-H1 Series Aperture Lens type Focal distance Max. O.D. Full length Filter size (F number) Filter is not supported 3Z4S-LE VS-0618H1 6.23 mm F1.8 64.5 mm dia. 57.2 mm for this lens. 3Z4S-LE VS-0814H1 8.24 mm F1.4 57 mm dia. 59.0 mm M55 P0.75 ∞...
  • Page 819 Vibration/Shock-resistance Lens (Six Types) Digital Camera (Standalone) FZ-S@, FZ-SH@, or FH-S@ (Using 3Z4S-LE VS-MC) 10,000 3Z4S-LE VS-MC15 VS-MC20 VS-MC25N VS-MC30 VS-MC35 VS-MC50 VS-MC75 1,000 1,000 Y field of view (mm) Digital Camera (Standalone) FZ-S@2M (Using 3Z4S-LE VS-MC) 1,000 3Z4S-LE VS-MC15 VS-MC20 VS-MC25N VS-MC30...
  • Page 820 Digital CCD Camera (Standalone) FZ-S@5M2 (Using 3Z4S-LE VS-MC) 1,000 3Z4S-LE VS-MC15 VS-MC20 VS-MC25N VS-MC30 VS-MC35 VS-MC50 VS-MC75 1,000 Y field of view (mm) High-speed CMOS Camera (Standalone) FH-S@02 (Using 3Z4S-LE VS-MCH) 10,000 3Z4S-LE VS-MCH12 VS-MCH16 VS-MCH25 VS-MCH35 1,000 VS-MCH50 VS-MCH75 VS-MCH100 1,000 10,000...
  • Page 821 High-speed CMOS Camera (Standalone) FH-S@04 (Using 3Z4S-LE VS-MCH Series) 10,000 3Z4S-LE VS-MCH12 VS-MCH16 VS-MCH25 VS-MCH35 1,000 VS-MCH50 VS-MCH75 VS-MCH100 1,000 10,000 Y field of view (mm) High-speed CMOS Camera (Standalone) FH-S@12 (Using 3Z4S-LE VS-MCL/M42 Series) 10,000 3Z4S-LE VS-MCL18/M42-10 VS-MCL25/M42-10 VS-MCL35/M42-10 VS-MCL50/M42-10 1,000 VS-MCL85/M42-10...
  • Page 822 Lens Types and Outside Diameters • C-mount Lens 3Z4S-LE VS-MC Series for 2/3-inch Image Elements Optical Focal Aperture Depth of Lens type Max. O.D. Full length Filter size magnifi- distance (F No.) field cation 0.03x 183.1 mm 25.4 mm (0.03x) to M27.0 3Z4S-LE VS-MC15 31 mm dia.
  • Page 823 Optical Focal Aperture Depth of Lens type Max. O.D. Full length Filter size magnifi- distance (F No.) field cation 0.06x 47.1 mm 24.0 mm (0.06x) to M27.0 3Z4S-LE VS-MC30 31 mm dia. 0.15x 8.2 mm 35.7 mm (0.45x) P0.5 0.45x 1.1 mm 0.06x 131.9 mm...
  • Page 824 • C-mount Lens 3Z4S-LE VS-MCH Series for 1-inch Image Elements Optical Focal Aperture Depth of Lens type Max. O.D. Full length Filter size magnifi- distance (F No.) field cation 0.025x 262.0 mm 48.0 mm (0.025x) to M35.5 3Z4S-LE VS-MCH12 38 mm dia. 0.10x 17.6 mm 49.8 mm (0.15x)
  • Page 825 Optical Focal Aperture Depth of Lens type Max. O.D. Full length Filter size magnifi- distance (F No.) field cation 0.025x 262.0 mm 44.5 mm (0.025x) to M40.5 3Z4S-LE VS-MCH50 43 mm dia. 0.10x 17.6 mm 52.0 mm (0.15x) P0.5 0.15x 8.2 mm 0.025x 735.0 mm...
  • Page 826 • M42 mount Lens 3Z4S-LE VS-MCL/M42 Series for 1.8-inch Image Elements Optical Focal Aperture Depth of Lens type Max. O.D. Full length Filter size magnifi- distance (F No.) field cation 0.025x 367.0 mm 3Z4S-LE VS-MCL18/M42- 91.5 mm (0.025x) to F2.8 52 mm dia.
  • Page 827 Optical Focal Aperture Depth of Lens type Max. O.D. Full length Filter size magnifi- distance (F No.) field cation 0.05x 134.0 mm 3Z4S-LE VS-MCL85/M42- 105.0 mm (0.05x) to 52 mm dia. 0.10x 35.2 mm 130.2 mm (0.35x) P0.75 0.35x 3.5 mm 0.05x 188.0 mm 3Z4S-LE VS-MCL85-...
  • Page 828 Extension Tube An extension tube, which is installed between lens and camera, is used to adjust focal distance. Different combinations of the 7 tubes can be used to achieve any desired thickness. C-mount extension tube Extension tube Type Max. O.D. Thickness 7 sets Thickness: 0.5 mm...
  • Page 829: Error Messages And Troubleshooting

    Error Messages and Troubleshooting This section lists error messages that display on the screen and solutions. When a message with this symbol is displayed, the ERROR signal on the parallel interface is on. Error message Troubleshooting No value set. Be sure to set A value must be set for this item.
  • Page 830 Error message Troubleshooting The problem occurred in the system. This is displayed when the significant abnormality occurs in the controller system. Please contact one of our branches or regional offices. The problem occurred in system date. The system Low battery (for the backup of date and time data) level. The batteries need to be replaced. battery is insufficient.
  • Page 831 Error message Troubleshooting Fan/voltage error. Switch off controller, and verify if fan is affected. If error message is still shown after restart, the controller may be damaged. Please contact one of our branches or regional offices. Check the following points. •...
  • Page 832 Error message Troubleshooting The free capacity of RAMDisk is insufficient. If nothing is done, Clean up the content of RAMDisk to increase free space. If this error occurs even though measurement cannot be enough free space is available, scene group data may be too large. Review the inspection flow. performed correctly.
  • Page 833: Faq

    USB memory, the data file may get corrupted. The file needs to be repaired. Please contact OMRON.
  • Page 834: For Measurement

    "NG (memory shortage)" is displayed in the "Detail result" area • Does the number of specific processing items, such as camera image input, exceed the limit? Reference: About Limits on the Number of Image Input Processing Items Used (p.858) Data cannot be saved •...
  • Page 835: About Parallel Interface

    Target figure for the processing unit figure setting has disappeared • This occurs when image input or image compensation-related units, such as filtering, are set between the processing unit figure setting and the unit to be changed. Processing Items List Manual Processing Item List >...
  • Page 836: Serial Interface (Rs-232C/422 Connection)

    • Could the System - Communication - Parallel output control be set to handshaking or synchronization output? These settings influence the GATE output timing. Reference: Parallel Communications - Time Charts in the Vision System FH/FZ5 Series User's Manual for Communications Settings (Cat No. Z342) Serial Interface (RS-232C/422 Connection) No communication available •...
  • Page 837: Measurement Mechanism

    Measurement Mechanism This section describes how to configure measurement in accordance with the images acquired from cameras. This product is prepared with comprehensive processing capabilities for measuring items. Common processes for various processing items are described here. Color Processing Mechanism The images acquired from cameras are available with color information such as R(red)/G(green)/B(blue).
  • Page 838: Search Processing Mechanism

    Search Processing Mechanism Reference image patterns are registered as models and then search is performed for the parts of input images that most resemble the models. The degree of similarity is represented with a correlation value, inspection for defects and different parts being mixed in can be performed. The search process is performed over several distinct stages.
  • Page 839 Note Basic selection flow Does Measurement No rotation (CR) object (workpiece) rotate? Rotation range of Rotation (PT) measurement object (workpiece) narrow Rotation (CR) Search Speed For processing items to perform search processing such as [Search] and [Classification], you can specify the search processing speed by through the model parameter items "Stable", "Precise", and/or "Skipping angle".
  • Page 840 Correlation value With processing items that use search processing, judgement is performed through correlation values. Correlation values are used to check the consistency (degree of similarity) between actual measurement images and reference model images. If portions of measured images are missing or if shapes are different, the correlation value is lower.
  • Page 841: Edge Detection Measurement

    Edge Detection Measurement This method extracts parts with color changes as edges to perform measurement. Edges are found through color changes in the measurement region. When calculating the X coordinate of this edge Measurement region Edge Detection Method The following two types of edge detection method are available. Projection (Density method) A projected waveform is formed relative to the Detection as an edge...
  • Page 842 Edge Level Indicates the edge color change level (degree of color difference). This level is adjusted if edges cannot be accurately detected. Note The value 0 to 100 for the edge level indicates the edge intensity. It is not related to color difference in the original images. For case of measurement using relative position (%) with regards to width of color difference The edges are detected in the following manner.
  • Page 843 Noise Level This level judges whether an edge is present or not. The maximum value and minimum value for color difference in the edge detection area are determined and if the difference is less than the noise level, it is judged that there is no edge. When detection is affected by noise, increase this value.
  • Page 844: Defect Detection Measurement

    Defect Detection Measurement Color changes within the measurement region are used to find defects such as Defect scratches,contamination, and chipping. After measurement region is drawn, a rectangle (defect detection region) is automatically formed in this region. While moving the defect detection region Defect detection size around, calculate average density for each area to determine the difference between the original area and the surrounding area.
  • Page 845 After position compensation (with factory settings) Coordinate values after position compensation are output. Calibration Select whether or not to perform calibration when selecting output to external devices. Calibration: ON Calibration is performed during output and measured values after calibration are output. Calibration: OFF Calibration is not performed during output, and coordinate values from camera images are output.
  • Page 846: Basic Knowledge About Operations

    Basic Knowledge about Operations Inputting Values This section describes how to input values required for setting the judgement conditions and communication specifications. Methods for setting up values include the following, depending on the settings. • Specify values directly with the numeric keyboard Used to enter specific values, or to fine-tune the value with the UP and DOWN keys.
  • Page 847: Selecting Files And Folders

    Operation Method Click [...] in the item in which a character string is to be set. The soft keyboard is displayed. Switch the tabs as needed and Click the character that is to be input. Click [OK] after text has been entered. The software keyboard is closed.
  • Page 848: Available Operations In Select File Window

    e. File Name View Area • File name Names of files selected in the List View area are displayed. • Kind Specifies the types of the file displayed ("Scene data", "System data", etc.) in the List View area. Available Operations in Select File Window This section describes the main operations available from the Select File window.
  • Page 849: Using The Zoom Function

    Using the Zoom Function Specifies the magnification settings of the image displayed in the Properties window. a. Zoom browser Indicates where the zoom display area is in the original image. b. Magnification factor Input the magnification factor A factor of between 25% to 1600% can be indicated.
  • Page 850: Setting Figures

    Setting Figures This section describes the setting method for objects (figures and text) when registering models or specifying measurement regions. The type and number of objects varies depending on different setting options. Layout of Figure Setting Area Window for registering figures when registering or setting areas or models as measurement objects. a.
  • Page 851: Setting Methods

    Setting Methods Rectangle • Image selection status • Dimension • Example) When enlarging Drag the lower right Adjustment point down in a diagonal direction. Points are displayed at each of the four corners. • Using numbers for setting The window for settings is split into two. Setting is performed through input of numbers or through tapping on the arrows.
  • Page 852 • Using numbers for setting The window for settings is split into two. Setting is performed through input of numbers or through tapping on the arrows. Circle/Ellipse • Image selection status • Dimension Adjustment Drag the points. Points are displayed on the top, bottom, left, right, and lower right of the circle.
  • Page 853 Circumference • Image selection status • Dimension Adjustment Drag the points. Points are displayed on the top, bottom, left, and right of both the inner and outer circles. • Example) When enlarging the entire • Example) When adjusting the width of circumference the circumference Drag a point on the outer circle.
  • Page 854 • Image selection status • Dimension Adjustment Drag the points. Points are displayed on two lines at both ends of the arcs, on the inner arc, on the outer arc, and inside the • Example) When enlarging an arc • Example) When adjusting the width of Drag the point inside the arc outward.
  • Page 855 Crosshair Cursor • Image selection status Entire image is selected. • Using numbers for setting Setting is performed through input of numbers or through tapping on the arrows. The line type and line color can also be changed at this window. Polygons (Triangle to Decagon) •...
  • Page 856 • Using numbers for setting The window for settings is split into two. Setting is performed through input of numbers or through tapping on the arrows. Text • Image selection status Entire image is selected. Note • "Text" can only be used in the [Result display] processing item. Time •...
  • Page 857: About Or Setting/Not Setting

    About OR Setting/NOT Setting The OR setting/NOT setting is used when multiple images are combined. Areas with complex shapes can be drawn through combining figures, and unnecessary parts can be excluded form the area. Each time [OR/NOT] ( ) is tapped, the setting of the selected figure toggles between OR and NOT.
  • Page 858: About Number Of Logging Images

    About Number of Logging Images The maximum number of logging images (I_MAX) that can be stored in the controller's memory varies depending on the type of the controller in use and the type and number of connected cameras. For color cameras: 0.3 megapixel camera Intelligent compact camera Type of...
  • Page 859 For monochrome cameras: 0.3 megapixel camera 2 megapixel camera Type of controller eras eras eras eras eras eras eras eras eras eras eras eras eras eras FZ5-L3@@ FZ5-6@@ FZ5-11@@ FH-1@@@ FH-3@@@ 5 megapixel camera 0.3 megapixel camera Type of controller eras eras eras...
  • Page 860: About Limits On The Number Of Image Input Processing Items Used

    About Limits on the Number of Image Input Processing Items Used For the FZ5-L3@@/6@@ series, The number of image input processing items that can be used within one scene is limited by the combinations of the camera. (Units that are not used in conditional branching, etc. are also targeted.) If the limit is exceeded, a measurement NG occurs due to a memory shortage during measurement.
  • Page 861: About Max. Number Of Loading Images During Multi-Input

    About Max. Number of Loading Images during Multi-input The function that enables continuous high speed image input is called the multi-input function. The maximum number of images that can be loaded based on each specification is shown below. Type of controller 0.3 megapixel camera 2 megapixel camera 5 megapixel camera...
  • Page 862: Character Code Table

    Character Code Table For the case of character related process items, recognized characters are output to an external device using a character code (base 10). Calculation method for output value (base 10) Number of upper level bits x 16 + number of lower level bits = output value (Examples) If the recognized character is "2", "50"...
  • Page 863: About Memories Usable With Fz Series

    About Memories Usable with FZ Series The following types of memory can be used with FH/FZ5. On-board memory This is the area where images are temporarily stored when logging images using the logging function. This uses ring memory and if the maximum number of save images has been reached, images are overwritten starting with the oldest.
  • Page 864: Memory Display Image On Plc I/O

    Memory Display Image on PLC I/O The memory display image on PLC I/O varies depending on the PLC to be used. Using data output to the Data Output area of the PLC link from the serial data output processing item as an example, this section illustrates how the memory display image varies depending on the model.
  • Page 865 GX-Developer PLC I/O memory display image As an example, if 3 data items, expression 0 (DATA0) = 1.000, expression 1 (DATA1) = 200.000, and expression 2 (DATA2) = 1000.000, are output from FZ4, they are stored to the PLC Link area as measurement data as follows.
  • Page 866: Operation Log Input Information List

    Operation log input information list This is a list of operation log input information. For the operation log format, see below. Reference: Operation Log Format (p.127) Name Description References AddGlobalData Adds global data. Reference: Details (p.405) AddSystemData Adds system data. Reference: Details (p.407) AssignProc...
  • Page 867 Name Description References GetMeasureOut Acquires the measurement result output yes/no. Reference: Details (p.536) GetPort Executes individual input of parallel I/O terminal states. Reference: Details (p.542) GetSceneCount Acquires the count of usable scenes. GetSceneDescription Acquires the count of usable scenes. Acquires the count of the valid scene groups on the GetSceneGroupCount memory card.
  • Page 868 Name Description References MoveUnit Moves a processing unit. Reference: Details (p.625) NonstopSync Synchronizes the data for non-stop adjustment settings. Reference: Details (p.873) Executes batch input of parallel I/O and other terminal PutAll Reference: Details (p.643) states. Executes individual input of parallel I/O and other terminal PutPort Reference: Details (p.645)
  • Page 869 Name Description References Sets the display attributes for the measurement processing SetTimeWindow Reference: Details (p.875) time display window. SetUnitDataN Sets processing unit data. SetUnitDataN2 Sets processing unit data. SetUnitDataS Sets processing unit data. SetUnitDataS2 Sets processing unit data. SetUnitFigure Sets the figure data for a processing unit. Reference: Details (p.733) SetUnitTitle...
  • Page 870 Clearing Security Related Parameters ClearSecurityData Parameters _userName User name executed _password User password executed Data to be cleared Bit 0: User account mode Bit 1: Operation restriction contents Bit 2: Other Return value If it succeeded, returns 0. Otherwise, returns value other than 0. Clearing Setting Data in a Batch ClearSettingData Parameters...
  • Page 871 Copy File CopyFile Parameters srcFileName Name of file to copy from destFileName Name of destination file Return value If the file is copied successfully, returns 0. Otherwise, returns value other than 0. Directory Creation CreateDirectory Parameters directoryName Name of directory to create Return value If the directory is created successfully, returns 0.
  • Page 872 Getting Image Density Information GetDensityProfile Parameters unitNo Image input related and image conversion related processing item processing unit number imageNo Image number Image channel number imageChannel (Specifies RGB, R: 0, G:1, B: 2. For monochrome image, any value is OK) Target rectangular area.
  • Page 873 1: Registers any of the following I/O modules in the module communication system. • SerialNormal: Serial non-procedure communication • SerialNormal2: Serial non-procedure communication (Fxxx series method) • SerialPlcLink: Serial PLC link (Omron PLC) • SerialPlcLinkM: Serial PLC link (Mitsubishi PLC) 2: Registers any of the following I/O modules for Ethernet communication system ioModuleNo •...
  • Page 874 Getting Security Related Parameters GetSecurityParameter Parameters _userName User name executed _password User password executed Data identifier name dataIdent userLoginTimeout: Login timeout time (minutes) data Acquisition data storage variable Return value If it succeeded, returns 0. Otherwise, returns value other than 0. Executing I/O Initialization IoInitialize Parameters...
  • Page 875 Setting Measurement Trigger Input to Disabled LockMeasureStop Parameters timeout Timeout time Return value If it succeeded, returns 0. Otherwise, returns value other than 0. Synchronizing the Data for Non-Stop Adjustment Settings NonstopSync Parameters None. Return value If non-stop adjustment data is synchronized successfully, returns 0. Otherwise, returns value other than 0.
  • Page 876 Saving Security Related Settings SaveSecurityData Parameters _userName User name executed _password User password executed fileName File path to save to Return value If it succeeded, returns 0. Otherwise, returns value other than 0. Setting Operation Restrictions SetAccessControl Parameters _userName User name executed _password User password executed name...
  • Page 877 Setting the Measurement Processing Time Display Window SetSecurityParameter Parameters _userName User name executed _password User password executed Data identifier name dataIdent userLoginTimeout: Login timeout time (minutes) data Data to set Return value If it succeeded, returns 0. Otherwise, returns value other than 0. Setting the Measurement Processing Time Display Window SetTimeWindow Parameters...
  • Page 878 Synchronization of Setting Data Between CoreRA Processes SyncData Parameters srcCoreRANo Source CoreRA number destCoreRANo Destination CoreRA number Return value If setting data between CoreRA processes is synchronized successfully, returns 0. Otherwise, returns value other than 0. Setting Measurement Trigger Input to Enabled UnLockMeasureStop Parameters None.
  • Page 879 Logging Out UserLogout Parameters remoteOperation Logout target Return value If it succeeded, returns 0. Otherwise, returns value other than 0. Vision System FH/FZ5 Series Operation log input information list User’s Manual (Z340) WWW.NNC.IR...
  • Page 880: Manual Revision History

    Manual Revision History The manual revision symbol is an alphabet appended at the end of the manual number found in the bottom left- hand corner of the front or back cover. Cat. No. Z340-E1-07 Revision code Rev. No. Rev. Date Revision Contents Software Version Jul.
  • Page 881 WWW.NNC.IR...
  • Page 882 The Netherlands Hoffman Estates, IL 60169 U.S.A Tel: (1) 847-843-7900/Fax: (1) 847-843-7787 Tel: (31)2356-81-300/Fax: (31)2356-81-388 © OMRON Corporation 2013 All Rights Reserved. OMRON (CHINA) CO., LTD. OMRON ASIA PACIFIC PTE. LTD. In the interest of product improvement, Room 2211, Bank of China Tower, No.

Table of Contents