Announcement

Collapse
No announcement yet.

Help using a driver (imports)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help using a driver (imports)

    I have a driver that I use for my VB applications for talking to Allen Bradley PLCs. In visual studio, I just drag it to my form and it appears as an instance in the bottom (as a timer would). I then reference that driver in the code as 'driver1.write("plc address", value)' but because we don't have forums in HS scripting, I am trying to figure out how to add the driver (which is a VB form named EthernetIP.vb) to my project. I started with 'imports EthernetIP.vb' but no dice. I need to create an instance of it, somehow.

    Ideas?

    #2
    You might need to take a look inside the EthernetIP.vb file to establish whether or not this file is calling another library (look at the imports at the top) or that file is actually doing the hard work and sending the data - I imagine it is doing the first but double check.

    Comment


      #3
      Originally posted by mrhappy View Post
      You might need to take a look inside the EthernetIP.vb file to establish whether or not this file is calling another library (look at the imports at the top) or that file is actually doing the hard work and sending the data - I imagine it is doing the first but double check.
      That file is doing all the heavy lifting. The only reference it has is 'Imports System.ComponentModel.Design'.

      So how do I go about referencing this EthernetIP.vb driver from another vb file so I could make read/write calls? Or...how do I reference the entire class that the driver belongs to? (Probably the more appropriate way)

      Comment


        #4
        I'm not sure to be honest or even whether you can because the way HS is going to run the script is a bit different to how Visual Studio would allow you to add it to a project. Hopefully someone else will answer you but in your position I would probably be more tempted to create a Visual Studio application and control HomeSeer from that application rather than do it the other way around.

        Comment


          #5
          If you are creating a vb application using this driver, then why not keep the executable and call that from within HS3? You can add some command line arguments to your executable that can then be called from HS3.
          💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

          Comment


            #6
            Originally posted by Rupp View Post
            If you are creating a vb application using this driver, then why not keep the executable and call that from within HS3? You can add some command line arguments to your executable that can then be called from HS3.
            Because the idea is that the script will read and write values to and from the PLC, on a fairly constant basis. It's not that I am triggering commands, or this could be done as you mention.

            Comment


              #7
              Originally posted by phuz View Post
              Because the idea is that the script will read and write values to and from the PLC, on a fairly constant basis. It's not that I am triggering commands, or this could be done as you mention.
              Can the .exe not do this?
              💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

              Comment


                #8
                Originally posted by Rupp View Post
                Can the .exe not do this?
                Well I have an exe running right now acting as the data gateway. The idea was to eliminate this and go directly between homeseer and the PLC with the use of this driver.

                Comment

                Working...
                X