03-07-2017 04:04 AM
Labview thinks i made a cycle and adds a feedback node but actually i didn't and i dont want that feedback node or any error.
I'm writing at X+L Location and reading from X Location of the same array, that's not a cycle loop.
What can i do?
Solved! Go to Solution.
03-07-2017 04:12 AM
You implemented an illegal cycle (when not using a shift register or feedback node).
Please carefully review the output value connection of vc(s) to the array operations......
03-07-2017 04:13 AM
03-07-2017 04:16 AM
You do have a cycle. The output of the Addition goes into a Multiplication, vc(s). This result is used with a Replace Array Subset, whose result is used with an Index Array, whose result is used in the Select function, whose result is the Y for the Addition.
From what I see, the simple solution is to use the array before the Replace Array Subset for the Index Array.
03-07-2017 04:25 AM
crossrulz ha scritto:
You do have a cycle. The output of the Addition goes into a Multiplication, vc(s). This result is used with a Replace Array Subset, whose result is used with an Index Array, whose result is used in the Select function, whose result is the Y for the Addition.
From what I see, the simple solution is to use the array before the Replace Array Subset for the Index Array.
Exactly but the indexing of the two arrays are different. I'm replacing in a location , and reading from another, so that's not a "dataflow" loop, but just a simple wiring loop which shouldn't be of any problem
03-07-2017 04:32 AM
THAT is a cycle:
03-07-2017 04:56 AM
Is there a way to Ignore this cycle error?
I want my wires wired in this way because the dataflow is not a cycle
03-07-2017 05:04 AM - edited 03-07-2017 05:05 AM
@GianmarcoSbarra wrote:
Is there a way to Ignore this cycle error?
Use a shift register or a feedback node (for pipelining)
@GianmarcoSbarra wrote:
I want my wires wired in this way because the dataflow is not a cycle
You implemented a cyclic construct using dataflow. LV tells you so and many forum users do so as well. I wonder why you have issues in accepting things.... unless you are a fan of alternative facts and fake news.
Also another hint: Programming is about implementing an algorithm, not about "doing what i want to". Either your algorithm is flawed (requiring data before they are generated) or your understanding of the algorithm is incorrect. In either way, it is not going to happen like you want it to because, because it is simply not possible (unless using pipelining).
Last hint: You would have that very same issue in ANY programming language. So don't blame LV.....
03-07-2017 05:12 AM
@GianmarcoSbarra wrote:
I'm replacing in a location , and reading from another
Then Index from the array before the Replace Array Subset. If you are reading and replacing in two different indexes, then it won't matter.
But the reason it is a cycle is due to Rule #1 of dataflow: A function cannot execute until it has all of its inputs and will not output anything until it has completed execution. So since your Index Array depends on data from the Replace Array Subset which is indirectly dependent on the output of the Index Array, you have a cycle.
03-07-2017 05:20 AM
crossrulz ha scritto:
@GianmarcoSbarra wrote:
I'm replacing in a location , and reading from another
Then Index from the array before the Replace Array Subset. If you are reading and replacing in two different indexes, then it won't matter.
But the reason it is a cycle is due to Rule #1 of dataflow: A function cannot execute until it has all of its inputs and will not output anything until it has completed execution. So since your Index Array depends on data from the Replace Array Subset which is indirectly dependent on the output of the Index Array, you have a cycle.
Thank you for understanding what i'm trying to say.
What do you mean with "Then Index from the array before the Replace Array Subset.", i don't get how to implement it