Siemens level control (FB41)

sirhiss2

Member
Join Date
Oct 2003
Posts
109
I'm still having trouble getting this PID (FB41) block working. :confused:

Attached you will find the program that I have written so far.
I was wondering if you guys can take a look at it and offer some suggestions as to what I might be doing wrong.

I input a 4-20mA signal and nothing happens at the output of the block.

I've checked my analog Input and output cards, they are set up correctly for 4-20 mA. They are functioning properly. (y)

I've been trying to change MAN_ON to a False state (Automatic Mode)without much luck. In DB1 I changed my view so that I could edit items within it.
I then saved the block and downloaded it to the plc. (Downloaded everything)
When I call the block up again, when I go online with the PLC, it seems that it turns back to a True state. Am I missing something?
:unsure:
My 1st concern is with OB100 COM_RST. Is this causing all my values to change (reset to default) with in OB35 (FB41)? In this case how would this block function? It will not perform integration.

If I kept this PID in manual mode I would have to scale and unscale my inputs and outputs, right?

Thank you for any help and guidance you give.
 
Hello SirHiss;

Looking at your program, the first thing I notice is that you are not attributing any values to the inputs of your FB41. I would suggest that you set up a VAT table (for test purposes) with all your input values (M0.1, M0.2, MD20 [set it up as a REAL variable], etc...).
Trying to write to those values through the instance DB is not a recommended procedure. At this point the only variable with a defined value is your Always_On bit (M0.0); there is no valid setpoint value, for example.
To set up a VAT table, insert a new (VAT) block in the Blocks folder of your program; open it and fill in the addresses to be monitored; connect to the CPU and write the required values to the variables selected.
Once you get the FB41 block working, you will have to program logic that will allow you to change setpoints and parameters (using the Always_On bit for permanent selection of proportional and integral action, for example, is a simple way to go.
Keep us posted, we'll see how we can help you further.
Hope this helps,
Daniel Chartier
 
I fixed it for you and re-attached it. The Process Variable in and the setpoint have to be REAL, which means scaling the Analog Input. The Com_Rst needs to be a 1 on the first scan and your gain should start around 1.0. You can also set the HIGH and LOW output limits.
 
Hello Roy- I hope things are going well.

I sent this sample to Sirhiss2 a couple of weeks ago. You can do a search through the posts. It does work (or did) with the PVPER_ON. This sets up a recieve at PV_PER
to a scaled value of basically 0-27648. I ran it though PLC Sim and it worked fine. I normally do what you did though and scale everything to 0-100%. I was trying to make it work just like his past posts were stated.

Jay
 
Hi guys,
According to the documentation with this block, if you set MAN_ON to a false state and you set PVPER_ON as true then the scaling should be done automaticly. My problem is getting MAN_ON to stay at a false state. This was my question.

"In DB1 I changed my view so that I could edit items within it. I then saved the block and downloaded it to the plc. (Downloaded everything) When I call the block up again, when I go online with the PLC, it seems that it turns back to a True state. Am I missing something?"

Is there a step that I'm missing? any suggestions?
 
The "Initial Value" is set to true. To change it, go to "Decloration View" and make it false. Then back to "Data View" and under "Edit" tab click "Set Initial Values" and say Yes. You have a "Manual Bit" conected to the "Handle" on the outside of the box that should control that function, anyway. I prefer using FB58, it seems to be easier to configure and controls quite nice for anything, including temperature.
 
thanks RRobbins,
Could you send me some info on that block (FB58).
It may be better suited for this application.
My email address is [email protected].

I don't think I could change anything while in Decloration View.
I could change values in data view though.
The manual bit don't seem to want to work. no matter what value I put at that address it always goes back to the default true state. even when I'm in run mode and I "modify 0", the block don't seem to want to go into automatic mode.

I'm thinking it's something that I'm missing, maybe something small.

thanks
 
Hi Guys,
I am Muhammad Bilal working for Siemens Pakistan. I am writing a program to control flow of a liquid using PID block FB41 but i dont understant how to program and perameterize it. If somebody has a sample program please send me.
Thanks
 
Wow, this is not encouraging: a Siemens employee asking here for help!
(On second thoughts, is this the highest compliment to PLCs.net?)

regards

Ken
 
hahahahah..........!
not at all, basically i can not access to my PC bc i m not in my city and i m starting the project so i think if somebody konws how to program FB41 so its better to ask rather hit and trial. anyway if its complement for the PLC.net members that a siemens employee is asking for help then its no problem for me. i think there is no shame to ask anything from any person rather its a siemens employee or a employee of unkown company. Finally thank you very much for the assistance.
Regards,
Bilal
 
How are you going to program the PLC if you have no access to your PC ?

You are right that there is no shame in asking - however your customers may expect a greater standard of product awareness from you - still , it wouldn't be the first time I have spoken to a rep and ended up giving them the training course !
 
Dear i dont have my PC but i have my PG ok. and as far as support is concern so siemens has a very huge detabase and support for its engineers. sending query doesnt mean that i cant do it or siemens is not supporting me its just for help from some of experience persons.
anyway thank you for reply.
Bilal
 
Yes , I know - I contract for SAS on various projects - we are however required to have a fair general knowledge of what the software is capable of . This of course doesn't mean that every engineer knows all there is to know , but for example we would be able to add a drive or PID loop on site without recourse to backup . I have had experience where Siemens sales and product support guys get involved in a little "private" work , particularly in places where programmers may be a bit thin on the ground . I am surprised that FB41 is creating a problem for you - as Siemens themselves normally use the encapsulated version of this block which is easy as pie to incorporate , and takes any guesswork out of setting up a PID loop .

No offence intended , I trust you didn't infer any , I just thought by the tone of your post that rather than being a software guy , you were a salesman/product support guy doing the under the table bit .
 
Hey guy's this is what i have. For level control.

Hope this helps. This FB41 do have a few quarks! not the easiest to figure out. There are a few mistakes in the info that siemens presented on this block. No real biggies just little one's that will fool you up. For ex. it may ask you for HEx in the documentation but it really is looking for BCD. Or something like that.
Cheers;)
 
Last edited:

Similar Topics

I'm Still trying to setup a basic level control using this FB41 Block. bawling I have had help from some of you guys before so I will field these...
Replies
14
Views
13,355
Hello PLCs.net! Does anyone know how to configure S7 automated backups for S7 PLCs V15.1? I am having trouble setting up the ConfigurationFile...
Replies
0
Views
1,174
Hello, We have a 6es7 32101BL00-0AA0 DI card. There is a level switch to be added from an E&H FMR62. Our client is of the opinion that as the...
Replies
2
Views
1,231
SIEMENS LR460 Radar Level Meter,Set the maximum range 48 m, the minimum range 0 m.I have installed the RSLOGIX 5000 V17.00 The output 4-20ma...
Replies
8
Views
3,816
Hi Guys! :scratch: Could some one please help out here! I had to change a failing four-wire silo level probe at work. I found that the spare...
Replies
5
Views
3,921
Back
Top Bottom