LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Test USB Packet transmission using Ni TestStand and LabVIEW -urgent

Hi

I would like to test packet reception and transmission of communication at a certain baud rate using usb ( actually I used a serial to usb adapter) in NI TestStand and LabVIEW

I would greatly appreciate if you could help me to start with a smiple code to do it in TestStand and LabVIEW. I suggest I need to use NI Visa to do it

0 Kudos
Message 1 of 9
(2,691 Views)
If it's as simple as sending and sending RS232 data, then you can start by looking at the examples on LabVIEW. They do use VISA and it's actually irrelevant whether you have a USB-RS232 adapter our the pc has a built in port.

What do you need to send back and forth from TestStand?
0 Kudos
Message 2 of 9
(2,682 Views)

Thanks Denis

 

I would like to send a string and see the received text is the same or not. just simple checking. I could find this sample on the ni website unfortuantely the LV files are written in a very old LabVIEW version and I cant open them either in NI TestStand and LabVIEW 2012 . Could you please help me on this to open in NI TestStand and LabVIEW 2012

http://ftp.ni.com/pub/devzone/epd/instrumentcommunications.zip

 

This is for the communication using Serial port. Can I use the same VISA functions for USB communication?

Many thanks

 

 

0 Kudos
Message 3 of 9
(2,674 Views)

Further to y previous post, how can I configure usb in LabVIEW. for exaple for serial port there serial VISA functions so I can easily set message bits etc

but what about usb. How can I configure USB with VISA to stablish the connection

many thanks

0 Kudos
Message 4 of 9
(2,671 Views)
Comparing data sent with data received is trivial. You just use the equal function.

As I already said, USB is irrelevant. Of its a serial port to windows, its a serial port in LabVIEW.

Stop digging up ancient examples. Just open the examples you already have.
0 Kudos
Message 5 of 9
(2,668 Views)

Denis is there any way to open it in NI TestStand. I think it will be a good example for me to see how to do it in TestStand

also as I said I read and write using USB port not serial port. My client is desided to use USB so I want to use an adapter. but as I mentioend finally I real and write using USB post.

0 Kudos
Message 6 of 9
(2,663 Views)
You are simply not paying attention. For the last time, forget about USB. The driver for the widget makes it a serial port. All serial function are used. No USB specific functions are used.

Ancient code can be posted to the Version Conversion board. If it's that old, it probably didn't use VISA. The examples you already have will work better. Have you even bothered to look at them? This sounds like a trivial task. Have you just started with LabVIEW? There are several on line tutorials that you should take.
0 Kudos
Message 7 of 9
(2,658 Views)

sorry for asking the question again. I got it now

The example I already have has been downloaded from the link I posted here and as I mentioned I coudn't be able to open it in my machine. The version is LV 5.1

As you mentioned there are more examples I will search to find something else. Many Thanks

0 Kudos
Message 8 of 9
(2,653 Views)

As Dennis has been saying, try the current examples, specifically for serial port communications if you are using a USB to serial adapter at each end. The examples he is talking about are the ones that you can find, when you are in LabVIEW, on the Help:Find Examples toolbar. do a search on serial and you will get a number of examples. When the USB-serial adapter is plugged in it should show up in the National Instruments "Measurement and Automation Explorer" also refered to in some of these threads as "MAX", a utility that is installed when the VISA drivers were installed. Opening this will allow you to see what "COM" number is created when the USB-serial adapter is plugged in.   When doing a test of an end to end serial communications (which is what you are doing in effect) it sometimes is a good idea to reverse the sent string of characters and send them back in reverse order. This will prevent the possibiltiy of shorted wires in your serial link just "echoing" back what you sent (if pins 2 and 3 are shorted the outbound message string will appear on the same port's inbound side, regardless of what else is connected at the other end).

 

 

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 9 of 9
(2,638 Views)