B.B.S
2008-08-07 08:40:19 UTC
Using Labview 8.5 to communicate with an USB device based on AT91SAM7S64 controller.
I has written a labview application that talks to several units and it works good as long as i dont close the USB connection
I wants the application to start talking to all USB devices that are already connected, at the moment i must reconnect all USB connection every time I start the Vi.
If a try to reopen a closed USB connection I got an timeout error when I read data from the device
to illustrate the problem I made a dummy test program. (Added as Attachment as jpg and vi)
Senario 1:
If i plug the USB connector into the computer and start the vi the first sequence works fine.
The second sequence fails.
Senario 2:
If i plug the USB connector into the computer and start the vi the first sequence works fine.
If i unplug and plug the USB connector between teh two sequences both works fine
Senario 3
If I remove the VISA close from the first sequence.
If i plug the USB connector into the computer and start the vi the first sequence works fine.
both sequences works fine without needing to unplug the USB connector.
Questions?
Does the VISA close command send a message to the USB device? can this be the reason for the need to replug the connection?
Does it exist a method to reopen a USB connection that has been closed?
All help is good help :-)
USB_error_example.jpg:
Loading Image...
USB_error_Example.vi:
http://forums.ni.com/attachments/ni/170/347395/2/USB_error_Example.vi
I has written a labview application that talks to several units and it works good as long as i dont close the USB connection
I wants the application to start talking to all USB devices that are already connected, at the moment i must reconnect all USB connection every time I start the Vi.
If a try to reopen a closed USB connection I got an timeout error when I read data from the device
to illustrate the problem I made a dummy test program. (Added as Attachment as jpg and vi)
Senario 1:
If i plug the USB connector into the computer and start the vi the first sequence works fine.
The second sequence fails.
Senario 2:
If i plug the USB connector into the computer and start the vi the first sequence works fine.
If i unplug and plug the USB connector between teh two sequences both works fine
Senario 3
If I remove the VISA close from the first sequence.
If i plug the USB connector into the computer and start the vi the first sequence works fine.
both sequences works fine without needing to unplug the USB connector.
Questions?
Does the VISA close command send a message to the USB device? can this be the reason for the need to replug the connection?
Does it exist a method to reopen a USB connection that has been closed?
All help is good help :-)
USB_error_example.jpg:
Loading Image...
USB_error_Example.vi:
http://forums.ni.com/attachments/ni/170/347395/2/USB_error_Example.vi