LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Method of translation two language

Solved!
Go to solution

Thanks for the advice, I understand that it's right to add my vi. But the program contains a lot of sub vi. I'm not a professional and many pieces of vi I took from the forum and adapted for my project. And this is not a finished project, I'm still working on it. This is my hobby)))

 

"string indicators for" - its a "SET" and " Real Temp "

Download All
0 Kudos
Message 21 of 25
(1,178 Views)

Even without the subVI's, there is still a lot of benefit to us to see a real VI.  We can see the whole block diagram at once rather than sections that may or may not be in other loops.  We can see the other cases of event and case structures besides the ones that are on top when the screenshot is taken.  We can even take your code, rewrite sections of it and show you a way that would be more efficient.

0 Kudos
Message 22 of 25
(1,165 Views)

With great pleasure I will accept criticism and advice !!!

Thank you!

Download All
0 Kudos
Message 23 of 25
(1,160 Views)

This VI is scary.  Seeing the VI shows a lot of problems with your code that may even be the source of your problems.  Those event structures are being abused.

Unless you really, really, really know what you are doing, you should only have 1 event structure per VI.  Embedding them is bad.  Having two in parallel in the same loop is bad.  You may be getting lucky in that you have timeouts of 1 millisecond on them that may be preventing you from getting trapped.

 

Read Caveats and Recommendations when Using Events in LabVIEW - LabVIEW Help

 

You have an event structure for Pane - Mouse Move.  What is the purpose of that?  It is set to lock the front panel.  And it can also queue up an infinite number of events.  Probably each little short segment of a mouse move triggers an event.  It might be taking your VI forever to process all of those events.

 

You have some property nodes where you effectively only execute them if there is a change.  But you have others were you execute them on every iteration of the loop.

 

You can definitely get rid of local variables because you can wire from the source of the data in the loop.  And that large array being indexed has the same operation being performed on large groups of elements. See attached small snippet.

la_BD la_BD

 

Look into subVI's as well.  Trying to capture your entire block diagram crashed the code capture tool because it was so large.  Rethink the architecture.

You should have a few loops.  Once that grabs the serial data and decodes it.  Perhaps an action engine that stores all the current values.  (Look at the Current Value Table, a tool you can find by searching the NI site.)  Like data should be organized in array and clusters.

 

Another loop can process the data that is acquired for decision purposes.  A loop with one event structure can capture the user events.  Have a consumer loop that can send any UI updates as necessary to through a queue.

Download All
0 Kudos
Message 24 of 25
(1,150 Views)

Many thanks for the advice, I will optimize the program.

0 Kudos
Message 25 of 25
(1,114 Views)