07-31-2014 09:16 AM
Hi, programing in Labview is like jumping from one to another problem...:mansad:
This time I can't get why the main while loop isn't updated at all?!
Ok, there are events and also a case structure, but why isn't the program running at all?
The button (Abspielen) only works when I remove the event structure and the main program (inside of the case).
07-31-2014 09:22 AM
Hi Steffen,
quite a problem with the LabVIEWForum down nowadays?
- Without being able to open your VI right now I guess your event structure blocks your UI. In each event configuration you have the (quick&dirty) option to unblock the UI while the event is processed…
- Don't hide event structures inside cases.
- Process events as fast as possible.
Mind to attach your VI in LV2011?
07-31-2014 09:31 AM
Steffen,
please go for a proper producer/consumer pattern and PLEASE make the diagram way smaller....
Norbert
07-31-2014 09:36 AM
Hi Gerd,
Nice to meet you here. It seems that the down time is quite a while...
I put a event structure inside a case. It might be a mistake, but doesn't solve the problem.
So, I attached you the 2011 version.
btw: I solved the problem I had with saving the data...
07-31-2014 09:47 AM - edited 07-31-2014 09:47 AM
Hi Steffen,
as Norbert said: clean up, make the BD (way) smaller!
- In case of a VISA error your innermost VISARead-loop will spin forever, burning the CPU (and blocking your VI)…
- Do you really need a VISA-timeout of 4000s (or ~66min)?
- Please don't hide event structures inside case structures. They will prone to block your UI…
- Don't create several event structures within one VI. It may work, but it is not considered "good style"…
- Don't delete the label of controls or indicators. In text-based programming you wouldn't do this too. In case the label isn't needed on the FP you can always hide it!
- Don't use local variables, when the terminals aren't used so far…
07-31-2014 11:01 AM
@SteffenS wrote:
Hi, programing in Labview is like jumping from one to another problem...:mansad:
This time I can't get why the main while loop isn't updated at all?!
Ok, there are events and also a case structure, but why isn't the program running at all?
The button (Abspielen) only works when I remove the event structure and the main program (inside of the case).
I have to say this, but unfortunately for us developers... a computer will do exactly what you tell it to. 😄
07-31-2014 11:48 AM
your loop is not running at all because you have put one event structure inside while loop with no timeout case.
so only when you have an event fired that is registered with event structure then your loop will run once and again going to wait for an event to occur.
Learning LabVIEW or any other language is fun. You face some problem when you just start it doesn't mean language is trouble.
You get better by practice and experience.
07-31-2014 12:54 PM
Along with some of the other problems pointed out above
look at this loop:
If the value of "Abspielen" is true this loop will start. and never end.............................Blocking the outer loop from ever iterating again. (at least while "False" is not equal to "True"-- And that is always the case in every instance where I have tested it)
07-31-2014 01:12 PM
Oh my.........
Jeff , i did not scroll down to see that . My fault
Thats a huge while loop
07-31-2014 01:14 PM - edited 08-01-2014 10:32 AM
SteffenS wrote:I put a event structure inside a case. It might be a mistake, but doesn't solve the problem.
The entire code architecture is very problematic.