<< Prev        Next >>

ID : 6888

Pilot Lamp

The pilot lamp is purposed to display the ON/OFF state of the object. The pilot lamp monitors and displays the object state by combined with a timer.

The following example uses a lamp to monitor an I/O state.

Pilot Lamp Example

1

Load the editor and place a lamp and a timer on the panel layout.

2

Adding action source code

The lamp is correspond with the interval time of the timer and able to display the state of the object.

Using this relationship, in order to display the state of I/O variable #25 as own state, select the TIMER action from the Source Code Edit window then add the below to the skeleton created by the Source Code Edit window.

PL1.State = IO [25]

This statement means update the lamp state from the IO[25] state.

 

By changing the interval setting of the timer to 500, the state is updated every 500ms.
3

Compiling this panel layout and downloading it to the COBOTTA produces the following displays.

Lamp on

Lamp off

4

Changing lamp properties

The procedures for accessing properties are the same as for all other parts.

ID : 6888

<< Prev        Next >>