Author |
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: December 22 2005 at 12:49 | IP Logged
|
|
|
You cut me deep Tony . Look at the ph_addtoglobal (for numerics) and the ph_concatglobal (for strings).
These functions are useful because they return the new value of the global and save you some code.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 22 2005 at 14:12 | IP Logged
|
|
|
Hmm, these are not in my help file! You must have a newer one...
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: December 22 2005 at 15:41 | IP Logged
|
|
|
Thats wierd. These functions were added a ways back. Im wondering if the Installer is not overwriting the help file.
Oh my gosh, that must mean you've been missing out on all the new functions .
In any event, you can get the latest help file from this link: http://power-home.com/download/ph-help.chm. Be sure and save it to your hard drive and then open it. For some reason, you cant view the help file on the website (at least I couldnt). It probably has something to do with relative paths and such when the help was constructed.
HTH,
Dave.
|
Back to Top |
|
|
krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: December 24 2005 at 03:15 | IP Logged
|
|
|
I am thinking now that there is no need for a complete statement, as TonyNo pointed out that a Virtual Module cannot have the minus sign... The Code is shorter when I only update the status when the sign is plus... when the outside temp is 0 or below 0 then the virtual Module is not updated with the current temperature... Or I could update the virtual module with an Unknown Status.... Is that possible from a formula or do I have to use SQL in that case?
Peter
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: January 03 2006 at 15:06 | IP Logged
|
|
|
Peter,
You would have to use SQL in order to set a status to unknown. It's easy enough though:
ph_directsql("update x10unitcode set status = 0 where id = 'A' and unit = 1")
The above statement will set X10 unit A1 to a status of unknown.
Dave.
|
Back to Top |
|
|
krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: January 07 2006 at 03:25 | IP Logged
|
|
|
Thanks Dave, will adapt the code this weekend...
Peter
update: have entered the code and no ! so looking gooood!
Edited by krommetje
|
Back to Top |
|
|