Beckhoff PID function block

karlek

Member
Join Date
Jul 2014
Location
Varazdin, Croatia
Posts
68
Hello everyone,

Has anyone worked with Beckhoff function block fb_ctrl_pid (https://infosys.beckhoff.com/englis...box/html/tcplclibcontoller_ctrl_pid.htm&id=)?

I would like to find out what is the behaviour of the PID controller in following modes of operation:

TYPE E_CTRL_MODE : ( eCTRL_MODE_IDLE := 0, (* mode idle *) eCTRL_MODE_PASSIVE := 1, (* mode passive *) eCTRL_MODE_ACTIVE := 2, (* mode active *) eCTRL_MODE_RESET := 3, (* mode reset *) eCTRL_MODE_MANUAL := 4, (* mode manual *) eCTRL_MODE_TUNE := 5, (* mode tuning *) eCTRL_MODE_SELFTEST := 6, (* mode selftest *) eCTRL_MODE_SYNC_MOVEMENT := 7 (* mode synchronize *) );

Documentation doesn't say anything about each of these, while I was using it I tried just the active mode and the controller worked as expected. What about other modes?
 
We use that PID function block to control hydraulic valve stem position via LVDT feedback (+/-10 V signal). Output signal is +/-10V to a Delta Computer +/-100 mA converter that drives a Moog servo-valve on the actuator. The PLC runs a 1 ms cycle time. Any faster wouldn't help because the valves are large and can move full stroke <10 Hz.

We bought Beckhoff's Controller Toolbox library, but the basic PID block is the only one there I found of interest. I simply followed Beckhoff's examples to set PID constants (via a structure) and link to I/O variables. The function is called in your ST code (or FBD), so it updates each PLC cycle. It must store past readings internally (for I & D action) since transparent to the developer.

I don't recall if there is a basic PID block in their standard libraries. If doing simple proportional-only control, one could easily roll their own in just one line of ST. If derivative action, your function must track past values and perhaps add a noise filter. Integral action adds more issues - reset windup, bumpless transfer, so a store-bought solution gets smarter (except those in graduate school whose time is not valued).
 
We use that PID function block to control hydraulic valve stem position via LVDT feedback (+/-10 V signal). Output signal is +/-10V to a Delta Computer +/-100 mA converter that drives a Moog servo-valve on the actuator. The PLC runs a 1 ms cycle time. Any faster wouldn't help because the valves are large and can move full stroke <10 Hz.

We bought Beckhoff's Controller Toolbox library, but the basic PID block is the only one there I found of interest. I simply followed Beckhoff's examples to set PID constants (via a structure) and link to I/O variables. The function is called in your ST code (or FBD), so it updates each PLC cycle. It must store past readings internally (for I & D action) since transparent to the developer.

I don't recall if there is a basic PID block in their standard libraries. If doing simple proportional-only control, one could easily roll their own in just one line of ST. If derivative action, your function must track past values and perhaps add a noise filter. Integral action adds more issues - reset windup, bumpless transfer, so a store-bought solution gets smarter (except those in graduate school whose time is not valued).

Thanks for the explanation, but I think you didn't get my question quite right :) You described ordinary PID behaviour, whereas my question was concentrated on particular modes of operation which are available in Beckhoff's PID function block (I have linked FB's documentation in my post above where you see all the available modes user can choose). I would like to know how does FB behave in each particular mode, and Beckhoff didn't explain that in details.

Shooter gave an useful link where some modes are described:

"eCTRL_MODE_PASSIVE The output or outputs of the block are set to zero, but the internal states are retained.
eCTRL_MODE_ACTIVE The block is executed in accordance with its description, and appropriate output values are calculated (normal operation).
eCTRL_MODE_RESET All internal states are reset in this operating mode, and the error bit is cleared.
eCTRL_MODE_MANUAL
The value of the input value fManSyncValue is provided at the output (manual operation)."

but unfortunately there is no information how does controller work in other modes that are available (tune, selftest, synchronize).

I can presume that tune is used for changing PID constants "on the fly" while your process is online and executing together with the PLC code, but it would be nice if Beckhoff provided some documentation on this.
 
Last edited:
karlek,
I did understand your question. I simply related my experience in case it helps other readers. If you do resolve how all the advanced features of Beckhoff's PID block work and how to enable them, please relate for everyone else here.
 
karlek,
I did understand your question. I simply related my experience in case it helps other readers. If you do resolve how all the advanced features of Beckhoff's PID block work and how to enable them, please relate for everyone else here.

No hard feelings, it is nice that you shared your experience with the PID :) Well, recently I haven't worked with the PID so I didn't have a chance to try all those modes and currently I cannot contribute any more on this topic.
 

Similar Topics

I have PID temperature control which will connect to Beckhoff EL4004(0v-10v). How I can program it to let EL4004 to control the temperature?
Replies
7
Views
2,630
Hi everyone, This is my first time posting, so please forgive any omissions or mistakes. I am attempting to control the velocity of a stepper...
Replies
18
Views
1,000
Hello sameone have Beckhoff PLC Siemens Sinamics V90 configuration example?
Replies
0
Views
98
hello, I am using Beckhoff with TwinCAT3 and when I change or add some new hardware or for any reason, there is a mismatch in the real hardware vs...
Replies
1
Views
126
I have a Beckhoff CX7000 IPC with some digital I/O built-in and I additionally need two analog inputs 0-10V. Can I install both Ethernet terminals...
Replies
4
Views
207
Back
Top Bottom