I desperately need some help with an issue which re-occurs with the VM8090 relay board…
I’m using several VM8090 relay cards in a retail application across 7 outlets and this has been in place for over a year now. However, we occasionally get an issue where the pc is seemingly unable to connect to the com port anymore. My application is written in VBA (MS Access) and doesn’t give any errors when this problem occurs, it’s just that nothing happens on the relay board when the appropriate instructions are sent.
The device is always correctly listed in device manager and when I run the Velleman demo software, it always correctly shows the com port but clicking the Connect button gives the error ‘Failed to Connect. The system cannot find the file specified’. Additionally, any on-board timers previously set always correctly complete and switch off at the correct time. It seems the board is ;working’ but there is an issue with the USB connection - an unplug/re-plug of the usb cable solves this problem every time.
We can go weeks without it happening several times in an hour which is frustrating. Any thoughts or ideas on what causes this please; no other pc issues are evident (i.e. other usb devices seem ok) and it happens on different pcs in different premises? What does this error message relate to, is it a driver issue and is there a more recent driver available (<1 year old?)
Is there any support available on here please? This issue has been posted twice over the last 12 months without a single Velleman reply? Any help would be gratefully received…
Just a guess.
Is there any other equipment on the same breaker?
Maybe a copier, Laser printer something like that?
Do you have everything plugged into a UPS?
Are you getting intermittent brown outs (voltage drops)
Is there something interfering with the USB signal.
I guess you’re suggesting the power to the relay board is a potential issue. The pc is certainly on a ups which effectively means the board is ‘always’ powered via usb. The seperate 12v power to the board is not and we’re not aware of any issues with other equipment so I’d have to assume that’s ok as well. In any case, as far as I’m aware, as long as usb ‘power’ is available, the board is full functional apart from relay operation? If this is not true then I can certainly look to test with a surge protected supply or similar for the 12v.
There are no recorded brown-outs etc. on the ups.
I’m not sure why showing the VBA code would help as the issue is also apparent with the demo program when it gives the error ‘specified file not found’ - is this purely indicating that the usb ‘connection’ is not found?
Having to replug the USB cable to restore the port usually indicates that the port went into an invalid state while an application had that port open. Once this has happened, no other applications will be able to open that port (eg. the demo application) until the cable is unplugged and then plugged in again.
Hence the need to know if the script keeps the port open forever or if it opens the port only when needed.
I understand. I won’t post all my vba code here at the moment but the basic process is that the com port is opened when a particular form is opened and kept open until the form is closed. In practice, this form is left open all day ( 10 hours for example). The error I reported with the demo program is always in relation to having no other applications open. In other words, the application is in use until the relay board seems to no longer respond to commands - at this point we exit the application and test the board with the demo program and receive the error in question. We then have to unplug / re-plug usb cable and restart application which usually gets us back to normal albeit inconveniently.
As a matter of interest, would best practice be opening and closing the port each time a command is sent to the board?
[quote]the com port is opened when a particular form is opened and kept open until the form is closed. In practice, this form is left open all day ( 10 hours for example). The error I reported with the demo program is always in relation to having no other applications open. In other words, the application is in use until the relay board seems to no longer respond to commands - at this point we exit the application and test the board with the demo program and receive the error in question. We then have to unplug / re-plug usb cable and restart application which usually gets us back to normal albeit inconveniently.[/quote]This is exactly the situation that I tried to describe
[quote]would best practice be opening and closing the port each time a command is sent to the board?[/quote]In your situation, opening and closing each time has a big change of solving your problem. So I would certainly advise that you try this
OK - so could I get some ideas on what could be causing the board to ‘go into an invalid state’ please? Is there any logs / events to look for in Windows?
Other than power saving I have no idea what could be the cause. And my idea is that the USB port handle on Windows goes into an invalid/unusable state, not the board per se.