View Full Version : iLON snvt_count_inc preset range
01-10-2008, 03:28 PM
Alright, so I'm trying to do an image swapper for a damper. Distech supplies 11 different damper graphics, representing the damper from 0-100% open in increments of 10%. What I can't figure out (and haven't spent a lot of time on) is how to make your SNVT preset to look at a range of numbers like 1-10, 11-20, etc. Has anyone done this? I glanced in the user manual and didn't come across it.
01-10-2008, 05:52 PM
Can I assume that you are trying to set up 'presets' in an iLON? What value is sent be the SNVT count_inc, is it like 1 , 2 , 3 etc.? If so, try to create a preset such as name-one : value-1, name-two : value-2 etc.
I have never tried this but my guess is that your presets will be one, two, three etc. You can also use something like name-closed : value-0, name-ten : value-1, name-twenty : value-2 etc.
Let us know if this works.
01-10-2008, 07:17 PM
I do this all the time. As Dapper says, just set up 10 presets - I call them One to Ten - with values same as the text. In the image swapper, assign the appropriate image by number (or 11 minus the number for the opposite damper) to the presets. A couple of things about the Distech graphics are that they're a little big for the iLON framework, so I reduced everything to 75% of the original and also that the animated fan is in .avi format which doesn't work with the i.LON, so it needs to be converted to a an animated gif. I use Corel Photo-Paint, but there are many ways to do it. If you haven't done it, you'll need to set up translation rules to convert ranges of damper position to integers. In other words, you need to have a point with a value of, say, 3 to represent the range of 25% to 35% and on through the range so you'll have split 0-100% into 10 values (1 to 10). It's a pain in the butt, but once you do it once, you can copy the XML file to any new iLON and use it again. I set the translator up to do 10 dampers (that is, 10 inputs and 10 outputs) then cut back on the variables if I need fewer.
01-11-2008, 09:55 AM
Ah, translation rules. I haven't done any of that yet, but it makes sense. I know I need to make the multiple presets, just didn't know how to assign a range of numbers to each one of those. As far as the graphics and animation goes, yeah I've had those same image re-sizing problems. I use Paint Shop Pro and convert stuff to the animated .gif from the .avi. I just find that the graphics tend to be too small once uploaded to the ilon, so I'll enlarge them on the ilon side, take the new pixel size and use the new enlarged ratio to enlarge my other graphics, such as the image swappers.
Anyway, I'll work on the translation rules, thanks!
01-11-2008, 11:12 AM
It sounds like you're using Distech freeprogs. If so, there's an alternative to using translation rules to create the 10 values - just do it in the code:
If (DamperPos < 2 )
DamperPicVar = 1
If (DamperPos >= 2) and (DamperPos < 10)
DamperPicVar = 2
I use the translation rules to go from SNVT_switch or SNVT_lev_percent to SNVT_count_inc to work with ASCs but in a freeprog, it's probably easier in code.
01-14-2008, 07:48 AM
I'll try that. I haven't done a whole lot of programming. I've done the web design for about 10 of our ilon's in the year I've been in this industry and just starting to do programming. Thanks!
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.