03-06-2013 06:47 PM
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
03-06-2013 07:52 PM
03-06-2013 09:27 PM
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
03-06-2013 09:41 PM
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
03-06-2013 09:50 PM
03-06-2013 10:08 PM
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.
03-06-2013 10:22 PM
03-06-2013 11:06 PM
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
03-07-2013 07:47 AM
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).