Search code examples
blockdiagramlabviewled

How can I create a more elegant array diagram in LabVIEW?


I want the LEDs to light up in the following order:

station A - w - w2 - station B - w2 - w3 - w4 - station C -w4 - w5 - station D - w5 - w4 - w3 - station E - w3 - w2 - w - station A

and this is repeated.

I started giving a false value to the leds that can't be lit in that case but I didn't continue after the fourth. Does anyone have any idea how this could be solved more elegantly?

enter image description here


Solution

  • What you really want is a Simple State Machine.

    These are a recommended early design pattern from NI and allow you to do the kind of sequential operation you are after while allowing for more dynamic responsiveness to inputs.

    This allows you to do a bunch of different things like:

    • Not need all those off/on local variables
    • Have a single timer running for consistent operation time
    • The ability to interrupt the sequence at any step
    • Significantly simplified extension of the process.

    Something like this: Basic led state machine