11-27-2012 10:42 AM - edited 11-27-2012 10:46 AM
@Raghunathan wrote:
Thanks for the tips. My device does not accept a LF as termination character.
I have tried with a white space and also checked for any errors. Still no luck . As you can see from the image below, there is 47 bytes at the Read buffer, excpet that it is hoidden from me - I still dont read it in the indicator named Read Buffer.
I'd turn on the termination character option in the VISA serial config. That way you can dump all those timing delays/bytes at port junk and just wait for the termination character. Hard-coded waits are usually (but not always) a substitute for understanding communications requirements.
[edit] forgot he said he already had the term char option on. I would avoid the use of both the bytes at port and term char at the same time...
11-28-2012 09:34 AM
Yes . That was a great pointer instead of advising to read a tutorial on ASCII !
In a technical forum it's such a relief to see advises that don't presume the OP as a stupid human.
Will get access to the equipment shortly and will check out your suggestion. Thanks.
11-28-2012 09:42 AM
Have you tried checking the size of the data returned? This would help you to also see if you are simply reading not printable/displayable data or are reading nothing.
11-28-2012 01:20 PM
@Raghunathan wrote:
Yes . That was a great pointer instead of advising to read a tutorial on ASCII !
In a technical forum it's such a relief to see advises that don't presume the OP as a stupid human.
Will get access to the equipment shortly and will check out your suggestion. Thanks.
Im sorry if my post offended. You posted to the NI forums so I assumed intelegence
Ignorance and stupidity are quite different. If there had been a knowledge gap the tutorial would have cleared it up. Thanks for the follow up Bill.
11-28-2012 02:04 PM
11-28-2012 10:52 PM
@RavensFan wrote:
There is not much help we can offer in this thread until the original poster comes back with some of the questions answered such as the actual data saved in the indicator as default and uploading the VI, and the number of bytes actually read by the VISA read when it returns.
True . I now will have to check the following as advised :
1. Not use the option of TermChar and BytesAtPort together.
2. See if the characters returned are unprintable.
3. Check actual number of bytes read by the function.
And this will be after two days when I return back to base. Thanks for all the support.
12-01-2012 04:27 AM
12-01-2012 07:49 AM
12-01-2012 08:32 AM
The error/warning code in your picture also shows that some bytes are left in the visa buffer from last read.
Warning code 1073676294 is a information from visa read, that there are still bytes left in the buffer after a read.
http://digital.ni.com/public.nsf/allkb/C96C84C922DC3F978625632500482F78
But since this warning is there in the error cluster before your visa read in your picture, that support the theory that what you get is a new line feed, only one byte. And that this new line feed is leftover from a previous vise read.
12-01-2012 08:35 AM
You could try to clear the buffers before you make your new request. Try using the VISA Clear before you send out your command.