I am a relatively new LabVIEW user. I am attempting to read the serial output of a PIC microcontroller using a NI USB-232 adapter. The programming of the PIC has set a baud of 55.56k, while the NI adapter is set to 57.6k. I am able to get data from the set up I am using - but the data that the VISA read .vi in labview does not match the data that is being sent by the PIC controller. I have verified the signal from the PIC on an oscilloscope, it is transmitting correctly.
Is the PIC's baud of 55.56k too slow for the NI adapter to understand? According to the specifications, the adapter only works on standard bauds - but I would expect a certain amount of tolerance to those rates. Does anyone know what they are?
P.S. Since I am a new user - I am sure I haven't included all the information necessary to help. Let me know if there is anything I need to include!
The baud rate of 55.56K is not too slow for the USB -232, the problem lies in that this is not a standard baud rate and the USB device cannot be set to that baud rate exactly. In Measurement and Automation Explorer you can set the baud of that device to 56K which hope fully result in better data than setting the baud rate to 57.6K. If you are still having trouble, the 843X series supports non buad rate from 57 b/b to 3,000kb/s.
The question you are asking is not specific to the USB-232. If two asynchronous serial devices are attempting to communicate with each other, they should be communicating at the same rate. In your case, the USB-232 is at a different baud rate than your PIC, so I would expect errors in the data. Specifically, I would expect framing errors as well as the last couple bits to be incorrect.
You are correct that there should be a tolerance. That tolerance is about 2% of the baud rate from our experiments. However, your baud rates differ by more than 3.5%.
I hope this helps,
Could anyone answer if the NI USB-232 Series could be used as REAL interface for getting communication with electric devices (normally used in the energy market: digital relays, metering, etc.). The question is related with the fact that the new generation laptops doesn't have serial ports, and all the communications, as I mentioned, in the operations field is through serial ports but the commun brands just sell "virtual" RS232, that in the end don't get any communication with those devices, maybe regarded not UART's devices. So, I just want to be sure that this interface will have success for our goals... With one "YES" from experience is enough...
Before hand, thanks...
Note: Here are some links about specs.:
Why would you hijack a completely unrelated thread?
I really don't understand your problem. I've used many USB-RS232 adapters and have not had problems communicating to instruments. The NI one works great and I've had great success with inexpensive ones that use the FTDI chip. What programming language are you using and what serial api? Do you require odd baud rates, handshaking?
p.s. Since most people here are familiar with the NI specs, you really don't need to link to them. It's your instrument specs that are a complete unknown.
I'm very sorry about my sin, I'm new in this and, is not my bussiness... I'm not a developer just a user one, and my area of application is related to use interfaces with programs that don't have anything related with NI, maybe they are arcaic, but useful for my job, and without the appropiate interface there is no communication with those ones, that was my own point. I have a OMEGA converter and is not working, but by now that is not important...
If I could buy this device for my own, maybe I wouldn't want to be sure a 100% about the cost effectiveness relationship, but is different when you have to give explanation for everything...
Why I put those links? I don't know, maybe I wanted to share this useful information, I guess the space is not yours, and I didn't receive any complain form NI about it. the market is full of chinese things that doesn't work... You must be proud about your great companies as American. I'm from the third, fourth or maybe tenth world...
Why I commented regarding of this topic? 'cause I didn't find any other topic related, and I've fear about to have a question without answer...
This won't happen again, specially for you Knight of NI, since this is not my bussiness, but let me say that I change the name of the topic.
All of the USB-RS232 converters are 'virtual' devices and there is simply no guarantee that the expensive one from from NI will work any better than the one you have. Perhaps you have the wrong serial cable or perhaps the program you are using is old and uses register reads and writes. If that is the case, then no USB device will ever work. If the Omega converter shows up in Windows device manager as a serial port and you can communicate to an instrument via a program such as Hyperterminal, then you know the problem is with your software.
p.s. You still have not provided the name of the software you are using. If you did that, then perhaps someone here might have used it and could suggest a solution.
Well, first of all, thank you for you kind answer Mr. Knutson.
I still didn't do a test with the hyperterminal, but of course, the converter is detected by the computer, as long as Windows tell me that is installed (driver: PL-2303 Driver Setup Installer, Prolific Edition).
The devices that I'm trying to get communication with, are the multifunctional relays BECKWITH. These devices have the firmware versions: (M-3425A) D-0179 v00.00.26 and (M-3311A) D-0179 v00.00.23. They get communication with computers through the software IPScomm: D-0133V02.04.14 and D-0188V00.00.20, respectively, at a baud rate of 9600, normally, but you can drop this value.
The reason for the comm problem, I guess, is the interface, 'cause I compared the specs between NI devices and the RS-232 specs, and they have different voltages of operation. I couldn't find the Omega USR 2309 specs(http://www.omegatech.com.tw/USR2309BK.asp)
Also, I foundthe following technical fact (Copyright © 1997-2010 Lammert Bies, All rights reserved😞
Hardware specific problems:
RS232 ports which are physically mounted in a computer are often powered by three power sources: +5 Volt for the UART logic, and -12 Volt and +12 Volt for the output drivers. USB however only provides a +5 Volt power source. Some USB to RS232 converters use integrated DC/DC converters to create the appropriate voltage levels for the RS232 signals, but in very cheap implementations, the +5 Volt voltage is directly used to drive the output.
This may sound strange, but many RS232 ports recognize a voltage above 2 Volt as a space signal, where a voltage of 0 Volt or less is recognized as a mark signal. This is not according to the original standard, because in the original RS232 standard, all voltages between -3 Volt and +3 Volt result in an undefined signal state. The well known maxim MAX232 series of RS232 driver chips have this non-standard behaviour for example. Although the USB to RS232 converters outputs of these drivers swings between -10 Volt and +10 Volt, the inputs recognize all signals swinging below 0 Volt and above 2 Volt as valid signals. (See the following link for the author).
But, in spite of that, something tells me that could be worthwhile doing a test with the NI USB-232 Series interface, but of course everything maybe is related with the fact that you mentioned in the beggining, "all those converters are VIRTUALS".
Thanks a lot.
Ok, finally I found another solution, no converters and more reliable solution, the port expresscard/64 or PCMCIA. It could be installed in the laptops with these expansion ports an expresscard or PCMCIA with serial port or whatever application that we find out in the market.
Regards and happy holidays.