Jump to content

Basic Level Question


Recommended Posts

Having a cluster array, I want to input it into a function, modify some data in the array and then output the modified array. Is there any way I can do this without duplicating the array on the front panel - having the duplicate input array passing information to the output array? So far all I've done is to hide the indicator (input array) on the front panel...

Jeff

Link to comment

To my knowledge, local variables cannot be assigned as inputs or outputs to the 'icon connector' (terminals). This means that I have to duplicate the entire cluter array on the front panel, assign the duplicate the opposite case (either control or indicator), assign it to a terminal, and then hide it so that it doesn't clutter up the front panel. This works but, is a pretty cumbersome procedure. Is there a better way?

Jeff

Link to comment

Thanks pblaze but, you missed my point completely. The connector for your vi isn't connected to anything. How would you call this vi from another, modify the array, and then use the modified array in another vi without duplicating the original input array?

In fact, you could have accomplished the same thing in your vi with just one local variable, not two...

Link to comment

If you want to pass data to a sub vi, then yes you must copy your data structure to the front panel of the sub vi TWICE. Make one a control and wire that as an input. Make the other an indicator and wire it as an output.

In the example I sent, you don't need any locals at all. I just set them up to illustrate that they could both write and read.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.