08-30-2013 12:52 PM
it goes something like this
i want the FGV to have a cluster of two 1D arrays of double (that will be the FGV variable). and the data that i'm "adding" is a double number/constant (whatever), this will be the added variable.
the main idea is that i want to be able to select to which one of the two i'm adding the additional number and i think it's pretty easy to accomplish with case structure and a simple boolean control (reference), that is what i've done.
the problem is that if i don't connect anything to the shift register of the FGV labview doesn't recognize it as the FGV variable i've described and if i do, it's an additional input which i don't want to use later.
in theory, i can make my additional variable to also be a cluster with two 1D arrays of type double within, however, since my input consists of only one number, i'm not sure how to accomplish it.
thanks in advance.
it would be good to know if something like this is even possible. (first option)
Solved! Go to Solution.
08-30-2013 01:57 PM - edited 08-30-2013 03:00 PM
It is a bit difficult to understand what you are saying without seing your code, but you could use globally initialized feedback nodes instead of the shift registers.
Please show us your code.
08-30-2013 02:26 PM - edited 08-30-2013 02:27 PM
I'm not sure what you are looking for. Something like this?
08-30-2013 04:20 PM
it would look something like the one i've attached, we were taught to build FGV as a single iteration while loop with an uninitiated shift register.
the reference node input is just for the location selection, ie first array or second.
i want to disconnect the cluster since it would initialize to zero the data i already have inside but if i disconnect i get black lines (labview doesn't recognize type of wire).
it will eventually be turned into a subVI with threeinputs (hopefully), new data, set/get (Enum) and the reference node.
the output would be just the selected array.
08-30-2013 04:25 PM - edited 08-30-2013 04:26 PM
Your shift register needs to be uninitialized. (at the moment you are initializing the shift regsiter with every call of the subVI).
Create e.g. an "init" state to initialize from the inside, or use the "first call?" function.
(It really does not help much to attach pictures. Please attach the actual VI instead.)
And why are you using a reference instead of a boolean wire? Looks very strange and convoluted.
08-30-2013 04:42 PM - edited 08-30-2013 04:44 PM
please bother to read the entire message and not just take a look at the picture.
as i already wrote, this will be a subVI and i need the boolean value to be read every time (the boolean itself isn't "near" and it doesn't look good if i wire it directly, i might be wrong, but this is the way i want it for now).
i know that the shift register needs to be uninitialized, that's what i wrote, i also wrote that if i disconnect, the wired become black (which is to my understanding means that labview doesn't recognize the data type of the wire).
p.s. if i initialize inside (3rd state), from the way i understand, i would have leading zeros in my data arrays which i definitelly don't want/need.
08-30-2013 04:57 PM
If you want to come here to get advice, you might not want to bite the hand that is feeding it to you. This is what altenbach suggested (or something similar).
08-30-2013 05:20 PM
when somebody repeats what i write as a direction, that tends to get to me.
thanks for the suggestion, does this initialization mean that the first call would make it start with zeros? i don't need a first zero element but if there's no other way, i guess i can work around it.
08-30-2013 05:53 PM - edited 08-30-2013 05:54 PM
No, on the first call it will have two empty arrays.
(You still should attach VIs instead of pictures!)
08-31-2013 06:38 AM
thanks, next time i will.