02-10-2009 09:06 AM
HI Cory,
First all of this term talk was based on the last character being a "10" or "0A" in hex. If that is still the case try using
Instrument I/O >>> Serial >>> VISA Configure Serial Port to set-up your port. If you take a look inside that VI you will see there are anumber of settings that work together to set the term character behaviour properly. That VI understands what combos to use.
Try giving that VI a wirl.
Ben
02-11-2009 07:25 AM
You called it Ben. I edited my code so that I polled the device twice. The response to the first polling were the 64 bytes I showed earlier. The response to the second polling were the missing 25 bytes. I was able to parse them correctly and check the results against the measurements made by the Windows software that came with the device.
Thanks to everyone for their input.
Corey
02-11-2009 07:35 AM
If you disabled the termination char Labview should not behave like this. I am 100% sure your problem is that the termination char is enabled. Take a look at this sample on how to disable the term char. It is a Labview example

02-11-2009 07:36 AM
Actually Mike Ravens and t06 called it (I gave them Kodus since their observations were the key).
Thanks!
Ben
02-11-2009 08:21 AM
Thanks Ben.
I'm still confused about the original poster's messages. All along he swore that the termination character was not enabled. In the VI he posted in message 10, the termination character Enable was set to False.
What ultimately fixed his problem? Did he in some way actually have the termination character enabled? Did what he say and what he posted not actually reflect his real application?
The only other possibility was that it took longer than the 500 msec wait he had to return all the bytes. I doubt that, but it's possible.
02-11-2009 08:51 AM

02-11-2009 08:51 AM
Here's the code that worked for me. There may be a better way to do it but I didn't have time to dig further into it last night. You can see I poll the device once, read the serial port buffer, wait 250 ms and read the buffer again. I am not entirely clear why this works the way it does since I have the termination character disabled.
In previous versions of this program I incrementally extended the waiting period to 10 s but never got the full configuration message. I also tried hardwiring the "# of bytes at port" to 89 but still only got 64 bytes.
Corey
02-11-2009 08:57 AM - edited 02-11-2009 08:58 AM
Hi Corey,
i think someone already said it, but i didn't found it in your posted vi. See the "VISA Configure Serial Port" function for an example. I think you have to change also the "End Mode for Reads" to "None" (as shown in the example) to get what you need.
Hope it helps.
Mike
02-11-2009 09:04 AM

02-11-2009 09:09 AM
MikeS81 wrote:Hi Corey,
i think someone already said it, but i didn't found it in your posted vi. See the "VISA Configure Serial Port" function for an example. I think you have to change also the "End Mode for Reads" to "None" (as shown in the example) to get what you need.
Hope it helps.
Mike
Message Edited by MikeS81 on 02-11-2009 03:58 PM
So the secret here was the Serial: End Mode for Reads which apparently overrides the setting for Termination Character Enabled? I don't think I've ever used the End Mode for Reads. I would have thought its default value would be None.
I've never had any issues before, but then again, I think I almost always use the Serial Port Configure VI.