LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error & Event

Why  NewVal 2 not working, and event case works only in timeout?

 

 

error.png

0 Kudos
Message 1 of 9
(1,102 Views)

Events are for controls, not indicators.

 

Why not create an event for the boolean instead?

 

This code makes very little sense overall. Can you explain what it should do?

 

(You can fire events by writing to a signaling value property, but I doubt you need that)

0 Kudos
Message 2 of 9
(1,096 Views)

I need that will be sent me an error message.

For tests, I create "s" button because the robot now is not here, but events do not work2023-04-23_11-03.png

0 Kudos
Message 3 of 9
(1,073 Views)

@altenbach wrote:

Events are for controls, not indicators.

 


Your control is  s   you have an indicator error out 1

 

 

0 Kudos
Message 4 of 9
(1,062 Views)

And how can I send error messages with events?

0 Kudos
Message 5 of 9
(1,059 Views)

The event only captures the front panel action of control by default. If you want to trigger an event programmatically, you need to use the Value (Signaling) Property.

 

-------------------------------------------------------
Applications Engineer | TME Systems
0 Kudos
Message 6 of 9
(1,039 Views)

@Petros_Baghalyan wrote:

And how can I send error messages with events?


Check for user events.

You can generate events programmatically on your demand.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 7 of 9
(1,035 Views)

If this is not a button, but a value coming from an instrument, you just process it according to the dataflow. Since you need to poll that value, your loop needs to spin anyway. No event structure needed at all.

 

Since you fire a popup only of the value has changed, use the "is value changed" primitive from the comparison palette.

 

altenbach_0-1682263129413.png

 

 

If the popup should not block the loop, use a notifier, queue, or appropriate channel wire and handle it in a separate loop.:

 

altenbach_0-1682264162874.png

 

 

 

Let's have a look at your other code:

 

2023-04-23_11-03.png

 

 

Are you aware that you only need one case structure and wire the numeric directly to the selector. Make one case 0, one case, -10738etc... and one the default

 

 

 

 

 

0 Kudos
Message 8 of 9
(1,006 Views)

@altenbach wrote:

If the popup should not block the loop, use a notifier, queue, or appropriate channel wire and handle it in a separate loop.:


Here's how it could look with a channel instead:

 

altenbach_1-1682264913655.png

 

 

Message 9 of 9
(997 Views)