Jump to content

ACCES USB-IDIO-16 DLL or Low-Level control


Recommended Posts

This I/O board is pretty sweet and seems to have some great capabilities if they can be accessed in a more "OEM" manner than I realized when I bought it.

Details can be found at:  http://accesio.com/go.cgi?p=/104/104-idio-16.html  (picked it up on EBay for $45.

I am planning to use my new Acces USB-IDIO-16 to control the switching of my HO model train hump yard layout. I am wanting to use the USB interfacing of this card to;
1) resd a RFID reader (with data going into Excel 2013 at the moment (to determine the cars making up the train)
2) use the IDIO-16 to control the switches and

3) monitor the photoeyes.

ASSEC's reply for help:

The easiest way to control a single relay from any language or environment is "DIO_Write1()".  If you only have one USB device you're connected to, just use the "diOnly" constant (-3, or 0xFFFFFFFD) for the "Device Index" parameter.  This leaves the call looking like this:

Status = DIO_Write1(&hFFFFFFFD, relayNumber0to15, TrueOrFalse);

Which translated to:(I cut out some details, but you get the idea (that I need some guidance).

Sub IOCard()
Public Declare Function DIO_Write1 Lib "AIOUSB" Alias "VBDIO_Write1" (ByVal DeviceIndex As Long, ByVal BitIndex As Long, ByVal Data As Boolean) As Long

Status = DIO_Write1(&HFFFFFFFD, 0, True)

This avenue isn't going too well, various Windows errors, so after more reading, I thought to maybe try the low-lo-level control functionality ASEC supports. After asking them about this, I got the flowing reply today:

Windows doesn't provide any method of making a "USB control transfer", which is necessary to use the low level interface.

Well, in my blissful ignorance, I am thinking that Assec might just be the ticket to the fast track to success but I'm still digging and have decided to share my thoughts with all of you here on this sight.

So, any thoughts (or questions for clarity)?
 

Brad

Link to comment
Share on other sites

  • Moderators

BradClifford,

Welcome to the AutoIt forums. :)

 

questions for clarity?

Is there actually an AutoIt question in all of that? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I think that device has a library that can be used with autoit.

I see the manual and says this in C

UInt32 GetDeviceByEEPROMByte(Byte Data);
 
so with autoit you could do something like this:
 
DllCall("yourlibary","UINT","GetDeviceByEEPROMByte","BYTE",$Data)
Edited by Danyfirex
Link to comment
Share on other sites

I think I'm wrong in my above answer. so I still think you can use autoit. Look Chapter 5 here

as I can read. when you install the sdk/driver you should have some examples(vb6,C,delphi,vbet,C#)

Just traslate it to autoit.

I've read bad. Autoit can not work in low level. so instead use the win32 library.

Saludos

Edited by Danyfirex
Link to comment
Share on other sites

Thanks Danyfirex,

I'll dig into this more tonight. I got another reply from the manufacturer as follows:

I think it might be straightforward if you use the .NET wrapper dll we created a while back, AIOUSBNet.dll, instead of using AIOUSB.dll directly.

I'll try to put all this together "with a little help from my friends" and see what happens .....

Cheers & thx again for the help

B

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...