Advantech AE Technical Share Document

Similar documents
DO, Open Collector to 30 V, 30mA Max.Load. Open Circuit (no connection to anything) Short Circuit (connection to ground).

Application Note. PowerStar 5/6 - LabView VI Integration

SOP of Advantech CODESYS RTE Runtime Package

Introducing the LXI Interface

Advantech AE Technical Share Document

User Guide. Introduction. Requirements. Installing and Configuring. C Interface for NI myrio

Advantech AE Technical Share Document

Microsoft Windows 10. Quick Reference. Watsonia Publishing 47 Greenaway Street Bulleen VIC 3105 Australia

Advantech AE Technical Share Document

University of Pennsylvania. Department of Electrical and Systems Engineering. ESE Undergraduate Laboratory. Introduction to LabView

PCI-DIO02. User s Manual

LabVIEW programming I

Lab 2: Introduction to mydaq and LabView

TUTORIAL. Ve r s i on 1. 0

Advantech Multiprog Deploying a project on KW

LabVIEW programming I

MOS-1110Y-0101E Isolated 16 DI/8 DO, 1-Ch, DB37, PCIe I/F

Crystal Reports. Overview. Contents. Using Crystal Reports Print Engine calls (API) in Microsoft Visual Basic

1

Introduction to LabVIEW

NI-ModInst Help Contents Index Search

Advanced Remote Panel USER GUIDE

User Manual pdoc Signer

Lab 1: Getting familiar with LabVIEW: Part I

GPIF II Designer - Quick Start Guide

How to Properly Manage Tabor s AWG Arbitrary Memory

Installation & Reference Guide

Using the JSON Iterator

INTRODUCTION TO LABVIEW

Windows 10: FAQs. The Start Menu. Cortana

Note that if the downloadable distribution file is provided to you by an HP representative, you can skip the downloading steps in this README.

PCIE-1752/1754/1756 PCIE-1730 Sales Training

Advantech AE Technical Share Document

MW100 CAN Bus Module Configuration Tool (MX118-CAN-M30/S1) User s Manual

Thermal Transient Test

CPC-PP EMS. CAN-PC Interface. User Manual. Documentation for CAN-Interface CPC-PP. Document version: V2.0 Documentation date: January 17th, 2005.

Setting up a Project and Debugging with Visual Studio

Quick Guide FAST HR. For more resources, including a guide on FAST HR codes, visit # Instructions Screenshot

User s Manual. PC-Based Measurement Instruments. Setup Guide for Windows Vista IM E. 1st Edition

PCI-AIO02. User s Manual

Custom PDF Generator for LabVIEW Version 3 Quick Start User Guide

Quick Start Guide for BPA 365 Solutions MAKES PEOPLE HAPPY

Experiment 1: Introduction to Labview 8.0 (tbc 1/7/2007, 1/13/2009,1/13/2011)

SCODE-CONGRA: Simple example project A + B = C

Engineering Innovation Center LabVIEW Basics

Homework Assignment 9 LabVIEW tutorial

DIO-0808RN-USB. N Series for USB Isolated Digital I/O Unit(8ch Relay Output, 8ch DI) DIO-0808RN-USB 1. Ver.1.02

EZ Touchscreen CE Computer. User Manual

Using the reporting function

Windows Device Driver and API Reference Manual

Software installation PCI-1050

RTE for WIN32. Installation Manual (Rev.7.0) Midas lab

Advantech AE Technical Share Document

Using Packet Tracer to Build a Network

PDA Data Acquisition and Control System User Manual

OVERVIEW GOALS KEY TERMS

R.E.A.C.H Patient Manager. User Manual

GUI and API Application Note

How to make a LabVIEW CIN for Mac OS X using Xcode

Introduction to Personal Computers Using Windows 10 and Microsoft Office 2016

1 LabView Remote Command Interface Guide

16 Graphics cards Mining system Building S.O.P

BE/EE189 Design and Construction of Biodevices Lecture 1. BE/EE189 Design and Construction of Biodevices - Caltech

TOP Server Client Connectivity Guide for National Instruments' LabVIEW

TUTORIAL SESSION Technical Group Hoda Najafi & Sunita Bhide

LevelOne User Manual WNC-0600USB N_One Wireless USB Adapter

3. Click the Change Case button. 4. On the menu, click the desired case option. Managing Document Properties

Installation Guide OriginPro (Home-Use and Network-License)

