PLCGuy Posted October 9, 2023 Share Posted October 9, 2023 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? Link to comment
Solution PLCGuy Posted October 10, 2023 Author Solution Share Posted October 10, 2023 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 1 Link to comment
Recommended Posts