If you're using power from the board, when the board is powered off the buzzer will not go off. However, when the board is first powered on it will go off until the plc code corrects it.
You can always bypass the transistor altogether and just use an output to drive the buzzer. A little...