ElectricCPR Posted April 8, 2018 Share Posted April 8, 2018 Attached is a picture of a calculation that I'd like to use to trigger specific programs. Is it possible? If yes, how? Sent from my SM-G930T using Tapatalk Link to comment
larryllix Posted April 9, 2018 Share Posted April 9, 2018 Attached is a picture of a calculation that I'd like to use to trigger specific programs. Is it possible? If yes, how? Sent from my SM-G930T using Tapatalk I don't know what 12 A could possibly mean but all basic math is possible in ISY.For the remainder it is called modulo$variable %= 12For the integer of the division use.$variable /= 12Sent from my SM-G930W8 using Tapatalk Link to comment
ElectricCPR Posted April 9, 2018 Author Share Posted April 9, 2018 I don't know what 12 A could possibly mean but all basic math is possible in ISY.For the remainder it is called modulo$variable %= 12For the integer of the division use.$variable /= 12Sent from my SM-G930W8 using Tapatalk As stated in the equation A=The Jewish Year which this year is 5778Sent from my SM-G930T using Tapatalk Link to comment
larryllix Posted April 9, 2018 Share Posted April 9, 2018 As stated in the equation A=The Jewish Year which this year is 5778Sent from my SM-G930T using Tapatalk 5778 what?Sent from my SM-G930W8 using Tapatalk Link to comment
ElectricCPR Posted April 9, 2018 Author Share Posted April 9, 2018 It's simple algebra pluging in the values to solve the equation. The question is does it work with ISY? If yes how?Sent from my SM-G930T using Tapatalk Link to comment
larryllix Posted April 9, 2018 Share Posted April 9, 2018 It's simple algebra pluging in the values to solve the equation. The question is does it work with ISY? If yes how? Sent from my SM-G930T using Tapatalk Yes but it would need to be known what the result you want is. 5778 what? Did you want the whole number portion and fractional parts in different variables M and m? Will A be changing each year and will it be used again? Sent from my SM-G930W8 using Tapatalk Link to comment
ElectricCPR Posted April 9, 2018 Author Share Posted April 9, 2018 Yes but it would need to be known what the result you want is. 5778 what? Did you want the whole number portion and fractional parts in different variables M and m? Will A be changing each year and will it be used again? Sent from my SM-G930W8 using Tapatalk A will be changing each year Sent from my SM-G930T using Tapatalk Link to comment
ElectricCPR Posted April 9, 2018 Author Share Posted April 9, 2018 Here's the other other half of the equation. Sorry. Sent from my SM-G930T using Tapatalk Link to comment
larryllix Posted April 9, 2018 Share Posted April 9, 2018 Here's the other other half of the equation. Sorry. Sent from my SM-G930T using Tapatalk I don't have access to my ISY right now but what I would is define a State variable for each variable in the formula. Then I would create a program for each variable with a trigger condition for each variable involved in the program like this If .....$var1 ....or .... $var2 Then ....program to calc that variable Now when any value is changed the programs will self trigger and calculate each result into it's variable in a chain reaction. The decimals will have to set for each variable minding overflow quantities at 32 bit values. Sent from my SM-G930W8 using Tapatalk Link to comment
Michel Kohanim Posted April 9, 2018 Share Posted April 9, 2018 Hi @ElectricCPR, Yes, it's doable. With kind regards, Michel Link to comment
ElectricCPR Posted April 9, 2018 Author Share Posted April 9, 2018 Hi [mention=9795]ElectricCPR[/mention], Yes, it's doable. With kind regards, Michel How? I tried the remainder function and it doesn't seem to work!Sent from my SM-G930T using Tapatalk Link to comment
larryllix Posted April 9, 2018 Share Posted April 9, 2018 2 hours ago, ElectricCPR said: How? I tried the remainder function and it doesn't seem to work! Sent from my SM-G930T using Tapatalk I have had no problem with the modulo operator. What does "It does not work" mean?". "The answer is always 0"?, "the answer is incorrect"? "The answer never changes from the original quotient"? "The answer is not what I expected"? Let's work from there so you can understand how ISY works possibly. What was your test program. You can right click on your program and use "copy to clipboard" and then paste it here for more help. Link to comment
DrLumen Posted April 10, 2018 Share Posted April 10, 2018 It may take a dozen or so variables and ~20 lines of code but can be done. If some of the values you have in parentheses are true constants then you will want to precalculate them. Luckily, the formula can be broken down and each operation done easily. God forbid you needed any trigonometry functions or anything more advanced. The modulo works here: New Program - [ID 0029][Parent 0010] If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then $Int_41 = 18 $Int_41 %= 4 Else - No Actions - (To add one, press 'Action') Result - $Int_41 = 2 (18%4) Link to comment
ElectricCPR Posted April 10, 2018 Author Share Posted April 10, 2018 I was testing the module not with this equation, but in general. What I'm trying to accomplish is:If$Days_Till_RH is 0And Time is 1:00:00AM ThenWait 25 hours $Jewish_Year += 1$Jewish_Year Init To $Jewish_YearWait 5 secondsAdjust program Pesach Trigger PS I just realised that I can't set it to trigger on a specific date if there is a way please let me knowSent from my SM-G930T using Tapatalk Link to comment
paulbates Posted April 10, 2018 Share Posted April 10, 2018 There are some options to baseline your programs to the actual date: If you want to run the V4 family of ISY Firmware, you can set up the isylink program on an external computer and it can be configured to load month, day and year into separate ISY variables. You can work with that in your program. If you are willing to run the V5 family of ISY Firmware, there are enhancements to its admin console and program/variable features to use month, day and year in variables Paul Link to comment
larryllix Posted April 10, 2018 Share Posted April 10, 2018 For a sample of V5 techniques see this https://forum.universal-devices.com/topic/21703-how-to-make-events-occur-every-year-between-certain-dates/?do=findComment&comment=232740 Link to comment
ElectricCPR Posted May 8, 2019 Author Share Posted May 8, 2019 After putting time into it, finally wrote the code and tested it. I'm sure that it can be revised to make it shorter, but it works!!!! PM me if you're interested in itSent from my SM-G930T using Tapatalk Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.