Jump to content

PLCGuy

Members
  • Posts

    77
  • Joined

  • Last visited

Everything posted by PLCGuy

  1. Yes, that works great. But what is in "Folder 1" that will do the needed math on the Voltage variable? We need some function will determine if the voltage is say 2.0 versus 2.3 versus 8.3 so that the calculation $WtrGallons = Voltage * $Slope - $Offset can be conducted correctly. And since Voltage can only be part of a compare and can not be on the right side of an expression in the ISY, we are stuck. Again, maybe I am missing a trick here. (Note: Certainly we could reduce this to 20+3 programs with approx 1000 gallon resolution, but for this application we really need 100 gallon resolution - a 1000 gallons is a lot of water to lose before you get any warnings.)
  2. Believe me, we tried to simplify this, but when you can't assign the value from the Elk to a variable (see earlier in this thread), there is not much you can do in terms of an intelligent search. But, if you can think of a simpler way to do this under the constrains of the ISY programming language, please let me know. That said, I think the issue is with the way we are using the state variables. I suspect, we should have created separate conditional and body programs as described in the great posting by ergodic (http://forum.universal-devices.com/viewtopic.php?f=26&t=6395) but before I rewrite all eighty some programs, I want to understand where we went wrong.
  3. Well I wrote the 20 programs needed to process the analog values coming from the Elk. Actually if was closer to 85 programs. The good news is that they work, most of the time. The bad news is "most of the time". It seems like we have some sort of occasional logic race condition that I can not figure out. Happens about once per week where the water Level goes to the millions of gallons. Retriggering cleans it all up. The basic idea we tried was to have three types of programs with three states: 1 program called WaterLvlInit which is waiting for a trigger 81 programs called ChkxxxVolt that calculates the water level based on the voltage xxx 1 program called WaterLvlDisplay to display the result on the Elk Keypad This is what it looks like. Where did we mess up? And could we have used folder conditions to make this simpler? (FYI, the 81 voltage checking programs are sorted into 8 folders by voltage MSD) // WaterLvlInit (Wait for a trigger to calculate and display the water level, then initialize the WtrGallons variable and move to State 1 (Check level)) If Time is 5:00:00AM Or Elk Keypad 'Main Keypad' 'F4' is Pressed Then $WtrGallons = $SlopeDiv10 $State_LvlCalc = 1 ===================================================== // Chk020Volt (Test if the Elk Zone 'Water Level' 'Voltage' is 2.0 Volts and if so, scale WtrGallons by 20) If $State_LvlCalc is 1 And Elk Zone 'Water Level' 'Voltage' is 2.0 Volts Then $WtrGallons *= 20 $WtrGallons -= $Offset $State_LvlCalc = 2 // Chk021Volt (Test if the Elk Zone 'Water Level' 'Voltage' is 2.1 Volts and if so, scale WtrGallons by 21 and subtract the offset) If $State_LvlCalc is 1 And Elk Zone 'Water Level' 'Voltage' is 2.1 Volts Then $WtrGallons *= 21 $WtrGallons -= $Offset $State_LvlCalc = 2 . . . // Chk100Volt (Test if the Elk Zone 'Water Level' 'Voltage' >= 10.0 Volts and if so, scale WtrGallons by 100 and subtract the offset) If $State_LvlCalc is 1 And Elk Zone 'Water Level' 'Voltage' >= 10.0 Volts Then $WtrGallons *= 100 $WtrGallons -= $Offset $State_LvlCalc = 2 ===================================================== // WaterLvLDisplay (Display the results in inches (rather than gallons) on the Elk Key Pad and go back to waiting) If $State_LvlCalc is 2 Then $WtrLvl = $WtrGallons $WtrLvl /= $GallonsPerInch Set Elk Area 'House' Display Text on Keypads, Content 'Elk_WaterLevel' $State_LvlCalc = 0
  4. Yes, I now see that the "no variable in "if" comparisons" issue only happens with Elk objects. Variables can be compared with variables. My bad... Off to try 20 programs...
  5. Ouch... I quickly saw the issue with trying to assign Elk voltages to a variable, but the fact that we can't use variables at all on the conditional side of IF Compare statements was a real shock. My backup plan for the inability to assign Elk values to variables had been to create an improvised FOR loop, using IF statement to hunt down the Elk voltage level. Now that is out. Michael - any chance you will add variables for the conditions in IF Compare statements? That would add a lot of flexibility to the ISY, hopefully without a lot of extra effort. As for the CAI, I appreciate the guidance and I may have to go that route. It certainly looks like a good box and better resolultion and variable handling would be nice. The issue for us isn't the cost of the CAI board (that is cheap) but rather the cost of labour for installation and configuration. Its another trip for our electrician to the site (and another power supply, unless we can run it off the ELK databus - anyone know?), another day for one of our techs to learn new product and so on. This gets expensive. Plus it is one more device to fail, so it reduces the overall reliability of the system. So as ugly as it is, it might just be cheaper to write 100 compare programs. So if anyone else has any other ideas on how to get the ISY to interact with Analog values, great. I would be thrilled to get a solution that doesn't involve more hardware.
  6. I started off trying to use the variables, but I can't seem to find a way to assign a Elk voltage to a variable. I can create the IF compares with Elk voltages (as suggested by apostolakisl), but variables seem to be off limits for Elk values. As apostolakisl points out, to use Compares, I need 100 programs Perhaps there is a way to construct some sort of For Loop to iterate for 0.1 to 10.0 and stop when there is an hit. Anyone ever tried that?
  7. Two steps forward and one back... After learning that the ISY can`t accept analog inputs (see above), I installed an Elk M1XIN Input module near the cistern and have wired the level transmitter to a Elk zone. The analog signal comes from an EchoPod DL24 ultrasonic level sensor that measures liquid levels in a tank. In this case the tank is the 20,000 gallon cistern containing water for the home. The Echopad provides a 4-20mA signal that indicates the water level; 4mA indications the tank is empty and 20 mA indicates the tank is full and a signal in between indicates a water level in between. The whole thing works well - for example, right now Elk M1 is showing a 4.2 V signal from the ultrasonic sensor, which if I do a bit of math, indicates a water level of 27`inches or approximately 6080 gallons. The trouble is that I am doing the math on my pocket calculator. The client wants the math to be done in the system and the water level (or even better the gallons) presented on the Elk keypad. This is important to them, as running out of water can really impact their life in a not so good way. The math is simple: Level = Voltage x 11.75 - 23.5 Gallons = Level x 189 BUT I discovered that I can not do ANY math in the Elk. All there are is some range compare functions and these are not likely to do the trick, unless I do about 100 of them, one for every 0.1 of voltage. That seems messy. Perhaps an Elk FOR loop would do the job, but I haven`t seen how to use those in the Elk logic - I think I saw these mentioned in the tech notes, but no examples (Any Elk users know about these?) So I thought that ISY994 that could do the math if I could send numerical values to and from the Elk and ISY. Bought the ISY Elk Module and it allows the ISY to read the zone voltage. But how do I take that floating point voltage and use it for ISY variables? Any help on using Elk voltage readings in variable math is greatly appreciated. Any help on handling those decimal places in the ISY is also great. Can I do something like Variable = Elk Voltage * 10 (just to preserve the decimal place)? Regards Eric
  8. Not yet. In fact there isn't even a Elk system in place. Currently there is a DSC, but interfacing to it has been less than fun. I know that it can be done through an intermediate computer running a web server (using DSCLink), but I don't like equipment with spinning parts being required 7x24 for a control system to work. Heck - that is one reason I really like the ISY (the other is the amazing service you and your team offers). So the likely solution (provided it will work) is an ELK retrofit for the main alarm and then an Elk I/O module to measure the analog signal and various DIs like valve position, pump status and level alarms. Plus I can add a little security to the cistern area. Thanks
  9. Hi I have been trying to use the ISY-994i to monitor the water levels in a large cistern. The idea is that the ISY can send water level warnings via email and make basic control decisions like reduce the watering cycle. To do this, I have installed a ultrasonic water level transmitter that provides a 4-20 mA signal and planned to interface that with the ISY. So I purchased an EZIO2x4 for its analog features, but it didn't work out as planned. LeeG tells me that the ISY doesn't recognize the analog values in the EZIO, so this option is out. So before I spend more $$$ on another piece of hardware (and more time on another experiment), what is the preferred way to get the ISY to read analog values? Here are a few of my thoughts: [*:3fmykx50] Use a CAI webcontrol board to grab the 4-20 mA signal and send that value to the ISY via the REST interface. [*:3fmykx50] Use the Analog input feature that seems to reside in the Elk M1 to grab the 4-20 mA signal (with a resistor of course to make it 2-10V) and send that to the ISY via the Elk module As much as I like the price of the CAI webcontrol board, the thought of another PLC to add to the complexity of the system worries me. But will the Elk solution work? I will have to buy another Elk I/O module (nothing near the Cistern now), but those aren't that much more than the CAI. All suggestions appreciated.
  10. Thanks Lee. That last tip turned out to be critical. Without the Wait, the programatically controlled scene was very unreliable. With the Wait, the scene settled down. The other thing that seemed strange is that writing the program to trigger on a Fast On or Fast Off seemed to increase the unreliability. Detecting regular On or Off commands and using those to drive the program seemed to be better in terms of reliability.
  11. Is it possible to have a single SwitchLinc Dimmer control two scenes? The reason is that I have a SwitchLinc at an entry door that I would like to use to control both exterior and interior lights when someone enters the door. There is no easy way to add another switch near the door. Why not just make the indoor and outdoor scene the same scene? Because the outdoor scene has a number of seasonal and time of day fade controls that would not be appropriate for an indoor scene. Now I have managed what seems to be a bit of a kludge by creating a number of programs that monitor the state of the SwitchLinc using "Control" and use that to set the indoor scene. For example: Is there a better way? Have I missed the obvious?
  12. That was it - with some text in the body, the notification Worked like a charm - thanks!
  13. I have two different notifications actions set up in the same program. They both go to the same email account. One works and the other doesn't: The notification called 'Light Change Notice' works: ${alert.subject} This one (Schedule Change Notice) doesn't: ISY99 Changed to ${sys.program.#.name} Operation at ${sys.time12} ${sys.date} The program is trivial: If From Sunrise To Sunset (same day) Then $State_Schedule = 1 Send Notification to 'MyGmail' content 'Light Change Notice' Send Notification to 'MyGmail' content 'Schedule Change Notice' Else - No Actions - (To add one, press 'Action') The Error Log shows the following whenever the ISY attempts to send 'Schedule Change Notice' Sun 2012/12/02 01:41:24 PM System -50001 -19 What am I doing wrong? FYI I am running 3.2.6 and have moved the 'Schedule Change Notice' to a number of programs without success. Thanks for any guidance
×
×
  • Create New...