University of Illinois Department of Electrical and Computer Engineering ECE 451 Automated Microwave Measurements Laboratory

Apache Tomcat Installation guide step by step on windows

VI-CENTER EXTENDED ENTERPRISE EDITION GETTING STARTED GUIDE. Version: 4.5

Exercise 5: Basic LabVIEW Programming

ECE 451 Automated Microwave Measurements Laboratory. Experiment No. 2. Automated RF Power Detection Using LabVIEW

User Manual APAX Software Manual

SCHEMATIC DESIGN IN QUARTUS

How to Add Video Clips to Department Page

Testing your TLS version

IMMDongleGenerator / IMMDongleGeneratorLight

Getting Started with Office 365

Advantech AE Technical Share Document

BCM 4.0 Personal Call Manager User Guide. BCM 4.0 Business Communications Manager

INSTALLING AN SSH / X-WINDOW ENVIRONMENT ON A WINDOWS PC. Nicholas Fitzkee Mississippi State University Updated May 19, 2017

Tyler Dashboard. User Guide Version 5.8. For more information, visit

SensorXplorer TM Installation Guide

LABVIEW LAB SKILLS ACTIVITY 1 PROGRAMING ENVIRONMENT

Lesson 1 Introduction to LabVIEW. TOPICS LabVIEW Environment Front Panel Block Diagram Dataflow Programming LabVIEW Help and Manuals Debugging a VI

Express Card-FRM11. User s Manual. ecard-frm11 User s Manual (Rev 2.1)

The Robodox Guide to Multiple Cameras in FRC

SomaticView Version 1.0

Table 1. Inputs and Outputs

Spectrometer Visible Light Spectrometer V4.4

Investintech.com Inc. Software Development Kit: PDFtoImage Function Library User s Guide

Profibus Getting Started User's Manual

13 FORMATTING WORKSHEETS

CodeLoader 2 Operating Instructions. Version 2.2.0

NAME EET 2259 Lab 3 The Boolean Data Type

Programming for the LabVIEW Real-Time Module Using LabWindows/CVI

Adobe Encore DVD Tutorial:

Advantech AE Technical Share Document

CPE 323: Laboratory Assignment #1 Getting Started with the MSP430 IAR Embedded Workbench

Transcription:

Advantech AE Technical Share Document Date 2017/11/2 SR# 1-3050819460 Category FAQ SOP Related OS Windows 7, Windows XP Abstract IAG_FAQ APAX-5580, How to use LabVIEW in APAX-5580 to control APAX IO Module Keyword APAX-5580, LabVIEW, IO module Related Product APAX-5580 Problem Description: In this document, we describe the detailed procedures of how to use LabVIEW in APAX-5580 to control APAX IO module. Furthermore, we explain how to build runtime in case of the customer does not install LabVIEW. Answer: 1. First of all, install the latest version of EtherIO Bus Driver on the Advantech support webpage. http://support.advantech.com/support/downloadsrdetail_new.aspx?sr_id=1-10yrsvf &Doc_Source=Download 2. If you installed it with default path, you can find ADSDIO.dll in C:\Windows\System32 3. To use Advantech defined DIO functions, we need to prepare the header file of VC++ for APAX-5580. If you install AdamApax.NET Class Library VS2008 with default path, you can find ADSDIO.h in C:\Program Files (x86)\advantech\adamapax.net Class Library\Sample Code\APAX\Win32\CPlusPlus\include 1

4. Open the LabVIEW and New a Blank VI. In this document, we use LabVIEW2012 in Windows 7 as demonstration. (LabVIEW2009 with Windows XP is also verified can work in APAX-5570.) 5. After creating a new VI, switch from the Front Panel to Block Diagram window. Right click your mouse, and choose Connectivity Libraries & Executables Call Library Function Node button. This kind of node could call DLL or functions in the shared library directly. 2

6. Double click the VI and define the path of DLL, which is C:\Windows\System32 Use C language as calling convention. 7. Open ADSDIO.H to decide which API you want to transfer it to LabVIEW VI. Now we use API DIO_GetValue for illustration of APAX-5040 (DI-module). 8. In the Function tab, follow the rule of function name defined in ADSDIO.H. If you define the path of DLL correctly, it would be a list for you to choose. 3

9. In the Parameters tab, the parameter of each variable needs to be defined. 9.1 Return value We use the name ERR_DIOGET as the return value of the API DIO_GetValue. Use Signed 32-bit Integer data type as compatible to LONG type. 9.2 LONG handle 4

