Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

  • I am trying to add a binary switch button to my dashboard that I can turn on manually through the dashboard and after X amount of seconds it turns off automatically. I do not see any parameters where I can change these settings. Are there any functions/settings/parameters that can enable me to do this timing functionality with a toggle switch? Can I get some help on this?

    Mango Core Verison: 3.6.0
    Mango API Module Version: 3.6.0
    Mango UI Module Version: 3.6.1
    Platform: Windows 10 Pro
    Browser: Google Chrome


  • @shehryar-tariq said in Timer for Binary Switch Button:

    I am trying to add a binary switch button to my dashboard that I can turn on manually through the dashboard and after X amount of seconds it turns off automatically.

    This is something that you should ideally do within your PLC program. If you are not using a PLC you can do it from the Mango backend using an event detector.

    The reason for this is that if you close the tab/window, or if there is some sort of communication issue the command to turn the binary point back off will not get sent.

    @shehryar-tariq said in Timer for Binary Switch Button:

    Are there any functions/settings/parameters that can enable me to do this timing functionality with a toggle switch? Can I get some help on this?

    It is possible to do this from a dashboard, but I would not recommend it as per above.


  • Thank you for your response but I am not using a PLC. Can you please explain what do you mean by using backend Mango? I thought event recorder is only for getting events, I don't think it can trigger anything, can it?

    0_1566835696986_1e7096f3-699b-4864-9c3d-24d690ef47e8-image.png

    What I intend to do is that I have a toggle switch shown above, and I want it to automatically close once I manually turn it on after a certain time delay


  • To be more explicit about how to do this with an event detector -

    • Add a binary state detector to your binary data point
      0_1566835734440_b77460c0-3f4f-451c-9596-2a1c8564776c-image.png

    • Under the state tab, choose the true state and set the duration to X seconds

    • Save event detector

    • Go to event handlers page

    • Add a "Set point" event handler

    • Under the "Set point" tab choose your binary point

    • Under the "Event types" tab select your binary state event
      0_1566835873698_6c8eb607-de28-44f4-afbc-a1aad6fb01fa-image.png

    • Under the "Active action" tab, choose "Set to static value" and set the value to false

    • Save event handler


  • @shehryar-tariq said in Timer for Binary Switch Button:

    I thought event recorder is only for getting events, I don't think it can trigger anything, can it?

    The event detectors are used to monitor for certain conditions and trigger an event/alarm yes. But you can hook up event handlers to these events to perform actions.


  • Something that might be useful - you can create a single event handler that you can attach to multiple event detectors.

    • Change the event handler to "Set to scripted value"
    • Add this script -
    var points = DataPointQuery.query('eq(id,' + event.referenceId1 + ')');
    points[0].runtime.set(0);
    return UNCHANGED;
    

    This will make the handler lookup the point which triggered the event and set that point back to zero.