Fb 58

tbarringer

Member
Join Date
Feb 2010
Location
Gerogia
Posts
6
I am new to programming. I am using a Siemens S7-300. I am using FB 58 to do PID control. I have multipule heaters on my machine each of which I want to control using PID control. If I just input the fb 58 into a line with a scale function for each themocouple will i have independent pid controls or will all those thermocouple be virtually linked to one PID controller?
 
Do a search you will find lots of old threads

basically each call will be a unique control

also you would need to call from an interrupt OB, such as OB35
 
Try some of these

http://www.plctalk.net/qanda/showthread.php?t=43060&highlight=fb58

http://www.plctalk.net/qanda/showthread.php?t=26074&highlight=fb58

http://www.plctalk.net/qanda/showthread.php?t=25767&highlight=fb58

http://www.plctalk.net/qanda/showthread.php?t=6015&highlight=fb58



There are a number of OB's resident in the PLC, these are called automatically by the system. Some are timed interrupt which is critical for most PID loops.

They are called once you put a program in (such as CALL FB58)

Look in the CPU properties and see what is available in your PLC.
 
Each loop will be its own call to the PID block. Give each called block its own instance data block.

Call the pid block in OB35 and pass the cycle time in as a constant. Consult your hardware configuration of the cpu for the timing of OB35. The default on 300 is 100ms. For temperature and humidity loops for rooms I change it to 1000ms. This is up to you to decide. Once you know your OB35 cycle time, pass it in to the block call "cycle" parameter as a constant, such as T#1s or T#100ms.

There is a lot of ways to do it, but I don't do any code in OB35 other than calling the block with the cycle time input. Then I use an FC for each loop, where I control the inputs to the PID and use the outputs.

I can post an example if you need it, but it will be Tuesday before I am at my work computer.
 
Back
Top Bottom