To anyone that can help, I am currently setting up an application that will use (2) KMotion motor control boards. My current knowledge ends with G-code programming and servo motor applications i.e. CNC lathes and Milling machines. In this application I will be using (8) stepper motors but I will be only runnng 1-axis at a time. If anyone could offer a programming example that uses multiple boards and stepper motors it would be helpful for me to see any differences in designating linear movement for a stepper motor. I am currently writing a line by line requirement of the sequence that I need to program to give myself an outline of the motions without the numerical values for each move. The following is a list of the equipment that I am using; -Toshiba M200 Tablet PC running Windows XP Professional -KMotion Software -(2) KMotion Motor Control Boards #1 Motor- (X-axis) Model # 5709L-03, Frame Size-23, 0.9 Step angle, http://www.linengineering.com/site/products/5709.html #2 Motor- (Y-axis) Model # 5709L-03, Frame Size-23, 0.9 Step angle, http://www.linengineering.com/site/products/5709.html #3 Motor- (Z-axis) Hybrid Linear Actuator - Size 17 Captive shaft HSI 43000 Series 1.8 degree step angle, .00125 travel per step http://www.hsimotors.com/hybrid/Size17-Captive.htm#Draw #4 Motor- (A-axis) Hybrid Linear Actuator - Size 17 Captive shaft HSI 43000 Series 1.8 degree step angle, .00125 travel per step http://www.hsimotors.com/hybrid/Size17-Captive.htm#Draw #5 Motor- (B-axis) Model # 4018M-05, 1.8 degree step angle http://www.linengineering.com/site/products/4018.html #6 Motor- (C-axis) Model # 4018M-05, 1.8 degree step angle http://www.linengineering.com/site/products/4018.html #7 Motor- (D-axis) Model # 211-18-02, 1.8 degree step angle http://www.linengineering.com/site/products/211.html #8 Motor- (E-axis) Model # 4018M-05, 1.8 degree step angle http://www.linengineering.com/site/products/4018.html Thank you in advance for any assistance that you may offer and please don't hesitate to ask for additional information that you may require. Cheers Dan Dan Zimmermann, President GBOGH Research gboghmobile@...
It's not clear what would give the best result, to do a feedhold or kill all the axes? Below is some "watchdog" code that runs continuously and when it sees an input change issues a feedhold (StopCoordinatedMotion()). Add the "for" loop to the end of your Init.c program so after your initialization the loop will continue to run.
You might also try replacing the StopCoordinatedMotion with: DisableAxis(0);
DisableAxis(1);
DisableAxis(2);
which would act more like estop.
I hope this helps.
TK
#include "KMotionDef.h" main(){ int fault=0; for (;;) // repeat forever { WaitNextTimeSlice(); // execute one loop per time slice // check external fault signal if (!fault && ReadBit(19)) { fault=1; // remember we are in a fault state StopCoordinatedMotion(); // do a feed hold } if (fault && !ReadBit(19)) { fault=0; // remember we are no longer in a fault state } }} From: strohm81 To: DynoMotion@yahoogroups.comSent: Sunday, December 7, 2008 7:43:56 PMSubject: [DynoMotion] Triggering E-stop with input When using a VFD that has the ability to output a logic signal when a fault occurs, is it possible to have KMotionCNC read the input an execute a program that duplicates or triggers the E-stop button on the main page to prevent scrapped parts and broken cutters? What would the C code look like to do something like that? Or is there an easier way to do it?
Checked by AVG - http://www.avg. com Version: 8.0.176 / Virus Database: 270.10.1/1870 - Release Date: 12/31/2008 8:44 AM
Checked by AVG - http://www.avg. com Version: 8.0.176 / Virus Database: 270.10.1/1870 - Release Date: 12/31/2008 8:44 AM
_______________________
HI TK
with Snap Amp its working fine, however with KMotion, some times i have to dbl click on the OUTPUTS before it works, I dont know why!. The other thing is that, with the Kflop and Kanalog configuration the encoder input channels can not tolerate "my" 5V encoder signals as stated in the spec, when i used 74ls245 buffer IC they also fine.Sure u can ask anything, I have a basic knowlege on this stuff. but as far as Dynomotion is concerned, I am new.Have a nice day.Azed ---
On Thu, 1/1/09, TK wrote:From: TK Subject: RE: [DynoMotion] Kmotion: how to read current position using c parogramTo: DynoMotion@yahoogroups.comDate: Thursday, January 1, 2009, 6:01 AM Hi Azed, All IO pins should default as inputs. You can verify this on the Digital IO Screen. Axis channel #0 defaults to read encoder channel #0 which would be KMotion Encoder #0 Axis channel #4 defaults to read encoder channel #4 which would be SnapAmp0 Encoder #0 Are you connecting a ground and +5V to the encoder? (sorry had to ask). SnapAmp has differential encoder inputs (A, /A, B, /B) where KMotion only has single ended encoder inputs (A and B). Do you understand the difference? For single ended just connect 2 of the 4 signal wires. Can you see the IO bits toggle on the Digital IO Screen? TK From: DynoMotion@yahoogro ups.com [mailto:DynoMotion@ yahoogroups. com] On Behalf Of Azd Md Sent: Tuesday, December 30, 2008 10:46 PM To: DynoMotion@yahoogro ups.com Subject: RE: [DynoMotion] Kmotion: how to read current position using c parogram Thanks TK for your reply I ve tried this itw orsk with the SnapAmp but not with the Kmotion. could it be that the default setup of the IO pins is digital output , not encoder?? thanks Azed --- On Wed, 12/31/08, TK wrote: From: TK Subject: RE: [DynoMotion] Kmotion: how to read current position using c parogram To: DynoMotion@yahoogro ups.com Date: Wednesday, December 31, 2008, 2:25 PM Azed, Run the Kmotion.exe program. Since you have a KMotion board. Make sure the KFLOP option is not checked under the option menu. Open the Axis Screen. Does the Position of Axis #0 change when you rotate the encoder? You should also be able to see the two input bits #0 and #1 change randomly on the Digital IO screen when you rotate the encoder. If all this works you can print the encoder position from a C program with something like: printf(“Encoder 0 = %f\n”,ch0->Position); TK From: DynoMotion@yahoogro ups.com [mailto:DynoMotion@ yahoogroups. com] On Behalf Of azken98 Sent: Tuesday, December 30, 2008 9:29 PM To: DynoMotion@yahoogro ups.com Subject: [DynoMotion] Kmotion: how to read current position using c parogram I ve just started with KMotion, i ve KMotion board . I ve connected the encoder channels A and B to the KMotion JP3 pins 15 and 16. Now I want to test the Encoder position, any help? thanks Azed Checked by AVG - http://www.avg. com Version: 8.0.176 / Virus Database: 270.10.1/1868 - Release Date: 12/30/2008 12:06 PM