background image

Manual USB-DIO-48 

14

 

Chapter 5: Programming

 

 

The driver software provided with the board uses a 32-bit .dll front end compatible with any 
Windows programming language. Samples provided in Borland C++Builder, Borland Delphi, 
Microsoft Visual Basic, and Microsoft Visual C++ demonstrate the use of the driver.

 

 

The following is a list of the most common function calls provided by the driver in Windows.

 

 

For a complete list of available functions and details on how to use them refer to the USB 
Software Reference Manual located in the installation path for this board.

 

 

unsigned long DIO_Configure(DeviceIndex, bTristate, pOutMask, pData) 

 
unsigned long 

DIO_Configure

unsigned long DeviceIndex - number from 0-31 of the device you want to configure 
unsigned char bTristate - boolean value. TRUE causes all bits on the device to enter tristate 
(high-impedance) mode.  FALSE  removes the tristate.  The tristate is changed 

after

 the 

remainder of the configuration has occurred.  All devices with this feature power-on in the 
"tristate" mode at this time. 
void *pOutMask - a pointer to the first element of an array of bytes; one byte per 8 ports or 
fraction.  Each "1" bit in the array indicates that the corresponding byte of the device is 
Output.  
void *pData - a pointer to the first element of an array of bytes.  Each byte is copied to the 
digital output ports on the device before the ports are taken out of tristate.  Any bytes in the 
array associated with ports configured as input are ignored.  

 

The size of the out mask and data is as follows: 

Out Mask 

2 bytes 

Data 12 

bytes 

 

unsigned long DIO_WriteAll(DeviceIndex,pData) 
 

unsigned long DeviceIndex - number from 0-31 of the device to which you wish to write all 
output bits 
void *pData - pointer to the first element of an array of bytes.  Each byte is copied to the 
corresponding output byte.  Bytes written to ports configured as inputs are ignored 

Note that the size of "all" is the same as the size of the data given under DIO_Configure. 

 

unsigned long DIO_ReadAll(DeviceIndex,Buffer)

 

 

unsigned long DeviceIndex - number from 0-31 of the device from which you wish to read all 
digital bits 
void *Buffer - pointer to the first element of an array of bytes.  Each port will be read, and the 
reading stored in the corresponding byte in the array. 

Note that the size of "all" is the same as the size of the data given under DIO_Configure. 

Summary of Contents for USB-DIO-48

Page 1: ...10623 Roselle Street San Diego CA 92121 858 550 9559 FAX 858 550 7322 contactus accesio com www accesio com MODEL USB DIO 48 USB 48 CHANNEL DIGITAL INPUT OUTPUT MODULE USER MANUAL FILE MUSB DIO 48 A1j ...

Page 2: ...CES nor the rights of others IBM PC PC XT and PC AT are registered trademarks of the International Business Machines Corporation Printed in USA Copyright 2009 by ACCES I O Products Inc 10623 Roselle Street San Diego CA 92121 All rights reserved WARNING ALWAYS CONNECT AND DISCONNECT YOUR FIELD CABLING WITH THE COMPUTER POWER OFF ALWAYS TURN COMPUTER POWER OFF BEFORE INSTALLING A CARD CONNECTING AND...

Page 3: ... parts not excluded by warranty Warranty commences with equipment shipment Following Years Throughout your equipment s lifetime ACCES stands ready to provide on site or in plant service at reasonable rates similar to those of other manufacturers in the industry Equipment Not Manufactured by ACCES Equipment provided but not manufactured by ACCES is warranted and will be repaired according to the te...

Page 4: ...11 Figure 3 2 48 Channel OEM Board with Right Angle Headers Map 11 USB Connector 12 Embedded USB Connector 12 LED 12 DC Power Jack Optional 12 ST Screw Terminals for High Retention Ext Power 12 50 Pin Box Headers 12 5V Resettable Fused Outputs 12 Pull Up Pull Down Configuration Jumpers 12 Chapter 4 USB Address Information 13 Chapter 5 Programming 14 unsigned long DIO_Configure DeviceIndex bTristat...

Page 5: ...nd or floating Jumper selectable power provided via USB cable or external power supply for higher current sourcing capabilities Resettable fused 5VDC output per I O connector Standard 50 pin IDC type shrouded connectors with key PC 104 size board 3 550 by 3 775 in Rugged industrial enclosure Compatible with Industry Standard I O Racks such as Gordos OPTO22 Potter Brumfield etc Applications Automat...

