The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Using Concatenate Strings to Build Strings

SercoSteveB
Active Participant

What are the values in String Out and String Length Out following execution of the VI?

 

Daily CLAD #21 Build Strings.png

 

 

a)      Starting String01234, 15

b)      Starting String12345, 20

c)      Starting String01234, 20

d)      Starting String01234, 21

Comments
ashwinilele
Member

its A

RustyStrings
Member

The answer is A

the fact that the string length is not modified by the loop means that it would be 15

mini09
Active Participant

Can u please post the picture in little large size .

mini09
Active Participant

I replaced the string constant with array of strings the LabVIEW throughs error? is that because ofI`ve connected to shift register insted of auto indexing terminal?

SercoSteveB
Active Participant

Hi gnshmrthy, thanks for participating and commenting.

The majority of the pictures should be VI Snippets (with the exception of those including implicit property nodes).  You should be able to drag it straight from your browser to the block diagram?

Let me know if this functionality is not working?

Steve

SercoSteveB
Active Participant

I think the error is due to the Concatenate Strings being incompatable with arrays.  It is valid to wire an array to a Shift Register but inside the loop you would need to use arrays compatable functional nodes.

SercoSteveB
Active Participant

Answer A:  Nice one ashwinilele and RS.

Key concepts are that the Iteration Count terminal begins at 0 and increments by 1 for each iteration and that the string length node is outside the loop so it is the length of the string constant "Starting String" is only calculated once (before the loop executes) and is passed to String length Out on completion of the loop.

RustyStrings
Member

Steve

What are you talking about when you say you can drag from the browser to the block diagram

Also what is the easiest way to put block diagram and front panel items in this blog?

I find the process of saving images and the inserting them tedious, and hesitate to do so

SercoSteveB
Active Participant

Rusty

From my posts; the ones surrounded by the dotted line, with 2009 (the version of LabVIEW you are running) in the top right hand corner and some LabVIEW specific stuff in the top left hand corner, should be VI snippets.  Some of my posts are not snippets as VIs which contain implicit property nodes aren't recreated correctly but most posts are.

Check out VI Snippets here: https://decibel.ni.com/content/docs/DOC-7547

You should be able (LabVIEW compatibility version issues aside) to left click drag and drop a VI Snippet from your internet browser window to the Block Diagram of a VI in LabVIEW.  The block diagram of the snippet should be the same as if you'd wired it yourself.  Pretty cool eh?

I am not sure there is an easy way to put a block diagram inside a post, I think VI Snippets are the most useable for the end reader, as they are so much more than just a picture.  Each time I need to include a picture/VI; I am having to save a VI Snippet in LabVIEW and then browse to it, and insert image, from the blog posts.  It is pretty clunky, and annoyingly fails alot.

Steve

pgops
Member

Hi Steve,

When I drag this snippet to block diagram,I am not getting the code,instead just a path is displayed.

ersmt444
Member

Image broken

skian
Member

A