09-15-2005 06:45 AM
09-15-2005 07:02 AM
Hi,
You could have two displays. A small one for the new messge being typed and being sent, and another to display the received messages as well as the sent messages.
The way to do the secong display is to append the strings as they are sent and received. Place a Shift Register (right click the edge of the loop and select) in your while loop. Initialize the shift register from outside the while loop (empty string or any string you want to start the display with). Then wire the left shift register to an Append String (top) with the incoming text / outgoing text. Wire the output of the Append String to the right shift register.
When wiring the previous string to the top of the Append String and simply feeding new text, it should prevent duplicating all the text for each iteration of the loop. I wish I had LV at work, I could do a quick example. A picture is worth 1000 words 😉
JLV
09-15-2005 10:43 AM
09-15-2005 11:50 AM
Hi,
Excellent idea to post a jpg on your website. You can also do attachments within this forum.
OK.. You're getting close. What you need to do is wire an empty string " " outside (left) the loop to the Shift Register. It will turn pink. The inside the loop, continue to wire from the left Shift Register to the top left of the "Append String.vi" which is located in the Strings tools. Wire your existing "String3" to the bottom left (assuming 2 left boxes) of the "Append String". The output of the "Append String" goes to the right Shift Register.
If you want to see the text while the loop is running, then place a string display between the "Append String" and the right Shift Register. Placing a string display outside the while loop will show all of the strings only after exiting the loop. For instance if you want to store the data in a file.
You can add more strings to be appended by selecting the Append String and dragging down. Use Context Help for descriptions of the vi. It is an essential tool (Under Help > Context Help).
Hope this helps,
JLV
09-15-2005 11:52 AM
Hi,
Although you already know this, I will mention it because it is an observation from your jpg image. You cannot run the vi with unwired vi's.
😄
09-15-2005 12:40 PM
09-16-2005 05:48 AM
09-16-2005 07:54 AM
09-16-2005 09:38 AM