LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to sent/recieve simple USB commands?

Solved!
Go to solution

Hello,

 

Before I start. I've been reading om the internet (USB tutorials, nuggets, etc.) for the last 2 days to get this,

but it is really confusing and I still have no idea how to do this. So I'm asking for your help.

 

I setup a custom USB device in MAX.

 

I need to sent this command:    0x2 M 1 0x3

Were 0x2 defines the start and 0x3 defines the end of the command.

 

I think I have to use a control transfer, but I do not understand what to use at the Index, Value, Request Value,

Request and Length inputs. I also do not understand how to sent Hex, Dec and ASCII at the same time.

Do I need to convert these values?

I would really appreciate some example code. Can I use the VISA commands?

 

Kudos will be given, thank you in advance Robot Happy

--------------------------------
The Enrichment Center is required to remind you that you will be baked, and then there will be cake.

0 Kudos
Message 1 of 3
(6,282 Views)

Hi!

Maybe this can be useful:

 

(it's about VISA communication with USB devices)

 

http://zone.ni.com/devzone/cda/tut/p/id/4478

 

 

Regards,

Marco

Message 2 of 3
(6,266 Views)
Solution
Accepted by topic author SectorEffector

@Heinen wrote:

I need to sent this command:    0x2 M 1 0x3

I also do not understand how to sent Hex, Dec and ASCII at the same time.

Do I need to convert these values?


I am not sure about the Index, Value, Request Value,

 

But about sending your comand....

I assume the space before the "M" and the space after the "1" is not needed,

but the space between the "M" and the "1" is needed

 

 

usb.png

Omar
Message 3 of 3
(6,240 Views)