9.3 WORD i_wslot Use Unsigned 16-bit Integer data type as compatible to WORD type. 9.4 WORD i_wchannel 5

9.5 WORD* o_wvalue Use Signed 16-bit Integer Pointer data type as compatible to BOOL* type. 10. After defining those parameters, you could see the icon on the block diagram as below. For the following steps, we are going to demonstrate in detail to illustrate the concept of modularity for the amateur user of LabVIEW. One may build a project as bellow figure. For more details of modularity, one could refer to LabVIEW official tutorial: http://www.ni.com/white-paper/7593/en/ 6

11. Move your mouse on the pin, and right-clicking on the pin to create input type ( such as Constant, Control ) or output type ( Indicator ) of pins. 12. Generally, the left hand side of the module is for input pin, and usually used as Control. The right hand side is for output pin and used as Indicator. 13. For demonstration, we arranged all pins as shown below. However, considering APAX-5040 is a DI module, for input pins, we only need to create 1) handle is the driver handler, which is created by function ADAMDrvOpen. If driver initialization succeeded, function returns ERR_SUCCESS, and the handle will be used for rest of the functions. handle shall be terminated by function ADAMDrvClose. 2) i_wslot for controlling the slot ID of the APAX-5040 module 3) i_wchannel for controlling the channel number of the APAX-5040 module 7

For output pin, we need to create 1) o_bvalue for monitoring the DI value of APAX-5040. 2) handle for passing the driver handler to the next module. 14. Switch to the Front Panel to assign the connector. There would be 9 pins already created shown on the Panel. 15. Assign connectors to specified pins. In the Connector zone, click the left-top connector. Then click the pin of handle. It would make the connector and pin as a pair. 8

Similarly, click the other connector in the Connector zone. Then click the pin of i_wslot to make them as a pair. Assign the rest of input pins with connectors. There are 5 output pins but only 4 connectors. However, we only assign those output we need same as step 14 th indicated. For example, if we want to monitor the error code of this function, we assign ERR_DIOGet to the right-top connector. 9

The handle needs to be passed to the next APAX IO Module, so we assign it as well. To get the DI value, we use the o_bvalue to be shown as the indicator. After finishing the assignment of module APAX-5040, we can save the file. 10

16. Besides, in LabVIEW, there is an option for you to edit the icon of the VI. Right click on the icon and choose Edit Icon There is painter for you to edit the icon. 11

17. To use the VI you created, save the VI (APAX5040), and then open a new blank VI. 18. Click the Select a VI button on the Functions palette. 19. Navigate to the VI, and left click to place it on the block diagram. 20. You can move your pointer on each pin, and it will show the variable name of the pin. For example, it shows handle when the pointer move on the left top pin. 12

21. In case of transmitting handle correctly among APAX IO Modules, we need 2 additional modules. Use ADAMDrvOpen Module as the first module, and ADAMDrvClose Module as the last module. 22. You could follow previous steps to create these 2 modules by their API definitions. 23. Select these 2 modules in your blank VI with APAX5040. 13

24. You can create indicator for checking Error code. Connect the handle of DrvOpen to the handle pin of APAX5040. 25. Because we may change APAX IO Module ID and channel ID, we leave i_wslot and i_wchannel could be changed. 26. Connect the handle of APAX5040 and DrvClose. Complete all connection. 14

27. If you don t use the correct APAX IO Module ID, you would get Error as below. 28. You may use AdamApax.NET Utility to check your APAX IO Module. 29. After using the correct ID, you can get the value of channel 0 successfully! 15

For the Error code definition, you can look up in the ADSDIO.H for detailed explanation. 16

It is possible that the customer does not install LabVIEW in APAX-5580, but still wants to use APAX-IO Module. For this reason, we could build runtime (EXE file) and provide runtime to meet the customer s request without asking him to install LabVIEW. By following steps, we explain how to build runtime with LabVIEW. 1. Create a new a project and add the file. 17

2. Add from File. 3. It will include the used VI files and DLL automatically if the VI file includes other VI files. 18

4. Save your project. Select Build Specification and New an application (EXE) 5. Set your destination directory and your application name. 19

6. Configuring the project by moving the VI from Project Files to Startup VIs. 7. Click Build button to build the EXE file. 8. After building, find the runtime Application.exe. You can use the program to run. 20