B version is the later model.
But they are different. In the B version PLC I/O is built in. The P version needs the external PLC I/O card.