- Posts: 54
- Thank you received: 0
Custom GUI models
- danimal300
- Topic Author
- Offline
- Senior Member
-
What I am looking for is a just a command speed and a real speed so I can see compare the difference between the two, and set the closed loop control and know that I am sending the right RPM value to the machine in the first place.
I had my spindle speed working manually, but as soon as I got the VFD up and running, the spindle speed bar on the standard GUI stopped working. I have no idea what changed, I did not change the encoder pins.
Thanks.
Please Log in to join the conversation.
JT
Please Log in to join the conversation.
- danimal300
- Topic Author
- Offline
- Senior Member
-
- Posts: 54
- Thank you received: 0
With that said here is my Custom_postgui.hal:
and here is my main.hal:
Please Log in to join the conversation.
- danimal300
- Topic Author
- Offline
- Senior Member
-
- Posts: 54
- Thank you received: 0
Please Log in to join the conversation.
- danimal300
- Topic Author
- Offline
- Senior Member
-
- Posts: 54
- Thank you received: 0
Please Log in to join the conversation.
- danimal300
- Topic Author
- Offline
- Senior Member
-
- Posts: 54
- Thank you received: 0
Please Log in to join the conversation.
danimal300 wrote: I want to use this basic closed loop controller ( wiki.linuxcnc.org/cgi-bin/wiki.pl?Closed...pindle_Speed_Control ) but I cannot get it to work with anything I do. It always fails on the first loadrt command, no matter what I do.
The error messages do tell you what is wrong, but you typically need to scroll down to the second section to see the specific error message.
Your "loadrt" error is likely to be that you are "loadrt"-ing a component that has already been loaded. Unfortunately every component (such as "abs" or "lowpass") has to be "loadrt"-ed at the same time. So if your first HAL file loads an abs function the postgui file can't add another. You need to increase the number of instances in the first loadrt.
There is a way round this, but it might actually be more work, see "TWOPASS" here:
linuxcnc.org/docs/2.7/html/hal/twopass.html#cha:hal-twopass
Please Log in to join the conversation.
- danimal300
- Topic Author
- Offline
- Senior Member
-
- Posts: 54
- Thank you received: 0
Please Log in to join the conversation.
this loadrt is now not required , so you can comment it out
please give the exact error as shown .
also post your complete config as a tar.gz archive ( use compress), rather than snips , it also helps if we know which version of linuxcnc you are using .
if you only have a single index input then tie this also to the a channel , and in your hal file
make sure the encoder count type is set to 1
Please Log in to join the conversation.
- danimal300
- Topic Author
- Offline
- Senior Member
-
- Posts: 54
- Thank you received: 0
cncbasher wrote: loadrt probe_parport
this loadrt is now not required , so you can comment it out
please give the exact error as shown .
also post your complete config as a tar.gz archive ( use compress), rather than snips , it also helps if we know which version of linuxcnc you are using .
if you only have a single index input then tie this also to the a channel , and in your hal file
make sure the encoder count type is set to 1
I am starting to get the whole thing working, but I am still having some issues. I will attache the whole compressed folder to make troubleshooting easier.
What I ended up doing was using an example from the Hal Examples forum (Here) and I modified it to work with my machine. I still have some issues with values. For example, I have 1 encoder pulse per revolution, but when I set encoder.N.position-scale = 1.0, I get roughly three pulses per revolution according to the output. I cannot seem to find any factor that modifies this value.
I have been tweaking it for a few days now, and I am starting to get close to smooth operation. I do feel like I am shooting in the dark, because there are probably 10 - 15 variables that I am tweaking that all effect the other values. Does anyone have some recommended methodology?
So far, I set my low pass gain pretty low so that I would get a reasonably smooth signal from the encoder. Not as smooth as I would like it, but it is reasonable. Then I adjusted the maxoutput and set the PID values to zero. Using that I adjusted the proportional gain until the command signal was ball park for the output RPM. Then when I adjust the ID values, everything kinda gets screwy. I will package and post my hal files, but I am just looking more for a method here than anything else.
Please Log in to join the conversation.
