03-22-2020 08:10 PM
I am doing a practice with user-event generated from subvi.
My simple code, which intended to display the number on the main.vi, didn't work properly.
Can you check what I need to fix?
(The stop function was not implemented yet.)
labmaster.
Solved! Go to Solution.
03-22-2020 09:07 PM - edited 03-22-2020 09:09 PM
03-22-2020 09:20 PM - edited 03-22-2020 09:26 PM
Thank you for the check.
I changed the code a little bit with the functional global of reference.
Still had a problem.
labmaster.
03-22-2020 09:35 PM - edited 03-22-2020 09:37 PM
03-22-2020 10:16 PM - edited 03-22-2020 10:27 PM
Thanks.
Anyway, I have already checked with the probe and the event manager tool.
I am not sure if '0' value just after functional global is weird but a proper value of reference was transmitted to the subvi.
Maybe I can guess the reference had a problem to send the right value but I don't know why or how to resolve this trouble because of beginner in using user-event.
That's my question.
Did you find any reason for the problem in reference?
labmaster.
03-22-2020 11:19 PM
Reference "0" implies that there is no active reference. This is not only user-event,
but also queue, notifier, FPGA ref, etc...
A cause of your problem is not related to user-event, it's FGV's.
At the first call, "set" method is called but there is no data on output terminal.
This is because "get" method is not called. No called, No data.
If you would like to get the data on "set", place the output terminal out of structure.
03-22-2020 11:41 PM - edited 03-22-2020 11:50 PM
I was surprised from your comment and it works.
I have never seen the difference of positional effect between inside and outside of while loop in the functional global.
I think this should be a kind of bug in Labview.
The global ran first (set) before it ran timeout of event stucture (launching the subvi).
When subvi get is running, then, the global should be run in the second time (get).
So it's not a 'race' condtion between set and get of the global.
Can you explain it briefly if my understanding is wrong?
labmaster.
03-22-2020 11:49 PM
This is not LabVIEW Bug, is expected behavior.
When "set" is called, nobody assigns the input value to output terminal.
This is because "get" case is not executed.
You can also see the behavior with attached example.
This VI has the same unexpected behavior but it's also not bug.
03-22-2020 11:53 PM - edited 03-22-2020 11:54 PM
Okay I understand what you mean.
Passing the variable through the global, this was an exceptional habit even for me.
I had a mistake in my convention.
Thank you.
03-22-2020 11:58 PM