LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Development / Buttons don't activte after a few run's @ continious run

Hello,

 

I don't know why, but if the VI runs continiously it stopps after a few loops.

When the buttons were adjusted before run the VI one time everything works like it should be.

If it should run continiously -> after some adjustment it is not possible to adjust the ring buttons any more.

 

Best regards

martin

0 Kudos
Message 1 of 2
(2,171 Views)

One: Don't use Run Continuously unless you are trying to perform specific debugging (not the case here).

Two: Don't use Run Continuously unless you are trying to perform specific debugging (not the case here).

Three: Don't use Run Continuously unless you are trying to perform specific debugging (not the case here).

Four: Don't use Run Continuously unless you are trying to perform specific debugging (not the case here).

 

Got it?

 

Good. Now, as to your VI.... you've got problems.

  • No outer loop to keep the VI running. See points One, Two, Three, and Four above.
  • Hard-coded paths. BAD. What if another user tries to run the VI? Can't, because it would be trying to write to your user folder. What if they try to run it on, say, XP? Can't. because the C:\Users folder doesn't exist there.
  • Lack of understanding of dataflow. In case 1 of your large case you are setting the values of the controls, but are also trying to read their values. Which happens first? Don't know  -->  race condition. E.g., the "append to file? (new file:F) 5" control. Err... constant... Errr... control...  errrr.. something.
  • Using hidden controls instead of constants. This is just silly.
  • Having multiple event cases trying to respond to the same event. This simply makes no sense. Why are you using 2 event structures to respond to the Pane's Mouse Down event?
  • Building matrices instead of arrays. You use the Build Matrix instead of the simpler Build Array function. 
  • Using file I/O for data instead of wires. In case 1 of your large case structure you have a loop that writes to file. Outside of the loop you read that file, transpose it (the Read from Spreadsheet File has an input for that), and then use Delete From Array to extract rows (WRONG: use Index Array for this), and then write out to a new file. Why isn't the code that's outside the loop inside the loop? 
  • What are you attempting to do with the event structures?

 

 I would suggest reading some of the articles dealing with application frameworks, such as state machines and producer-consumer architectures. I think the producer-consumer one will help you a lot.

 

0 Kudos
Message 2 of 2
(2,164 Views)