What can EMC do for us?
- awesomepanda
- Offline
- New Member
- Posts: 9
- Thank you received: 0
deviation.How can I make this algorithm come true?
I know there is an PID component in the HAL.But someone told me I should achieve the control algorithm "Beyond the HAL" affirmatively.I think he means that I have to finish the algorithm without using the PID component in HAL.Is there any other methods to do this.
I have read some documents in the website.The documents only teach me how to configuration ,net the signals and add some panels in the AXIS.Are the controlling things finished by EMC automatically.
I have a quick glance at the example of "A2 MechShop Gantry Plasma Machine"
In this example,I think the part of controlling is just setting the parameters in the PID component
wiki.linuxcnc.org/cgi-bin/wiki.pl?GantryPlasmaMachine
.
There are a lot of videos in the YOUTuBe about using EMC.It seems they are all using EMC to cutting things with G code.How can I use EMC just to control the inverted pendulum or things like that?What can EMC help me? It's best to give me some successful examples about that.
I am new here.Waiting for your help.Thank you.
Please Log in or Create an account to join the conversation.
But inside that is a system to connect and run small programs that control the I/O - It is called HAL.
HAL is what you need to use for your project - it you download linuxcnc you get HAL.
HAL has many prebuilt components to choose from but you can also use a program called 'comp' to help you built a special HAL component.
You would probably need this to create a program to describe the motion you want then connect that to PID component the to some I/o point (such as the parallel port)
look at the online docs for info about HAL
www.linuxcnc.org/docs/2.5/html/
Please Log in or Create an account to join the conversation.
You speak of an inverted pendulum and that leads me to wonder if you are looking at automonous robotics. If so I tend to think you are barking up the wrong tree. I could be wrong but this strikes me as an entirely different set of issues.
awesomepanda wrote:
I have to use EMC to control an inverted pendulum.I want to use the PID and closed loop algorithm to reduce the
deviation.How can I make this algorithm come true?
I know there is an PID component in the HAL.But someone told me I should achieve the control algorithm "Beyond the HAL" affirmatively.I think he means that I have to finish the algorithm without using the PID component in HAL.Is there any other methods to do this.
I have read some documents in the website.The documents only teach me how to configuration ,net the signals and add some panels in the AXIS.Are the controlling things finished by EMC automatically.
I have a quick glance at the example of "A2 MechShop Gantry Plasma Machine"
In this example,I think the part of controlling is just setting the parameters in the PID component
wiki.linuxcnc.org/cgi-bin/wiki.pl?GantryPlasmaMachine
.
There are a lot of videos in the YOUTuBe about using EMC.It seems they are all using EMC to cutting things with G code.How can I use EMC just to control the inverted pendulum or things like that?What can EMC help me? It's best to give me some successful examples about that.
I am new here.Waiting for your help.Thank you.
Please Log in or Create an account to join the conversation.
- awesomepanda
- Offline
- New Member
- Posts: 9
- Thank you received: 0
I was asked to use the linuxcnc and the Xpc( in the software simulink) to simulate the controlling of the inverted pendulum. He don't give the exact method.I think I can use the Linuxcnc to send the controlling commands and use the Xpc for simulation the circumstances.
As a CNC ,I think Linuxcnc is used to help us to get our machine in the right position.All we have to do is creating or using the component ,setting the parameters ,and netting the signals in the HAL,then GIVE THE POSITION BY USING G CODE.
But in the inverted pendulum,I have to control it with the deviation .And I don't need to give the position forward,in other words ,maybe I don't need the G code.I am so confused about that.
Because I don't know Linuxcnc well and have not use it to complete any projects.I wonder if there is some functions to solve my problems.
ANOTHER QUESTION:what's the file with suffix ".py".It seems to deal with the signals .Which file will call it? .ini file ,hal.file or other files will call it.
By the way ,if anyone who have use Linuxcnc to complete some simple projects,please show me and give me all the files in the projects.
Thank you.
Please Log in or Create an account to join the conversation.
But in the inverted pendulum,I have to control it with the deviation .And I don't need to give the position forward,in other words ,maybe I don't need the G code.I am so confused about that.
You might want to use G-code to set the pendulum base position, and use functions in HAL to semi-independently keep the pendulum balanced.
I can imagine doing this in HAL with independent X and Y PID components wired through Offset components. (Offset usefully subtracts the offset from the feedback values, avoiding following-errors being raised.)
Even though you seem to have an arbitrary proscription on using the PID component, I would still be tempted to use it to get started.
Please Log in or Create an account to join the conversation.
If the center position of the pendulum is a commanded axis position then a command such as
G1 X0. F10.
would move the pendulum to the center, assuming X0. is the center.
In a machine tool the servo PID values are adjusted for critical damping. But if you deliberately tune the axis for an underdamped response you get oscillation.
Being a forced oscillation, the period and amplitude are functions of the pendulum kinematics and the servo gains.
Doug
Please Log in or Create an account to join the conversation.