03-02-2016 03:34 PM - edited 03-02-2016 03:37 PM
As far as the RS232 card goes, it looks like it only does RS232, so that's not useful. If I connected that card to my device I would blow it up. See here for differences between RS-232 and TTL (I am using 3.3 VDC instead of 5 VDC, but you get the picture):
https://www.sparkfun.com/tutorials/215
As far as the DIO card goes, I think that brings this right back to my original question. I can't reset a hardware timed task fast enough, but software timing isn't reliable enough, so is it possible to use any DIO card to capture UART?
03-03-2016 09:42 AM
Jo-Jo,
What is the maximum voltage signal you are transmitting and receiving? Regarding your question about rearming your task software timing won't be any faster than the hardware. Although your statement that of the RS-232 is not the same as UART is correct all NI serial hardware is UART compatible as explained before. As long as the specs of the cards support 0-3.3VDC (which many of them do) then you should fine.
Thanks,
03-03-2016 12:14 PM
The logic is 0 to 3.3.
I feel like maybe I wasn't clear. Yes, the DIO cards, including the one I already have, can send and receive single bytes via UART. The problem is that if you want to send several bytes via UART, the timing between bytes is not always uniform. This is why every byte starts with a sync bit. So you can trigger on the synch bit, and then your timing will be OK for that one byte. However, if you want to send multiple bytes, then the task must be able to rearm itself before the next sync bit is received, which at 115200 baud, can be as soon as 10us, or even less. I have been unable to rearm the task that quickly, so hardware timing is not possible. Also software timing is not possible, because you have to be able to read bits to about 10us of accuracy, which isn't reliable.
I just wanted to know if there was something I was missing, since I feel like someone must have run into this probably before, but I get the impression that I'll just have to use a USB to UART device, which is fine. I would just rather not have to use external hardware, as it is one more peice of test equipment I have to set-up, keep track of, worry about, etc.
03-03-2016 12:36 PM
If you have LabVIEW FPGA, there are examples floating around that use an R Series FPGA card as a UART. Then everything is done in hardware and you just use a DMA FIFO to send data and another for recieving.
03-03-2016 12:48 PM
OK, that's makes sense.
Unfortunately, I'm not using the FPGA stuff for anything at the moment, so spending that much for a UART is probably not something I can justify.
Thanks for the answer.
03-23-2017 02:26 PM
Hi,
I am interested in this problem as well. You were running at 115200 and were having issues with the timing of the sync pulse. At lower baud rates this should become less of issue. Do you think that at 57600 you would see less of an issue? I am looking at using these cards for UART as well, but my data rate is 1/2 of yours.
I am curious about your opinion on this.
Thanks,
Drake
03-23-2017 02:51 PM
If you only want to receive a single byte you can do it. Otherwise, you will probably run into the same problems I had even at the slower speed.
Ideally you would use hardware timing, and start when you receive the start bit. This works fine if you only want to receive 1 byte. Unfortunately, you have to rearm the task before the next byte, and I just couldn't get it to rearm fast enough. If you have a faster controller you might be able to do it. It turns out our system is running a little slow.
Software timing is probably out because you aren't on a real-time system, so it is just too slow and unstable. You would be receiving a bit about every 18us. I would be surprised if you could software time that kind of rate with the card I had.
07-19-2017 06:17 AM
Hi guys, I would like to know whether you find a solution for this? I would like to receive every 30 ms a frame of 9 bytes. I have a NI PXIe- 1062Q with a NI PXI-6528 isolated digital I/O board. Do you think I can use this one to only receive those frames at 9600 bauds? cheers!
07-19-2017 06:31 AM
@JOSEGANDICA wrote:
Hi guys, I would like to know whether you find a solution for this? I would like to receive every 30 ms a frame of 9 bytes. I have a NI PXIe- 1062Q with a NI PXI-6528 isolated digital I/O board. Do you think I can use this one to only receive those frames at 9600 bauds? cheers!
Not a chance. That board uses software timing, which means it only runs as fast as your software. You will not get the speeds you need nor consistently sample properly.
So let's back this problem out. What level are your UART signals? TTL (5V digital)? LVTTL (3.3V digital)? RS-232? If RS-232 just get a USB-Serial adapter, preferably from FTDI (people around here seem to have better luck with them). If TTL or LVTTL, find a converter to change those into RS-232 and then use said USB-Serial adapter. Then it is a simple VISA Read to get your data.
07-19-2017 06:52 AM
Hi,
Thanks for your fast answer. Let me explain it better. I have used USB-serial converter successfully with visa in Labview10.. everything worked fine but my usb serial device got broken (14€ hardware so =( ) My levels are 3.3v LVTTL. Is there any board that you can install on NI PXIe-1062Q to manage TLL or LVTTL uart communication? I would like to use realiable NI hardware,
thanks in advance