TwinCAT2 Controller Toolbox

swedeleaner

Member
Join Date
Dec 2013
Location
Göteborg
Posts
143
Anyone of you that are familiar with Twincat2 Control Toolbox?

I want to make use of a PID-controller for a cooling solution, but this was harder than i expected.

The basic PID-controller in codesys let me use negative gain it, but that PID-controller doesn´t use limiters, so when hitting the max for an INT, it just starts over from maximum negative INT... :mad: (A jump from +32000 to -32000, my valves will freak out)

I nagged on my boss to buy the Controller Toolbox, but the PID-controllers in the pack just won´t let me use negative gain... The FB:s error flag is trigged, telling me i cant use negative gain.

There is however a FB_CTRL_PID_SPLITRANGE.

The manual says it can be used for cooling solutions, but i have only gotten the heating to work. (The FB uses two outputs)

There is something called eParameterRecord, and it´s in heating as default.
But the information system doesn´t even describe it, nor googling helps.

To narrow it down. I want to use a PID-controller for a cooling solution with an output limiter. Which way should I choose? :oops:
 
sorry i dont use the toolbox.
i got it free from www.oscat.de it is very good documented in english
in oscat you can see the actual code (and change it if needed)

you can use the function LIMIT for your problem.
in the toolbox you can set the K (float) to a negative number this changes the behavior of the valve.
in the splitrange function i saw they are default 0 so no action at all, two different K one for heating and one for cooling.
 
Thanks sir!

I found out about OSCAT about two days ago, and found the PID i was looking for. Everything is working now.

But still a ****ing shame that even the swedish Beckhoff-support can´t get the damn regulator to work.

Guess Beckhoff did a proper job writing that regulator...:mad:
 

Similar Topics

Hi All, I have to connect a slave (Digiforce 9311) to EtherNET/IP scanner (EL6652). The EDS file informations must be transfered into IO...
Replies
0
Views
357
I have 10 years expereience about programming TwinCAT2 PLC. However, there is still one thing that I can't find a best solution about updating the...
Replies
0
Views
797
Ok so probably a really dumb question. How do I do set a variable equal to a value in ladder? I can't seem to find a ':=' equivalent in ladder...
Replies
1
Views
1,315
I have some code that is going to trigger calculations to happen either when "A" happens, or every 1 second. For the 1second trigger, I am...
Replies
3
Views
1,625
I am needing to convert the low DWORD of a timestamp into a LREAL. The DWORD is a 32bit unsigned number. In TwinCat2, I keep getting a negative...
Replies
3
Views
1,681
Back
Top Bottom