SYSTEM GPIO_TEST4

In the GPIO_TEST3 example, a pushbutton was "soft wired" to an LED in such a way that the LED was ON when the pushbutton was up, and OFF when the pushbutton was down. This is the reverse of what you would usually expect, so in the present system configuration, the signal is inverted using an instance of the FB_NOT function block type so that the LED is ON when the pushbutton is down.
In this system configuration:
  • I/O is configured and wired as in the GPIO_TEST3 system configuration.
  • Upon launching the system configuration:
    • An empty test window is opened.
    • In the GPIO.RES1 resource, an event is issued at the DT.IND terminal, and is passed in succession to the RUN.STOP and RUN.START terminals. This results in the RUN cycle time being reset to the current value at the RUN.DT input, following which events are issued at intervals of RUN.DT at the RUN.EO terminal.
  • At each occurrence of an event at the RUN.EO output:
    • An event is passed from RUN.EO to BUTTON.REQ.
    • The button state is read to BUTTON.X (TRUE=up, FALSE=down) and is passed to LED.X.
    • An event is passed from BUTTON.CNF to LED.REQ.
    • The value at LED.X is written to the LED output (TRUE=high=ON, FALSE=low=OFF)
Last updated: 2016-02-15.
©2015,2016 Holobloc Inc.. All rights reserved.