Page 6: ...fused 5VDC power is available at each I O connector on pin 49 There is one resettable fuse per connector The resettable fuses are rated at 0 5A All I O lines are buffered by a type 74ABT543A tristate buffer transceiver capable of sourcing 32 mA or sinking 64 mA The buffers are configured under program control for input or output I O Lines are jumper selectable with pull ups to 5 VDC via 10KΩ or wi...

Page 7: ... rail systems PR On board DC power circuitry and external regulated AC DC 5V adapter ST Ext pwr components screw term s for reg 5V pwr input high retention RoHS This product is available in a RoHS compliant version Please call for specific pricing then be sure to add this suffix to the model number on any hard copy or verbal purchase orders Special Order Contact factory with your special requireme...

Page 8: ... with a 50 pin female header connector and a 50 pin female edge connector STB 50 Screw terminal board typically ships with standoffs but can also mount on SNAP TRACK or DIN SNAP STB 48CH 50 Pin Multi Header Universal Screw Terminal Board with steel powder coated enclosure for up to 48 Digital I O Channels IIB 24 24 Channel Optically Isolated Input Board ROB 24 24 Channel Electromechanical Relay Bo...

Page 9: ...Manual USB DIO 48 9 Figure 1 2 Enclosure Label ...

Page 10: ...r CD ROM or disk drive where you see B in the examples below WIN NT 2000 XP 2003 a Place the CD into your CD ROM drive b The install program should automatically run If it does not click START RUN and type B GLQR JJ click OK or press c Follow the on screen prompts to install the software for this board Hardware Installation The board can be installed in any USB 2 0 or USB 1 1 port Please refer to ...

Page 11: ...vided with the board Also refer to the Block Diagram and the Option Selection Map when reading this section of the manual There are two primary versions of this board each has an option selection map Figure 3 1 48 Channel Board Option Selection Map Figure 3 2 48 Channel OEM Board with Right Angle Headers Map ...

Page 12: ...ng the OEM version of this board to connect external power via secure screw terminals instead of a non retained DC jack Strip your wires approximately 4mm and tin then tighten the regulated 5 VDC source leads into the labeled terminals 50 Pin Box Headers The 50 pin box headers have standard 0 100 spacing between pins and are keyed to prevent improper connections It can be used with standard IDC ty...

Page 13: ...supported USB devices are currently installed and each device type This information is returned as a Vendor ID VID Product ID PID and Device Index The VID is 0x1605 and the 48 bit board PID is 0x8002 The Device Index is determined by how many of the devices you have in your system and provides a unique identifier allowing you to access a specific board ...

Page 14: ...lement of an array of bytes one byte per 8 ports or fraction Each 1 bit in the array indicates that the corresponding byte of the device is Output void pData a pointer to the first element of an array of bytes Each byte is copied to the digital output ports on the device before the ports are taken out of tristate Any bytes in the array associated with ports configured as input are ignored The size...

Page 15: ... 12 GROUND 13 I O 17 I O 41 14 GROUND 15 I O 16 I O 40 16 GROUND 17 I O 15 I O 39 18 GROUND 19 I O 14 I O 38 20 GROUND 21 I O 13 I O 37 22 GROUND 23 I O 12 I O 36 24 GROUND 25 I O 11 I O 35 26 GROUND 27 I O 10 I O 34 28 GROUND 29 I O 09 I O 33 30 GROUND 31 I O 08 I O 32 32 GROUND 33 I O 07 I O 31 34 GROUND 35 I O 06 I O 30 36 GROUND 37 I O 05 I O 29 38 GROUND 39 I O 04 I O 28 40 GROUND 41 I O 03 I...

Page 16: ...pending on user configuration The USB bus is specified to provide 500 mA to most desktop environments This gives you 182 mA available 500 mA 300mA 200 mA If using more than a total of 500mA use optional Regulated 5 VDC external power supply and remove VUSB jumper and place jumper on VEXT Then plug in external power before plugging into USB port 5V with 0 5A resettable fuse for each connector Envir...

Page 17: ... problems with this manual or just want to give us some feedback please email us at manuals accesio com Please detail any errors you find we will reply with manual updates 10623 Roselle Street San Diego CA 92121 Tel 858 550 9559 FAX 858 550 7322 www accesio com ...

Reviews: