Hi,
I'm having trouble getting the pulse and direction signals working on my machine. I have a CNC gantry router with clearpath motors. I am using CNC4PC C68 connector board on my Kflop to connect to the UCBB break out board which is also from CNC4PC. I can get the machine on, initialize and home it, but the enable won't turn on. Once the machine is done homing, it essentially does nothing. If I don't setup the motors in the c program, then I can use the kmotion software to toggle the enable. But when the c program includes the motor setup you can't use the software to force the enable on.
I attached my C program for Initializing. What am I doing wrong?
Thanks,
Derwin
Pulse and Direction Signals Not Working
Moderators: TomKerekes, dynomotion
-
- Posts: 1
- Joined: Thu Jun 23, 2022 12:35 am
Pulse and Direction Signals Not Working
- Attachments
-
- H2OReactor Init.c
- (11.04 KiB) Downloaded 199 times
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Pulse and Direction Signals Not Working
How can you home the system without the Enable on? How are you Homing?I can get the machine on, initialize and home it, but the enable won't turn on.
what bit is the Enable?then I can use the kmotion software to toggle the enable
What is the state of the EStop input?
Anything printed on the Kmotion Console?
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 2
- Joined: Thu Jun 23, 2022 1:03 pm
Re: Pulse and Direction Signals Not Working
We are using Clearpath motors, and they are setup to home on enable. We have the motor enable signals grouped into 2 enables. The first is CN1_Out_1 36, and the second is CN1_Out_14 38.How can you home the system without the Enable on? How are you Homing?
#define CN1_Out_1 36what bit is the Enable?
#define CN1_Out_14 38
#define CN1_In_10 0What is the state of the EStop input?
shows the status of our e-stop and changes states properly.
We checked the actual i/o that are wired in without motors setup and could toggle using the i/o checkboxes in the kflop software. Once we loaded the init file that is attached with all the motor settings the kmotion console was displaying our printf lines. The problem that we were having is that the step, and direction signals weren't changing when the motors were configured. Our E-Stop/Enable i/o were both working correctly, however, once motors were setup we got out of e-stop, and the motors were enabled, however the step/dir signals didn't seem to get to the clearpath motor.
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Pulse and Direction Signals Not Working
How do you know this? Once the Outputs are configured as Step/Dir Outputs you won't be able to toggle them as GPIO on the Digital IO Screen. You won't be able to see the Step Pulses on the Digital IO screen as the pulses are very narrow. You should be able to se the Direction signal change if you move in both directions.The problem that we were having is that the step, and direction signals weren't changing when the motors were configured.
How are the Step/Dir signals wired?
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 2
- Joined: Thu Jun 23, 2022 1:03 pm
Re: Pulse and Direction Signals Not Working
I was only trying to use the gpio screen when I had the motors unset in the kflop, and toggling the checkbox would change the dir, and/or step the motor. To check if the direction/pulse signals were getting sent I was using the motor teknic clearpath software (MSP), and the position command and direction weren't changing there once the motors were setup.
This machine was running before, but we just had breakout boards on the kflop pins without opto-isolators.
We added a breakout board (KFLOP Connector)
https://cnc4pc.com/kflop-connector-board.html
and an opto board (UCBB):
https://www.cnc4pc.com/ucbb-dual-port-b ... board.html
I have a theory that I may need to reverse the step/dir outputs with: PGA(STEP_PULSE_LENGTH_ADD)=32 + 0x80;
This machine was running before, but we just had breakout boards on the kflop pins without opto-isolators.
We added a breakout board (KFLOP Connector)
https://cnc4pc.com/kflop-connector-board.html
and an opto board (UCBB):
https://www.cnc4pc.com/ucbb-dual-port-b ... board.html
I have a theory that I may need to reverse the step/dir outputs with: PGA(STEP_PULSE_LENGTH_ADD)=32 + 0x80;
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Pulse and Direction Signals Not Working
I think the UCBB is expecting TTL signals so select TTL output mode by adding 8 to the OutputChan0 value.
HTH
HTH
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.