LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data types in build waveform

a question from a new learner:
when building a waveform, we need to indicate "y","dt","t0"or the waveform input right?
but should "y" be a 1D array or a scalar? I think what I am input to "y"is 1D array. There is a mistake showing "two different terminals of different data types are wired together". Myabe it will be a lot easier if I could show a pic of the block diagram but I don't know how to export it into an image. SORRY!
THANKS A LOT!
0 Kudos
Message 1 of 4
(2,915 Views)
a clearer description of my "y"input is that:  it is the output of a formula node. the formula node is in a for loop. everytime the for loops goes, there will be a new value given to "y". And I need each y to be in an array and then the array of "y" values to be the "y" input option of the "build waveform" function.  Do I need to align each y value into an array manually or it will be in an array automatically as it comes out?  if it is automatically aligned, why it shows that the two terminals have different data types? Thanks for your help!!!!!!
0 Kudos
Message 2 of 4
(2,913 Views)
The input to the Y input is a 1D array. This is shown on the block diagram as a thick/solid wire. You don't describe what is being done in the formula node or what the output data type of that is. When data exits a for loop, the default is to auto-index the output. If the output of the formula node is a scalar, it will be a 1D array when it exits the for loop. If it is a 1D array, then it will be a 2D array when it exits. You can disable the auto-indexing by right clicking on the exit terminal and selecting 'Disable Indexing'. Without knowing what the formula node does or why you have a for loop, I don't know if this will help but I doubt it. Maybe what you need to do is use the Build Array function at the output of the formula node and pass it out of the for loop with a shift register. Attaching your code would help. Just click the Browse button below the message body. If you just want to post an image, select it and then do a CTRL-C and paste it into paint. You could also copy the entire block diagram by using Alt-Print Screen and then paste in Paint. Save the image as either a jpg or png file and post it.
0 Kudos
Message 3 of 4
(2,902 Views)
thanks Dennis for your detailed help! I have tried to get the BUILD WAVEFORM function passing out of the for loop but there are some more inputs i need to get from inside the loop.
I tried to attach the VI this time to show more clearly what my question is
Hopefully it works.
0 Kudos
Message 4 of 4
(2,894 Views)