10-14-2008 02:25 AM
Trying to get Hex values(5000 hex values) from serial and save them in text file but when receive 0A in my data it stop reading rest of data? Like if I am sending 100 hex values and 0A comes on start it only read 1 byte and leave rest in buffer on running code next time it fetch from buffer as 0A is for next line but the data I am receiving from FPGA can send any Hex.
Example:
Input to saved in file after from Read serial.
0100020003000400050006000700080009000a000b000c000d000e000f0010001100120013001400150016001700180019001a001b001c001d001e001f0020002100220023002400250026002700280029002a002b002c002d002e002f0030
but it only read till 19 values as 0A comes, and read rest when code execute second time
10-14-2008 02:58 AM
Hi Ali Afzal,
did you activate the termination char? It should work if you deactivate it.
Mike
10-14-2008 03:11 AM
Hello Mike
Thanks for reply, kindly if you can explain me how to deactivate it?
the values from FPGA are send as HEX but on Serial Read it would be as String ....
Is there way that i can recive the same Hex values and save in text file with each value in new line just like stack
10-14-2008 04:19 AM
10-14-2008 04:54 AM
10-14-2008 06:53 AM
Hi Ali Afzal,
the red marked constant should solve your problem. I recommend to open the serial port only ones outside the loop and close it afterwards.
Mike
10-16-2008 04:16 AM
Hello Mike
Thanks for your help, I have one more query.
Actually I am doing project which require Communication between Oscilloscope(DSO7054A) and signal generators(agilent E8257D and E4438C), as shipment will take time to reach me I have short time period can you guide me for some sort of simulator on LAN if I can run labview oscilloscope simulator on one system and original application on other..... I hope you under stand
Regards
M. Ali
10-17-2008 12:58 PM
Hi,
National Instruments offers the ability to simulate much of our hardware in LabVIEW through our software drivers so you can develop before you receive your hardware. If you are not using National Instruments hardware, I would suggest contacting the hardware manufacturer or searching the web for an appropriate simulator specific to your hardware.
10-28-2008 11:26 PM
Hello
Thanks you ppl for help, i have one more problem regarding the serial,
- First command is send on COM 1 to send data on its ACK as "S" data is delivered on COM port
"3", i want this continues data to be stored on text file. Reading the serial should not be event based, when the bytes stop coming file should save and code exist
Thanks in advance
10-29-2008 09:37 AM