- Posts: 2180
- Thank you received: 905
ATC Project - Debug phase
- spumco
- Offline
- Platinum Member
-
Less
More
4 years 5 months ago #243411
by spumco
State during continuous rotation is 4. This hasn't changed from my earlier post:
Replied by spumco on topic ATC Project - Debug phase
I will attach HAL when I get home later today, but the snippet I posted on page 1 of this thread is essentially unchanged (besides changing rev-dc to a negative number)Can you attach your HAL file?
What is the state during the continuous rotation?
What is the status of motor-fwd, motor-rev and motor_vel ?
State during continuous rotation is 4. This hasn't changed from my earlier post:
- carousel.0.state
- "0" before first enable
- "0" after M68 E0 Q2
- "11" after first enable
- "2" after sense-0 is first triggered
- "4" after sense-1 is triggered (during continuous rotation)
- "0" after M65 P0 (at random location
- "5" while jog-fwd or -rev is enabled
- "0" when jog-fwd or -rev is disabled
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
4 years 5 months ago #243412
by andypugh
I think I see a bug, though not one that might usually be seen
"2" is looking for the position to be correct
I think that motor_rev = twice is a bug. But would probably only cause issues if hold_dc is non-zero.
Replied by andypugh on topic ATC Project - Debug phase
[*]"2" after sense-0 is first triggered
[*]"4" after sense-1 is triggered (during continuous rotation)
I think I see a bug, though not one that might usually be seen
"2" is looking for the position to be correct
Code:
case 2: // moving
if ((current_position != mod_pocket) && enable) return;
if (rev_pulse > 0){
motor_fwd = 0;
motor_rev = 1;
motor_vel = rev_dc;
timer = rev_pulse;
state = 3;
} else {
motor_fwd = 0;
motor_rev = 0;
motor_rev = hold_dc;
active = 0;
if (enable) ready = 1;
state = 4;
break;
}
I think that motor_rev = twice is a bug. But would probably only cause issues if hold_dc is non-zero.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
4 years 5 months ago - 4 years 5 months ago #243421
by andypugh
Replied by andypugh on topic ATC Project - Debug phase
You can get linuxcnc-usapce-dev as a package here:
www.linuxcnc.org/dists/buster/2.8-rtpree...-dev_2.8.2_amd64.deb
Install it with
sudo apt-get install ./linuxcnc-uspace-dev_2.8.2_amd64.deb
You need the./ to tell apt to look for a local file, not something on the repository servers.
Then try changing the code above to:
Then
sudo halcompile --install carousel.comp
And see if things are better.
www.linuxcnc.org/dists/buster/2.8-rtpree...-dev_2.8.2_amd64.deb
Install it with
sudo apt-get install ./linuxcnc-uspace-dev_2.8.2_amd64.deb
You need the./ to tell apt to look for a local file, not something on the repository servers.
Then try changing the code above to:
Code:
} else {
motor_fwd = 0;
motor_rev = 0;
motor_vel = hold_dc;
active = 0;
if (enable) ready = 1;
state = 4;
break;
}
Then
sudo halcompile --install carousel.comp
And see if things are better.
Last edit: 4 years 5 months ago by andypugh.
Please Log in or Create an account to join the conversation.
- spumco
- Offline
- Platinum Member
-
Less
More
- Posts: 2180
- Thank you received: 905
4 years 5 months ago - 4 years 5 months ago #243435
by spumco
HAL attached, just in case I forgot some changes in my post earlier today.
I'll have a go at the halcompile right now.
EDIT - downloaded .deb
sudo apt-get install ./linuxcnc-uspace-dev_2.8.2_amd64.deb
Reading package lists... Done
E: Unsupported file ./linuxcnc-uspace-dev_2.8.2_amd64.deb given on commandline
Bugger.
Replied by spumco on topic ATC Project - Debug phase
Can you attach your HAL file?
What is the state during the continuous rotation?
What is the status of motor-fwd, motor-rev and motor_vel ?
- M68 E0 Q1
- carousel.0.motor-fwd = LOW
- carousel.0.motor-rev = LOW
- carousel.0.motor-vel = 0
- carousel.0.current-position = 0
- carousel.0.pocket-number = 1
- M64 P0
- carousel rotates CCW
- carousel.0.motor-fwd = HIGH
- carousel.0.motor-rev = LOW
- carousel.0.motor-vel = 5
- carousel.0.current-position = 0
- carousel.0.pocket-number = 1
- carousel.0.homed = LOW
- carousel.0.homing = HIGH
- sense-0 triggered
- carousel reverses direction (CW)
- carousel.0.motor-fwd = LOW
- carousel.0.motor-rev = LOW
- carousel.0.motor-vel = -5
- carousel.0.current-position = 1
- carousel.0.pocket-number = 1
- carousel.0.homed = HIGH
- carousel.0.homing = LOW
- M65 P0
- carousel stops
- carousel.0.motor-fwd = LOW
- carousel.0.motor-rev = LOW
- carousel.0.motor-vel = 0
- carousel.0.current-position = 1
- carousel.0.pocket-number = 1
- carousel.0.homed = HIGH
- carousel.0.homing = LOW
HAL attached, just in case I forgot some changes in my post earlier today.
I'll have a go at the halcompile right now.
EDIT - downloaded .deb
sudo apt-get install ./linuxcnc-uspace-dev_2.8.2_amd64.deb
Reading package lists... Done
E: Unsupported file ./linuxcnc-uspace-dev_2.8.2_amd64.deb given on commandline
Bugger.
Last edit: 4 years 5 months ago by spumco.
Please Log in or Create an account to join the conversation.
- spumco
- Offline
- Platinum Member
-
Less
More
- Posts: 2180
- Thank you received: 905
4 years 5 months ago - 4 years 5 months ago #243436
by spumco
Can I just paste the updated code in /dev/linuxcnc/rip/src/hal/components/carousel.comp?
Replied by spumco on topic ATC Project - Debug phase
Disregard post, was looking at the imported version, not what's installed.
Can I just paste the updated code in /dev/linuxcnc/rip/src/hal/components/carousel.comp?
Last edit: 4 years 5 months ago by spumco. Reason: Duh
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
4 years 5 months ago #243442
by andypugh
(Which makes it all the more strange that you don't have halcompile)
Can you try halcompile -h in both a new terminal and one that has run the rip-environment script?
Replied by andypugh on topic ATC Project - Debug phase
Yes. Sorry, I had forgotten that you had a run-in-place version available.
Can I just paste the updated code in /dev/linuxcnc/rip/src/hal/components/carousel.comp?
(Which makes it all the more strange that you don't have halcompile)
Can you try halcompile -h in both a new terminal and one that has run the rip-environment script?
Please Log in or Create an account to join the conversation.
Time to create page: 0.501 seconds