LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

works in debub/highlight mode but fails in real run


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. 😄

0 Kudos
Message 21 of 24
(873 Views)

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.

 

0 Kudos
Message 22 of 24
(866 Views)

@Jpdas06 wrote:

Here is the VI.  


OK, quick glance at the code:

  1. Are you using continuous run?
  2. The stop button is latch action, no need to reset to default.
  3. Have a look at a simple state machine instead of all these disconnected code fragments.
  4. All these dialog popups are annoying to the user. Just have them enter them on the main front panel in any order and light a green LED for each valid entry. Allow to proceed to the scan once all are green.

Please tell us exactly step by step how you are operating the VI. What you see and what you expect to see instead.

0 Kudos
Message 23 of 24
(863 Views)

@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.


"Should be" isn't "Is" -Jay
0 Kudos
Message 24 of 24
(861 Views)