LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connect two buttons together

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

0 Kudos
Message 1 of 4
(995 Views)

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.

0 Kudos
Message 2 of 4
(949 Views)

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.

0 Kudos
Message 3 of 4
(936 Views)

@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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 4
(920 Views)