02-19-2014 11:17 AM
Ok, let's take a step backwards. What exactly are you sending to your computer?
02-19-2014 11:18 AM
02-19-2014 11:23 AM
OKay, I am receiving data such as 123, 24,10 001,..............................990, 1023 and son on.
If I append termination character 0xA at each end of string, will the termination letter effect the string or mix the contents of string because it might be that string content will match to termination letter contents??????
02-19-2014 11:25 AM
I am sending that data such as 123, 239, 457, 789, 430, 782, so on. But after using convert circuit that I make myself will convert the decimal to ASCII.
02-19-2014 11:26 AM
02-19-2014 11:37 AM
@ Yamaeda
OKay, I am receiving data such as 123, 24,10 001,..............................990, 1023 and son on.
If I append termination character 0xA at each end of string, will the termination letter effect the string or mix the contents of string because it might be that string content will match to termination letter contents??????
02-19-2014 11:51 AM
02-19-2014 12:27 PM
@Haris115 wrote:
OKay, I am receiving data such as 123, 24,10 001,..............................990, 1023 and son on.
If I append termination character 0xA at each end of string, will the termination letter effect the string or mix the contents of string because it might be that string content will match to termination letter contents??????
This is why I am asking what you are sending. BE VERY SPECIFIC. Are you sending ASCII characters the print to be numbers (ei: "0") or are you sending binary data, one character for each number (ei 0x0")?
And you are apparently getting data from something else. What is the protocol the instrument is using?
02-19-2014 12:36 PM
The device is sending data in numeric such as 230, 340 so on.
The my device will convert random numeric data to ASCII for compatible in Pc.
02-19-2014 12:57 PM
So you are recieving 2 bytes from the instrument and converting those into ASCII characters. I say 2 bytes since you want a value greater than 255. So after each converted number, you add your termination character.
So the instrument sends binary 230 (0x00E6). You take that and change it to "230\n" (using C notation there). Then in LabVIEW, you just read something like 10 characters (yes, that is more than you will actually read, that is on purpose). The VISA Read will return to you "230". You can do whatever you want with that data.