Announcement

Collapse
No announcement yet.

Controlling events in 1 sec. steps

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

    Controlling events in 1 sec. steps

    Hi,
    I want to control small dosing pumps and need to be able to set OFF time say 320 sec after A1 ON. Is there a function which can do it? I can only see 1 minute resolution.

    I am also thinking of a convenient way of the time entry (perhaps from Excel). Could you help?
    Thanks
    Peter

    #2
    Sorry, I know/found how to enter event delay. That would be fine, however is there any neat way a person can enter the delay?
    By reading data from Excel?
    Thanks

    Comment


      #3
      if you use a script, you can code it something like this:

      hs.execx10 "b6","on",0
      hs.waitsecs 5
      hs.execx10 "b6","off",0

      This will turn it on and after 5 seconds turn it off

      Comment


        #4
        The script library section is for the postuing of new scripts. Could you please delete your thread from that location. TIA.

        -Rupp
        ...One Nation Under GOD, Indivisible, With Liberty And Justice For All.
        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

        Comment


          #5
          I don't know if this will help but the Timer function (i.e. mytimer = Timer) will return seconds since midnight (86400.00 seconds per day). In fact, I believe you can resolve to less than one second, as it returns two digits to the right of the decimal point.

          regards,

          GenevaDude

          Comment


            #6
            I find the most convenient way to schedule short time intervals is with WScript.Sleep with resolution to 1 millisecond. Of course that depends upon what else is scheduled on your computer to provide that degreee of accurracy. From a vbs script (which can use .sleep) you can also create the Excel object to get the data from the spreadsheet. Not very difficult if you are handing at scripting. If you do not want to work with the Excel object, then you could output the spreadsheet to a csv file and process strings with the FileSystemObject which has many examples in varioius scripts on this board.

            If you are working in VB then I would use a Windows API dispatch Timer to do your timing, but the concept is still the same.

            If you do want good control of the timing then I would not run it in homeseer (i.e. hs.waitsecs) unless homeseer does not have much else to do. It gets a single time slice from Windows to do all its activity and it must prioritize the events, asp pages, IO within this same slice.

            Comment

            Working...
            X