Opc Matlab-PlcSim Fb41 model

kolchak

Member
Join Date
Dec 2016
Location
Moscow
Posts
20
Hello!

Please help with the answer to the question of the right choice of TI and TD parameters for PID FB41 block.
I have a process model in Matlab-simulink, the PID controller is in Step7, FB41 block. Data communication takes place on the OPC protocol. The output of the PID controller (Step7) enters the object in Matlab, where I see the result of the process to scope.

Рlease help me deal with the electric drive model and the PID controller. I calculated all the parameters of the model, the engine.
I'm using an OPC connection between the matlab (model) and step7 (PID controller FB41)
Please tell me why the process diagrams may differ so much?
Is there something wrong in setting up the PID controller (CONT_C)?
I calculated the PID regulator coefficients like this:

Kp = 4
Ki = 2.5
Kd = 1

The values for the S7 would be:

Gain = Kp = 4
Ti = Kp/Ki = 4/2.5 = 1.6
Td = Kd/Kp = 1/2.5 = 0.25

In the future, I want to speed up the speed regulator's electric drive, improve it to a two-loop model with a speed regulator and current regulator and explore the system.

Screenshots of the block and model settings I showed you below:
c96a0e1dfd93.png

ccf103980bc5.png

c7f612444fa2.png

41a3ab8495de.png

eacc3bc37393.png


Scope 2 - Results, only Matlab (good)
Scope 1 - Results, Matlab - PLCSIM using OPC (wrong)
Thank you for the answer!
Best Regards, Yuri.
 
Maybe the problem is that the OPC communication is not cycle precise (not synchronized with the plc cycle), or maybe it not writes the values fast enough into the plc.

You can try with a testsetup:
In you Matlab Task increase an integer every step and write it into the plc via OPC.
Inside the S7 program cyclic interrupt, check if the difference between last and actual cycle is only one. If more, then you lost one cycle.
 
You can try with a testsetup:
In you Matlab Task increase an integer every step and write it into the plc via OPC.
Inside the S7 program cyclic interrupt, check if the difference between last and actual cycle is only one. If more, then you lost one cycle.

Hello, Thomas!

I did not understand what you meant, could you please explain more details?
Thank you.
 

Similar Topics

Hello PLC expert i need your help. i want to use OPC communication and Matlab to read and write data from/to a Logix5561. A Topic is...
Replies
0
Views
1,641
Hello! Please help with the answer to the question of the right choice of TI and TD parameters for PID FB41 block. I have a process model in...
Replies
27
Views
11,401
I am running CCW 13 trying to upload to a micro 820 vers.12 I get an output message OPC server is unable to load project controller. Please help!
Replies
1
Views
103
I know nothing about simaticnet OPC server. I do know Kepware. I would only ever scale raw to engineering in the PLC, but it is possible to scale...
Replies
5
Views
198
If anyone has a crack for IBH OPC Server, please send it to: [email protected] Urgently. Thanks in advance!
Replies
1
Views
107
Back
Top Bottom