04-23-2023 12:15 AM
Why NewVal 2 not working, and event case works only in timeout?
04-23-2023 12:52 AM
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)
04-23-2023 02:05 AM - edited 04-23-2023 02:08 AM
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 work
04-23-2023 02:54 AM
@altenbach wrote:
Events are for controls, not indicators.
Your control is s you have an indicator error out 1
04-23-2023 03:01 AM
And how can I send error messages with events?
04-23-2023 06:50 AM
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.
04-23-2023 07:14 AM
@Petros_Baghalyan wrote:
And how can I send error messages with events?
Check for user events.
You can generate events programmatically on your demand.
04-23-2023 10:10 AM - edited 04-23-2023 10:36 AM
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.
If the popup should not block the loop, use a notifier, queue, or appropriate channel wire and handle it in a separate loop.:
Let's have a look at your other code:
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
04-23-2023 10:48 AM
@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: