LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Nugget: 1 of n : GEtting started with USB communication via VISA

Shane posted

"so.... "Would a parent class for all  USB devices allow adaptation of mouse implementation to other classes of devices?""

Yes that is what I was getting at. It sounded like you were talking about branching the HID class to allow for multiple HIDs. By putting the class HID in a parent class of USB other non-HID devices could be added as children of the USB class at a later time. A suspect very little code would be implemented in the USB class methods but it seems reading the device desriptor would be at that level and the results of that would require casting it as a HID class to be able to access the HID specific stuff like buttons.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 31 of 104
(5,359 Views)

In that case, yes, if the HID class inherited from a base USB class you could have other USB Device Classes inherit from that base class.  You could probably reuse some of the HID class code while creating a sibling class for other USB Device Classes, (Gah!  Too much class!) but it couldn't be inherited from the HID class.  If this were to become a community supported long-term project that would be the way to go.

 

Message 32 of 104
(5,351 Views)
"If this were to become a community supported long-term project ..."
 
I'm game for that provided I can finsih two major projects that are dominating my spare time at the moment. I'll do what I can to support this project.
 
Ben
 
PS  I have never given up on the idea of implementing robot wars with LV and a universal USB driver could be an critical step in realizing that dream.
 
 
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 33 of 104
(5,310 Views)

Hi all,

 

Strangely I get the error 0xBFFF003E using USB raw with a microcontroler from Freescale.

In fact, I can ask for the USB descriptors fine using the MAX and the control in function. Hhowever if I press the command to read them constantly (say 10x very quickly), I receive this error. 🙂

And the error goes to the point of needing to deleting the driver and reinstalling the whole thing again (inf file), so that VISA can recognize it again (in fact, in the system folder it remains there with the exclamation sign).

Not need to say that the I can read the PID and VID from the uC.

 

Is it maybe a configuration from the firmware and somehow it freezes if I request it many times? I don't think there would be a problem in the pipe0 in terms of bandwidth... 🙂

 

Does anyone have any idea?

 

And something else: I have four pipes of communication (except for the default one). EP1_Out (bulk) - command pipe, EP2_IN (bulk) - status pipe, EP3_Out (bulk) - data out pipe and EP5_IN (int) - data in pipe. I'd just like to send a command through the pipe1 to start an AD conversion. Which exactly block should I use?

I am trying to use the VISA write with the string of commands to do that in hex (dependant on my firmware naturally) and trying to read the interrupt frmo EP5 with the data. But doesn't say a word back. 🙂

 

Any information is highly appreciated.

Thx!

0 Kudos
Message 34 of 104
(5,113 Views)

Sorry!

I forgot to mention: how do I select which endpoint I want to send data to? With the bulk-out pipe property node and then just use the VISA write?

Just to confirm and not doing dummy errors..

Thx!

 

Edgar Charry

0 Kudos
Message 35 of 104
(5,111 Views)

Do not make the same question 4 times ! 1 , 2, 3 and here. It is not polite !

 

You could just open a new thread.

Message 36 of 104
(5,107 Views)

Ops...

However I thought that posting it in different threads, more people might have an idea about it and answer it. 

Just a question of probability mate. That's it.

 

0 Kudos
Message 37 of 104
(5,105 Views)

echarry a écrit:

Ops...

However I thought that posting it in different threads, more people might have an idea about it and answer it. 

Just a question of probability mate. That's it.


Wrong...
That's not the way the forums work : a question posted in a new thread will always receive more attention than when appended to an already long discussion. In this later case, if the original posters are not listening (and this is usually the case when the thread is a few weeks old), the post may soon disappear from the front page, pushed down by incoming questions, without any possibility to know if a reply was given. While it is possible to sort threads looking specifically for unanswered questions.
So, post multiplication is not only impolite, it is also counterproductive 😉 
 

 

Chilly Charly    (aka CC)
Message 38 of 104
(5,079 Views)

Chilly,

Way better explanation than "it's not polite".

Well, I started another thread anyway. Let's see what happens..

Thx!

 

0 Kudos
Message 39 of 104
(5,067 Views)

Just for the record (i thought it was obvious) :

The forum is a treasury. If someone has a question, first will search the forum if someone else has make that question and got an answer.

If you post multiple times one question, you also multiply the work someone needs to find that answer.

I believe 80% of questions people have, are answered that way. Only 20%, or less are questions that will be posted in a new thread.

Message 40 of 104
(5,063 Views)