05-31-2022 04:37 AM
Hi,
I want to connect or wire two buttons together so when i click on Send Trigger button the program take image then match pattern after trigger automatically
I attach the pictures.
can I find help
05-31-2022 08:34 AM
I suppose you could use Value (Signaling) property to do that.
The button could be a latch button, so it won't work. You'd need to change the mechanical action to switch, and in the event case set the boolean value back to false with a property node or local.
It would help to have a VI... We can't examine (or correct) images.
05-31-2022 10:41 AM
Using a Signaling property node will definitely work, but It's not very expandable. If you want to expand this out later on I'd go with a more expandable architecture. Of course if this is basically all you need to do then by all means use the property nodes.
A few alternatives:
-Put your "match pattern" code into a subVI, then put that subVI in both of your event cases.
-Implement a producer/consumer pattern, where you send your image to a second loop for processing, triggered by commands in your UI handling loop.
-Use User Events to trigger the second loop instead of Signaling property nodes
Also, note the nodes on the right of your Event Handler have a white dot inside them. That means they return default values when unwired, which is not going to work with your references here. You should right click those and unselect "Use default when unwired", then wire your references all the way across. As it is now you won't actually be closing your refs when you think you are. LabVIEW will probably auto-close them, but it's best to be intentional with those things.
05-31-2022 01:58 PM
@BertMcMahan wrote:
Using a Signaling property node will definitely work, but It's not very expandable. If you want to expand this out later on I'd go with a more expandable architecture. Of course if this is basically all you need to do then by all means use the property nodes.
A few alternatives:
-Put your "match pattern" code into a subVI, then put that subVI in both of your event cases.
-Implement a producer/consumer pattern, where you send your image to a second loop for processing, triggered by commands in your UI handling loop.
-Use User Events to trigger the second loop instead of Signaling property nodes
Also, note the nodes on the right of your Event Handler have a white dot inside them. That means they return default values when unwired, which is not going to work with your references here. You should right click those and unselect "Use default when unwired", then wire your references all the way across. As it is now you won't actually be closing your refs when you think you are. LabVIEW will probably auto-close them, but it's best to be intentional with those things.
Even better, select "Linked Input Tunnel --> Create And Wire Unwired Cases" (clicking on the corresponding tunnel on the left if needed) and all your unwired cases gets a wire. Any new cases get a wire, too.