I'm using KFLOP with the alternate outputs so that JP4 & JP6 can output the Step & Direction pulses. That's because I'm using KANALOG to handle the Linear Encoder inputs from the three main axes.
I've now got the 4th axis working open loop with that arrangement, so that's a big step forward and proves the interface works as it should.
However, I'm confused as to the expected arrangement for the Enable for the drives. The Step Response dialog box in KMotion has buttons that Enable and Disable the drive, so those buttons are obviously intended to be hooked up to the Enable output.
Currently, I've used JP8.9 SwitchEnableAll to ground the Output Opto Isolator 7 JP13.16 so that when JP13.15 is activated, the Enable goes low. (See attached schematic) I've done it this way to make sure it's not enabled during bootup. I copied this idea from one of the manual pages I've seen, but I can't find it any more.
So the question is this...
What decides which output is hooked up to the Enable button in the Step Response screen, and presumably the same is expected in KMotionCNC? I can't see anything in the literature provided that explains this, but I might have missed it. I expected that information to be in the Help of the Step Response screen, but it doesn't mention how the Enable button is connected in the software.
Drive enable arrangement
Moderators: TomKerekes, dynomotion
-
- Posts: 78
- Joined: Tue Mar 30, 2021 8:07 am
Drive enable arrangement
- Attachments
-
- Schematic for Dynamotion control on Denford Mill.pdf
- (14.94 KiB) Downloaded 41 times
- TomKerekes
- Posts: 2529
- Joined: Mon Dec 04, 2017 1:49 am
Re: Drive enable arrangement
Hi Roger,
There isn't any direct support for Drive Enable(s). But you can handle it however you like. The Enable Button on the Step Response Screen enables the KFLOP Axis not necessarily the Drive. A common way to handle Drive Enables is to within a forever loop monitor the KFLOP Axis enable, and if enabled, then enable the Drive. See the example watchenable.c
HTH
There isn't any direct support for Drive Enable(s). But you can handle it however you like. The Enable Button on the Step Response Screen enables the KFLOP Axis not necessarily the Drive. A common way to handle Drive Enables is to within a forever loop monitor the KFLOP Axis enable, and if enabled, then enable the Drive. See the example watchenable.c
HTH
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 78
- Joined: Tue Mar 30, 2021 8:07 am
Re: Drive enable arrangement
Ok, thanks for that. I'll take a look.
-
- Posts: 78
- Joined: Tue Mar 30, 2021 8:07 am
Re: Drive enable arrangement
Is there some kind of documentation with a block diagram that shows the way 'C' programs integrate with KMotionCNC? Everyone must have the same issues, trying to figure out how to organise the various parts of the configuration.
Here are some of the most obvious questions that immediately come to mind...
Will there be multiple 'C' files, one for each function, or will there be many? For example, if there are lots of things that need initialising, they would presumably all be in one place and called once. How is that arranged?
Will I have one separate program that just monitors and controls the Enable, and say another that deals with homing? How will those be integrated into the system and how are they triggered?
What's the relationship between KMotion and KMotionCNC? Do you create or enter all of the 'C' files through KMotion and then somehow integrate them with KMotionCNC?
It's really not clear how this whole system hangs together. Some kind of graphic explaining this would be very useful.
Here are some of the most obvious questions that immediately come to mind...
Will there be multiple 'C' files, one for each function, or will there be many? For example, if there are lots of things that need initialising, they would presumably all be in one place and called once. How is that arranged?
Will I have one separate program that just monitors and controls the Enable, and say another that deals with homing? How will those be integrated into the system and how are they triggered?
What's the relationship between KMotion and KMotionCNC? Do you create or enter all of the 'C' files through KMotion and then somehow integrate them with KMotionCNC?
It's really not clear how this whole system hangs together. Some kind of graphic explaining this would be very useful.
- TomKerekes
- Posts: 2529
- Joined: Mon Dec 04, 2017 1:49 am
Re: Drive enable arrangement
It depends on your system and how you want things to work. C Programs perform Configuration, Initialization, and any real-time activities that your system needs.Is there some kind of documentation with a block diagram that shows the way 'C' programs integrate with KMotionCNC? Everyone must have the same issues, trying to figure out how to organise the various parts of the configuration.
You might see this and this. You might also see the KStep Tutorial and Video. Even if your hardware is different it will show the overall process of creating an Initialization program and configuring KMotionCNC to use it.
Normally there is one C Program often referred to as the Initialization C Program that configures everything, initializes everything, and then may continue running forever in a loop servicing anything in your system that needs to be continuously serviced. This can consist of one C program file or be broken into multiple files that are all included together to make the Program. See the above link.Will there be multiple 'C' files, one for each function, or will there be many? For example, if there are lots of things that need initialising, they would presumably all be in one place and called once. How is that arranged?
No. You can do that for testing and debugging, but therafter it is simpler and more efficient if that task is added to a forever loop in your Initialization program. For each concurrently running C Program a separate Thread is required for it to be executing. See here.Will I have one separate program that just monitors and controls the Enable
Tasks like Homing, Tool Changes, Spindle Actions that are only performed when required are usually best as separate C Programs.and say another that deals with homing?
Either by a User Button or MCode configured in KMotionCNChow are they triggered?
yesWhat's the relationship between KMotion and KMotionCNC? Do you create or enter all of the 'C' files through KMotion and then somehow integrate them with KMotionCNC?
HTH
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 78
- Joined: Tue Mar 30, 2021 8:07 am
Re: Drive enable arrangement
Ok, thanks for that, I'll look at those things.