S7 PID FB 41 set up

Randrukie

Member
Join Date
Apr 2017
Location
Tullamore
Posts
7
Hello everybody,
I am new and looking for help with S7 FB 41.

Closed loop pressure control - valve QBS2 I use its monitor line as feedback input to AI and then I want to drive it from AO card with 4...20mA.

There must have been some rescalling work done as I only get 2.8-10.5 mA out from it ( over 0-6Bar) and this is what I need to feed in to analogue card.

Is it still possible to work with Siemens FB41?

Also, its my first PID I attempt and I have no clue which ports I should assign scaled values.

I am looking for some working example in ladder logic. I done tons of research online but found nothing that I could really understand.
It is handwritten as PDFs were too big.

Any help much appreciated.
Regards,
Rob









[email protected]
 
Here is few things you should check:

- Input "MAN_ON" must be FALSE in order to set the controller to automatic and enable PID algorithm.

- To input "CYCLE" you must enter the sampling time of the block here. Ideally you should call your controller in a cyclic interrupt OB and enter the interval time of that OB here.

- You should move MD32 to output "LMN", this is the value which is controlled by the PID (between 4.0 ... 101.0 in your case).
 
Hello Matsdin,
Thanks for showing interest and valuable tips.

My code looks like that right now ( see the attached-sorry for handwriting but S7 software sits on the laptop that by the company's policy cannot be connected to the net).

How could you explain fluctuations at OUT from FC 105? It jumps like 00000.3444424 back to 2.47763882 when there is no input ( at 4mA) and keeps jumping with the input as well. Is this the problem with scaling?

Also Output from FB41 -DB1.DBD4 is stuck at 0000004???

Also I am feeding Value from HMI to give it a set point but not sure if that is the right data type-system just doesn't control to that.

Its my first PID and its terrible- I work like an animal to get it going- you help me amnd my next set of furniture comes from Ikea!
 
If you select FB41 and press F1, it will open a help file which explains how the block works and what the parameters do.

Scaling looks right. when PIW = 616, scaled value should be (616 / 27648) * 6 = 0.13, which is correct. Any fluctuations in measured values are coming from analog input, not from your program.

You need to get FALSE value to input "MAN_ON". By default this input is TRUE, and if you leave it unused it will keep the default value. This means that currently your controller is set to manual mode, and value from input "MAN" is used and limited between "LMN_LLM" and "LMN_HLM" (4.0 ... 101.0). So no controlling is currently done, and output is always 4.0.

Data type for setpoint must be REAL, you may have it already but it's hard to tell from the picture. Also value from FC105 "OUT" should be connected to "PV_IN" but this might also be already the case.
 
Dear Matsdin,

Thank you so much.
1) Yes. I know, I see and I have manuals printed in front of me...maybe I am just, you know-one of them-less able...
If I don't understand stuff I just switch off..
However,it all start to make sense to me!

2)I asked about scaling because I still see good steady feedback value fed into input of FC 105, its healthy, linear, very steady. Still at the out of the block there are fluctuations-significant- up to 50% of the scaled range.

3) I have introduced 'control bit' Boolean which switches off MAN_ON, COM_RST, PVPER_ON.

4) Input 'CYCLE' you say:
'To input "CYCLE" you must enter the sampling time of the block here. Ideally you should call your controller in a cyclic interrupt OB and enter the interval time of that OB here.'
I don't understand that bit but I will get to know.Thanks.

5) My data type for Set Point is set DWORD- I will change it to REAL.

It is a pity I can't publish the code but I face limitations of my company policy or the data limit by PLCS.net.
Not to worry, good to know there are good helping people out there!

I will make those changes and will come back to you-Monday-Tuesday.
Kind Regards,
Rob
 
Hello Matsdin,

Its working! Still scaling is off and there are some other issues but at least its responsive. I will try to fine tune it and come back with some post but yes, I am learning here.

Thank you again its my final college project and I was starting to panic a bit.

Kind Regards,
Rob
 

Similar Topics

Hi folks, so... firstly I have setup a hydraulic pressure test system. The system is used to pump up a volume to a set pressure - i.e. if we need...
Replies
10
Views
3,279
Dear Expert, I'm in a problem where I need to run my G120 CU250S in speed control PID mode and in a torque mode. The switching is done by DI0and...
Replies
1
Views
1,587
I have a project coming up where I need to control the speed of my 5HP pump using a Powerflex 525 with a Pressure Sensor that is 4-20mA. What I am...
Replies
18
Views
13,951
Hi All, With AB RsLogix PID: What is the best way to reset the output to a specific value. For now i'm overwriting the PID.DATA[0] but i'm not...
Replies
9
Views
2,936
Hi everyone, I'm having problems with the response time on my PID loop. I've tri.ed different tunnings but none have worked. In order to have my...
Replies
9
Views
2,877
Back
Top Bottom