LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I send data to my USB device on endpoint 2

Hello.  I am having difficulty figuring out how to send a series of 5 bytes to my USB device on endpoint 2.  I know that endpoint 2 is a OUT endpoint so the device should be able to receive data.  I have already created a custom VISA driver and I am able to receive interrupt data on endpoint 1.  But what I cannot figure out is how to send data to my device. 
 
 
For example, I want to send 04 FF 3F 0A 55 to my device so that my device can make a beeping sound.  How can I go about doing this? 
 
Can anyone please help me?  Thank you.
0 Kudos
Message 1 of 5
(4,422 Views)
Hello maalex,
You can use VISA commands to write to your USB device.  The USB Instrument Control Tutorial gives more details about using VISA for instrument control. 



This is a very simple way to achieve what you are looking for, just select your USB device from the dropdown menu.  Make sure you use the right termination character!  That would be specific to your device. 

Thanks,

Meghan
Applications Engineer

Message Edited by Meghan R on 04-16-2007 05:15 PM

Message Edited by Meghan R on 04-16-2007 05:15 PM

Message Edited by Meghan R on 04-16-2007 05:16 PM

0 Kudos
Message 2 of 5
(4,399 Views)
Hi Meghan,
 
Thank you for your reply.  This example does not send it to the correct endpoint.  I need the data to be sent to end point 2 of the USB device. 
 
Alex
0 Kudos
Message 3 of 5
(4,378 Views)
Hi Alex,

I apologize, I didn't clearly understand what you were asking.  If you need to specify an endpoint, you have two options.  One is to use the VISA USB Control Out VI, and set the Index to the endpoint you're using (pictured below).



The other option you have is to use a VISA Property Node.  Right click on the property node and go to Select Class»VISA»I/O Session»USB Raw.  Then you can left click on the word property and select USB Settings»Bulk In Pipe.  Then right click on the property node and select Change All to Write.  You can then input your specific endpoint.  (Pictured below)



Thanks!

Meghan

Message Edited by Meghan R on 04-19-2007 05:40 PM

Download All
0 Kudos
Message 4 of 5
(4,355 Views)
Hi Meghan,
 
Thank you for your help.  I realized I needed to use the property node to set the end point and it works.
 
Thanks again
 
Alex
0 Kudos
Message 5 of 5
(4,344 Views)