Hitachi HF-W100E/IoT User Manual

Industrial controller for iot applications
Table of Contents

Quick Links

HIOT-63-0002-03
INDUSTRIAL CONTROLLER FOR IoT APPLICATIONS
HF-W100E/IoT
STARTUP GUIDE
USER'S
MANUAL
Table of Contents
loading

Summary of Contents for Hitachi HF-W100E/IoT

  • Page 1 HIOT-63-0002-03 INDUSTRIAL CONTROLLER FOR IoT APPLICATIONS HF-W100E/IoT STARTUP GUIDE USER’S MANUAL...
  • Page 2 HIOT-63-0002-03 INDUSTRIAL CONTROLLER FOR IoT APPLICATIONS HF-W100E/IoT STARTUP GUIDE Read and keep this manual. ・Read safety instructions carefully and understand them before starting your operation. ・Keep this manual at hand for reference. USER’S MANUAL...
  • Page 3 Second Edition, November 2017, HIOT-63-0002-02 (out of print) Third Edition, April 2018, HIOT-63-0002-03 All Rights Reserved, Copyright © 2017, 2018, Hitachi, Ltd. The contents of this publication may be revised without prior notice. No part of this publication may be reproduced in any form or by any means without permission in writing from the publisher.
  • Page 4: Safety Instructions

    SAFETY INSTRUCTIONS  Product Safety Precautions Carefully read and fully understand the safety precautions below before operating the equipment.  Operate the equipment by following the instructions and procedures described in this manual.  Pay attention especially to safety precautions displayed on the equipment or in this manual.
  • Page 5  Never disassemble or modify this equipment. Failure to do so may result in death or serious injury. In addition, note beforehand that Hitachi is not responsible for the results caused by modification.
  • Page 6 SAFETY INSTRUCTIONS (Continued) < CAUTION>  If the equipment drops or is tipped over, personal injury may result. Pay full attention when transporting the equipment.  Make sure you do not catch or hit your fingers to cause personal injury when unpacking or carrying the equipment.
  • Page 7 SAFETY INSTRUCTIONS (Continued)  When you work on installation or replacement of hardware, wear an antistatic wrist strap to prevent the buildup of static electricity.  When you tighten or remove a screw, use a screwdriver that fits the size and type of the head of the screw to avoid stripping the head.
  • Page 8 For information about the instructions and cautionary notes related to using devices (hardware) and about how to use the basic RAS features already built into the Hitachi industrial computers, download the electronic manuals for the HF-W100E from the following home page.
  • Page 9  Memory capacities and requirements, file sizes and storage requirements, etc. must be calculated according to the formula 2 . The following examples show the results of such calculations by 2 (to the right of the equals signs). 1 KB (kilobyte) = 1,024 bytes 1 MB (megabyte) = 1,048,576 bytes 1 GB (gigabyte) = 1,073,741,824 bytes...
  • Page 10: Table Of Contents

    CONTENTS SAFETY INSTRUCTIONS ..................S-1 CHAPTER 1 INTRODUCTION TO HF-W100E/IoT ..........1-1 1.1 Overview ..........................1-1 1.2 Specifications ........................1-2 1.2.1 Software specifications ....................1-2 1.2.2 LAN interface specifications ..................1-3 1.2.3 BIOS settings ......................... 1-4 1.3 Changes to the HF-W Instruction Manual ................1-5 1.3.1 Time required for restoring the factory condition with the recovery DVD ....
  • Page 11 5.2 Adding OPC Objects ......................5-2 5.3 DCOM Settings ........................5-4 5.3.1 DCOM security settings ....................5-4 5.3.2 Firewall settings ......................5-11 CHAPTER 6 RAS FEATURES IN HF-W100E/IoT ..........6-1 6.1 Overview ..........................6-1 6.2 RAS Library for the CODESYS Runtime Environment ............. 6-2 6.2.1 RAS library interface .....................
  • Page 12 Figure 6-6 Editing the Config File (Enabling the Monitor) ............. 6-18 TABLES Table 6-1 RAS Features in HF-W100E/IoT ................6-1 Table 6-2 List of RAS Library Functions .................. 6-2 Table 6-3 Bit Allocation of usiOutput and usiMask for GendoContorlN ........6-3 Table 6-4 Return Value from the GendoControlN Function (Error Cases) .......
  • Page 13 This Page Intentionally Left Blank...
  • Page 14: Chapter 1 Introduction To Hf-W100E/Iot

    1. INTRODUCTION TO HF-W100E/IoT CHAPTER 1 INTRODUCTION TO HF-W100E/IoT 1.1 Overview The HF-W100E/IoT is a Hitachi industrial computer HF-W100E equipped with a software PLC. It has the features of both an industrial computer and a programmable logic controller (PLC). A software PLC is a development environment/runtime environment that executes PLC functions on a computer with a general-purpose OS.
  • Page 15: Specifications

    1. INTRODUCTION TO HF-W100E/IoT 1.2 Specifications The instruction manual of the HF-W100E, base hardware of HF-W100E/IoT, (hereinafter denoted as HF-W instruction manual) describes the specifications of the industrial computer, and this section supplements them with HF-W100E/IoT-specific specifications. 1.2.1 Software specifications This manual describes the software specifications only.
  • Page 16: Lan Interface Specifications

    1. INTRODUCTION TO HF-W100E/IoT 1.2.2 LAN interface specifications (1) EtherCAT connection Built-in LAN port are handled as follows. Default factory EtherCAT Item Remarks setting capable LAN A Ethernet Built-in LAN LAN B EtherCAT port LAN C EtherCAT (*) CODESYS EtherExpress driver for EtherCAT is installed at the factory.
  • Page 17: Bios Settings

    1. INTRODUCTION TO HF-W100E/IoT 1.2.3 BIOS settings The factory default BIOS settings for HF-W100E/IoT are as follows. Do not change these settings. If you do, it may affect the processing of realtime control. BIOS settings other than those below are the same as the default settings for the HF-W100E.
  • Page 18: Changes To The Hf-W Instruction Manual

    1.3.1 Time required for restoring the factory condition with the recovery DVD In “7.1 Overview of Restoration Procedure” in the HF-W instruction manual, the time required for restoring the factory condition is approximately 30 minutes for HF-W100E/IoT. 1.3.2 Recovery DVD name The name of the recovery DVD described in “7.2 Preparation”...
  • Page 19 This Page Intentionally Left Blank...
  • Page 20: Chapter 2 Setup

    2. SETUP CHAPTER 2 SETUP This chapter describes how to set up the HF-W100E/IoT. • After setting up the OS, activate the license of the CODESYS runtime environment. However, since devices shipped after September 2018 will be automatically licensed, it is not necessary to perform the activation process.
  • Page 21: License Activation

    2. SETUP 2.2 License Activation Product activation is required for the CODESYS runtime environment (CODESYS SoftMotion RTE) installed on this device. You must go through license authentication (product activation) against 3S, the manufacturer. 2.2.1 Confirmation of Activation Status You can check if license activation is done by the following procedure. 1.
  • Page 22: License Activation Method

    2. SETUP 2.2.2 License activation method (1) Online activation Activate the license on this device. In this case, you must connect to the Internet. • Using the CODESYS development environment • Using a Web browser (2) Offline activation Activate the license on the environment (PC with Internet access) outside this device. You can activate the license without connecting this device to the Internet.
  • Page 23: License Activation Procedure

    • Device: Different depending on the model you purchased. Select as follows. Model name Device name Motion model HJ-100E RTE SoftMotion 64bit (Hitachi Industry & Control Solutions, Ltd.) CNC model HJ-100E RTE CNC 64bit (Hitachi Industry & Control Solutions, Ltd.) • PLC_PRG in: Any...
  • Page 24 2. SETUP 3. Click the CODESYS Control RTE V3 icon in notification area on the taskbar. (The icon is hidden by default, and you must click “^” to find it.) Then click Start PLC to start the CODESYS Softmotion RTE. Before the activation, the CODESYS Softmotion RTE runs in DEMO mode.
  • Page 25 2. SETUP 5. The Select Device window opens. Select the device you want to select, and click Note: If no devices are shown under Select the network path to the controller, repeat clicking Scan network. If you still cannot find any devices, the CODESYS Softmotion RTE may not have started yet.
  • Page 26 2. SETUP 7. The Edit Licenses window is displayed. Click Install licenses. 8. The Select Operation window is displayed. Select Activate license, and then click Next.
  • Page 27 2. SETUP 9. The Active License window is displayed. Enter the ticket ID shown on the license certificate (included with the product) in the Ticket ID box. Then click Next. 10. The Select Licenses window is displayed. Select the checkbox for CODESYS Control SoftMotion RTE SL, and then click Next.
  • Page 28 2. SETUP 11. If the activation is successful, the following window appears. Click Finish. In the Edit Licenses window, you can check that the license for CODESYS Control SoftMotion RTE has been activated. You can also check the display status of the CODESYS Control RTE V3 icon in notification area on the taskbar to see whether the mode has been changed from DEMO to licensed.
  • Page 29 2. SETUP (b) Using the Web browser 1. Click the CODESYS Control RTE V3 icon in notification area on the taskbar. (The icon is hidden by default, and you must click “^” to find it.) Then click Start PLC to start the CODESYS Softmotion RTE. Before the activation, the CODESYS Softmotion RTE runs in DEMO mode.
  • Page 30 2. SETUP 4. Click CODESYS Software Key (Softcontainer) as the binding for the license. Note: Do not select CODESYS Runtime Key (Dongle) (not supported by this device). 2-11...
  • Page 31 2. SETUP 5. Select the license container, and click Activate selected licenses now. ↓ License being activated ↓ License activated A window is displayed to indicate that license activation was successful. Click 2-12...
  • Page 32 2. SETUP In the window in Step 2, enter the ticket ID in the License key box again, and click Next. Then you can confirm that the license status has changed to “Activated”. (You cannot reactivate using the same ticket ID.) You can also check the display status of the CODESYS Control RTE V3 icon in notification area on the taskbar to see whether the mode has been changed from DEMO to licensed.
  • Page 33 2. SETUP (2) Offline activation 1. Execute Steps 1 to 7 in “(1) Online activation (a) Using the CODESYS development environment”. 2. The Select Operation window is displayed. Select Request license, and then click Next. 3. The Request License window is displayed. Create a request file (WibuCmRaC) to be used in license activation.
  • Page 34 2. SETUP 4. Use a PC with Internet access to visit the CODESYS license activation site (http://license.codesys.com). Enter the ticket ID shown on the license certificate (included with the product) in the License key box. Then click Next. 5. The activation status of the license is displayed. Click Activate licenses. 2-15...
  • Page 35 2. SETUP 6. Click CODESYS Software Key (Softcontainer) as the binding for the license. Note: Do not select CODESYS Runtime Key (Dongle) (not supported by this device). 7. To jump to the window for online activation, click the Offline license transfer link near the lower right corner.
  • Page 36 2. SETUP 8. In Select license request file, specify the path of the request file created in Step 3. Click Upload request and continue now to upload the request file. 9. Click Download license update file now to obtain the license update (WibuCmRaU) file.
  • Page 37 2. SETUP 10. The following window is displayed for uploading the result of the license activation, but first execute the following Steps 11 to 13. 11. In the Select Operation window of HF-W100E/IoT, select Install license, and then click Next. 2-18...
  • Page 38 2. SETUP 12. The Install License window is displayed. Specify the path of the license update file you obtained in Step 9, and then click Finish. 13. If the activation is successful, the following message is displayed. Click OK. 14. In order to report the successful license activation to the license activation site, follow Steps 1 to 3 again and create a new request file (WibuCmRaC).
  • Page 39 2. SETUP In the window in Step 4, enter the ticket ID in the License key box again, and click Next. Then you can confirm that the license status has changed to “Activated”. (You cannot reactivate using the same ticket ID.) You can also check the display status of the CODESYS Control RTE V3 icon in notification area on the taskbar to see whether the mode has been changed from DEMO to licensed.
  • Page 40: Updating The Network Driver

    2. SETUP 2.3 Updating the Network Driver In the factory settings of HF-W100E/IoT, the Intel® Network driver is used for the built-in LAN (LAN A), and the CODESYS EtherExpress driver is used for the built-in LAN (LAN B and LAN C) to support EtherCAT.
  • Page 41 Click Intel(R) Atom(TM)/Celeron(R)/Pentium(R) Processor PCI Express – Root Port3 – 0F4C. Then, right-click on the network adapter displayed below (in the example above, CoDeSys EtherExpress GBit PCI Ethernet Adapter #2 (*)). (*) Network adapter names are displayed differently for the HF-W100E/IoT. 2-22...
  • Page 42 Select CoDeSys EtherExpress GBit PCI Ethernet Adapter, and then click Next. 10. A message is displayed to indicate that the driver has been successfully updated. Confirm the message, and then click Close. This completes the installation of the driver. Restart the HF-W100E/IoT. 2-23...
  • Page 43 This Page Intentionally Left Blank...
  • Page 44: Chapter 3 Creating A Plc Program

    3. CREATING A PLC PROGRAM CHAPTER 3 CREATING A PLC PROGRAM 3.1 PLC Program Creation Procedure 3.1.1 Creating a project The following shows how to create a new project. 1. Start the CODESYS development environment in the following steps. Wait until the startup process is complete.
  • Page 45 HF-W100E/IoT. Model Device Motion model HJ-100E RTE SoftMotion 64bit (Hitachi Industry & Control Solutions, Ltd.) CNC model HJ-100E RTE CNC 64bit (Hitachi Industry & Control Solutions, Ltd.) • For PLC_PRG in, specify a language to use. In the figure below, Structured Text (ST) is selected as an example.
  • Page 46: Creating A Plc Program

    3. CREATING A PLC PROGRAM 3.1.2 Creating a PLC program (1) Task configuration 1. Double-click MainTask in the Devices window to display a window for setting up the task configuration. In the MainTask tab, you can set task priority, type, and interval. ...
  • Page 47 3. CREATING A PLC PROGRAM 2. The Add Task window is displayed. Enter the task name, and then click Add. (2) Creating a program 1. Double-click PLC_PRG (PRG) in the Devices window to display a window for creating a program. You can create a program in the PLC_PRG tab. In the declaration part in the upper pane, define variables.
  • Page 48 3. CREATING A PLC PROGRAM  Adding a POU To add a POU, follow the procedure below. 1. In the right-click menu on Application in the Devices window, click Add Object > POU. 2. The Add POU window is displayed. Enter the POU name, configure the type and the implementation language, and then click Add.
  • Page 49 3. CREATING A PLC PROGRAM  Creating global variables To add global variables, follow the procedure below. 1. In the right-click menu on Application in the Devices window, click Add Object > Global Variable List. 2. The Add Global Variable List window is displayed. Enter a name, and then click Add.
  • Page 50: Building A Plc Program

    3. CREATING A PLC PROGRAM 3.1.3 Building a PLC program 1. After you finish creating a program, click the Build menu, and on the menu, click Build. (Alternatively, click the build icon on the toolbar.) 3.1.4 Starting PLC Start PLC to run a PLC program. For information about how to start PLC automatically when the device starts, see “(2) Starting PLC automatically”.
  • Page 51 3. CREATING A PLC PROGRAM (2) Starting PLC automatically If you enable the following settings, PLC will automatically start when the device starts. 1. Click the CODESYS Control RTE V3 icon in notification area on the taskbar. (The icon is hidden by default, and you must click “^” to find it.) Then click PLC Configuration.
  • Page 52 3. CREATING A PLC PROGRAM NOTE In Windows® Embedded Standard 7, if the version of the CODESYS scheduler (file name: CmpDrvSchedulerAMP.sys) is "3.5.10.10" and you enable these settings in an attempt to start PLC automatically when Windows starts, a blue screen or a reset might occur in rare cases.
  • Page 53 3. CREATING A PLC PROGRAM 5. In the console window, right-click the Auto Start task, and on the menu, click Enable. Note: To cancel the PLC auto start, right-click the Auto Start task, and on the menu, click Disable. (b) Changing the PLC configuration 1.
  • Page 54 3. CREATING A PLC PROGRAM 2. If a window is displayed to indicate that admin rights are required, click OK to obtain the admin rights. If the User Account Control window is displayed, click Yes. When the admin rights are granted, click the icon again, and then click PLC Configuration.
  • Page 55: Running A Plc Program

    3. CREATING A PLC PROGRAM 3.1.5 Running a PLC program 1. Double-click Device (*****) in the Devices window to display a window for setting up device configuration. ((*****) shows the selected device name.) 2. Click Scan network to display the Select Device window. In the Select Device window, select the device you want to connect to, and click OK.
  • Page 56 3. CREATING A PLC PROGRAM  Selecting another device as a device to run To connect another device and select the device as a device to run, follow the procedure below. Note that, in order to connect to another device, PLC must be running on the device. 1.
  • Page 57: Debugging A Plc Program

    3. CREATING A PLC PROGRAM 3.1.6 Debugging a PLC program (1) Setting a breakpoint You can set a breakpoint to stop a program at any location. 1. To set a breakpoint, right-click on a line where you want to set a breakpoint, and on the menu, click New Breakpoint.
  • Page 58 3. CREATING A PLC PROGRAM (2) Writing a value You can write a value to a variable while the program is running. 1. Enter a value (example: FALSE) in Prepared value while the program is running. In the body, the value is shown as “TRUE ”. 2.
  • Page 59: Programming Languages

    3. CREATING A PLC PROGRAM 3.2 Programming Languages In CODESYS, you can program using the programming languages defined in IEC 61131-3 (Structured Text (ST), Ladder Diagram (LD), Function block diagram (FBD), and Sequential Function Chart (SFC)) as well as the CODESYS proprietary language Continuous Function Chart (CFC).
  • Page 60: Visualization Objects

    3. CREATING A PLC PROGRAM 3.3 Visualization Objects CODESYS offers visualization features for creating a graphical user interface. This section shows how to add and run a typical visualization object, Lamp. For details about visualization features, refer to the following topic in the online help. •...
  • Page 61 3. CREATING A PLC PROGRAM 4. Select the created Lamp. The Properties window is displayed. In the Properties window, you can change the settings of the Lamp. For example, by clicking Position > Variable, you can specify a variable output to the Lamp. ...
  • Page 62: Creating And Setting Up A G-Code

    3. CREATING A PLC PROGRAM 3.4 Creating and Setting Up a G-Code (1) Adding an object 1. In the right-click menu on Application in the Devices window, click Add Object > CNC program. (In the following, the project created in “4.2 Configuration for Using Servo Amplifiers and Servo Motors”...
  • Page 63 3. CREATING A PLC PROGRAM (2) Creating a G-code 1. Double-click CNC in the Devices window to display a window for creating a G-code. 2. If you click a meshed icon ((A) in the following figure) on the menu near the upper left corner of the window, an auxiliary line is shown.
  • Page 64 3. CREATING A PLC PROGRAM (3) CNC settings 1. Double-click CNC settings in the Devices window to display a window for CNC settings. 2. Click the Path preprocessors tab to display a list of Available function blocks. Select the function block you want to use, and then click >. The function block is registered under Active function block instances.
  • Page 65 3. CREATING A PLC PROGRAM 3. Select the registered function block, and click Parameters. The Parameter editor window for the function block is displayed. Set up the parameters as required. For details about G-codes, CNC, and SoftMotion, refer to the following topic in the online help.
  • Page 66: Reset Action When An Error Occurs

    3. CREATING A PLC PROGRAM 3.5 Reset Action When an Error Occurs The CODESYS runtime environment stops executing a program when exceptions such as a watchdog timer timeout error are detected. You can reset these exceptions with a reset action. Reset actions include three types of resets: warm up reset, cold reset, and reset (PLC initialization).
  • Page 67 This Page Intentionally Left Blank...
  • Page 68: Chapter 4 Configuration Of Ethercat Connection

    4. CONFIGURATION OF EtherCAT CONNECTION CHAPTER 4 CONFIGURATION OF EtherCAT CONNECTION This chapter explains how to configure EtherCAT. Use the procedure that fits your needs. • When I/O modules are used • When servo amplifiers and servo motors are used...
  • Page 69: Configuration For Using I/O Modules

    4.1 Configuration for Using I/O Modules 4.1.1 Adding EtherCAT devices (I/O modules) The following procedure shows how to add EtherCAT devices. This procedure uses I/O modules (EH-IOCA) from Hitachi Industrial Equipment Systems Co.,Ltd. as an example. (1) Adding EtherCAT masters 1.
  • Page 70 4. CONFIGURATION OF EtherCAT CONNECTION (2) Adding EtherCAT slaves 1. Click the Tools menu, and on the menu, click Device Repository. 2. The Device Repository window is displayed. Install the configuration file for the device you want to connect. In this example, click Install. 3.
  • Page 71 4. CONFIGURATION OF EtherCAT CONNECTION 4. When installation is complete, EH-IOCA is added to the list of installed devices. Confirm that the device has been added to the list, and click Close. 5. Right-click on EtherCAT_Master (EtherCAT Master) in the Devices window. On the menu, click Add Device.
  • Page 72 4. CONFIGURATION OF EtherCAT CONNECTION 6. The Add Device window is displayed. Select EH-IOCA, and then click Add Device. EH_IOCA (EH-IOCA) is added under EtherCAT_Master (EtherCAT Master) in the Devices window. • Repeat this step for all the EtherCAT slaves you want to add. •...
  • Page 73 4. CONFIGURATION OF EtherCAT CONNECTION (3) Adding devices (I/O modules) to connect 1. Add devices to connect. In this example, an I/O module is added to an EtherCAT slave. Right-click on () under EH_IOCA (EH-IOCA). On the menu, click Plug Device. Repeat this action for each EtherCAT slave according to your needs.
  • Page 74 4. CONFIGURATION OF EtherCAT CONNECTION 3. Y16 is added under EH_IOCA (EH-IOCA). Add a plugged device to () and subsequent slaves according to your needs.
  • Page 75: Ethercat Nic Setting

    4. CONFIGURATION OF EtherCAT CONNECTION 4.1.2 EtherCAT NIC setting The following procedure shows how to configure the EtherCAT NIC setting. The PLC must be started and connected before starting the following procedure. • If the PLC has not been started See “3.1.4 Starting PLC”, and start the PLC.
  • Page 76: Setting Cycle Time For The Ethercat Master And Interval For The Task

    4. CONFIGURATION OF EtherCAT CONNECTION 4.1.3 Setting cycle time for the EtherCAT master and interval for the task The following procedure shows how to set up the cycle time for the EtherCAT master and the interval for the task. (1) Cycle time setting for the EtherCAT master 1.
  • Page 77 4. CONFIGURATION OF EtherCAT CONNECTION (2) Interval setting for the task 1. Double-click MainTask in the Devices window to display a window for task configuration. In the MainTask tab, you can set task priority, type, and interval. 2. In the task configuration window, select Cyclic for Type, and then specify 4000 (µs) (default setting) for Interval.
  • Page 78: Ethercat Slave Setting

    4. CONFIGURATION OF EtherCAT CONNECTION 4.1.4 EtherCAT slave setting (1) I/O mapping setting The following procedure shows how to allocate variables to the module I/Os you configured. 1. Double-click EH_IOCA (EH-IOCA) under EtherCAT_Master (EtherCAT Master) in the Devices window. Then, click EtherCAT I/O Mapping. As an example, a UINT variable is allocated to Output.
  • Page 79 4. CONFIGURATION OF EtherCAT CONNECTION 2. As VAR (variable), declare the Output variable and the address you configured in EtherCAT I/O Mapping. 3. After you declare a variable for a device, confirm that the variable you declared for the device has been successfully allocated. If a strikethrough value is shown under Address, the variable has not been allocated.
  • Page 80: Checking The Ethercat Connection

    4. CONFIGURATION OF EtherCAT CONNECTION 4.1.5 Checking the EtherCAT connection The following procedure shows how to check the status of the EtherCAT connection. 1. Click the Online menu, and on the menu, click Login to log in to the PLC. 2.
  • Page 81: Configuration For Using Servo Amplifiers And Servo Motors

    The following procedure shows how to add EtherCAT devices. This procedure uses servo amplifiers (ADVA-R5MSEC) and servo motors (ADMA- R5MF111) from Hitachi Industrial Equipment Systems Co.,Ltd. as an example. (1) Adding EtherCAT masters 1. Right-click on Device (*****) in the Devices window. ((*****) shows the selected device name.) On the menu, click Add Device.
  • Page 82 4. CONFIGURATION OF EtherCAT CONNECTION (2) Adding EtherCAT slaves 1. Click the Tools menu, and on the menu, click Device Repository. 2. The Device Repository window is displayed. Install the configuration file for the device you want to connect. In this example, click Install. 3.
  • Page 83 4. CONFIGURATION OF EtherCAT CONNECTION 4. When installation is complete, HITACHI AC SERVO DRIVES ADV Series is added to the list of installed devices. Confirm that the device has been added to the list, and click Close. 4-16...
  • Page 84 5. Right-click on EtherCAT_Master (EtherCAT Master) in the Devices window. On the menu, click Add Device. 6. The Add Device window is displayed. Select HITACHI AC SERVO DRIVES ADV Series, and then click Add Device. Then, ADVA_EC (HITACHI AC SERVO DRIVES ADV Series) is added under EtherCAT_Master (EtherCAT Master) in the Devices window.
  • Page 85 (3) Adding devices (Axis) to connect 1. Add devices to connect. In this example, an Axis is added to an EtherCAT slave. Right-click on ADVA_EC (HITACHI AC SERVO DRIVES ADV Series). On the menu, click Add SoftMotion CiA402 Axis. Repeat this action for each EtherCAT slave according to your needs.
  • Page 86 4. CONFIGURATION OF EtherCAT CONNECTION 3. The SM_Drive_GenericDSP402 you selected is added under ADVA_EC (HITACHI AC SERVO DRIVES ADV Series). In the following figure, two devices were added. 4-19...
  • Page 87: Ethercat Nic Setting

    4. CONFIGURATION OF EtherCAT CONNECTION 4.2.2 EtherCAT NIC setting The following procedure shows how to configure the EtherCAT NIC setting. The PLC must be started and connected before starting the following procedure. • If the PLC has not been started See “3.1.4 Starting PLC”, and start the PLC.
  • Page 88: Setting Cycle Time For The Ethercat Master And Interval For The Task

    4. CONFIGURATION OF EtherCAT CONNECTION 4.2.3 Setting cycle time for the EtherCAT master and interval for the task The following procedure shows how to set up the cycle time for the EtherCAT master and the interval for the task. (1) Cycle time setting for the EtherCAT master 1.
  • Page 89 4. CONFIGURATION OF EtherCAT CONNECTION (2) Interval setting for the task 1. Double-click MainTask in the Devices window to display a window for task configuration. In the MainTask tab, you can set task priority, type, and interval. 2. In the task configuration window, select Cyclic for Type, and then specify 4000 (µs) (default setting) for Interval.
  • Page 90: Ethercat Slave Setting

    For details about the PDOs, refer to the user’s manual of the EtherCAT slave you use. 1. Double-click ADVA_EC (HITACHI AC SERVO DRIVES ADV Series) in the Devices window to display a window for EtherCAT slave configuration. 2. Click Process Data, clear the checkboxes selected under Select the Outputs and Select the Inputs, and select the checkboxes for the PDO you want to use.
  • Page 91 • Parameters are defined on a per EtherCAT slave basis. For details about the parameters, refer to the user’s manual of the EtherCAT slave you want to use. 1. Double-click ADVA_EC (HITACHI AC SERVO DRIVES ADV Series) in the Devices window to display a window for the EtherCAT slave configuration.
  • Page 92: Softmotion Axis Setting

    4. CONFIGURATION OF EtherCAT CONNECTION 4.2.5 SoftMotion Axis setting In this example, an Axis setting is configured. • Repeat this action for each Axis according to your needs. 1. Double-click SM_Drive_GenericDSP402 (SM_Drive_GenericDSP402) in the Devices window to display a window for Axis configuration. 2.
  • Page 93: Checking The Ethercat Connection

    4. CONFIGURATION OF EtherCAT CONNECTION 4.2.6 Checking the EtherCAT connection For information about how to check the EtherCAT connection, see “4.1.5 Checking the EtherCAT connection”. If EtherCAT is connected successfully, the icons beside the devices are shown in green in the same way as for I/O modules.
  • Page 94: Chapter 5 Configuration For Using Opc

    5. CONFIGURATION FOR USING OPC CHAPTER 5 CONFIGURATION FOR USING OPC 5.1 Overview CODESYS supports the OPC server and allows you to use OPC Classic (OPC DA/AE) and OPC UA. For information about an overview of the OPC server and how to use OPC server tools, refer to the CODESYS original manuals in the following locations.
  • Page 95: Adding Opc Objects

    5. CONFIGURATION FOR USING OPC 5.2 Adding OPC Objects You must add a Symbol configuration object to disclose variables to the OPC client. 1. In the right-click menu on Application in the Devices window, click Add Object > Symbol configuration. 2.
  • Page 96 5. CONFIGURATION FOR USING OPC 3. Select the variables you want to disclose to the OPC client. • You can select variables after you build the PLC program. • If you want to use OPC UA, also select Constants.
  • Page 97: Dcom Settings

    5. CONFIGURATION FOR USING OPC 5.3 DCOM Settings DCOM is a technology used for communication between PC software components distributed in the network. If you want to use a remote connection to link an OPC client to the local device where the CODESYS OPC server is running, you must configure DCOM settings. To enable DCOM connection, a user of the OPC client PC must be authenticated on the local device.
  • Page 98: Firewall Settings

    5. CONFIGURATION FOR USING OPC 4. The My Computer Properties window is displayed. Select the Default Properties tab to configure as follows. • Select Enable Distributed COM on this computer. • Specify Connect for Default Authentication Level. Note: On the OPC client PC, specify None for Default Authentication Level. •...
  • Page 99 5. CONFIGURATION FOR USING OPC 5. In the My Computer Properties window, select the COM Security tab. Under Access Permissions, click Edit Limits. • For Permissions for ANONYMOUS LOGON, select all Allow checkboxes, and then click OK. 6. The Launch and Activation Permission window is displayed. Click Edit Limits. •...
  • Page 100 5. CONFIGURATION FOR USING OPC 8. Select My Computer > DCOM Config to expand trees, and right-click on CoDeSysOPCDA. On the menu, click Properties. 9. The CoDeSysOPCDA Properties window is displayed. Select the General tab, and specify Connect for Authentication Level.
  • Page 101 5. CONFIGURATION FOR USING OPC 10. Select the Location tab, and then select Run application on this computer. 11. Select the Security tab. Under Launch and Activation Permissions and Access Permissions, select Customize.
  • Page 102 5. CONFIGURATION FOR USING OPC 12. Under Launch and Activation Permission, click Edit. Set all access permission for Everyone to “Allow” as follows. • Click Add. • The Select Users and Groups window is displayed. Click Advanced. • Click Search Now. Select Everyone under Search results, and then click OK. •...
  • Page 103 5. CONFIGURATION FOR USING OPC The following table shows the possible settings in addition to “Everyone” and shows which users are granted access rights for each. Select a user according to the system security requirements. Setting Users granted with access rights Everyone All users INTERACTIVE...
  • Page 104 5. CONFIGURATION FOR USING OPC 5.3.2 Firewall settings Windows Firewall is enabled by default, and consequently, DCOM connection is not allowed with the default settings. Follow the procedure below to allow DCOM connections to pass through Windows Firewall. If you already disabled Windows Firewall, this procedure is not necessary. 1.
  • Page 105 5. CONFIGURATION FOR USING OPC 8. The Program window of New Inbound Rule Wizard is displayed. • Select This program path. • Click Browse, select the following file, and then click Next. C:\Program Files (x86)\3S CODESYS\CODESYS OPC Server 3\WinCoDeSysOPC.exe 9. The Action window of New Inbound Rule Wizard is displayed. •...
  • Page 106 5. CONFIGURATION FOR USING OPC 10. The Profile window of New Inbound Rule Wizard is displayed. • Select all checkboxes, and then click Next. 11. The Name window of New Inbound Rule Wizard is displayed. • Enter the rule name, and then click Finish. 12.
  • Page 107 This Page Intentionally Left Blank...
  • Page 108: Chapter 6 Ras Features In Hf-W100E/Iot

    CHAPTER 6 RAS FEATURES IN HF-W100E/IoT 6.1 Overview In addition to the standard RAS features on HF-W, HF-W100E/IoT offers additional HF- W100E/IoT's own RAS features. These include such functionalities as the ability to control hardware from the CODESYS runtime environment and to monitor the CODESYS runtime environment.
  • Page 109: Ras Library For The Codesys Runtime Environment

    6. RAS FEATURES IN HF-W100E/IoT 6.2 RAS Library for the CODESYS Runtime Environment This chapter describes the interface of the RAS library for the CODESYS runtime environment (hereinafter denoted simply as “RAS library”) and how to use the library. By using the RAS library, you can control the external general purpose I/O.
  • Page 110: Table 6-3 Bit Allocation Of Usioutput And Usimask For Gendocontorln

    6. RAS FEATURES IN HF-W100E/IoT (1) Control function for the external general purpose outputs (GendoControlN) GendoControlN - Controls the external general purpose outputs (output1 to 8) DWORD GendoControlN(USINT usiOutput, USINT usiMask); This function controls the external general purpose outputs (output1 to 8).
  • Page 111: Figure 6-1 Operation Example Of The Gendocontroln Function

    6. RAS FEATURES IN HF-W100E/IoT The GendoControlN function sets the output state of the general purpose output with usiOuput and specifies a control target with usiMask. Figure 6-1 shows an operation example to illustrate the relationship between usiOutput and usiMask.
  • Page 112: Table 6-5 Bit Allocation Of Pusiinput For Getgendin

    6. RAS FEATURES IN HF-W100E/IoT (2) Get function for the external general purpose inputs (GetGendiN) GetGendiN - Acquires the status of the external general purpose inputs (general- purpose input1 to 7) DWORD GetGendiN(POINTER TO USINT pusiInput); ...
  • Page 113: Table 6-7 List Of Enumeration Types In The Ras Library

    6. RAS FEATURES IN HF-W100E/IoT For an example of a program using this function, see “6.2.3 Examples of using the RAS library”. NOTE Do not use this function if you are using the RAS library in the HF-W RAS features to control the external general purpose I/O.
  • Page 114: Adding The Ras Library

    6. RAS FEATURES IN HF-W100E/IoT 6.2.2 Adding the RAS library To use the RAS library in the CODESYS runtime environment, you must add the RAS library using the following procedures. • Install the RAS library in the library repository. • Add the RAS library to the library manager.
  • Page 115 6. RAS FEATURES IN HF-W100E/IoT 3. The Add Library dialog box appears. Click Advanced. 4. The Add Library dialog box appears. Click Library Repository. 5. The Library Repository dialog box appears. Click Install.
  • Page 116 6. RAS FEATURES IN HF-W100E/IoT 6. Specify the CmpHIoTRAS.compiled-library file in the C:\Program Files\HIoTRAS\Library folder, and click Open. 7. Confirm that CmpHIoTRAS is added in System\SysLibs. Click Close. This completes installation of the RAS library. Click the close button (×) at the upper right corner of the Add Library dialog box to...
  • Page 117 6. RAS FEATURES IN HF-W100E/IoT (2) Adding the RAS library to the library manager 1. Double-click Library Manager in the Devices window. 2. Click Add library in Library Manager. 3. The Add Library dialog box appears. Click Advanced. 6-10...
  • Page 118 Note that you can use the search bar to search the libraries. 5. If the following library is shown in library manager, the library was added successfully. CmpHIoTRAS,*.*.*.* (Hitachi Industry & Control Solutions Ltd.) (Asterisks (*) denote the version information.) 6-11...
  • Page 119: Examples Of Using The Ras Library

    6. RAS FEATURES IN HF-W100E/IoT 6.2.3 Examples of using the RAS library This subsection describes how to control the external general purpose I/O from applications running on the CODESYS runtime environment.  Adding the RAS library Add the RAS library. For information about how to add the RAS library, the library functions, see “6.2.2 Adding the RAS library”.
  • Page 120: Figure 6-3 Example Of External General Purpose I/O Control Program

    6. RAS FEATURES IN HF-W100E/IoT In the example of Figure 6-3, the program outputs to the external general purpose output (output1) and obtains the input state of a external general purpose input. PLC_PRG (declaration part) PROGRAM PLC_PRG uiState: INT;...
  • Page 121: Monitoring The Codesys Runtime Environment

    This function monitors whether the CODESYS runtime environment is running properly. The function consists of the WDT control component that periodically triggers the watchdog timer on HF-W100E/IoT from the CODESYS runtime environment and the CODESYS monitor service running on the Windows environment.
  • Page 122 6. RAS FEATURES IN HF-W100E/IoT (*1) The timeout threshold is 63 seconds minus the timeout. For information about how to set the value, see “6.3.5 HIoTRAS setting command”. The factory setting is 0 (seconds) because the timeout is set to 63 seconds.
  • Page 123: Enabling/Disabling The Codesys Runtime Environment Monitor

    6. RAS FEATURES IN HF-W100E/IoT 6.3.2 Enabling/Disabling the CODESYS runtime environment monitor You can enable and disable the CODESYS runtime environment monitor by editing the CODESYS config file and changing the settings of the monitor service. The monitoring functionality is enabled in the factory setting. Note that, if the CODESYS runtime environment monitor is disabled, a shutdown of the CODESYS runtime environment will not be detected.
  • Page 124 6. RAS FEATURES IN HF-W100E/IoT (b) Stopping the monitor service 1. Open Control Panel. • If the OS is Windows® Embedded Standard 7, click Start, and click Control Panel. • If the OS is Windows® 10, right-click Start, and click Control Panel from the menu.
  • Page 125: Figure 6-6 Editing The Config File (Enabling The Monitor)

    6. RAS FEATURES IN HF-W100E/IoT (2) Enabling the CODESYS runtime environment monitor (a) Editing the config file 1. Follow the Steps 1 to 3 in “(a) Editing the config file” in “(1) Disabling the CODESYS runtime environment monitor”. 2. The CoDeSysControl.cfg file opens. In the ComponentManager section, insert the following line to add the WDT control component (CmpHWdtControl) as a loading component.
  • Page 126 6. RAS FEATURES IN HF-W100E/IoT (b) Starting the monitor service 1. Follow the Steps 1 to 5 in “(b) Stopping the monitor service” in “(1) Disabling the CODESYS runtime environment monitor”. 2. Change Startup type to Automatic, click Apply, and then click OK. Then, restart the PC.
  • Page 127: Event Notification

    6. RAS FEATURES IN HF-W100E/IoT 6.3.3 Event notification The CODESYS runtime environment monitor uses an event object and notifies an application when a watchdog timer timeout occurs. The application can infer that a watchdog timer timeout has occurred when the event object is in the signaled state.
  • Page 128: Recording The Event Log

    6. RAS FEATURES IN HF-W100E/IoT 6.3.4 Recording the event log Table 6-11 shows the data recorded in the Event Log by the CODESYS runtime environment monitor. Table 6-11 List of Events Recorded in the Event Log Event ID Source Type...
  • Page 129: Hiotras Setting Command

    6. RAS FEATURES IN HF-W100E/IoT 6.3.5 HIoTRAS setting command The HIoTRAS setting command can set the timeout threshold for the CODESYS runtime environment monitor and the action at the time of time-out. Table 6-12 List of Items Set by the HIoTRAS Setting Command...
  • Page 130 6. RAS FEATURES IN HF-W100E/IoT 2. When the Explorer window is opened, right-click the HIoTRASSet.bat file. On the menu, click Run as administrator. 3. When Command Prompt is opened, enter the timeout threshold (0 to 62), and press the Enter key.
  • Page 131 6. RAS FEATURES IN HF-W100E/IoT 4. As an example, enter 30 for the timeout threshold. If the setting is completed successfully, “The operation completed successfully.” is displayed. 5. Next, enter the action at the time of time-out (0 to 6), and press Enter.
  • Page 132 6. RAS FEATURES IN HF-W100E/IoT 6. As an example, enter 1 for the action at the time of time-out. If the setting is complete successfully, “The operation completed successfully.” is displayed. When “Press any key to continue...” is displayed, press any key to exit the batch file.
  • Page 133: Changing The Startup Setting

    6. RAS FEATURES IN HF-W100E/IoT 6.3.6 Changing the startup setting The following is a procedure to change the startup setting of the CODESYS runtime environment to Start the PLC with the basic system service. If this option is not selected for the startup setting, the CODESYS runtime environment will not be stopped or restarted even if the action at the time of time-out is set to Codesys Stop or Codesys Restart.

Table of Contents