<< Prev        Next >>

ID : 7011

Illuminated Push Button

An illuminated push button combines button and lamp operation. It therefore supports Clicked, Released events for adding action source code.

The property state gives the lamp's current state just as it does for lamps and check boxes.

Illuminated Push Button Example

1

Load the editor and place the button and a timer just as you would with a regular button.

2

Changing illuminated push button properties

The illuminated Push Button has separate action source code blocks for the events "Clicked" and "Released".

3

Adding action source code

The following example uses illuminated push buttons to run a program and display an I/O state. Pressing this button runs a program in the same folder. (This program waits two seconds and then turns IO[24] on.) The lamp in the button tracks IO[24].

Add the necessary parts to the panel layout.

4

This part supports two events for adding action source code: Clicked, Released. This example uses only two.

IPB1.State = IO[24] ' copy IO[24] state into IPB1

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

5

Write the program to run using WINCAPSIII.

Compile this and the panel layout, download them to the COBOTTA, and test.

ID : 7011

<< Prev        Next >>