04-25-2017 01:15 PM
Jpdas06 wrote:Thanks for the valuable input and identifying me, altenbach.
It was not meant to be insulting, even though some LabVIEW programmers purist might take it as an insult. 😄 I have the highest respect for text programmers. 🙂
There was also a big logical jump and my two statements are uncorrelated (argument is independent of being a text programmer) and I am sorry because that could be misread.
Typically, seasoned text programmers confronted with LabVIEW (you, maybe?) tend to keep the old habits for a while, for example declaring all "variables" (controls and indicators) disconnected in the top left and then pump everything via local variables and value property nodes in the bulk of the code. This causes extra data copies in memory and since property nodes execute synchronously you also create orders of magnitude more overhead for the same result. Fully embracing the power of dataflow takes a while, but is definitely worth it. 😄
04-25-2017 01:27 PM - edited 04-25-2017 01:28 PM
It was bit insulting as I mentioned to Ben, but I agree that I am still exploring the power of LabVIEW while holding the old habits. I feel more logical when doing so, but thats because I am unable to grasp that copies of same variable taking lot of memory. I totally get that and will optimize my way to reduce the use of property nodes.
I am again posting a picture and pardon me for that, but I got rid of 'Current Field' and set things as following (picture code!), and now it is working. I am using for loop counter to increment the startfield.
04-25-2017 01:30 PM - edited 04-25-2017 03:07 PM
@Jpdas06 wrote:
Here is the VI.
OK, quick glance at the code:
Please tell us exactly step by step how you are operating the VI. What you see and what you expect to see instead.
04-25-2017 01:31 PM
@Jpdas06 wrote:
Hi Jeff
Thank you for the compatible version.
however the modification does the same. the current field doesn't reset after the completion of for loop and operation goes beyond the endfield value. I compared with before modification VI and could not find any change.
I was afraid of that. All I did was disable the numerics that should not be messed with by the operator since the seq structure should be the only way to change them.
I did attach another mod that actually forces the value of current field to be calculated prior to starting the For Loop. As you had it there was no data dependency between the subtract and the loop.