background image

com_CloseDevice

This function closes a device by Serial Port.

Declaration

BOOL 

com_CloseDevice(HANDLE hDevice)

Parameters

hDevice  A valid device handle.

Return value

TRUE if successful, FALSE otherwise.

Example 

com_CloseDevice(hDevice);

Remarks

Please see “Serial_Communication.pdf” to set hardware for serial communication, and USB_LAB

-

KIT, USB_STARTER, USB_8PR are not supported by serial communication.

Device Type Table

 

Product 

device_type

USB_16PIO 

0x01

USB_LABKIT 

0x02

USB_16PR 

0x03

USB_STARTER 

0x04

USB_8PR 

0x06

USB_4PR 

0x07

USB_8PI 

0x08

USB_8RO 

0x09

USB_16PI 

0x0A

USB_16RO 

0x0B

USB_32PI 

0x0C

USB_32RO 

0x0D

USB_IND 

0x0E

USB_M_4IO 

0x10

Содержание UHRO-16

Страница 1: ...d Version 16 photo couple input 16 relay output channels Product Code AUSB16P R USB 16 PHOTO ISO RELAY BOARD DECISION COMPUTER J rgen Merz e K Lengericher Str 21 49536 Lienen Telefon 49 0 5483 77002 T...

Страница 2: ...oftware Driver Windows will use HID interface and sample for program ming Linux driver and sample for programming Package includes the following items USB 16PR Board USB cable Software and Manual CD T...

Страница 3: ...ust be 5V external DC It is to pay attention to correct polarity Otherwise the product could be damaged If the board is by wrong power supply except function you can try new store the firmware The U E...

Страница 4: ...below 4 8V for USB I O board it can t work normally and sometimes it will cause device manager keeping refreshing itself or can t recognize the device To reset the hanging USB Module Set different ID...

Страница 5: ...1 IN0 Opto isolator Ch 00 Input 2 IN0 Opto isolator Ch 00 Input 3 IN1 Opto isolator Ch 01 Input 4 IN1 Opto isolator Ch 01 Input 5 IN2 Opto isolator Ch 02 Input 6 IN2 Opto isolator Ch 02 Input 7 IN3 Op...

Страница 6: ...1 Relay Ch 01 Output 5 NO 2 Relay Ch 02 Output 6 COM 2 Relay Ch 02 Output 7 NO 3 Relay Ch 03 Output 8 COM 3 Relay Ch 03 Output 9 NO 4 Relay Ch 04 Output 10 COM 4 Relay Ch 04 Output 11 NO 5 Relay Ch 05...

Страница 7: ...er installation is required The functions for access and control of HID hid dll you can find in the Windows System32 folder 1 Power supply 5V connect 2 USB connect 3 USB input device device driver sof...

Страница 8: ...unction is only implemented in USBLABKIT Linux Support dcihid 0 5 1 Basic function library and demo program 2009 05 01 This package includes a c library and a demo program which is develo ped by Decis...

Страница 9: ...te the hex file and then press the Download button to update firmware 6 Set Board Id between 0 14 and press Reset button and connect PC again The remote control of Decision USB products by LAN or wire...

Страница 10: ......

Страница 11: ......

Страница 12: ......

Страница 13: ......

Страница 14: ...ts in materials and workmanship and be fully functional under normal usage In the event of the failure of a SmartLab product within the specified warranty period SmartLab will at its option replace or...

Страница 15: ...oducts Users Manual Design Implementation by Decision Computer International Company No parts of this documentation may be reproduced or transmitted in any form by any means electronic photocopying re...

Страница 16: ...tions to open and close Devices 7 6 Functions for digital input output 10 7 Functions for reset hardware device 16 8 Functions for analog input output 17 9 Functions for watch dog 18 10 Using USBDII w...

Страница 17: ...created to provide a standard way to access the functionality provided by all USB data acquisition products Specifically the USBDII provides the following features Platform independent The library is...

Страница 18: ...a types used may not be present in the programming language you want to use Please find the following data type conversion table for your convenience HANDLE An opaque 32 bit integer BYTE A 8 bit unsig...

Страница 19: ...ee Device Type Table ID Table following below Return value A valid handle representing the device or INVALID_HANDLE_VALUE 1 if an error occurred For USB_STARTER there is no ID selection and device_id...

Страница 20: ...ters device_type The type of the device to open device_id Device s id on the board For more information please see Device Type Table ID Table following below port_num Com Port Num to open Return value...

Страница 21: ...eDevice hDevice Remarks Please see Serial_Communication pdf to set hardware for serial communication and USB_LAB KIT USB_STARTER USB_8PR are not supported by serial communication Device Type Table Pro...

Страница 22: ...3 4 OFF 0 2 3 4 OFF 1 ON 1 1 3 4 OFF 2 ON 2 3 4 OFF 1 2 ON 3 1 2 4 OFF 3 ON 4 2 4 OFF 1 3 ON 5 1 4 OFF 2 3 ON 6 4 OFF 2 3 4 ON 7 1 2 3 OFF 4 ON 8 2 3 OFF 1 4 ON 9 1 3 OFF 2 4 ON 10 3 OFF 1 2 4 ON 11 1...

Страница 23: ...nipulate The first port has index 0 For more information please see Write Address Table following below byPortState The new state of the port Return value TRUE if successful FALSE otherwise If an erro...

Страница 24: ...elow byPortState The new state of the port Return value TRUE if successful FALSE otherwise If an error occurred GetLastError may return the following values ERROR_INVALID_PARAMETER The handle passed w...

Страница 25: ...PR 0x01 OUT07 to OUT00 0x02 DIO7 to DIO0 0x03 DIO15 to DIO8 USB_4PR 0x02 OUT03 to OUT00 USB_8RO 0x02 OUT07 to OUT00 USB_16RO 0x02 OUT07 to OUT00 0x03 OUT15 to OUT08 USB_32RO 0x00 OUT07 to OUT00 0x01 O...

Страница 26: ...more information please see Read Address Table following below lpbyPortState A pointer to a variable of type BYTE receiving the new state of the port Return value TRUE if successful FALSE otherwise I...

Страница 27: ...pointer to a variable of type BYTE receiving the new state of the port Return value TRUE if successful FALSE otherwise If an error occurred GetLastError may return the following values ERROR_INVALID_P...

Страница 28: ...08 USB_8PR 0x00 IN07 to IN00 0x02 DIO7 to DIO0 0x03 DIO15 to DIO8 0x10 JP9 JP10 Settings USB_4PR 0x00 IN03 to IN00 USB_8PI 0x00 IN07 to IN00 USB_16PI 0x00 IN07 to IN00 0x01 IN15 to IN08 USB_32PI 0x00...

Страница 29: ...output It can be defined by Jumper 10 and Jumper 11 on the board And we can use hid_GetDigitalByte com_GetDigitalByte function to read Jumper State to determine witch port is either input or output hi...

Страница 30: ...aration BOOL hid_ResetHW HANDLE hDevice Parameters hDevice A valid device handle Return value TRUE if successful FALSE otherwise Example hid_ResetHW hDevice com_ResetHW This function directly resets t...

Страница 31: ...e A pointer to a variable of type DWORD receiving the new state of the port Return value TRUE if successful FALSE otherwise If an error occurred GetLastError may return the following values ERROR_INVA...

Страница 32: ......

Страница 33: ......

Страница 34: ......

Страница 35: ......

Страница 36: ......

Страница 37: ......

Страница 38: ......

Страница 39: ......

Страница 40: ......

Отзывы: