Announcement

Collapse
No announcement yet.

How to convert the analog voltage bit # from SECU16 into a voltage value in HS?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to convert the analog voltage bit # from SECU16 into a voltage value in HS?

    Bran-Newbie here, I’m stuck! I can get the bit number (0-255) into HS from the analog input of a SECU-16 representing 0-5 volts but, and now for the incompetent part, where in HS can I enter in the conversion formula (variable# divided by 51.2) to display the voltage value and save it to disk?

    Thanks!
    Tom

    #2
    To display the converted value you'll need to put it either in an asp page or in the devicestring of a virtual device. Either way it will have to be through scripting, as far as I know there isn't any way to convert the number diplayed on the pages generated by HS. You would do the actual conversions about the same way.

    Volts = hs.DeviceValueByName("Ocelot Variable 66")/51.2
    or
    Volts = cpuxa.getpoint(1,12)/51.2

    hope that helps
    jim

    Comment


      #3
      Thanks Jim! I can see that I’m getting a little ahead of myself. I guess I got so excited about getting all this working together that I assumed there would be an easy fix for a beginner. Now I see it’s time to dive deeper into the second half of the manual.

      Tom

      Comment


        #4
        I knew there was a reason I was having so much trouble figuring this stuff out!

        I'm impressed... even with just the first half!

        [img]/infopop/emoticons/icon_biggrin.gif[/img]

        (see profile for environment)

        Comment

        Working...
        X