From: uCer on
thanks, but what is that? I don't use C++ code..
From: uCer on
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


visa.jpg:
http://forums.ni.com/attachments/ni/170/321870/1/visa.jpg
From: Dennis Knutson on
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?
From: uCer on
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.
From: Dennis Knutson on
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 <a href="http://www.usb.org/developers/vendor/" target="_blank">vendor id</a>. 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.