• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Accessing Mervis variables through Evok

    Mervis
    2
    5
    1951
    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.
    • N
      n1lp0int3r last edited by

      Hi,

      Is there any way to set and get the variables defined in Mervis through Evok? Let's say i have a script that gets some data and would like that my mervis program acts upon that data. Can i use the Evok API in order to set some variable to the value that i get from the script? Or is this possible in any other way?

      Regards

      T 1 Reply Last reply Reply Quote 0
      • T
        tomas_hora administrators @n1lp0int3r last edited by

        @n1lp0int3r Right now you can do it but not easily. When someone is asking for an interface between Mervis and other application, we suggest making a TCP Modbus channel and device in Mervis and map the variables to registers.

        In Evok, there is no full support of making a proper TCP/RTU Modbus client or server (even though the TCP Modbus client is used to interface with neuron IOs and TCP Modbus Server provides access to DI of UniPi 1 for Mervis). But the support is hardcoded in evok so you would have to figure it out yourselves how it works...

        1 Reply Last reply Reply Quote 0
        • N
          n1lp0int3r last edited by

          Oh ok. One point that i didn't understood correctly is how we can make that mapping. In order to acomplish that i should interact with the TCP Modbus server and present to it a new device is that it?
          If i understood correctly is there any documentation that you can point?

          Thanks

          T 1 Reply Last reply Reply Quote 0
          • T
            tomas_hora administrators @n1lp0int3r last edited by

            @n1lp0int3r Exactly...

            You can use the Modbus Client in evok https://github.com/UniPiTechnology/evok/blob/master/evok/modbusclient_tornado.py which is used in Neurons and create a custom device which will periodically read from registers or write to register on event...

            1 Reply Last reply Reply Quote 0
            • N
              n1lp0int3r last edited by

              Ok i can see now. Thanks

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