I wish to interface a PC with external digital and analogue hardware. A search of UK catalogues found the VELLEMAN VM110 "experiment interface board" as a possible solution. It was advertised as being compatible with VB.
Since ordering and receiving this board, I have been unable to find a suitable .dll (which did not appear to be contained on the supplied CD) nor was there any specimen VB6 program. The only references were to VBNet and VC++.
Could I please ask if any member has used this device and knows of a specimen program with which to run it from VB6?
If this is not regarded as an appropriate post to the coding sector of the forum, it is requested that the moderator(s) transfer the post to a more relevant sector.
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video) My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet Social Group:VBForums - Developers from India
even if it is different model, should get you started
these functions are declared in the form
Private Declare Function OpenDevice Lib "k8055d.dll" (ByVal CardAddress As Long) As Long
Private Declare Sub CloseDevice Lib "k8055d.dll" ()
Private Declare Function ReadAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long) As Long
Private Declare Sub ReadAllAnalog Lib "k8055d.dll" (data1 As Long, data2 As Long)
Private Declare Sub OutputAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long, ByVal Data A
s Long)
Private Declare Sub OutputAllAnalog Lib "k8055d.dll" (ByVal data1 As Long, ByVal data2 As Lon
g)
Private Declare Sub ClearAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub SetAllAnalog Lib "k8055d.dll" ()
Private Declare Sub ClearAllAnalog Lib "k8055d.dll" ()
Private Declare Sub SetAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub WriteAllDigital Lib "k8055d.dll" (ByVal Data As Long)
Private Declare Sub ClearDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub ClearAllDigital Lib "k8055d.dll" ()
Private Declare Sub SetDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub SetAllDigital Lib "k8055d.dll" ()
Private Declare Function ReadDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long) As Boole
an
Private Declare Function ReadAllDigital Lib "k8055d.dll" () As Long
Private Declare Function ReadCounter Lib "k8055d.dll" (ByVal CounterNr As Long) As Long
Private Declare Sub ResetCounter Lib "k8055d.dll" (ByVal CounterNr As Long)
Private Declare Sub SetCounterDebounceTime Lib "k8055d.dll" (ByVal CounterNr As Long, ByVal D
ebounceTime As Long)
also
k8055_source_code.zip
Source code files for Borland C++ builder, Visual Basic 6.0 and Delphi 6.x
probably a better choice for you
Last edited by westconn1; Feb 13th, 2010 at 01:47 AM.
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Akhileshbc : Thanks for reply. Yes, I did try to find the answer through the manufacturer's website, but such info. as there was seemed sparse and poorly documented. The website appears to be in Belgium. It was because of not finding much of use at that site I made the Forum post, in the hope that someone had already trodden this path.
Westconn1 : That info. looks VERY useful. I will read and attempt to use. I am not sure to what extent VB6 code to operate this interface module (which looks to be quite a handy piece of kit and not expensive at around $35US) would be of general interest to this Forum. I will leave the thread open for now, and if I manage to write some good code will post it to this thread.
Thanks as always for your rapid and helpful replies.
Camoore, judging from your past posts you like to interface with external devices. Have you considered the PICAXE series of microcontrollers? They're very inexpensive, easy to program. The Editor/Compiler is free and it's packaged with full documentation and example code. It also easily interfaces to your PC through RS232/VB6/MSComm. They even sell two models of USB/Serial converters made specifically for them for programing the chips. Their converters also recognize the Break command and and after the chip is programmed you can use it to interface VB6 to the chip.
The nice thing about programming your own micro's is that since you wrote the code it makes writing VB code to interface the chip..easy!
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing??
CDrive : Thank you for the tip about Picaxe controllers. I will investigate via their website. And yes, you are very correct when you remark that I like to interface computers with external systems and hardware.
The Velleman VM110 was not of my choosing, but that said it seems a useful board incorporating digital outputs, digital inputs, analogue outputs, analogue inputs plus two PWM output channels. Up to 4 boards can be hooked to the USB simultaneously and individually controlled from VB6.
My problem was getting started with it, since its included CD did not contain dll / VB6 code info. Now thanks to Westconn1 I am well on the track. Inter alia I have now found a comprehensive manual (that supplied with the product was very sparse). For info. I will attach this Velleman manual as .zip. The manual is, if you can find it, freely available on the web. This includes VB code similar to that which Westconn1 kindly found.
Yes, westconn1 is always helpful and seems to gravitate to these types of topics. I suspect that westconn1 is an electron head too!
Here's a publication that has long been a favorite among the Electron Head community. Over the years they've morphed from mostly RS232 interface to quite a bit of information and projects with USB interface.
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing??
despite the fact that mscomm is easy to work with it is about time manufactures started providing usb interfaces, as velleman appear to do
unfortunately i am not really an electronics wizz, though have made some basic boards, nothing to interface to computer, totally out of my league, i guess, repairing dry joints is about my usual limit
maybe i am just good at googling
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
This goes to show the value of a great forum such as this. It brings together souls of different experiences and specialisations. My own specialisation throughout my work phase was analogue and digital hardware circuit design, plus systems engineering. But I never had time (except for 1 year in 1976) to get in any way involved with software. It is only since I retired in 2004 that I started to teach myself programming - which in work days my "softies" were always doing but which I never fully understood. Now I understand a little bit more. I would go so far as to say that I could now do a few things better than did they, but they did not have as much time to spare as the peace of retirement now allows me!
despite the fact that mscomm is easy to work with it is about time manufactures started providing usb interfaces, as velleman appear to do
As long as the programmer has the dll's and syntax to communicate with them, USB is great. So I totally agree.
Last edited by CDRIVE; Feb 14th, 2010 at 10:34 PM.
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing??
This post is to close the thread as resolved, thanks to forum contributions.
At attachment is a VB6 demmo program (courtesy of Velleman) which exercises every function of the vm110 / K8055 interface board. By studying the code, it becomes an easy matter to write one's own progams to control / read the board and interface with the "outside world".
This program relies on a dll : K8055.dll which must be present in the C:\Windows\System folder (98SE) or System32 folder (2000, XP etc.). This dll is contained in the attached package.
Also critical to its satisfactory function are 3 drivers - Hidclass.sys, Hidparse.sys and Hidusb.sys. These should be present in the windows drivers folder. I found that it is ESSENTIAL that the correct version of these drivers be used for the OS. in use on one's machine, and that there have apparently been several versions of these drivers over the years.
Within the attached project folder will be found the drivers which work with Win98Se (V23/04/99) and also much later versions which work with XP.
The CD which comes with the vm110 does not contain these drivers (at least mine did not) and it proved tricky to find them - especially at the correct version - on the web.
I found an excellent Velleman.be support forum at :
at which I received good, fast and most helpful information.
As above stated in this thread, I think the vm110 is a very useful interface card, readily integrated into a VB6 application. It provides 5 digital inputs, 8 digital outputs, 2 analogue inputs, 2 analogue outputs and associated with these last two a pair of PWM outputs. Up to 4 vm110 boards may be connected to a single PC, each having a 2-bit address selected by a pair of jumpers.
camoore
Wales, UK
Last edited by camoore; Mar 2nd, 2010 at 04:36 PM.
Reason: typo
Camoore, thanks for posting this info. If I ever mess with a Velleman PIC it will be very handy.
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing??