A PLC is a relay panel that moved into a box. Power supply, a processor running a program, input cards that turn field contacts and signals into bits and numbers, output cards that turn bits back into contacts and signals, and a communication port to a screen or a network. You will find them in purifier controllers, boiler controls, crane cabins, hatch cover and ramp systems, the engine safety system, and increasingly inside the switchboard.
The lights are the first diagnostic and the most ignored. On the CPU: power, run, fault, battery. On every I/O card: one LED per channel, lit when the input is on or the output is driven. A sensor that is made and an input LED that is dark means the problem is between the sensor and the card (wiring, power, sinking/sourcing, 1.12) or, less often, a failed input channel: 24 V on the terminal with the LED dark is the card, 0 V is the field. An input LED lit and the program not acting on it means the program or the card's address. An output LED lit and the coil not pulling in means the card's own output, the output group's supply fuse, the wiring or the coil. An output LED dark when it should be lit means the program has not been told what it needs to be told; go back to the inputs it is waiting for. That one habit, reading the LEDs against the drawing, finds most PLC faults without a laptop.
The backup battery holds the program and the clock on older units. It has a date on it and a low-battery LED, and when it dies the program goes with it on the next power cycle, so there must be a backup of the program somewhere you can find.
Pocket rules. LEDs first, laptop second. Input dark with the sensor made: field wiring, or the channel if the terminal has volts. Output lit with nothing happening: the card's output, its supply, or the field wiring. Output dark: find the input it is waiting for. Know where the program backup lives and when the battery dies.
Electrical or mechanical. Power, I/O cards, wiring, battery, backups, reading the program: electrical. Changing the program: vendor, or you with the go-ahead and a backup first.