05-13-2024 07:53 AM
I have a program where I have a push button connected to NI DAQ and when button is pressed the DAQ reads it. Until the reading part the program is fine. When the push button pressed, a true variable will come out of the DAQ read and is given to a case structure. Inside the case structure, a generate user event is wired with a true variable and this is then given to register to user events and finally to the event structure. Inside the event structure, a boolean is wired.
You can see what I explained in the picture above. I have also attached the VI. When I run the program and pressed the push button, nothing is happening. So I ran it in highlight execution mode and I see the user event Push Button Pressed is never executed inside the event structure, but the true case of the case structure is executed which will generate a user event. But it is not executed in the event structure. Why is this happening? Thank you.
Solved! Go to Solution.
05-13-2024 08:03 AM
Sorry, the program is wrong. I used the register for user event in the wrong way. I correct it by watching a youtube video. Here is the correct solution.
05-14-2024 04:18 AM
@govindsankar wrote:
Sorry, the program is wrong. I used the register for user event in the wrong way. I correct it by watching a youtube video. Here is the correct solution.
Yes, in your first one you send the event before you've registered it and started listening, thus no reaction, and since you reregister i assume the same happens every time.