Jump to content

Using Elk Voltage Levels with eisy Math Functions


PLCGuy
Go to solution Solved by PLCGuy,

Recommended Posts

Posted

Is there any way to take the voltage level from an Elk Zone and use it in an eisy math function? I currently have an exceptionally ugly set of IF statements in my old ISY-994 that has 100 variations of the following:

===================================================================================

Chk02xVolt - [ID 0036][Parent 004D]

Folder Conditions for 'Chk02xVolt'

If

        Elk Zone 'Water Level' 'Voltage' >= 2.0 Volts

    And Elk Zone 'Water Level' 'Voltage' <= 2.9 Volts

Then

   Allow the programs in this folder to run.

 -----------------------------------------------------------------------------------

Chk020Volt - [ID 0016][Parent 0036]

If

        Elk Zone 'Water Level' 'Voltage' is 2.0 Volts

 Then

        $ElkVoltageX10  = 20

Else

   - No Actions - (To add one, press 'Action')

Test if the Elk Voltage is 2.0 Volts and if so, set $ElkVoltageX10 to 20 (i.e. ten times the voltage)

-----------------------------------------------------------------------------------

and so on...

Is there a nicer way to do this in the esiy using the Elk Node Server?

  • Solution
Posted

Never mind... found the answer and all seems to be working well 😄

 

WaterLvlCalc - [ID 0012][Parent 0013]

If
        'Alarm / House Alarm System / KitchenKeypad' is switched F4
 
Then
        $ElkWtrVoltage  = 'Alarm / House Alarm System / Water Level' Voltage Volts
        Wait  2 seconds
        $WtrGallons  = 10
        $WtrGallons *= $ElkWtrVoltage
        $WtrGallons *= $SlopeDiv10
        $WtrGallons -= $Offset
        $WtrLvl  = $WtrGallons
        $WtrLvl /= $GallonsPerInch
        Set 'Alarm / House Alarm System' Display Message
        $State_LvlCalc  = 1
        Wait  10 seconds
        Set 'Alarm / House Alarm System' Clear Message
 
Else
   - No Actions - (To add one, press 'Action')
 
Wait for a trigger to calculate cistern $WtrGallons (= 10 x $ElkWtrVoltage x $SlopeDiv10 - $Offset), $WtrLvL = ($WtrGallons / $GallonsPerInch), and then display the level on the Elk Keypad

 

Cistern Water Level .jpeg

  • Like 1
Guest
This topic is now closed to further replies.

×
×
  • Create New...