This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

simple closed loop control
#3
That is logical behavior, if you write to the switch object for example 1/1/1 and your feedback is 1/2/1 then you need to know the value of 1/2/1 before writing to 1/1/1..  

grp.checkwrite checks in this case the internal value of the controller of 1/1/1 so the last sended value and this does not check the actual value of the feedback object 1/2/1.. the same counts for Daniels solution, this will get the value of 1/2/1 but writing to 1/1/1 does not change by it.

What you might want to do is send write always to the bus and use grp.write.

If you want to make the write depending on the feedback you need to send the feedback cyclic from the actuator, and make in your script a condition where you compare 1/2/1 with the new value you want to write to 1/1/1.
Reply


Messages In This Thread
simple closed loop control - by khalil - 16.11.2021, 16:30
RE: simple closed loop control - by Daniel - 16.11.2021, 17:28
RE: simple closed loop control - by Erwin van der Zwart - 16.11.2021, 18:41
RE: simple closed loop control - by admin - 17.11.2021, 08:16
RE: simple closed loop control - by khalil - 17.11.2021, 08:50
RE: simple closed loop control - by khalil - 21.11.2021, 15:51
RE: simple closed loop control - by admin - 22.11.2021, 06:59
RE: simple closed loop control - by khalil - 22.11.2021, 09:03

Forum Jump: