Advertisement

Quick Links

I-8093W/I-9093
Linux API Reference Manual
V2.0.0 July 2018
Written by Edward Ku
Edited by Anna Huang
5

Advertisement

Table of Contents
loading

Summary of Contents for ICPDAS I-8093W

  • Page 1 I-8093W/I-9093 Linux API Reference Manual V2.0.0 July 2018 Written by Edward Ku Edited by Anna Huang...
  • Page 2 Names are used for identification purposes only and may be registered trademarks of their respective companies. Contact Us If you have any problems, please feel free to contact us. You can count on us for a quick response. Email: service@icpdas.com I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 2...
  • Page 3: Table Of Contents

    ..................42 4.16. i8093W_GetIndexLatchStatus ..................44 4.17. i8093W_ClearLatchedIndex ..................... 45 4.18. i9093_SetExTrigMode ...................... 46 4.19. i9093_GetExTrigMode ..................... 47 4.20. i9093_SetExSignal......................48 4.21. i8093_GetExSignal ......................49 4.22. i9093_SetPreTriggerSteps ....................50 4.23. i9093_GetPreTriggerSteps ....................51 I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 3...
  • Page 4 4.31. i9093_GetTriggerOutConfig ..................... 59 4.32. i9093_SetLowPassFilter ....................60 4.33. i9093_GetLowPassFilter ....................62 4.34. i9093_ReadIndexLatchedPosition ..................64 4.35. i9093_ReadExTrigLatchedPosition ................... 65 Appendix A. Error Code .......................... 66 Appendix B. Revision History ........................67 I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 4...
  • Page 5: Preface

    Preface I-8093W/I-9093 are 3-axis encoder counter board. I-8093W/I-9093 encoder card has 32 bits counter and high counting rate 10Mpps. The application of I-8093W/I-9093 board is position/distance measurement, velocity measurement, feedback for motor control, hard wheel input and so on. The information contained in this manual is divided into the following topics: ...
  • Page 6: Introduction

    1. Introduction I-8093W is a 3-axis high speed encoder module. Its each axis can be independently configured as one of A/B Phase, Pulse/Direction and CW/CCW input mode. I-9093 is also a 3-axis encoder which included A/B Phase, Pulse/Direction and CW/CCW input mode with compare trigger output function.
  • Page 7 9 LED as Status Indicator 12 LED as Status Indicator Dimension (L x W x H) 102 mm x 30 mm x 115 mm 144 mm x 30.3 mm x 134 mm The difference between I-8093W and I-9093 Functions I-8093W I-9093 ...
  • Page 8: Specifications

    LED Indicators System LED Indicator 1 LED as Power Indicator 1 LED as Power Indicator 9 LED as Status Indicator 12 LED as Status Indicator Isolation Intra-module Isolation, Field-to-Logic 2500 Vrms 3000 VDC I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 8...
  • Page 9 144 mm x 30.3 mm x 134 mm Environment Operating Temperature -25 °C ~ +75°C -30 ~ 85 °C Storage Temperature -40 ~ +85°C Humidity 5 ~ 95 % RH, Non-condensing 10 ~ 90% RH, non-condensing I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 9...
  • Page 10: Pin Assignments

    1.2. Pin Assignments I-8093W I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 10...
  • Page 11 I-9093 I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 11...
  • Page 12: Jumper Settings

    1.3. Jumper Settings I-8093W 5V / 24V Input Level Enable / Disable 5V power supply Enable Disable I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 12...
  • Page 13 I-9093 5V / 24V Input Level I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 13...
  • Page 14: Wire Connections

    1.4. Wire Connections I-8093W I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 14...
  • Page 15 I-9093 I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 15...
  • Page 16: Block Diagram

    1.5. Block Diagram I-8093W I-8014CW/I-9014C I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 16...
  • Page 17: Quick Start

    ICP DAS provides a range of demo programs for different platforms that can be used to verify the functions of the I-8093W/9093. The source code contained in these programs can also be reused in your own custom programs if needed. The executable file, can be used to retrieve the basic configuration information related to the module and to verify the functions.
  • Page 18: Getting Start On Linpac Controllers

    2.1. Getting start on LinPAC Controllers This part will show the functions of I-8093W with 'demo8093' file. After execute 'demo8093W.exe' file you can see the functions as following picture: I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 18...
  • Page 19 InA0 and decreased by one for every falling edge of InB0. CountN the current counter value for channel N, 32 bits wide, from -2147483648 to 2147483647 OverflowN 0 = no overflow 1 = overflow This gives the following: I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 19...
  • Page 20 If InB0 is Low, counter_0 will be decreased by one for every falling edge of InA0. CountN the current counter value for channel N, 32 bits wide, from -2147483648 to 2147483647 OverflowN 0 = no overflow 1 = overflow This gives the following: I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 20...
  • Page 21 Counter_0 will be increased by one when the InA0 phase leads by 90 degrees to InB0.  Counter_0 will be decreased by one when the InA0 phase lags by 90 degrees to InB0. I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 21...
  • Page 22 (3) Preset value is used to set the set the starting position of the count. (4) Read Frequency I-8093W can read frequency of input signal. *If there is no encoder input, the frequency will be 0.093 not 0 I-8093W/I-9093 I/O Module User Manual, v2.0.0...
  • Page 23: Compare Trig Out

    All operations of position compare and trigger pulse output are automatically done by the hardware circuit. There is no software calculation effort when the system is operating. I-9093 makes the system design simpler, and significantly increases the system performance. I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 23...
  • Page 24: Api References

    4. API References ICPDAS supplies a range of C API functions for the I-8093W/I-9093 module. When developing a custom program, refer to either the i8093W.h header file, or the API functions described in the following sections for more detailed information.
  • Page 25 (For I-8093W only) i8093W_SetIndexLatchStatus This function use to enable/disable the index latch function of I-8093W. (For I-8093W only) i8093W_GetIndexLatchStatus This function use to get the index latch function status of I-8093W. (For I-8093W only) API for I-9093 Function for Windows Description i9093_SetExTrigMode This function use to set External latch mode of I-9093.
  • Page 26 (For I-9093 only) i9093_ReadIndexLatchedPosition This function use to get the index latched position of I-9093. (For I-9093 only) i9093_ReadExTrigLatchedPosition This function use to get the external trig latched position of I-9093. (For I-9093 only) I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 26...
  • Page 27: I8093W_Init

    Before executing any functions on the I-8093W/I-9093, the i8093W_Init function needs to be called once for I-8093W/I-9093. If there are two or more I-8093W/I-9093 modules, you need call the i8093W_Init function for each I-8093W/I-9093 module individually by passing the slot number that the I-8093W/I-9093 module is plugged into.
  • Page 28: I8093W_Getfirmwareversion

    Syntax short i8093W_GetFirmwareVersion(int slot); Parameter slot: specifies the slot number (1 ~ 8). Return Values The version number of the primary FPGA firmware for the I-8093W/I-9093 module. Example int ver, slot; Open_Slot(slot); ver= i8093W_GetFirmwareVersion(slot); I-8093W/I-9093 I/O Module User Manual, v2.0.0...
  • Page 29: I8093W_Getlibversion

    4.3. i8093W_GetLibVersion This function use to get the library version of 8093W.lib/i8093W.dll. Syntax short i8093W_GetLibVersion(void); Parameter None Return Values The version number of the 8093W.lib/i8093W.dll. Example int ver, slot; Open_Slot(slot); ver = i8093W_GetLibVersion(void); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 29...
  • Page 30: I8093W_Setmode

    4.4. i8093W_SetMode This function use to set the operation mode of I-8093W/I-9093. Syntax int i8093W_SetMode( int slot, int ch, int Mode For Windows (CE and WES) Parameter slot: specifies the slot number (1 ~ 8). specifies the channel (0 ~ 2).
  • Page 31: I8093W_Getmode

    4.5. i8093W_GetMode This function use to get the operation mode of I-8093W/I-9093. Syntax int i8093W_GetMode( int slot, int ch, int* Mode Parameter slot: specifies the slot number (1 ~ 8). specifies the channel (0 ~ 2). *Mode: [output] get encoder counting mode 1 ==>...
  • Page 32: I8093W_Setxor

    4.6. i8093W_SetXOR This function use to set the xor of I-8093W/I-9093 for each channel. Syntax int i8093W_SetXOR( int slot, int ch, int Xor Parameter slot: specifies the slot number (1 ~ 8). specifies the channel (0 ~ 2). Xor: to change the status of Z_index...
  • Page 33: I8093W_Getxor

    4.7. i8093W_GetXOR This function use to get the xor of I-8093W/I-9093 for each channel. Syntax int i8093W_GetXOR( int slot, int ch, int* Xor Parameter slot: specifies the slot number (1 ~ 8). specifies the channel (0 ~ 2). *Xor: [output] to change the status of Z_index...
  • Page 34: I8093W_Getlinestatus

    4.8. i8093W_GetLineStatus This function use to get A,B and Z status of I-8093W/I-9093. Syntax int i8093W_GetLineStatus( int slot, int ch, int* A_Status, int* B_Status, int* C_Status Parameter slot: specifies the slot number (1 ~ 8). specifies the channel (0 ~ 2).
  • Page 35 Return Values Please refer the Error Code. Example int slot , ch , A_Status , B_Status , C_Status; Open_Slot(slot); i8093W_GetLineStatus(slot , ch , & A_Status , & B_Status , & C_Status); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 35...
  • Page 36: I8093W_Getindex

    4.9. i8093W_GetIndex This function use to get Z index status of I-8093W/I-9093. Syntax int i8093W_GetIndex( int slot, int ch, int* index Parameter slot: specifies the slot number (1 ~ 8). specifies the channel (0 ~ 2). * index: [output] 0: not activated...
  • Page 37: I8093W_Read32Bitencoder

    4.10. i8093W_Read32BitEncoder This function use to get 32-Bit Encoder value of I-8093W/I-9093. Syntax int i8093W_Read32BitEncoder( int slot , int ch , long* EnCode32); Parameter slot: specifies the slot number (1 ~ 8). specifies the channel (0 ~ 2). * EnCode32: [output] get encoder value.
  • Page 38: I8093W_Resetencoder

    (1 ~ 8). specifies the channel (0 ~ 2). Return Values Please refer the Error Code. Example int slot , ch ; Open_Slot(slot); i8093W_Read32BitEncoder(slot , ch , &EnCode); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 38...
  • Page 39: I8093W_Setpresetvalue

    4.12. i8093W_SetPresetValue This function use to set 32-Bit preset value of I-8093W/I-9093. Syntax int i8093W_SetPresetValue( int slot, int ch, long presetVal Parameter slot: specifies the slot number (1 ~ 8). specifies the channel (0 ~ 2). presetVal: Set preset value.
  • Page 40: I8093W_Getpresetvalue

    4.13. i8093W_GetPresetValue This function use to get 32-Bit preset value of I-8093W/I-9093. Syntax int i8093W_GetPresetValue( int slot, int ch, long* presetVal Parameter slot: specifies the slot number (1 ~ 8). specifies the channel (0 ~ 2). presetVal: [output] get preset value.
  • Page 41: I8093W_Readfreq

    1: read frequency function supported by firmware version 3 or later version. 2: if there is no encoder input, the frequency will be 0.093 not 0 Example int slot , ch ; float freq; Open_Slot(slot); i8093W_ReadFreq(slot , ch , &freq); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 41...
  • Page 42: I8093W_Setindexlatchstatus

    4.15. i8093W_SetIndexLatchStatus This function use to enable/disable the index latch function of I-8093W. Syntax (For I-8093W only) int i8093W_SetIndexLatchStatus( int slot, int ch, int ifEnableLatch Parameter slot: specifies the slot number (1 ~ 8). specifies the channel (0 - 2).
  • Page 43 Example int slot, ch ; int ifEnableLatch; Open_Slot(slot); i8093W_SetIndexLatchStatus(slot, ch , ifEnableLatch); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 43...
  • Page 44: I8093W_Getindexlatchstatus

    4.16. i8093W_GetIndexLatchStatus This function use to get the index latch function status of I-8093W. Syntax (For i-8093W only) int i8093W_GetIndexLatchStatus( int slot, int ch, int* latchedStatus, int* ifEnableLatch Parameter slot: specifies the slot number (1 ~ 8). specifies the channel (0 - 2).
  • Page 45: I8093W_Clearlatchedindex

    Parameter slot: specifies the slot number (1 ~ 8). specifies the channel (0 - 2). Return Values Please refer the Error Code. Example int slot , ch ; Open_Slot(slot); i8093W_ClearLatchedIndex(slot, ch); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 45...
  • Page 46: I9093_Setextrigmode

    0 : disable external latched mode 1 : reset encoder 2 : external latch Return Values Please refer the Error Code. Example int slot , ch ; unsigned char mode; Open_Slot(slot); i9093_SetExTrigMode(slot, ch, mode); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 46...
  • Page 47: I9093_Getextrigmode

    0 : disable external latched mode 1 : reset encoder 2 : external latch Return Values Please refer the Error Code. Example int slot , ch ; unsigned char mode; Open_Slot(slot); i9093_GetExTrigMode (slot, ch, &mode); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 47...
  • Page 48: I9093_Setexsignal

    (1 ~ 8). Edge: 0 : Falling edge 1 : rising edge Return Values Please refer the Error Code. Example int slot ; unsigned char edge; Open_Slot(slot); i9093_SetExSignal (slot, edge); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 48...
  • Page 49: I8093_Getexsignal

    (1 ~ 8). *Edge: [output] 0 : Falling edge 1 : rising edge Return Values Please refer the Error Code. Example int slot ; unsigned char edge; Open_Slot(slot); i9093_GetExSignal (slot, &edge); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 49...
  • Page 50: I9093_Setpretriggersteps

    (0 ~ 2). Steps: Set the steps 0~255. Return Values Please refer the Error Code. Example int slot , ch ; unsigned char step; Open_Slot(slot); i9093_SetPreTriggerSteps (slot, ch, step); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 50...
  • Page 51: I9093_Getpretriggersteps

    (0 ~ 2). *Steps: [output] get steps 0~255. Return Values Please refer the Error Code. Example int slot , ch ; unsigned char step; Open_Slot(slot); i9093_GetPreTriggerSteps (slot, ch, &step); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 51...
  • Page 52: I9093_Setfirsttrigposition

    (0 ~ 2). Position: Set first trig position Return Values Please refer the Error Code. Example int slot , ch ; unsigned long position; Open_Slot(slot); i8093_SetFirstTrigPosition(slot, ch , position); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 52...
  • Page 53: I9093_Getfirsttrigposition

    (0 ~ 2). *Position: [output] get first trig position Return Values Please refer the Error Code. Example int slot , ch ; unsigned long position; Open_Slot(slot); i9093_GetFirstTrigPosition (slot , ch , &position); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 53...
  • Page 54: I9093_Settrigdistance

    (0 ~ 2). dir: Direction count Distance: set Distance Return Values Please refer the Error Code. Example int slot , ch, dir; unsigned long distance; Open_Slot(slot); i9093_SetTrigDistance (slot , ch, dir, distance); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 54...
  • Page 55: I9093_Gettrigdistance

    (0 ~ 2). dir: Direction count *Distance: [output] get Distance Return Values Please refer the Error Code. Example int slot , ch, dir; long *distance; Open_Slot(slot); i9093_GetTrigDistance (slot, ch, dir, & distance); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 55...
  • Page 56: I8093_Readnextposition

    (0 ~ 2). * Data32: [output] get next position Return Values Please refer the Error Code. Example int slot , ch ; long Data32; Open_Slot(slot); i9093_ReadNextPosition (slot, ch, &Data32); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 56...
  • Page 57: I9093_Clearnextposition

    Parameter slot: specifies the slot number (1 ~ 8). specifies the channel (0 ~ 2). Return Values Please refer the Error Code. Example int slot , ch ; Open_Slot(slot); i9093_ClearNextPosition (slot, ch); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 57...
  • Page 58: I8093_Configtriggerout

    (0 ~ 2). enStatus: set compare trig out status 0 : disable 1 : enable Return Values Please refer the Error Code. Example int slot , ch ,status; Open_Slot(slot); i9093_ConfigTriggerOut (slot, ch, status); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 58...
  • Page 59: I9093_Gettriggeroutconfig

    (0 ~ 2). *enStatus: [output] get compare trig out status 0 : disable 1 : enable Return Values Please refer the Error Code. Example int slot , ch ,status; Open_Slot(slot); i9093_GetTriggerOutConfig (slot, ch, &status); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 59...
  • Page 60: I9093_Setlowpassfilter

    4MHz (No low pass filter) 6MHz(No low pass filter) 4MHz 1MHz 2MHz 500KHz 1MHz 250KHz 640KHz 160 KHz 320KHz 80KHz 160KHz 40KHz 80KHz 20KHz 40KHz 10KHz Return Values Please refer the Error Code. I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 60...
  • Page 61 Example int slot , ch , filter; Open_Slot(slot); i9093_SetLowPassFilter(slot, ch, filter); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 61...
  • Page 62: I9093_Getlowpassfilter

    4MHz (No low pass filter) 6MHz(No low pass filter) 4MHz 1MHz 2MHz 500KHz 1MHz 250KHz 640KHz 160 KHz 320KHz 80KHz 160KHz 40KHz 80KHz 20KHz 40KHz 10KHz Return Values Please refer the Error Code. I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 62...
  • Page 63 Example int slot , ch , filter; Open_Slot(slot); i9093_GetLowPassFilter (slot, ch, &filter); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 63...
  • Page 64: I9093_Readindexlatchedposition

    (0 ~ 2). *Data32: [output] get the index latched position. Return Values Please refer the Error Code. Example int slot , ch ; long Data32; Open_Slot(slot); i9093_ReadIndexLatchedPosition(slot, ch, *Data32); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 64...
  • Page 65: I9093_Readextriglatchedposition

    (0 ~ 2). *Data32: [output] get the external trig latched position. Return Values Please refer the Error Code. Example int slot , ch ; long Data32; Open_Slot(slot); i9093_ReadExTrigLatchedPosition(slot, ch,&Data32); I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 65...
  • Page 66: Appendix A. Error Code

    There was a Slot index error (1 ~ 8) CHANNEL_OUT_RANGE There was a Channel index error (0 - 15) MODE_ERROR There was a Mode error(CW/CCW, DIR/Pulse, A/B Phase) FIRMWARENOTSUPPORT The Firmware is not support. I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 66...
  • Page 67: Appendix B. Revision History

    July 2018 Added content for the I-9093 modules Added 2.Quick start Added 3.Compared Trig Out Added API naming table Added Compare table Added Applicable Platform table Modify library , demo path Modify API I-8093W/I-9093 I/O Module User Manual, v2.0.0 P. 67...

This manual is also suitable for:

I-9093

Table of Contents