Remora - ethernet NVEM / EC300 / EC500 cnc board

More
3 years 2 weeks ago #282940 by GeramyL

I did some more digging around and found some examples of how to implement a PID controller.
In the hal-file I added this
Code:
loadrt pid names=pid.x setp pid.x.Pgain [JOINT_0]P setp pid.x.Igain [JOINT_0]I setp pid.x.Dgain [JOINT_0]D setp pid.x.bias [JOINT_0]BIAS setp pid.x.FF0 [JOINT_0]FF0 setp pid.x.FF1 [JOINT_0]FF1 setp pid.x.FF2 [JOINT_0]FF2 setp pid.x.deadband [JOINT_0]DEADBAND setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT and in the ini-file I added this to the JOINT_0 section [code]P = 1000.0 I = 0.0 D = 0.0 FF0 = 0.0 FF1 = 1.0 FF2 = 0.0 BIAS = 0.0 DEADBAND = 0.0 MAX_OUTPUT = 0 Is this the correct way to implement a PID controller for an axis? If no, what did I do wrong? If yes, what values should I start out with? With these values I still get following error.   For remora thats now how you implement it, attached are my files for linuxcnc 2.9   That's really helpful, thanks for sharing! My hal and ini now looks like this. This is a correct implementation, right? I tried with PGAIN = 10, 100, 1000, 10000. No difference what I can tell.
[/code]
 
I see you have set the joint_0 axis only. You can send me an email and I can help you more directly geramy.loveless@ansuzindustrial.com your going to need to do a few things in order to get it right, you can do halcmd -kf inside a terminal and run the following command setp remora.joint.0.pgain 89 and change the pgain until your f-error becomes better, remove f-error and min-ferror from the config by commenting it out and then run a hal scope and load joint.0.f-error in one of the channels and joint.0.fb-pos-cmd in another and then put it on loop and run it back and forth you will be able to read the f-error value and adjust the pgain via halcmd until you reduce the peak and then use ff1gain to reduce the curve.

Please Log in or Create an account to join the conversation.

More
3 years 2 weeks ago #282962 by GeramyL
Chris the next question is what firmware did you flash, what .txt file did you upload to your board? You need to make sure to upload a config file that works for you if it’s gonna be DMAStepgen you need the latest beta firmware from the dmastepgen branch 2.1 , everything is very specific, any one parameter wrong and your whole system will be like a turtle crossing the road in the middle of traffic. Scary at best haha.

Please Log in or Create an account to join the conversation.

More
3 years 2 weeks ago #282963 by chrstrvs

I did some more digging around and found some examples of how to implement a PID controller.
In the hal-file I added this
Code:
loadrt pid names=pid.x setp pid.x.Pgain [JOINT_0]P setp pid.x.Igain [JOINT_0]I setp pid.x.Dgain [JOINT_0]D setp pid.x.bias [JOINT_0]BIAS setp pid.x.FF0 [JOINT_0]FF0 setp pid.x.FF1 [JOINT_0]FF1 setp pid.x.FF2 [JOINT_0]FF2 setp pid.x.deadband [JOINT_0]DEADBAND setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT and in the ini-file I added this to the JOINT_0 section [code]P = 1000.0 I = 0.0 D = 0.0 FF0 = 0.0 FF1 = 1.0 FF2 = 0.0 BIAS = 0.0 DEADBAND = 0.0 MAX_OUTPUT = 0 Is this the correct way to implement a PID controller for an axis? If no, what did I do wrong? If yes, what values should I start out with? With these values I still get following error.   For remora thats now how you implement it, attached are my files for linuxcnc 2.9   That's really helpful, thanks for sharing! My hal and ini now looks like this. This is a correct implementation, right? I tried with PGAIN = 10, 100, 1000, 10000. No difference what I can tell.   I see you have set the joint_0 axis only. You can send me an email and I can help you more directly geramy.loveless@ansuzindustrial.com your going to need to do a few things in order to get it right, you can do halcmd -kf inside a terminal and run the following command setp remora.joint.0.pgain 89 and change the pgain until your f-error becomes better, remove f-error and min-ferror from the config by commenting it out and then run a hal scope and load joint.0.f-error in one of the channels and joint.0.fb-pos-cmd in another and then put it on loop and run it back and forth you will be able to read the f-error value and adjust the pgain via halcmd until you reduce the peak and then use ff1gain to reduce the curve.
[/code]
 
That is truly really nice of you! I will  take you up on that offer and send you an email later.

The reason I only set up PID controller for JOINT_X is because I don't think it's necessary to troubleshoot all axes at the same time. If we can figure out what the issue is on one axis, we can probably implement the same solution on the other axes.

Please Log in or Create an account to join the conversation.

More
3 years 2 weeks ago #283009 by rbobey1989
Hello everyone here, it has taken me a few hours to change the interruption from the Index pin to GPIO mmmmm, dark things hahaha, but well the news is very good at the point I am now you can use the 4 ENC (Qdc) Well, following Scott's brilliant idea of using the GPIO interrupt for the Index pins, we have more pins free in XBAR, I urge those who have motors with encoders to try and comment on the results, I hope that encoder arrives soon Scott, greetings.
My repository in case you want to take a look.
***** I have created another branch for the interruption version per GPIO module QdcIndexGpioInterrupt branch , in the main branch there is the interruption implementation through the Index signal of the ENC Modules (Qdc)******
The following user(s) said Thank You: oficinerobotica

Please Log in or Create an account to join the conversation.

More
3 years 2 weeks ago #283013 by GeramyL

Hello everyone here, it has taken me a few hours to change the interruption from the Index pin to GPIO mmmmm, dark things hahaha, but well the news is very good at the point I am now you can use the 4 ENC (Qdc) Well, following Scott's brilliant idea of using the GPIO interrupt for the Index pins, we have more pins free in XBAR, I urge those who have motors with encoders to try and comment on the results, I hope that encoder arrives soon Scott, greetings.
My repository in case you want to take a look.
***** I have created another branch for the interruption version per GPIO module QdcIndexGpioInterrupt branch, in the main branch there is the interruption implementation through the Index signal of the ENC Modules (Qdc)******
When I get my next big job íll probably buy some new servos or steppers with encoders 24-bit and give it a shot :) but that will be maybe a month out.

Please Log in or Create an account to join the conversation.

More
3 years 2 weeks ago #283014 by GeramyL

Hello everyone here, it has taken me a few hours to change the interruption from the Index pin to GPIO mmmmm, dark things hahaha, but well the news is very good at the point I am now you can use the 4 ENC (Qdc) Well, following Scott's brilliant idea of using the GPIO interrupt for the Index pins, we have more pins free in XBAR, I urge those who have motors with encoders to try and comment on the results, I hope that encoder arrives soon Scott, greetings.
My repository in case you want to take a look.
***** I have created another branch for the interruption version per GPIO module QdcIndexGpioInterrupt branch, in the main branch there is the interruption implementation through the Index signal of the ENC Modules (Qdc)******
Actually to think about it I do have some 220v servos and encoders. Do you think the motor would work with the servo drivers without the encoder plugged into the driver itself and use the driver as open loop and close the loop on the remora board??

Please Log in or Create an account to join the conversation.

Time to create page: 0.312 seconds
Powered by Kunena Forum