ICP DAS I-8088W Reference Manual

I-8088W API Reference Manual
Version 1.0.2, Oct. 2020
Service and usage information for Linux Platform
Warranty
Warning
All products manufactured by ICP DAS are under warranty regarding defective materials for a period of one year, beginning from the date of delivery to the original purchaser.
ICP DAS assumes no liability for any damage resulting from the use of this product. ICP DAS reserves the right to change this manual at any time without notice. The information furnished by ICP DAS is believed to be accurate and reliable. However, no responsibility is assumed by ICP DAS for its use, not for any infringements of patents or other rights of third parties resulting from its use.
Copyright
Copyright @ 2012 by ICP DAS Co., Ltd. All rights are reserved.
Trademark
The names used for identification only may be registered trademarks of their respective companies.
Contact US
If you have any problem, please feel free to contact us. You can count on us for quick response.
Email: service@icpdas.com
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 2
Table of Contents
Table of Contents ................................................................................................................ 3
1. Introduction ................................................................................................................. 5
1.1. Specification ....................................................................................................... 6
1.2. Pin Assignment ................................................................................................... 7
1.3. Block Diagram .................................................................................................... 8
1.4. Wire Connection ................................................................................................. 9
2. Software and Getting Started ................................................................................... 10
2.1. Software ............................................................................................................10
2.2. Simple PWM Operation ..................................................................................... 11
2.2.1. Flow Chart ............................................................................................... 11
2.2.2. How to Setup the Standard PWM ...........................................................12
2.3. Using DI to Trigger PWM ...................................................................................16
2.3.1. Flow Chart ...............................................................................................16
2.3.2. How to Setup the Trigger PWM ............................................................... 17
2.4. Synchronize PWM .............................................................................................21
2.4.1. Flow Chart ...............................................................................................21
2.4.2. How to Setup the Standard PWM ...........................................................22
3. API for Linux PAC ...................................................................................................... 24
3.1.1. i8088W_Init .............................................................................................24
3.1.2. i8088W_GetFirmwareVersion .................................................................25
3.1.3. i8088W_GetLibVersion ...........................................................................26
3.1.4. i8088W_SetPWMDuty ............................................................................27
3.1.5. i8088W_SetPWMDuty_Deci ...................................................................28
3.1.6. i8088W_SetPWMDuty_float ....................................................................30
3.1.7. i8088W_GetRealPWMDuty_Deci ...........................................................32
3.1.8. i8088W_SetPWMCountMode .................................................................34
3.1.9. i8088W_SetBurstCount ...........................................................................36
3.1.10. i8088W_PWM_Start ...............................................................................37
3.1.11. i8088W_PWM_Stop ................................................................................38
3.1.12. i8088W_SetSyncChannel .......................................................................39
3.1.13. i8088W_GetSyncChannel .......................................................................41
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 3
3.1.14. i8088W_Sync_Start ................................................................................42
3.1.15. i8088W_Sync_Stop ................................................................................43
3.1.16. i8088W_SetHardwareTrigChannel .........................................................44
3.1.17. i8088W_GetHardwareTrigChannel .........................................................46
3.1.18. i8088W_GetPWMActiveState .................................................................48
3.1.19. i8088W_GetDI ........................................................................................50
Appendix. Error Codes ..................................................................................................... 52
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 4
1. Introduction
PWM (Pulse width modulation) is a powerful technique for controlling analog circuits. It uses digital outputs to generate a waveform with variant duty cycle and frequency to control analog circuits. I-8088W has 8 PWM output channels and 8 digital inputs. It can be used to develop powerful and cost effective analog control system.
Features:
Automatic generation of PWM outputs by hardware, without software intervention.  10 Hz ~ 500 kHz (non-continuous) PWM output frequency with 0.1% ~ 99.9% duty cycle  Software and hardware trigger mode for PWM output  Individual and synchronous PWM output Using software trigger mode, you can set
configuration for all PWM channels then trigger them one by one or all of them at the same time.
Burst mode PWM operation for standby  DI channel can be configured as simple digital input channel or hardware trigger source
of the PWM output.
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 5
1.1. Specification
PWM Output
Channels
8
Scaling Resolution
16-bit (1 ~ 128 µs for each step)
Frequency Range
10 Hz ~ 500 kHz (non-continuous)
Duty Cycle
0.1 % ~ 99.9 %
PWM Mode
Burst counting, Continuous mode
Burst Counter
1 ~ 65535
Hardware Trigger Mode
Trigger Start and Trigger Stop
Output Type
Source
Max. Load Current
1 mA
Intra-module Isolation, Field to Logic
3,750 Vrms
ESD Protection
4 kV Contact for each channel
Digital Input
Input Channels
8 (Sink/Source)
Input Type
One common for all digital input
On Voltage Level
+5 V ~ +30 V
Off Voltage Level
< 0.8 V
Input Impedance
4.7 kΩ, 1/4 W
Intra-module Isolation, Field to Logic
3,750 Vrms
ESD Protection
4 kV Contact for each channel
LED Display
1 LED as Power Indicator/16 LED as PWM and Digital Input Indicator
Power
Power Consumption
40 mA @ 5 V, 2 W ± 5 %
Environment
Operating Temperature
-25 °C ~ +75 °C
Storage Temperature
-30 °C ~ +85 °C
Humidity
5 % ~ 95 % RH, non-condensing
Dimensions
30 mm x 102 mm x 115 mm (W x L x H)
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 6
1.2. Pin Assignment
Pin 01 ~ 08: PWM0 ~ PWM7, are designed for PWM output  Pin 09 ~ 10: PWM.GND is isolated ground.  Pin 11 ~ 18: DI0 ~ DI7 are designed for digital input that also capable of setting as an
external trigger signal to start or stop its PWM pulse.
Pin 19 ~ 20: DI.COM is isolated ground.
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 7
1.3. Block Diagram
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 8
1.4. Wire Connection
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 9
2. Software and Getting Started
PRRODUCT
CPU
DOWNLOAD LINK
LP-8x4x
PXA270
http://www.icpdas.com/en/download/show.php?num=982&model=LP-8441-EN
LP-8x2x/9x2x
AM335x
http://www.icpdas.com/en/download/show.php?num=915&model=LP-8421
LX-8000/9000
x86/E38xx
http://www.icpdas.com/en/download/show.php?num=904&model=LX-9381
2.1. Software
In this section, we will introduce you one simple program (demo 8080W.exe) which have three setup modes – Normal, Hardware Trigger and Synchronize. We need to check the following steps before running the program.
1. First, user need to download LinPAC SDK, which is includes GNU toolchain, Libraries, header, examples files, etc.
2. Check the power cable, Ethernet cable, VGA monitor, the communication cable between controller and PC has been connected well, and then check the i-8088W has been plugged in the controller.
3. Next, check the communication between controller and PC is fine, and download the demo program files to the controller.
4. User can find the related files in the product CD or below website:
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 10
2.2. Simple PWM Operation
Set PWM Mode
Set Burst Count
Choice Burst Count Mode (1 -65535)
Set PWM Duty
(Frequency and Duty)
Set Integer Duty Set x10 Integer Duty
Start or Stop PWM
Start PWM
Stop PWM
Set Float Duty
Set Continous
0
1
0
1
2
Frequency:
Select 0: 1 – 00000 Hz Select 1: 1 – 500000 Hz Select 2: 0.1 – 500000.0 Hz
Duty:
Select 0: 1 – 99 % Select 1: 1 – 99 % Select 2: 0.1 – 99.9 %
Note: Each time you change the settings of “PWM Duty", you have to re-send the “Start PWM” command to ensure the operation properly.
2.2.1. Flow Chart
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 11
2.2.2. How to Setup the Standard PWM
Please make sure you have completed the steps in section 2.1 before operating the following steps.
Description of the demo:
In this example, we will use the demo to set I-8088W as “Continuous” mode and its
frequency is 10 Hz, PWM duty is 50%. When we send the “Start Normal PWM” commend,
the DI0 will blinking per 0.5s.
Wire connection of I-8088W:
To do this, you need to wire PW0 to DI0, DI.COM to External 5V, PWM.GND to External GND. (Please refer to section 1.2 Pin Assignment)
Now, follow the steps to configure the related parameter:
Step 1: Change the authority of demo8088W.exe
For example, my LP-8x4xs IP address is 10.1.0.39, and telnet to the LP-8x4x by pietty.exe as below:
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 12
Step 2: Change the authority of demo8088W.exe
When you run the program, it will initialize the i-8088W module and obtain the related information as shown below.
Step3: Set PWM Mode
This setting includes two modes – “Burst Count Mode” and “Continuous Mode”. “Burst Count Mode” means it can output multiple fixed pulse in a period time and then stop output. “Continuous Mode” means it can output one fixed pulse in a period time and continue
output. In this example, we enter "1" to set it as "Continuous mode".
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 13
Step 4: Set PWM Duty
There are three options in this setting, if you choose:
"0" means you can enter an integer value (ex. input 50 to set it as 50 %)  "1" means you can enter an integer value to set it as one decimal place value. (ex. input
999 to set it as 99.9 %)
"2" means you can enter a one decimal place value. (ex. input 99.9 to set it as 99.9 %)
In this example, please enter "0" to set it as “Normal integer Duty”
Then, we will set its frequency as 10 Hz, PWM duty as 50 %.
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 14
Step 5: Start PWM
You will see three modes in below picture, please enter “0” to set it as “Normal PWM”
Then enter “0” to start the PWM.
If you have completed the correct setup, you will see below picture. In this example, it will
send the “start PWM“ command to channel 0 ~ 7, the condition is 10 Hz with 50% duty, and
we has connected the PWM0 to DI0, so the DI0 will blink per 0.5 seconds.
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 15
2.3. Using DI to Trigger PWM
Set PWM Mode
Set Burst Count
Choice Burst Count Mode (1~65535)
Set PWM Duty
Set Integer Duty Set x10 Integer Duty
Input Frequency
Input Duty
Configure DI as external trigger source for each channel
Set DI as Normal
PWM
DI signal to Start
PWM
Wait DI signal to Start PWM
Stop PWM
DI signal to Stop
PWM
Start PWM
Wait DI signal to Stop
PWM
Set Float Duty
Set Continous
0 1 0
1
2 0 1
2
Frequency:
Select 0: 1 ~ 00000 Hz Select 1: 1 ~ 500000 Hz Select 2: 0.1 ~ 500000.0 Hz
Duty:
Select 0: 1 ~ 99 % Select 1: 1 ~ 99 % Select 2: 0.1 ~ 99.9 %
2.3.1. Flow Chart
I-8088W API Reference Manual, Version 1.0.2, Oct. 2020 -- 16
Loading...
+ 36 hidden pages