LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Not Executing

Solved!
Go to solution

@sambpk wrote:
I unpacked several subVIs after having an issue so that I could easily see where everything was going as it was confusing me with the subVIs and the sequence frames showed up when I did that and I have been deleting them after I fix any problems associated with the subVI. I have a user input for the timing control because my boss wants it to be different each time, I can't set a timing limit on anything because my boss told me not to. I know how to use the cleanup tool, but I press it and it crosses or hides some wires that I needed to see so I leave it the way it is until I fix the issue at hand. I think we all have different preferences on how to code and how we learn from looking at things, I don't understand why you have to be so rude to me about every little thing. You make me worried to post a question, I sure hope you don't actually teach people because I don't think you believe in the no question is a stupid one. I'm trying to learn what mistakes I'm making, I have read the file but I'm not going to be a professional at it by reading a file rather than doing. If you want to be rude to me every time I post something, I would rather you not respond at all and someone who is level headed can help.

Please (please!) use paragraphs and occasional linefeeds and keep the sentences short. It is extremely hard to read such a gigantic block of unstructured text. Your first sentence covers three lines without a single punctuation mark!

 

(I don't think Gerd suggested to use the cleanup tool, more like structure the code more cleanly from the beginning and as you go. I never use the cleanup tool on my own code.)

 

I wish I could help, but your zip files seem to contain some weird stuff and Chrome blocks the download. Curious what's tripping the fuses here.

0 Kudos
Message 11 of 20
(1,116 Views)

Clearly you have a lot to learn in LabVIEW, I'm sure you realize this. The reason your outer loop is only executing one time is this:

FireFist-Redhawk_0-1595000469661.png

 That is an inner while loop inside your main one, with a false constant wired to the stop condition. If an inner while loop never stops, you will be stuck on iteration 0 of any while loops outside of that one.

 


@altenbach wrote:
I wish I could help, but your zip files seem to contain some weird stuff and Chrome blocks the download. Curious what's tripping the fuses here.

That was happening to me to, but there's nothing in that ZIP except .vi files. Was able to download it by going to All Downloads and there's like a "Download Anyway" button or something.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

Message 12 of 20
(1,106 Views)

@altenbach wrote:

@sambpk wrote:
I unpacked several subVIs after having an issue so that I could easily see where everything was going as it was confusing me with the subVIs and the sequence frames showed up when I did that and I have been deleting them after I fix any problems associated with the subVI. I have a user input for the timing control because my boss wants it to be different each time, I can't set a timing limit on anything because my boss told me not to. I know how to use the cleanup tool, but I press it and it crosses or hides some wires that I needed to see so I leave it the way it is until I fix the issue at hand. I think we all have different preferences on how to code and how we learn from looking at things, I don't understand why you have to be so rude to me about every little thing. You make me worried to post a question, I sure hope you don't actually teach people because I don't think you believe in the no question is a stupid one. I'm trying to learn what mistakes I'm making, I have read the file but I'm not going to be a professional at it by reading a file rather than doing. If you want to be rude to me every time I post something, I would rather you not respond at all and someone who is level headed can help.

Please (please!) use paragraphs and occasional linefeeds and keep the sentences short. It is extremely hard to read such a gigantic block of unstructured text. Your first sentences covers three lines without a single punctuation mark!

 

(I don't think Gerd suggested to use the cleanup tool, more like structure the code more cleanly from the beginning and as you go. I never use the cleanup tool on my own code.)

 

I wish I could help, but your zip files seem to contain some weird stuff and Chrome blocks the download. Curious what's tripping the fuses here.


"I unpacked several subVIs after having an issue so that I could easily see where everything was going. It was confusing me with the subVIs. The sequence frames showed up when I did that and I have been deleting them after I fix any problems associated with the subVI." 

 

I'm not sure why you can't download it one is a 2020 version and the other is 2012. The other user was able to open it, so it might be something on your end.

 

This is my very first program ever using labview and I know it will not be perfect in appearance, which I can always go back and clean up but for right now I'm just trying to understand it in my way. 

0 Kudos
Message 13 of 20
(1,105 Views)

Hi Christian,

 

I meant to use the cleanup tool.

But I also wrote to start with those subVIs!

The mainVI needs to be structured by using more subVIs.

 

On my own VIs I don't use the cleanup tool, but many VIs downloaded from the forum improve after using it...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 20
(1,103 Views)

@FireFist-Redhawk wrote:

Clearly you have a lot to learn in LabVIEW, I'm sure you realize this. The reason your outer loop is only executing one time is this:

FireFist-Redhawk_0-1595000469661.png

 That is an inner while loop inside your main one, with a false constant wired to the stop condition. If an inner while loop never stops, you will be stuck on iteration 0 of any while loops outside of that one.

 


@altenbach wrote:
I wish I could help, but your zip files seem to contain some weird stuff and Chrome blocks the download. Curious what's tripping the fuses here.

That was happening to me to, but there's nothing in that ZIP except .vi files. Was able to download it by going to All Downloads and there's like a "Download Anyway" button or something.


Ergh. I had them wired to controls on the front panel before and I was still getting the same type of error.

0 Kudos
Message 15 of 20
(1,101 Views)

@GerdW wrote:

Hi Christian,

 

I meant to use the cleanup tool.

But I also wrote to start with those subVIs!

The mainVI needs to be structured by using more subVIs.

 

On my own VIs I don't use the cleanup tool, but many VIs downloaded from the forum improve after using it...


I did clean up the subVIs thank you for that advice, I was just more concerned with why the program was no longer executing more than once.

 

I know I need more subVIs but I was leaving everything out so that I could see how everything was flowing and diagnose the issue before compacting everything and needing to open several windows of subVIs to look at everything.

0 Kudos
Message 16 of 20
(1,102 Views)
Solution
Accepted by topic author sambpk

Hi Sam,

 


@sambpk wrote:

 


Ergh. I had them wired to controls on the front panel before and I was still getting the same type of error.


Think DATAFLOW: the outer loop can only iterate once ALL code inside has finished. Those inner loops will only finish when you press their stop button - or never right now due to those FALSE constants...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 17 of 20
(1,095 Views)

@GerdW wrote:

Hi Sam,

 


@sambpk wrote:

 


Ergh. I had them wired to controls on the front panel before and I was still getting the same type of error.


Think DATAFLOW: the outer loop can only iterate once ALL code inside has finished. Those inner loops will only finish when you press their stop button - or never right now due to those FALSE constants...


Thank you, I actually just figured this out before looking at your comment. I read the files on all the loops and dataflow, but sometimes I just learn better from doing, making the mistake and fixing it afterwards. Or I just don't notice when I have something silly in there like that.

 

I'm the only person who knows labview at all at my job, so I haven't been able to bounce ideas or troubleshooting off anyone more experienced than I. I've only learned this through videos and posts, so I find it more helpful to communicate with real people on the subject.

0 Kudos
Message 18 of 20
(1,092 Views)

@sambpk wrote:
"I unpacked several subVIs after having an issue so that I could easily see where everything was going. It was confusing me with the subVIs. The sequence frames showed up when I did that and I have been deleting them after I fix any problems associated with the subVI." 

Ah, now I think I understand. You probably did a "right-click...replace with subVI contents". I haven't heard the term "unpack" in this context thus I was confused. This action usually makes the VI harder to debug than having code structured into subVIs. Make sure your diagrams are not maximized to the screen so you can look at more than one at the same time. Typically one would debug the subVIs first, then look at the toplevel code more globally. Making the toplevel code more complicated is not helpful.

 

 


@sambpk wrote:
I'm not sure why you can't download it one is a 2020 version and the other is 2012. The other user was able to open it, so it might be something on your end.

Chrome analyzed the contents and decided that it is malicious and I can't have it :(. Nothing to do with "my end". It is well possible that the detector is currently bugged. Even google programmers make mistakes occasionally. 😄

 


@sambpk wrote:
This is my very first program ever using labview and I know it will not be perfect in appearance, which I can always go back and clean up but for right now I'm just trying to understand it in my way. 

So that's actually quite impressive (even though I haven't seen the code yet ;)). Dataflow is a very simple concept with very few rules that are easy to remember, but  also has incredible power and resulting complexity (similar to the game of go!) Nobody can become a master LabVIEW programmer overnight. A strong background in text programming might actually be a disadvantage because you need to forget some things instead of trying to do a literal translation. Nobody here is criticizing you personally when we criticize your code. Many of us have been programming for decades, have made every mistake once (at least!), and learned from them. You asking in the forum is the best decision you ever made, but you need to trust us. 😄 Good luck!

