What is the difference between piston and diaphragm in engineering thermodynamics?

In engineering thermodynamics, pistons are often easy to install and disassemble, and are usually fastened in the form of threads. Separators are generally fixed parts, and a few detachable separators are fastened in the form of slots and bolts and nuts. In addition, compared with the piston, the diaphragm is often larger and more able to withstand external forces.