From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-09-2019 10:17 AM
Hi,
when I hit the Ok button to measure reflection and mean light intensity in calibration section, I don't get any reaction. It could work perfect before. Although I changed nothing, it doesn't work now. I send the pictures and program attached . I would be very thankful for any suggestion to solve this problem!
07-09-2019 10:30 AM
You have multiple event structures in your VI. That is generally a bad idea, particularly if you don't fully understand how event structures work.
I don't understand why you have a mouse up event for buttons. You should be using the Value Change event for those buttons and putting the button inside the event structure.
It's likely that one of your events have been triggered, but the VI is in a state where the event isn't in the path of execution, and then it is configured to lock the front panel until the event case completes. Is anything else on the front panel dead locked?
Read Caveats and Recommendations when Using Events in LabVIEW - LabVIEW 2016 Help
then rethink your architecture as the multiple loops with event structures, particularly loops that appear to be so similar, is a sign of a problematic architecture.
Those loops are even set to run forever as they don't ever have a true value going to the stop terminals.
07-09-2019 11:59 AM
Dear sir,
Thanks for reply. Other buttons on the front pannel can work without error.
07-09-2019 12:08 PM
Any chance you disable that button somewhere in your code?
Exactly what do you mean by it doens't work? Does it fail to push down? Or will it push down, but the action never takes place?
Have you used Highlight Execution to see how the code is running?
07-10-2019 02:20 AM
Hi Senol,
I guess that this is the button and part of your code we are talking about.
I propose two changes:
07-10-2019 03:46 AM
As stated before:
Use value change events
Use one event structure
Note that mouse up event might do what you want, but it also does things you probably don't want. You can press the mouse outside the button (for instance when grabbing a graph cursor), then release it when hovering above the button. That will trigger the mouse up event, and users (incl. you) will be spooked about it.
I'd put a MessageBox in the event. Most of the code is conditional, and I'd want to make sure it's the event that is not triggering, or the code that is skipped because of the conditions... A correctly placed probe would work too.
07-10-2019 06:23 AM
Button "Kalibrierung für Probe 1 mit Reflexionsgrad" is problematic. When I hit this button it is pushed down but it doesn't take action Other buttons work well. I moved the button into terminal and changed the event to "value change". But the event still doesn't take action. I put probe on the lines in the events "Kalibrierung für Probe 1 mit Reflexionsgrad", "Kalibrierung für Probe 2 mit Reflexionsgrad " , "Messung für unbekannte Probe durchführen" . I get errors on the line in these events. There is something in the program that disables taking action in these events.
07-10-2019 06:30 AM
The problem is clear.
Note we can't actually run your VI, as subVIs are missing.
07-10-2019 06:34 AM
Thanks. What do you prefer to solve the problem?
07-10-2019 06:59 AM - edited 07-10-2019 07:08 AM
Use one event structure.
Use value change events.
Perhaps use the event inspector window for debugging.
When I remove all the missing subVIs and IMAQ stuff (don't have it installed), the event seems to work just fine.