From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control USB device with LabView

I want to control a microcontroler with labview via USB
The Problem is " How can I connect / Identify / Communicate My device ?"

PS : I'm Beginner
 

0 Kudos
Message 1 of 8
(5,953 Views)

See this example and also a bulk of threads available on this forum regarding SERIAL communication.

 

http://zone.ni.com/devzone/cda/epd/p/id/2669

 

 

 

0 Kudos
Message 2 of 8
(5,946 Views)

Well, that’s a little long to explain in a post.

Which microcontroller do you want to use?

What are you suppose to control/acquire with the microcontroller?

 

Also, what languages do you speak? I may have two tutorials that explain the creation of an acquisition card from scratch but they are in Spanish.

I use them as a base to make my own USB card with 3 AI at 16bits, 4 DI/4DO, 1 AO at 8 bits, a PWM output and RS232/RS485 extension ports.

Nevertheless as I said before, that project requires some time as you need to build the hardware (which is quite error prone at the beginning), fight with the proper driver (and the compatibility issues since it is not signed by Microsoft), then create and debug your own communication protocol and etc...

So my recommendation is that you find a good tutorial online, set up the hardware and driver, and only when Windows detect your pic, we can talk about the labview program to communicate.

Sorry not to be of more help,

0 Kudos
Message 3 of 8
(5,941 Views)

HiSmiley Happy

 

First of all I would have taken a look at this, this and this.

 

The communication is not so hard at all. You need to create a driver with the VISA Driver Wizard. Then you need to create your own commands that the microcontroller and your LabVIEW software recognize. These commands will be transfered with for example the basic serial read/write. We're doing this project at the company I work, and it was quite easy to get it to work. The only problem was that the C code developers and I could never agree on what the commands should beSmiley Very Happy 

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 4 of 8
(5,937 Views)

If your microcontroller shows up as a serial device in the system (Virtual COM port) then DO NOT start programming USB unless you want

 

1) to waste your time

2) to go crazy

3) failure

 

If the device shows up as a com port (FTDI chip) then use serial programming (as the first reply mentions).

 

Shane.

0 Kudos
Message 5 of 8
(5,922 Views)

I agree with Intaris, but I had one case where this did not work.

 

We bought a HAMEG HMP2030 porwer supply and installed the driver. It showed up as a virtual COM 3 port in MAX, but all communication with it failed. I had to create a VISA driver to be able to communicate with the device. I'm not quite sure what the problem with the serial communication was, but the VISA driver solved it. 

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 6 of 8
(5,887 Views)

Dear Even,

I have a problem with driver for Hameg HMP2030. maybe you wanna share the VISA driver that you created 😉

0 Kudos
Message 7 of 8
(5,779 Views)

Hi Even,

 

we (at ASML) have a HAMEG HMP2030 too, the labVIEW driver downloaded from HAMEG site returns errors. Did you use this driver? And if it is possible can I use your solution as well?

 

best regards,

Miranda

0 Kudos
Message 8 of 8
(5,728 Views)