ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Inputs and outputs > Light controllers > Light controller actions

Light controller actions

Introduction

As you may know, a procedure can include actions, some of which can affect a light controller - these are detailed below.

Actions

Switch the light controller onTurns the lights on at the current light level. If a ramp duration has been set, then the lights will ramp to the specified level over the specified duration, otherwise they'll come on instantly.

If the light is already on, then this action will have no effect. If the light is on at a low level and you want to make it 100%, then use the Set light level action (see below). If the light is ramping and you want it to stop ramping and jump instantly to a new level then, again, use the Set light level action.

Switch the light controller offTurns the lights off. If a ramp duration has been set, then the lights will ramp from their current level to off over the specified duration, otherwise they'll switch off instantly. If the light is already off, then this action will have no effect.
Set light levelChanges the light level of the lights to the value specified in the action's parameter. The parameter is percent (in some legacy experiments it may be in lux). If the lights are on, then if there is no ramp duration set, they will change instantly to the new level; otherwise, if there is a ramp duration set, they will change from the current level to the new level over the specified duration. If the lights are off, then the level will be noted and next time they are switched on, they will be at this level. This action will not switch the lights on.
Set ramp durationSets the duration over which the light controller will change from one light level to another. The duration can be specified with units of ms (milliseconds), s (seconds), min or m (minutes), or h (hours); if no units are given, seconds will be assumed. To set no ramp, so changes to light levels are instant, use a value of 0.

If you want to create a specific slope, for example 10%/s, then you can use the lighting controller's light level variable in your procedure to determine what the light level is now, and then set the ramp duration to achieve your target light level with the desired slope.

If you set the ramp duration while the controller is ramping, the new duration will only be used the next time you change the light level.

Important: A ramp duration is used once and then reset to zero. For example, if you set a light controller to have a level of 100% and a ramp duration of 10s and then you switch the light on, it will ramp from off to 100% over 10s. If you then switch the light off, it will turn off instantly. If you wanted it to ramp off over 10s, then you would need to set the ramp duration again, before you switch it off.

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T0299