06-11-2019 10:25 AM
@Emna20 wrote:
hi,
i want to know if there is any other solution for this topic : https://forums.ni.com/t5/LabVIEW/how-can-I-make-vi-run-faster/m-p/3931129#M11171833
Typically one good solution is sufficient. How many different "solutions" do you actually need? Have you tried any of the suggestions? Did you encounter any problems?
06-12-2019 06:24 AM
@
hi ,i add a refresh button to the database code . i want to know your opinion to my code .
06-12-2019 06:39 AM
If it works as expected, then it is good. Do you want a code review? Does the code do what you expect? Are you having any problems? Have you tried all that was suggested? Please share code and not pictures.
- A button named "button"? Really?
- Use the event structure to trigger on the "refresh button" instead.
06-12-2019 06:41 AM
You cannot mix polling (the Boolean\case) with events!
Add a refresh value change event to the event structure. Put the refresh code in it. Put the result in a shift register.
Add an ID value change event to the event structure (remove it from the shared event with Button). Put the ID code in it, using the data from the shift register.
Rename Button to Stop.
When done correctly, the refresh will refresh, the ID will update the name\brand\reference and Stop will stop.
06-12-2019 08:08 AM
hi ,
@thols you find below my code ( button mean : Home button )
@ wiebe@CARYA what do you mean by put the result in shift register (while loop + Shift Register or for loop +Shift Register ) more explantation please .
06-12-2019 10:28 AM
I already described what to do long ago.
Your above code is completely useless. Why would you need a case structure if both cases contain identical code???
06-12-2019 10:42 AM
@altenbach wrote:
I already described what to do long ago.
Your above code is completely useless. Why would you need a case structure if both cases contain identical code???
Here's one (of many!) possibility. You really should start with a few more LabVIEW tutorials!