Results 1 to 13 of 21
-
10-31-2012, 04:00 PM #1
Regular Guest
- Join Date
- Oct 2012
- Posts
- 8
Delta OrcaView GCL+ Programming help (Code in question posted)
Background & Objective:
The objective of this GCL+ code is to make a hanging fan coil (reheat only) which is ducted to OSA turn on automatically when it is +/- 1 Degree Fahrenheit outside of the temperature setpoint.
The problem is I think it is satisfying the code whatever setpoint is placed there, and I cannot figure out how to restrict the script to keep the fan OFF when the setpoint is reached.
This is my first attempt at automating these units, they had been set to run all day via the schedule and I hate inefficiency & waste!
Any input would be greatly appreciated, thank you!
Code Snippet:
//Renamed variables to make it easier for me to read what's going on
Variable RoomTemp
Variable Setpoint
'Heating Setpoint' = Setpoint
BACstat = RoomTemp
//Beginning of script
If
Schedule = On And (RoomTemp < Setpoint + 1) And (RoomTemp > Setpoint - 1) Then
'Fan Start Stop' = Off Else
'Fan Start Stop' = On
End If
-
10-31-2012, 05:15 PM #2
Professional Member
- Join Date
- Mar 2008
- Location
- Kitchener, Ontario
- Posts
- 491
Hi Cujo67,
Variable HeatRequired
Switch( HeatRequired , AI101 (BACstat) , Setpoint - 1 , Setpoint + 1 )
If Shedule On Then
Fan Start Stop = HeatRequired
Else Fan Start Stop = 0
End If
Are you fairly new to writting code? the help file can be a very useful tool if just starting out...
Hope this helps
-
10-31-2012, 06:42 PM #3
Regular Guest
- Join Date
- Oct 2012
- Posts
- 8
Second day of diving into writing code (done java in the past, but that was 10 years ago haha). Thanks a lot I'll try it when I get to work tomorrow and try and learn what exactly it is that you wrote, looks promising!
One more thing I was thinking of adding after the first post it came to me, any way to disable the fan from starting up if the OSA (minus say 3 degrees) is greater then the room temperature?
-
10-31-2012, 07:55 PM #4
Professional Member
- Join Date
- Mar 2008
- Location
- Kitchener, Ontario
- Posts
- 491
-
10-31-2012, 08:26 PM #5
Regular Guest
- Join Date
- Oct 2012
- Posts
- 8
Yes, since the weather here in SF is so unpredictable it would be sweet to have it shut off when it warms up outside so that the room stays cooler than the outdoor temp when above room setpoint
-
10-31-2012, 08:41 PM #6
Professional Member
- Join Date
- Mar 2008
- Location
- Kitchener, Ontario
- Posts
- 491
PM Me
-
11-01-2012, 09:22 AM #7
Regular Guest
- Join Date
- Oct 2012
- Posts
- 8
-
11-01-2012, 09:45 AM #8
If the unit provides OA ventilation it may be required to run when the space is occupied. Just something to ponder before changing the sequence.
kontrol out
-
11-01-2012, 01:02 PM #9
Regular Guest
- Join Date
- Oct 2012
- Posts
- 8
Thanks for the heads up kontrolphreak, I'll look into that.
So I tried plugging in the block of code, after cleaning it up to make it not throw me an (X) or a (?) here's what I tried running:
The fan will run but only when the BACstat temp is higher than the Setpoint.//Fan S/S Command
Variable Setpoint
Variable HeatRequired
Switch ( HeatRequired, BACstat, 'Heating Setpoint' - 1, 'Heating Setpoint' + 1 )
If Schedule On Then
'Fan Start Stop' = HeatRequired
Else 'Fan Start Stop' = 0
End If
From what I read in the help file, it looks like the right track to use a switch, but it appears it works by having a (var1, var2, on value, off value).
I'm thinking the question now would be how to write the 'on value' to turn on when the setpoint is outside of that +/- 1F deviation, and off value when it's within 1 degree F of the setpoint.
Was thinking of using =! but does anyone know the syntax to say 'is not'? Even that might be murky to try and write out, so would something like this work?
(var1, var2, (setpoint <= +1 and setpoint >= -1), (setpoint >= +1 and setpoint <= -1))
-
11-01-2012, 04:39 PM #10
Professional Member
- Join Date
- Mar 2008
- Location
- Kitchener, Ontario
- Posts
- 491
Hi Cujo67,
Are you able to read programming ? if not I would rethink trying to write it....people don't usually learn to write a different language before being able to speak it or atleast be taught how to interpret it ....I struggle with syntax sometimes cause I work on different vendors..
Variable HeatRequired
It should be HeatRequired = Switch( HeatRequired, AI101(BACstat) , (AV)Setpoint (ON value - 1) , (AV)Setpoint (OFF value) + 1 )
If Schedule On Then
'Fan Start Stop' = HeatRequired
Else 'Fan Start Stop' = 0
End If
-
11-01-2012, 04:46 PM #11
Regular Guest
- Join Date
- Oct 2012
- Posts
- 8
Thanks bdivell, it's throwing me a "Expecting Right Parenthesis" (X) to the left side of the Heat Required now. I tried it with this:
Variable HeatRequired
Variable Setpoint
HeatRequired = Switch( HeatRequired, BACstat , 'Heating Setpoint' (ON value - 1) , 'Heating Setpoint' (OFF value) + 1 )
If Schedule On Then
'Fan Start Stop' = HeatRequired
Else 'Fan Start Stop' = 0
End If
-
11-01-2012, 04:49 PM #12
Professional Member
- Join Date
- Mar 2008
- Location
- Kitchener, Ontario
- Posts
- 491
Are you typing exactly what I wrote? Are you a controls contractor ?.......
Do you have a analog variable created for your temperature setpoint? it looks like you declared a local variable instead.Last edited by bdivell; 11-01-2012 at 05:12 PM.
-
11-01-2012, 05:44 PM #13



, no permission I'm assuming.
