LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView bug ?!

Hello community,

 

First of all please forgive my English language errors, English is not my native language.

 

LabView for me is an old love from about... 1996 I thing but... the life take me in another side, in service side of electronic. In concrete I repair electronic modules used in industry, agriculture, forestry etc. machines, but... I have an old good friend that are in the middle of software / microcontrollers / LabView environments. Well, as usual my friend have no o little time to help me. I'm in the middle of a project, I learn (from examples) LabView enough to reach about 50% of my project, this project, when I finish it, I'l send it to my old friend to polish them. For this I bet that will have time. 

 

The project, until now it look like this...

 

MainScreen.JPG

For me looks ok (I'm proud for what I make without knowing LabView, the merit go to Labview because is an incredible pies of software, I'm amazed with them, btw... what I need is to show at my friend, visually what I need, closest possible to future real software, I don't try to demonstrate NOR to my friend or here that I know LabView).

 

Back to my business. Why I write this title ?! My logic say that can be a bug because one time / times run ok another time / times run wrong. My logic say... If I make it wrong - not work ok, if I make it good - work ok. Not some times... ok... some times... wrong.

 

What I try is to cleat the graph, The colored graph not the gray graph. The function that I need is next :

I open a .csv file in the chart to have an guide (the gray line) - this work ok, after that, I push the button "Start" and another transparent graph, start to plot (in real life values from 6 temperature sensors, in this simulation a random alteration of what I charge on first chart). When I push the "Stop" button I need to stop the plotting and let the plotted graf on the screen to see it / analize etc. When I push another time the "Start" button... I need to Clear the old plots and start again to plot from start point.

 

Well... sometimes work ok... sometimes... not work ok. This make me crazy for 3 days. I ask my friend about this problem, unfortunately it pass the Coronavirus recovery and don't have power for this. I can't blame them, thanks Good that it pass this virus.

 

Almost all that I made until now in my project was learned from examples from here from this wonderful community, I learn to open a .csv, to save it to work with arrays, with clusters, with graphs, charts, buttons, sliders, transparencies, and... another tons of function, all this in about 3 weeks, and... I will learn more but... the logic for this function that I need to clear the graph... I don't understand it. the only example that don't work for me because I have 2 buttons in the example are only one button is here https://forums.ni.com/t5/LabVIEW/How-do-i-clear-a-waveform-chart-after-i-press-stop/td-p/713535?prof...

 

To explain what I need I made a simple vi that sound like this (I can upload a vi if somebody want to help me in desired version). For the moment I upload an image;

test_vi.JPG

 

Well... sometimes this vi work ok sometimes work bad, sometimes clear the graph, sometimes not clear the graph and plot from where I stop it. What I need is to clear every time ok the graph.

 

If somebody can / want to help me I thank you.

 

Best regards, Marcelo

0 Kudos
Message 1 of 14
(1,588 Views)

@xipxid wrote:

To explain what I need I made a simple vi that sound like this (I can upload a vi if somebody want to help me in desired version). For the moment I upload an image;


Yes. Please upload the VI. Any version should be fine

0 Kudos
Message 2 of 14
(1,581 Views)

Here you have it in 2020 version.

 

Thank you very much.

0 Kudos
Message 3 of 14
(1,573 Views)

@xipxid wrote:

Hello community,

 

First of all please forgive my English language errors, English is not my native language.

 

LabView for me is an old love from about... 1996 I thing but... the life take me in another side, in service side of electronic. In concrete I repair electronic modules used in industry, agriculture, forestry etc. machines, but... I have an old good friend that are in the middle of software / microcontrollers / LabView environments. Well, as usual my friend have no o little time to help me. I'm in the middle of a project, I learn (from examples) LabView enough to reach about 50% of my project, this project, when I finish it, I'l send it to my old friend to polish them. For this I bet that will have time. 

 

The project, until now it look like this...

 

MainScreen.JPG

For me looks ok (I'm proud for what I make without knowing LabView, the merit go to Labview because is an incredible pies of software, I'm amazed with them, btw... what I need is to show at my friend, visually what I need, closest possible to future real software, I don't try to demonstrate NOR to my friend or here that I know LabView).

 

Back to my business. Why I write this title ?! My logic say that can be a bug because one time / times run ok another time / times run wrong. My logic say... If I make it wrong - not work ok, if I make it good - work ok. Not some times... ok... some times... wrong.

 

What I try is to cleat the graph, The colored graph not the gray graph. The function that I need is next :

I open a .csv file in the chart to have an guide (the gray line) - this work ok, after that, I push the button "Start" and another transparent graph, start to plot (in real life values from 6 temperature sensors, in this simulation a random alteration of what I charge on first chart). When I push the "Stop" button I need to stop the plotting and let the plotted graf on the screen to see it / analize etc. When I push another time the "Start" button... I need to Clear the old plots and start again to plot from start point.

 

Well... sometimes work ok... sometimes... not work ok. This make me crazy for 3 days. I ask my friend about this problem, unfortunately it pass the Coronavirus recovery and don't have power for this. I can't blame them, thanks Good that it pass this virus.

 

Almost all that I made until now in my project was learned from examples from here from this wonderful community, I learn to open a .csv, to save it to work with arrays, with clusters, with graphs, charts, buttons, sliders, transparencies, and... another tons of function, all this in about 3 weeks, and... I will learn more but... the logic for this function that I need to clear the graph... I don't understand it. the only example that don't work for me because I have 2 buttons in the example are only one button is here https://forums.ni.com/t5/LabVIEW/How-do-i-clear-a-waveform-chart-after-i-press-stop/td-p/713535?prof...

 

To explain what I need I made a simple vi that sound like this (I can upload a vi if somebody want to help me in desired version). For the moment I upload an image;

test_vi.JPG

 

Well... sometimes this vi work ok sometimes work bad, sometimes clear the graph, sometimes not clear the graph and plot from where I stop it. What I need is to clear every time ok the graph.

 

If somebody can / want to help me I thank you.

 

Best regards, Marcelo


I respectfully disagree with the logic of your claim.  If it were a bug, it would likely happen very consistently.  By far, the most common reason why it would "work sometimes and sometimes not" is because you have created a race condition where sometimes A wins the race but sometimes B will win.  Another cause of a seemingly random work/not work scenario is if you have uninitialized shift registers that should be initialized.  The results aren't really random, but it could certainly look that way.

 

Unfortunately, I don't have LV 20 at work so I can't be more specific than that; you'll have to wait until I get home.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 4 of 14
(1,572 Views)

@xipxid wrote:

To explain what I need I made a simple vi that sound like this (I can upload a vi if somebody want to help me in desired version). For the moment I upload an image;

 


 

Well, we cannot debug pictures, especially if we cannot see what's in the other cases or how the radiobuttons are configured. It is very rare that one would need value property nodes for booleans inside radiobuttons. Only one (and possibly none if so configured) can be true at any given time, so the booleans are highly correlated. Only the value of the radiobutton is needed to describe the state fully (It acts like an enum).

 

Please attach the actual VI of the small example and tell us how you operate it, what you observe, and what you would like to observe instead.

0 Kudos
Message 5 of 14
(1,572 Views)

See if this can give you some ideas.

 

(... and please give your radiobutton elements reasonable names!)

 

You probably want to refine the actions a little bit. At the moment the chart will stop and clear if you press the start button while it is generating data. Maybe you should have three controls in the radiobutton (start, stop, clear), or maybe add a separate "clear" button.

 

 

Message 6 of 14
(1,549 Views)

Hello again,

 

I'm very sorry about this delayed response but the NI forum rules block my reply at only 2 for first 24 hours, seems that is an antispam measure.

 

@ altenbach - your mod do not even clear the chat 😞 , I modify it and clear the graph but like my vi, sometime clear... sometime not. BTW, interesting approach for same result 🙂 . And if you look at the first picture, on bottom / right on big graph you will see a button named "ClearAll", the separate button that you suggest are already implemented and works great but what I need is do not let the possibility to operator to "Stop" and "Restart" the process because it can destroy a PCB with unfazed time / temperature process. What I need is a "Start / Stop" function for this 2 buttons.

 

@Billco, "I respectfully disagree with the logic of your claim.  If it were a bug, it would likely happen very consistently.  By far, the most common reason why it would "work sometimes and sometimes not" is because you have created a race condition where sometimes A wins the race but sometimes B will win.  Another cause of a seemingly random work/not work scenario is if you have uninitialized shift registers that should be initialized.  The results aren't really random, but it could certainly look that way."

 

Please do not understand that I blame LabView, this is not my intention, and please accept that NOT exist something "perfect" in this world. All that we made, we made around "test / error" principle. Even such a wonderful software like LabView can have "bugs". And this manifestation can be one of them. 

 

" By far, the most common reason why it would "work sometimes and sometimes not" is because you have created a race condition where sometimes A wins the race but sometimes B will win."

 

Well... if what you say in this proposition have something to do with... " Finite-State Machine ", you have link, you are right. I think that the racing condition that you clame CAN be find in my original vi and altenbach mod vi. But close to real explain for this weird manifestation is the Finite State Machin principle.

 

 

xipxid_1-1619602005616.png

 

You have here a vi that give a solution to my problem. This vi clear 100% all time the graph (a small help for somebody that want to use this function), all merit goes to my old best friend Crisu ! This vi respect the "Finite State Machine" principle ! But...

 

As you see in image, is needed an intermediary boolean indicator to firmly inform the history structure about the state of radio buttons !!! This can be a bug because I think that the radio buttons have enough "local variable", "propriety nodes" etc. to inform directly (and firmly) the state of the buttons. Well... are not what I think !

 

This is a bug or not ?! Your opinion are most that welcomed about this subject.

 

BTW... I will open a new subject about let say... "particularly / unusual approach for machine vision cameras" that I don't know from where can I start to think.

 

Thank you very much for your opinions and... BTW... if somebody have a solution for this "Clear Graph 100% time" without an intermediary indicator can post it here... always are pleasant to learn something new 😉

 

Thank you and best regards, Marcelo

0 Kudos
Message 7 of 14
(1,417 Views)

This is definitely not a reasonable solution. 100% CPU use when it is not charting (the wait belongs on the toplevel loop, outside the cases.) You definitely don't need multiple case structures or local variables and value property nodes.

 

A radiobutton control seems overkill if you only have two states. Why not use a single boolean button with two strings (Start & Pause, for example).

 

An event structure will also make things significantly simpler, see attached two examples.

Download All
0 Kudos
Message 8 of 14
(1,390 Views)

... and if you don't want to use an event structure, just use a feedback node and only clear if "start" just changed.

 

Note that the random number is wired across the inner case to enforce dataflow (clearing before adding new value).

 

 

altenbach_3-1619626231555.png

 

 

0 Kudos
Message 9 of 14
(1,385 Views)

Hello,

 

Waaaaw... this things make me a happy day ! Thank you very much for your interest in... elementary vi 🙂 . Fist of all one button version, "Start / Pause" on same boolean button is a good choice is the simplest choice, I think about this variant before that I start to fight with radio buttons. Problem is that the user MUST view "Start" and "Stop" buttons. If I put "Start" and "Pause" will have tons of message "how can I stop the process ?!" or "what make the button Pause" or whatever another stupid questions. People are accustomed to see the "Play & Stop" buttons and not on 2 state on same button !

 

The processor resource, for now... it's my last problem (I have an I9 32Gb RAM... I'm joke) at the end of this project will be one of the first priorities for me. Before end this project I will / need to redesign entire project. I have very much work to do with them. Only the English language correction... (the English language correction will be made it by an English language teacher 😉 ) will be an infinite work 😞 . The help pages, setting page, edit page, compare / analize page... an so on. When I reach this stage... be sure that I ask my friend and you here which is the best method to do this... or that... 

 

But before that I need to don't forget to thank you all for your precious help.

 

Best regards, Marcelo

 

P.S. BTW altenbach... did you see another post ?! https://forums.ni.com/t5/LabVIEW/Particularly-unusual-approach-for-two-machine-vision-cameras/td-p/4...

0 Kudos
Message 10 of 14
(1,370 Views)