04-09-2010 03:08 AM
Status Ende.
And this is what I get:Status µAI:
I’m guessing that the carriage return after the first line might cause the problem. The next two returns show no problems, they are only about 14 byte long and have no carriage return or linefeed within them. I would really appreciate some help,Thanks in advance Florian P.s.: I don't know if it is of any help but the returned data is followed by a Carriage return and a line feed according to the documentation of the device.Solved! Go to Solution.
04-09-2010 04:38 AM
Ok everyone,
I solved one problem, I now get all my data. If anyone is interested, I put the the read VISA in a while loop that ends when the number of bytes to read equals the bytes that are actually received and the string is not an empty string ( I think that's a double check and is actually not needed ...)
I still have a problem with the termination char, how can I tell my connection to use a carriage return followed by a line feed (\r\n) as a termination char?
thx Florian
04-09-2010 07:19 AM
Florian,
Can you post a copy of your vi?
04-09-2010 08:02 AM
04-09-2010 08:27 AM - edited 04-09-2010 08:27 AM
Florian,
There are a couple of problems with your code. You really don't need the first while loop at all. Since you know how many bytes to expect in return for each command, something simple like this should work. See if you can get this simple vi working.

04-09-2010 08:29 AM
Hello Weyne!
The example you showed is how i started, and it didnt't work. Now with my version I get my data the way I should.
But thanks!!
04-09-2010 08:47 AM
Florian,
Logic in second loop has a problem. Try adding some time delay between the first while loop and the "Bytes at Port".