01-27-2012 04:59 AM
Hi,
I'm a beginner with LABVIEW, So please help.
In my application, I need to communicate between PC and a microcontroller (STM32) by USB and then send/get command to/from LABVIEW via USB PC port.
Could you help me please, I hope that someone can share with me a VI which allows read/write to/from USB port.
Thanks for your help
HJe
01-27-2012 05:03 AM - edited 01-27-2012 05:05 AM
Hi,
Wha
There are several solutions :
1) You know how it communicates (maybe it simulate a com port, and you can use VISA Vi's)
2) There may be drivers developped by users that you can find on NI web site. (just search STM32 on NI web site...)
Best regards,
01-27-2012 07:48 AM
Your question is complicated because you have not specified what kind of USB class the USB device is. USB communication isn't like serial, unless the USB device's firmware is written such that something like the FTDI drivers can be used, which basically provide a simulated serial port to your applications. I would strongly suggest you read the USB nuggets by Intaris. The first one: Nugget: 1 of n : GEtting started with USB communication via VISA - LabVIEW - NI Discussion Forums
01-27-2012 09:31 AM
Hi smercurio,
your link in not working. Could you please give me the right link.
I'm using USB virtual COM port class.
Thanks,
HJe
01-27-2012 09:42 AM
01-27-2012 09:43 AM
01-27-2012 09:59 AM
@HJe wrote:
Hi smercurio,
your link in not working. Could you please give me the right link.
I'm using USB virtual COM port class.
Thanks,
HJe
If you are using the USB virtual COM port class then it's much easier. As I indicate, your device should show up as a serial port on your computer. Then you'll be able to talk to it like any serial device, and there are examples that ship with LabVIEW on how to do serial communication.
Have you verified that your computer's device manager recognized the micro as a serial device?