The MATLAB enables engineers to program their PLCs when they do not have enough knowledge to use other programs to program a PLC. In addition, there is a wide range of modern controllers such as MPCs and fuzzy systems with a complex construction for implementation on PLCs. MATLAB with its user-friendly blocks helps engineers to use these kinds of controllers without having adequate knowledge about the controllers.
To tell you the truth, I do not know which library in the MATLAB prepares this ability to program PLCs or even on each brand of PLCs. However, I use this MATLAB/SIMULINK ability to program other kinds of processors such as FPGAs and Raspberry Pi.
MATLAB programing is very easy by using building blocks that's only benefit. But I prefere do programming with RS logix only because it requires very less memory space compare to MATLAB programs. And you find easy solution to your programs compare to MATLAB.
The best thing about using the MATLAB compared to other IDEs for PLC programming is that you can develop the control system in MATLAB Simulink environment using blocks from Simulink library for your system and you can test the closed loop control performance on MATLAB as well. Once you are satisfied with the performance of the closed loop control system, you can generate the IEC 61131-3 Structured Text for the same and you can download this Structured Text code on your PLC and start running your system.
And I would also agree with Emad's answer that since most PLCs are limited by conventional control algorithms, MATLAB allows you to use more advanced control algorithms like Fuzzy Logic, Model Predictive Control and Neural Network based Control etc.
You can find more detail of the "SImulink PLC Coder" which enables you to do this in the link below (with examples):
My purpose of asking this question was i am looking for a solution that will give me process performance of a machine which is running on PLC control. I want to know how can i get a trend of PLC operation w.r.t. actual process operation? So, that if there is any fault occurs i can analyse that directly within less time. Is it possible to create a simulation monitoring system with MATLAB for a PLC controlled system or there is something else available?
You can of course have the trends of PLC parameters in MATLAB. There are several ways to do it. One of the most simplest way is to use OPC as an interface between MATLAB and PLC. You can configure MATLAB as an OPC client and PLC as an OPC server and all the parameters of PLC can be acquired in MATLAB and hence can be plotted in terms of trends as well.