The invention discloses a configurable PLC based on a PCIe bus. The PLC comprises a microcontroller, an FPGA, a PHY chip, a memory unit, a digital quantity input unit, a digital quantity output unit,an analog quantity input unit, and an analog quantity output unit. A realization mode of the PCIe bus is characterized in that the PCIe bus is connected to an FPGA device through a connector, the PCIebus is realized by the FPGA, and a device connection mode of a point-to-point serial connection is formed. The realization mode of an online configurable function is characterized in that logic function online configuration is realized through using an architecture scheme of a single-chip Cortex-4ARM and a PHY chip without a peripheral memory; and five-language programming compilation parsing execution of the most common IEC61131-3 is possessed and a ladder diagram, a function block diagram, a sequence function diagram, an instruction list and a structured text are included. The configurablePLC has the characteristics of a high transmission bandwidth, high transmission reliability, a large data volume, a high transmission rate, safe and timely data transmission, diversified functions, low cost, scalability, and a flexible and configurable interconnection structure.