Message 19 of 20
(1,075 Views)

@altenbach wrote:

@sambpk wrote:
"I unpacked several subVIs after having an issue so that I could easily see where everything was going. It was confusing me with the subVIs. The sequence frames showed up when I did that and I have been deleting them after I fix any problems associated with the subVI." 

Ah, now I think I understand. You probably did a "right-click...replace with subVI contents". I haven't heard the term "unpack" in this context thus I was confused. This action usually makes the VI harder to debug than having code structured into subVIs. Make sure your diagrams are not maximized to the screen so you can look at more than one at the same time. Typically one would debug the subVIs first, then look at the toplevel code more globally. Making the toplevel code more complicated is not helpful.

 





  • Yes, that was what I was doing. But I will try your suggestion next time it was just easy to visualize the wires when they are connected. However, this then just removes the subVI I originally made which was making more issues haha.

@sambpk wrote:
This is my very first program ever using labview and I know it will not be perfect in appearance, which I can always go back and clean up but for right now I'm just trying to understand it in my way. 


So that's actually quite impressive (even though I haven't seen the code yet ;)). Dataflow is a very simple concept with very few rules that are easy to remember, but  also has incredible power and resulting complexity (similar to the game of go!) Nobody can become a master LabVIEW programmer overnight. A strong background in text programming might actually be a disadvantage because you need to forget some things instead of trying to do a literal translation. Nobody here is criticizing you personally when we criticize your code. Many of us have been programming for decades, have made every mistake once (at least!), and learned from them. You asking in the forum is the best decision you ever made, but you need to trust us. 😄 Good luck!

 

  • It's even more difficult for me because I am a mechanical engineering intern with no background in programming besides elementary level matlab coding 4 years ago. No one at my company knows how to program with labview and I only have the summer, so I don't have time to extensively learn everything before starting the code. I appreciate your positive message though, I think sometimes things can be misinterpreted through text.

 

0 Kudos
Message 20 of 20
(1,059 Views)