It is currently Mon Aug 21, 2017 9:33 pm

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: VM140 USB problem
PostPosted: Mon Jun 06, 2016 11:29 am 
Offline
Member
Member

Joined: Sun Jun 05, 2016 8:14 am
Posts: 2
Hello,

I use a VM140 to control the 16 relays of a K6714-16 card and to read the input of 8 analogue 0-10V sensors.
I coded a software starting from the given example in VB.
Everything works fine to control the 16 relays and to readout the value of the 8 sensors.

My problem is that sometimes (ranging from a few minutes to a few tens of hours of use), the card stops working, i.e. it stops reading the sensors values (that are all 0) and I can't activate/deactivate the analogue and digital outputs. If I try to disconnect the card from the software point of view, or simply restart the software and reconnect the card, the card is shown as found but nothing works. The only way is to disconnect and reconnect the usb connection and then reconnect it.

I would like to know if someone encountered this problem before or if someone has an idea of how to solve it?

Best regards,
Arnaud


Top
 Profile  
 
 Post subject: Re: VM140 USB problem
PostPosted: Tue Jun 07, 2016 5:54 pm 
Offline
User avatar
Velleman Support
Velleman Support

Joined: Mon Dec 11, 2006 12:03 pm
Posts: 4926
Location: Belgium
If not yet done, you can try using the updated USB driver and updated DLL available here:
http://www.velleman.eu/support/download ... 8061&type=

Download and extract the package "K8061 driver update v4.0.0.0".
It contains the new driver and new DLL.
For more info: viewtopic.php?f=3&t=15613

One possible cause may be some electrical noise interference from the surrounding equipment:
For more info: viewtopic.php?f=3&t=2295&start=30

Also the power supply connection can cause problems:
Please see the reply from VEL417 in this thread:
viewtopic.php?f=3&t=1543


Top
 Profile  
 
 Post subject: Re: VM140 USB problem
PostPosted: Wed Jun 08, 2016 7:35 am 
Offline
Member
Member

Joined: Sun Jun 05, 2016 8:14 am
Posts: 2
Thank you,
I will try what was done in the two posts.
Best regards


Top
 Profile  
 
 Post subject: Re: VM140 USB problem
PostPosted: Thu Feb 09, 2017 5:16 pm 
Offline
Member
Member

Joined: Thu Feb 09, 2017 4:41 pm
Posts: 8
I have recently purchased a VM140 module. I put in the CD and there was a file which advised me to copy K8061.DLL and MPUSBAPI.DLL to the \Windows\SysWOW64 folder.
I am running Windows 7 64-bit so I assume this is correct so I followed the instructions.

When I connect the board, I get two errors:
Device software installation - Device Driver software was not successfully installed and in the Device Manager there is an Exclamation mark under "other drivers" alongside the K8061 USB interface board.

It is obviously me but I don't know why it is not recognized and installed.

Can you help me please,

Peter Luton


Top
 Profile  
 
 Post subject: Re: VM140 USB problem
PostPosted: Thu Feb 09, 2017 7:26 pm 
Offline
Senior Member
Senior Member

Joined: Tue Mar 27, 2007 12:24 am
Posts: 3431
Location: USA
You will need to download the complete software package from this link.
http://www.vellemanusa.com/support/downloads/?code=VM140
After you unzip the file you find the USB drivers.
You will need to manually install them.


Top
 Profile  
 
 Post subject: Re: VM140 USB problem
PostPosted: Thu Feb 09, 2017 8:14 pm 
Offline
User avatar
Velleman Support
Velleman Support

Joined: Mon Dec 11, 2006 12:03 pm
Posts: 4926
Location: Belgium
To install the driver you have also to disable the driver signature enforcement.

Here you'll find the instructions how to disable driver signature enforcement in Windows 10:
http://www.top-password.com/blog/how-to ... ws-10-8-7/
http://www.howtogeek.com/167723/how-to- ... d-drivers/

If problems occur with the original driver, you can use the latest driver "K8061 driver update v4.0.0.0", available here: http://www.vellemanusa.com/support/down ... 8061&type=


Top
 Profile  
 
 Post subject: Re: VM140 USB problem
PostPosted: Sat Feb 18, 2017 1:13 pm 
Offline
Member
Member

Joined: Thu Feb 09, 2017 4:41 pm
Posts: 8
Dear Velleman Support,

I finally got the VM140 installed and ran the Demo.exe and Daignostic Programs, these worked properly. I then loaded the Demo into Visual Basic 8 and the debugger threw up an error.
The part of the code at which it gave the error was when I clicked the "Connect" button, Button1.
The first line is:
Dim h as Integer
h = OpenDevice() and it is at this point the error occurs. It is described as "BadImageFormatException was Unhandled". An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

