coppo
02 Feb 06, 12:29 PM
Join Room example with very minimal code.
based upon example code supplied in online piced software
"logic" help manual.
Supplied in archived "CTA" format.
Download the zip file,
then use the "import archive" function in piced.
you WILL need to shutdown piced and cgate after the import ,
then restart piced ( cgate starts up auto ) other wise the new
megabuxx toolkit project will not be accessible, causing piced
to give you an error message.
code is
[Initialisation]
DisableModule("Joined Room");
-----------------------------
[RUN MODULE]
{this module runs 24/7, and controls when the joined room module
code is used.}
{Depending upon your hardware setup
( as whether the "door switch" contact is N/O or N/C ),
you may need to invert the on/off states for "door switch" = ??}
once (GetLightingState("door switch") = OFF) then
begin
EnableModule("Joined Room");
end;
once (GetLightingState("door switch") = ON) then
begin
DisableModule("Joined Room");
end;
----------------------------
[Joined room module ]
{Code is sourced and based upon the Online "Logic" help manual,
under index listing of "Group address" >> "Track Level". }
if GetCBusTargetLevel("Local Network", "Lighting", "meet 1") <>
GetCBusTargetLevel("Local Network", "Lighting", "meet 2") then
SetLightingLevel("meet 2", GetCBusTargetLevel("Local Network", "Lighting", "meet 1"),
GetCBusRampRate("Local Network", "Lighting", "meet 1"));
based upon example code supplied in online piced software
"logic" help manual.
Supplied in archived "CTA" format.
Download the zip file,
then use the "import archive" function in piced.
you WILL need to shutdown piced and cgate after the import ,
then restart piced ( cgate starts up auto ) other wise the new
megabuxx toolkit project will not be accessible, causing piced
to give you an error message.
code is
[Initialisation]
DisableModule("Joined Room");
-----------------------------
[RUN MODULE]
{this module runs 24/7, and controls when the joined room module
code is used.}
{Depending upon your hardware setup
( as whether the "door switch" contact is N/O or N/C ),
you may need to invert the on/off states for "door switch" = ??}
once (GetLightingState("door switch") = OFF) then
begin
EnableModule("Joined Room");
end;
once (GetLightingState("door switch") = ON) then
begin
DisableModule("Joined Room");
end;
----------------------------
[Joined room module ]
{Code is sourced and based upon the Online "Logic" help manual,
under index listing of "Group address" >> "Track Level". }
if GetCBusTargetLevel("Local Network", "Lighting", "meet 1") <>
GetCBusTargetLevel("Local Network", "Lighting", "meet 2") then
SetLightingLevel("meet 2", GetCBusTargetLevel("Local Network", "Lighting", "meet 1"),
GetCBusRampRate("Local Network", "Lighting", "meet 1"));