PID FB41(step7) OPC Matlab

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
Post Reply
rigard
Posts: 7
Joined: Mon Jun 01, 2015 5:51 am

PID FB41(step7) OPC Matlab

Post by rigard » Tue Feb 14, 2017 5:39 am

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.

I know that the formula FB41 - K (1 + 1 / Tis + Tds).
Parameters PID controller Matlab I have chosen the following:
Kp=5.7417
Ki=1.6724
Kd=9.4678


I used a variable block FB41 - PV, for input (OPC Read) and output (OPC write).
I also tried to use the signal for the job via the OPC FB41 setpoint (SP_INT), PV ( for the signal after the object) and LMN (for input to object in Matlab).
As a result, in both cases I received a completely different graphics, different from PID controller Matlab and FB41 (Step7) .


How should I choose the parameters of TI and TD, and correctly configure block PID controller FB41 (Step7) knowing the coefficients PID controller Matlab / simulink?

I looked a lot of articles, documentation of FB41, but did not understand how to implement the controller using Matlab and the OPC protocol.

I can send you the Step7 project with the FB41, for example.

I really hope for your help.
Thanks for the answer.
(sos)

Image[/url]

qqwww
Posts: 12
Joined: Wed Apr 21, 2010 6:24 pm

Re: PID FB41(step7) OPC Matlab

Post by qqwww » Wed Feb 15, 2017 12:22 am

From which OB do you call FB41?

rigard
Posts: 7
Joined: Mon Jun 01, 2015 5:51 am

Re: PID FB41(step7) OPC Matlab

Post by rigard » Thu Feb 16, 2017 10:20 am

qqwww wrote: From which OB do you call FB41?
OB1

qqwww
Posts: 12
Joined: Wed Apr 21, 2010 6:24 pm

Re: PID FB41(step7) OPC Matlab

Post by qqwww » Thu Feb 16, 2017 12:50 pm

It is not correct.
You have to use cyclic interrupts like OB30-OB38 for PID regulator.

Post Reply