• Recent
    • Tags
    • Popular
    • Register
    • Login

    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 Mango 5 Documentation Website

    Log point values only when "told" to do so...

    Development general discussion
    2
    3
    1.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      BobDay
      last edited by

      This may seem evident, but trying to figure out a way to log datapoints ONLY while an external process is running - perhaps by triggering an event in some watchdog point - or by scripting of some sort. Idea is, a process runs for, say, 3 hours per day; for a variety of reasons (charting being one of them), several points are logged at second or even sub-second intervals but don't want them logged when the external process is idle. Communication is via modbus, primarily TCP.

      Perhaps its possible to prevent (or enable, for that matter) modbus reads depending on a datapoint state.

      Any thoughts appreciated!

      1 Reply Last reply Reply Quote 0
      • CraigWebC
        CraigWeb
        last edited by

        Hi @bullitbd

        The following functions are available in the scripting enviroment. So you could use a meta point to watch if your process is running and then enable the relevant data source. then disable it when the process is not running. Data sources do take some time to start so you might need to look at how you could get a signal before the process starts.

        isDataSourceEnabled(xid)
        xid - Xid for a data source return true if enabled false if not or DNE

        enableDataSource(xid)
        xid - Xid for a data source, return status

        disableDataSource(xid)
        xid - Xid for a data source, return status

        isDataPointEnabled(xid)
        xid - Xid for a data point return true if enabled false if not or DNE or User does not have permissions

        1 Reply Last reply Reply Quote 1
        • B
          BobDay
          last edited by

          perfect! Not sure how I missed About Mango Java Script - thank you!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post