Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

read 4Mbit daa with high speed serial communcation

Hi all,
 
I have Board with µC und extern 4 MBit SRAM. Sensor data will be saved in this Memory.  with hyperterminal kann I read all data and save it in File. but with labview I can not do this. the minimum baudrate from Rs232 must be >= 115200  no parity, 1 stop bit, no Hw Check. I serched this forum for the last 2 day but I didnt find any  end solution. I tested Flush receive Buffer and set size Of buffer but I think I do any thing false.
 and her is my base Vi
 
0 Kudos
Message 1 of 7
(4,133 Views)
What exactly is your problem? You have nothing in the VI for writing to the file and you are only doing a single read. The time delay you have is not enough for all all of the data to be transfered by your device so I can understand if you are only getting a partial set of data.
0 Kudos
Message 2 of 7
(4,128 Views)

firstable with this Vi I will only test read Data and if it work I will save it in File.  Is it possible to read all data in a singel read? I tested with other delays  but I receive only a part of data?

I Have 22000 Line  termineted with CrLf to be read.  I send the  d\r\n and I Have to read all data. is that possible? if not any other suggestion!!

I will be happy for any suggestion with changing my VI

Thanks

0 Kudos
Message 3 of 7
(4,109 Views)
You could put the VISA Bytes at Serial Port and VISA Read inside a while loop. Exit the while loop when the number of available bytes is zero. You could also specify a fixed number of bytes to read and again in a while loop, keep reading until the number available is zero. In this case, the VISA Bytes at Serial Port would be used as a check. Every iteration, the number of bytes available could be checked against the fixed byte count. If the number available is less than the fixed count, use the number available. Using a fixed byte count might be better instead of trying to transfer a large number all at once.
0 Kudos
Message 4 of 7
(4,094 Views)
Thank dennis for your replay,
I have tested different suggetion. I still not see anyy or only partiell data.
 
0 Kudos
Message 5 of 7
(4,071 Views)

Try it without the flush buffer. You have that after your wait and all that will do is delete whatever has been sent already. If you want to do a flush buffer, do it after the VISA Configure Serial Port.

Also, the shift register and string concantanate is going to use quite a bit of memory if you do manage to read 4M of data. It would probably be more efficient to save to file as soon as the data is read. Using Write Characters to File is not the best function to use in that case. Every time it is called, it will open and close the file. Using a lower level function such as Write Text File would work better. You would open the file before the while loop starts and then close it when done.

0 Kudos
Message 6 of 7
(4,062 Views)

Hi Dennis,

Thank YOu it s running.

I tested without the flush buffer. and the delay time of 1000ms is in the loop. I used the Write to text file too. 

Best Regards

Rachid  

0 Kudos
Message 7 of 7
(4,042 Views)