From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
11-12-2010 04:22 PM
Hello all,
I'm having some problems with strings, could you help me?
I'm using a device linked to my computer in a RS-232 port.
I've configured the VISA Serial properly. When I write a command to my device, the response is something like this:
"XXXXX
YYYYYY
2222
44444
WWWW"
The problem is when I try to read this answer. The string indicator show one line at a time every single loop. And the other commands received are stored in the buffer until their time to be displayed come. I mean:
In the first loop the device answers XXXXX.
In the second loop the device answers YYYYYY but now I've stored this to be shown:
2222
44444
WWWW
XXXXX
YYYYYY
2222
44444
WWWW
In the third loop the device answers 2222 and again stores:
44444
WWWW
XXXXX
YYYYYY
2222
44444
WWWW
XXXXX
YYYYYY
2222
44444
WWWW
How do I configure my blocks to show the complete string?
Thanks,
Murilo
Solved! Go to Solution.
11-12-2010 04:44 PM
Post your code and we can better understand what is going on.
My first though is you are only passing the corrent reading to the indicator.
Are you using a string shift reg with a Concatenate String node?
Post your code and we will have a look.
11-12-2010 07:32 PM
To you have the termination character enabled on the VISA read? If so, the VISA read will stop every time it sees the new line character.
How are you determining how much data to read at a time?
11-17-2010 08:25 AM
I'll try to use a shift register...
What interests me is located only in the third read.
I'll be back to tell you.
11-17-2010 08:27 AM
Despite the broken VI, in the writter is "W?".
11-17-2010 09:41 AM
Hey, it worked perfectly!
Now I'll make some tests to learn how to manage this string.
Thanks a lot guys,
Murilo