Simulation Di, Dio And User Programmable Led - Advantech UNO-1110 User Manual

Ti cortex am3505 din-rail pc with 2 x lan, 5 x com, 4 x usb
Hide thumbs Also See for UNO-1110:
Table of Contents

Advertisement

3.5.3

Simulation DI, DIO and User Programmable LED

UNO-1110 has 4 Simulation DI (Digital Input), 4 DI, 2 DO (Digital Output) and 4 User
Programmable LEDs. Users can access these resources via the built-in Advantech
IO Service driver named "ADV1:".The follows are the descriptions and examples of
the usable DeviceIoControl codes in this driver:
How to Use the Control Code
There are 11 control codes for the operation codes in DIO and LED (driver).
1. ADV_IOCTL_READ_DI:
Read the Digital Input value.
lpInBuffer: unsed.
nInBufferSize: unused.
lpOutBuffer: The BYTE pointer to the current Simulation DI (BIT4~ BIT7) or DI (BIT0~
BIT3) value. BIT0 indicates DI_0 state; BIT1 indicates DI_1 state.
nOutBufferSize: User provided output buffer size.
2. ADV_IOCTL_WRITE_DO:
Write value out the Digital Output.
lpInBuffer: The BYTE pointer to the DO value that is requesting to write out. BIT0
indicates DO_0 state; BIT1 indicates DO_1 state.
nInBufferSize: User provided input buffer size.
lpOutBuffer: unsed.
nOutBufferSize: unsed.
3. ADV_IOCTL_READ_DO:
Read the written Digital Output value.
lpInBuffer: unsed.
nInBufferSize: unsed.
lpOutBuffer: The BYTE pointer to the current DO value. BIT0 indicates DO_0 state;
BIT1 indicates DO_1 state.
nOutBufferSize: User provided input buffer size.
4. ADV_IOCTL_TURN_ON_LED1:
Turn LED1 on.
lpInBuffer :unused.
nInBufferSize: unused.
lpOutBuffer: unused.
nOutBufferSize: unused.
5. ADV_IOCTL_TURN_OFF_LED1:
Turn LED1 off.
lpInBuffer: unused.
nInBufferSize: unused.
lpOutBuffer: unused.
nOutBufferSize: unused.
41
UNO-1110 User Manual

Advertisement

Table of Contents
loading

Table of Contents