LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

usb communication

Solved!
Go to solution

Hi,

 I have pcb board, contains microcontroller and some relays. I wnated to switch led on\off by sending commands ,and it has usb port for communication. from couple of days i am working sending ascii commands (01,02.. etc) form labview to the board using usb cable. I tried using visa methods by creating raw usb port which can be seen in max. but this dinnot work. Could you please help me in solving this problem

 

Thanks

 

0 Kudos
Message 1 of 11
(6,787 Views)

using visa methods by creating raw usb port which can be seen in max.
Can you post what you have tried?
0 Kudos
Message 2 of 11
(6,776 Views)

I was looking through the LabVIEW forum and cam across this hope it helps:

 

 http://forums.ni.com/ni/board/message?board.id=170&message.id=234317&query.id=1866381#M234317

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 3 of 11
(6,770 Views)

Have you seen this KB?

How Can I Communicate With a Device Using NI-VISA USB RAW Mode?

It would be helpful if you post screenshots of where the device is showing up and if you have had any success in communicationg with this instrument at all.

 

Thanks!

---

Peter Flores
Applications Engineer
0 Kudos
Message 4 of 11
(6,749 Views)
And it would be really helpful if you could explain where you got this pcb, what, if any, code you wrote for it, what type of USB connection it is, and what, if any, drivers you might have gotten for it. For example, a development board may come with an FTDI chipset. There is a driver from the vendor that you install to make the USB port a serial port. Boards may come with a Cypress chipset and there is a driver available for that.
0 Kudos
Message 5 of 11
(6,743 Views)

Pcb board is developed in my company. It has got driver for it. And usb is "raw" (any usb cabel can be used). Yes, when I connect this boars , it comes up in NImax as COM 3. But still I have trouble in sending commands to the board.

I have less knowledge on serial communication using visa.

I have attached document which contains screen shots.

0 Kudos
Message 6 of 11
(6,718 Views)

If you have a driver that makes it a serial port, it is certainly not raw. Raw would required to do things such as write to the different endpoints.

 

What exactly do you mean by 'trouble'? Do you get any errors? Does it work in Hyperterminal? Get that working before you write any code.

0 Kudos
Message 7 of 11
(6,716 Views)

Thanks for the clarification. As I understood that, I don't need to creat usb raw, if I have got driver for the board.

 

Yes, pcb board works in hyperterminal and also, 

For the PCBA tester the serial codes are

o1 to give the PCBA power

f1 to turn the power off

o3 to simulate the latch micro switch is closed

f3 to simulate the latch micro switch is open.

 

I don't know how to send commands to set led or any other switches on\off?

 

Please help.

Thanks

 

 

0 Kudos
Message 8 of 11
(6,711 Views)
Solution
Accepted by sandy1

If your company developed the board, shouldn't someone in your company know how to communicate with it?

 

If you need help with serial communications in LabVIEW, look for serial in the Example Finder.  Basic Serial Write Read.vi will show you one way of communicating.

 

One thing you'll need to pay attention to is if you need to send any termination characters such as a line feed or carriage return (or both) at the end of the string you send out.

Message 9 of 11
(6,709 Views)

I have used PIC18F4550 and successfully communicate it with PC using Virtual COM Port 
But I cant communicate it as a USB ...
i have communicate it by using VB Code ( example on www.sixca.com )
but cant send/receive data from PC using LabView (Although i m sending same Data) 
Plz tell me how to send/receive data using LabView

THNK U

JIMI

0 Kudos
Message 10 of 11
(6,403 Views)