04-05-2012 06:54 AM
I am doing a project in labview and i have to complete it as soon as possible. My project is to collect data from DAQ card and write it to serial port. I am using 4channel DAQ card. But i have to send 17channel data to the serial port. Since my daq card is of 4channel i have to add zeroes to rest of the 4channel data for making it a 17 channel data. The data should be sent at the rate of 9220 bytes per second. and the baud rate is 921600. The order at which data has to be sent is ( 2byte of 1stchannel data 2byte of 2nd channel data .......................2byte of 17th channel data). what should i do??
Thanks and regards
04-05-2012 03:52 PM
What, in particular, is the problem?
04-05-2012 04:29 PM
I'd like to know how you intend to get a baud rate of 921600.
04-06-2012 03:19 AM
Hi,
the data that i am sending to serialport has to be received by another software whose baudrate is same as what i have mentioned before..I have to send data according to that software's specification. the problem is how i can send the data in this format ( 2byte of data from the first channel,2byte of data from the 2nd channel, ...upto 2byte from the last channel).....what i have to do?
thanks and regards
04-06-2012 08:28 AM
VISA Write accepts a string of bytes, so if you have an array of bytes you just need to use the Byte Array to String. You have to put the data together as needed based on what the expected format is.
I don't think you understood my comment about the baud rate. You can't get a baud rate of 921600 on most serial ports. You need to have a UART that specifically supports that speed. Do you have one? If you have a serial port on your PC, you will need to check with the manufacturer of the motherboard to see if the UART they used can support that speed. If you don't have a serial port on your PC, then you need either a plug-in card or an external USB device. I think the ones made by NI top out at 230k.
04-10-2012 07:52 AM
Hi,
actually i have to design acording to the othr software to which i have to send the data; and this software is also running in the same PC . so what i need is to send data to this software through virtual serial port. i dont know how to convert the data from four channel daq card into string. one sample is represented by 2byte and the data has to be transmitted as a string (2byte of 1st sample ;2byte of 2nd sample; 2byte of 3rd sample ;2byte of 4th sample and the series is repeated.)
04-10-2012 07:58 AM
The Type Cast function will convert any datatype into a sequence of bytes (as a string). If you need to be concerned about endianness, then use the Flatten To String function, which allows you to specify endianness.
04-10-2012 08:21 AM
the main problem is i have to divide this four channel signal in such a way that the first sample of the 1st channel has to be transmitted first , then the first sample of 2nd channel , then 1st sample of 3rd channel , then 1st sample of 4th channel and this series is repeated. i want to know how it can be done....
04-10-2012 08:57 AM
You wire it up that way. The order of the bytes in your string are going to be the order the VISA write sends them out of the serial port.
I really don't understand where you are having a problem.
Perhaps you need to attach your VI so we can see what you are doing now.
04-16-2012 04:35 AM
hi,
i have sent data from one channel of daq to the serial port. the other software in the same was able to read the data i had sent. but the problem is there is distortion in the waveform. i have connected a function generator to send sine wave to the daq channel. i saved the output of the daq to text file and checked in matlab.then i got a nice waveform. but after connected the DAQmx to serial i saved the data from the daq card to text and checked the waveform...i got a distorted one. i have included the block diagram and distorted waveform picture...can you please help me in solving this....the waveform from daq is not continous..maybe because when visa serial port works ,the daqmx stop receiving the waveform..what modification should i do
thanks and regards