Hi all, searching on web i found the code for implementing a Kalman filter. I'd like to implement it in codesys in ST, but im not so skilled in coding so i dont know how to translate that code in ST. Can someone help? This is the code: float kalmanFilter(float accAngle, float gyroRate) { float y, S; float K_0, K_1; KFangle += DT * (gyroRate - _bias); P_00 += - DT * (P_10 + P_01) + Q_angle * DT; P_01 += - DT * P_11; P_10 += - DT * P_11; P_11 += + Q_gyro * DT; y = accAngle - KFangle; S = P_00 + R_angle;...
thank you Thomas! I correct with the full name of the function and it works!
Hi, i'm trying to use a function from oscat library. If i use it with CFC it works, but in ST not, for syntax errors or something similar. I get the error "oscat_basic.ATAN2" is of type FUNCTION and cannot be instantiated. Can someone tell me the error(s)? Thanks, BR
Hi, i'm trying to use a function from oscat library. If i use it with CFC it works, but in ST not, for syntax errors or something similar, can someone tell me the error(s)? Thanks, BR
Hi all, someone can help me to understand why PCF8591 doesn't work? I tested with python and it works, so connection are ok and i2c works, but in codesys i dont see any value, I add some image maybe someone knows where is the problem. I used the example https://forge.codesys.com/forge/talk/Runtime/thread/8981ce928a/#0518 , installed the device (by creating the .devdesc.xml file), installed the library and run. There are any parameters to change or some operation to do before? I also test MPU6050...
I not sure but probably i solved disabling remote GPIO in RPI setting.
Hi all, i have some problems with GPIO on RPI4. I set-up a simple system to test codesys but it doesn't work. I have only 1 input (pushbutton) and 1 out (a led). I also test the MPU6050 and it works correctly. Testing with python everything work fine, but with Codesys can't see the input when i push nor the output using a blink module. I started with the example GPIO.project, i change the GPIO board with the B+, i set GPIOs parameter input\output for the related channels, i declared in I\O mapping...
it works, ;-) Thank you,