Incidentally, I looked up the driver details. There were 4 driver files listed.
C:\windows\system32\drivers\winusb.sys
C:\windows\system32\WdfCoInstaller01009.dll
C:\windows\system32\WinUSBCoInstaller2.dll
C:\windows\system32\WUDFUpdate_01009.dll

I was surprised to see the in the System32 directory

Are you able to help me with this problem?

Thank for your attention,

Pete Luton


Top
 Profile  
 
 Post subject: Re: VM140 USB problem
PostPosted: Sat Feb 18, 2017 4:37 pm 
Offline
User avatar
Velleman Support
Velleman Support

Joined: Mon Dec 11, 2006 12:03 pm
Posts: 4926
Location: Belgium
It seems that you are now compiling a 64-bit application and using the 32-bit dll.
This is not possible in Windows, so the solution is to compile your application as 32-bit.
A 32-bit application can load the 32-bit dll.
Please see this threads for a solution:
viewtopic.php?f=3&t=5363
viewtopic.php?f=12&t=16783

If you anyhow want to write 64 bit application:
- Download the package: "K8061 update for Windows 64-bit OS." from http://www.velleman.eu/support/download ... 8061&type=
The package contains 64 bit version 4.0.0.1 of the K8061.DLL, 64 bit demo software and the USB driver version 1.0.0.2.
Uninstall the current driver if it is the older version (1.0.0.6 dated 19/12/2007) and install the version 1.0.0.2 dated 24/08/2009.
To test: Go to folder K8061Demo (of the extracted download) and run the K8061_Demo.exe


Top
 Profile  
 
 Post subject: Re: VM140 USB problem
PostPosted: Mon Feb 20, 2017 2:32 pm 
Offline
Member
Member

Joined: Thu Feb 09, 2017 4:41 pm
Posts: 8
Thanks for the tip. If I build the Demo for 32 bits I get the BadImageFormat error. I do not get the error about bad image format when I build the program for 64 bit. However, when I try to run the program I get "card not found" instead. The K8061_Demo.exe and diagnostic file both work and detect it as board 0.

There are 2 warnings:

Possible problem detected while building assembly 'K8061demo'. Referenced assembly 'mscorlib.dll' targets a different processor
Possible problem detected while building assembly 'K8061Demo'. Referenced assembly 'system.data.dll' targets a different processor

I am obviously going wrong somewhere but for the life of me I can't spot where.

Cheers,

Pete Luton


Top
 Profile  
 
 Post subject: Re: VM140 USB problem
PostPosted: Mon Feb 20, 2017 4:21 pm 
Offline
User avatar
Velleman Support
Velleman Support

Joined: Mon Dec 11, 2006 12:03 pm
Posts: 4926
Location: Belgium
The message "Card not found" is displayed if the older version of the K8061.dll is used with the new driver version 1.0.0.2.
You can try following to solve the problem:
- Download the package "K8061 driver update v4.0.0.0" from http://www.velleman.eu/support/download ... 8061&type=
- Extract it and copy the K8061.dll from folder K8061_DLL_v4.0.0.0 to Windows\SysWOW64 folder.
- Now the 32 bit version sf the Visual Basic demo should work OK.

In Device Manager (install) / check the driver version 1.0.0.2 is installed.
This driver is included to the downloaded package.

When you compile 64 bit application:
- Download the package: "K8061 update for Windows 64-bit OS."
- The package contains 64 bit version 4.0.0.1 of the K8061.DLL.
- Copy this DLL to Windows/System32 folder.


Top
 Profile  
 
 Post subject: Re: VM140 USB problem
PostPosted: Mon Feb 20, 2017 7:20 pm 
Offline
Member
Member

Joined: Thu Feb 09, 2017 4:41 pm
Posts: 8
Thanks very much, everything is now working. I found the driver installed was 1.0.0.6, I thought this was the latest one but I was obviously wrong.
Thanks once again,
Pete Luton


Top
 Profile  
 
 Post subject: Re: VM140 USB problem
PostPosted: Mon Feb 20, 2017 8:32 pm 
Offline
User avatar
Velleman Support
Velleman Support

Joined: Mon Dec 11, 2006 12:03 pm
Posts: 4926
Location: Belgium
I'm glad to hear it worked out.
Indeed the drivers are from different vendors, this is the reason to the "odd" numbers.
The vendor of the old driver version 1.0.0.6 (dated 19/12/2007) is Microchip.
The vendor of the new driver version 1.0.0.2 (dated 24/08/2009) is Microsoft.
Only the new driver version 1.0.0.2 works well with the new operating systems such as Windows 8, 10 etc.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group