LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rs232 or usb 6009?

I need to observe the output of a microcontroller which is the digital signal after AD conversion. However, I am not sure if i can connect the digital signal to the USB 6009 directly and plot the graph to observe the waveform using Labview. Or,  RS232 is the only way to input the digital signal to m PC? I hope to get a reply soon as I have to start my project ASAP. Thanks
0 Kudos
Message 1 of 8
(4,051 Views)
Probably your best bet is to connect the digital signal after A/D to an analogue channel on the 6009.

Good Luck

0 Kudos
Message 2 of 8
(4,043 Views)
You've posted questions here, here, here and probably a few other places I haven't bothered to track down. You posted some code but I can't view because I only have LabVIEW 7.1. If you can save it as 7.1, I would be glad to look at it. Before you post again, let me ask some questions. Is your pic on some sort of evaluation board or is it a board you designed? How are you reading out the registers of the A/D conversion and how is the result being output from the board? Do you have a single digital output where you would have to clock out one bit at a time or do you have an RS-232 port where the boards firmware will present the result as serial communication? It only makes sense to use a computer's serial port if you want to connect to a serial port on your board. If it is a single or multiple digital pins, then the 6009's the way to go but you have to realize that the USB 6009 is very slow on digital I/O. How fast is the A/D conversion being down on the pic? How fast is the digital data being output from the pic?
Message 3 of 8
(4,035 Views)

The pic is placed on an ICD programmable board and program is downloaded easily to pic using a software. The minimum acquisition time is 19.72μs; A/D conversion time is 19.2μs, A/D sample time is 38.92μs.10 bit A/D result will be loaded to both ADRESH and ADRESL registers but 8 bit data in ADRESH will be transmitted wireless to the receiver module. If using RS232 to input data to my PC, an additional chip to boost the signal level up to +/-15V is needed and this is a bit troublesome to me (correct me if I am wrong). So is it possible to display my receiving data in a waveform chart by just using USB6009 and Labview? Hope to hear from you soon. 🙂

0 Kudos
Message 4 of 8
(4,020 Views)
Thank you for your reply. 🙂
 
Why the digital signal is connected to the analog channel and not the digital channel? How am I going to configure the DAQ assistant? What will be shown in the waveform chart? a series of pulse or the original signal waveform?
 
Hope to hear from you soon.
0 Kudos
Message 5 of 8
(4,016 Views)

Okay, that's a little better.

You will never be able to read the output of a serial port with the USB-6009. For one thing, it's too slow. Even at 9600 baud, you won't be able to keep up. The USB-6009 has software timed digital I/O. You can only read a single bit at a time and a 9600 baud rate means an entire byte (8 bits) is transmitted at that rate. Second, even if you could read at the desired rate, you couldn't synch up. You would have to be able to know which bit is which part of which byte is being transmitted and even if add code to determine start bit, data, stop bit, etc. that would just slow down the digital I/O even more. It would appear that you have to use the pc's serial port though I really am not sure you can keep up with the A/D conversion. If the signal levels are not RS-232, what are they? If you could get the data with a serial read, it is easily converted to a format that can be displayed on a graph or chart. That just requires a type cast or the string to byte array function.

0 Kudos
Message 6 of 8
(4,005 Views)

So as what you have mentioned, I have to use usb-to-rs232 to input the data bytes to my PC. Does you mean that I have to extract data from start bit and stop bit? Could you give some advice on the proper steps of display digital signal on graph by using rs232? what should be take note of when using rs232? I am really not familiar with Labview therefore I will definitely need to have a lot of reading.

Thank you for your help and I hope to hear from you soon.

0 Kudos
Message 7 of 8
(4,000 Views)

No, you don't have to extract anything. Your pc's uart will do all of that. all that you would have to do is read one byte at a time. This is all done with the VISA functions. The string returned would be converted to a U8. In the example below, I use the type cast to do that. Then, If you want a floating point number displayed, you multiply the U8 by the bit value . The bit value is the full scale voltage range of the A/D divided by the total number of bits that the A/D has (i.e. 2**12).

Message Edited by Dennis Knutson on 01-13-2007 04:31 PM

0 Kudos
Message 8 of 8
(3,996 Views)