LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My device is complete, how communicate with PC through Labview?

Hi everyone,
 
I have my device developed, it used Atmel91SAM7, usb ports.
At first i have successfully communicate it with PC through REALTERMINAL, now i want through the real USB prot to cmmunicate.
I have a Labview8.0 , i thought i should use the VISA, but the VISA component don't work as i wished,  the created Controller can't display the actuel Port.
Furthermore, how can the LV find my usb device, i have no drive for it, cause it's a new Product.
 
So, what i can do now?
 
Thanks a lot!
Jin 
0 Kudos
Message 1 of 11
(3,451 Views)
0 Kudos
Message 2 of 11
(3,449 Views)

I don't know what REALTERMINAL is but if it is similar to Hyperterminal and the USB ports show up in device manager as com ports, then you can use VISA. Look at the shipping examples for serial communication.

If your USB ports are not emulating a serial port, then you can create your own VISA driver. See http://zone.ni.com/devzone/cda/tut/p/id/4478 for a starting point.

Message 3 of 11
(3,419 Views)

@Mathan wrote:
use devmgr.dll

????  Smiley Surprised 

(Note: I didn't give you the 1-star rating. I'm just confused what this will accomplish.)


Message Edited by smercurio_fc on 05-07-2008 09:10 AM
0 Kudos
Message 4 of 11
(3,411 Views)

That link helps in how to use devmgr.dll to list the USB devices attached to pc.

That's all.

That's a small starting point.

[Note: I like people pinpointing my mistakes.]

Thanks,

Mathan

0 Kudos
Message 5 of 11
(3,406 Views)
thanks, but what is that? I don't use C++ code..
0 Kudos
Message 6 of 11
(3,368 Views)
yes, u are right, i have successfuly programed, it runs, but one error, it seems can't continually recieve data, for example, from ...341, 342, 343, 344 then jump to 1001...every thousand like so. but it works in gear when use RealTern,  the stucture please see Attachment.

now, i know that at least i can through LV access my device, but my aim is using USB Port,
but i don't have a  USB vendor ID and product ID,  how i  can do that forward?

Thanks very much!

Jin



0 Kudos
Message 7 of 11
(3,358 Views)
I don't understand what you mean by 'aim is using USB Port'. If the port is emulating an RS-232 connection, then you are using the USB port. You would only need a vendor/product id if you were to create a driver from scratch and not use the serial emulation capablility. Since it can communicate with VISA now (even with some occasional errors), what would be the point? It would be easier to fix the existing problem. What are these numbers you are receiving? How often are they sent by  your device?
0 Kudos
Message 8 of 11
(3,347 Views)
thanks for ur answer, I mean that  my aim is not to emulate an RS-232 connection, but a real usb connection, now the Port  is a Virtual COM Port, I want see it als a USB device..so that i must  buy a usb vendor if i want to develop a real usb device?

the point error, the number is the packet ID, begin at 1, it is a 32 bits integer. the send frequence should be circa 40Hz. It works very good when i use the tool RealTernminal, but with LV  it seems that many packets are lost! I think the proglem is at the LV, but i can't find where is wrong.




0 Kudos
Message 9 of 11
(3,333 Views)

Well, emulating an RS-232 port is a valid USB connection as far as I am concerned. I think all you would be giving up is some data transfer speed.At 40Hz, you don't need USB 2.0 speed.

If you are creating a commercial product, then you will need a vendor id. For a one-off and something used internally, you might be able to just make one up. When you eliminate the RS-232 emulation, you then have a couple of options. You can use the driver wizard and use the VISA USB RAW or you can create a driver in C/C++. There is a lot of help in other forums for creating C based drivers. I'm guessing that the vast majority of USB devices ship with this type of driver and not a VISA based one.

0 Kudos
Message 10 of 11
(3,321 Views)