Hi Joanel,
That would depend on what you are trying to do.
Regards
Hello Tom,
Thanks for all the help that you have given me. You have helped me so much on this project. I was able to fix the problems with KMotionCNC by uninstalling it and installing everything again. It has been working great. Sorry for the bother again, but I have another question. Is there a way to connect KFlop to an Arduino board? I've been looking around but haven found any information about it.
Thanks,
Joanel Vasquez
Hi Joanel,
That would depend on what you are trying to do.
Regards
Regards
TK http://dynomotion.com
Hey Tom,
Well I want to two things. I'm trying to use a Solenoid and it's easy to control it with an arduino. It would be good for me if the arduino and the Kflop could communicate. I don't know if Kflop can be used to control it. Can it? Also, I want to control temperature with an arduino and it would be of my best interest if I could use the kflop to stop the temperature when I'm done with the task. Sorry for such a late reply and thanks for everything.
Thanks,
Joanel Vasquez
You could use the serial port on both the Arduino and the Kflop to communicate with each other
Hi Joanel,
If you just need a solenoid on/off and a Temperature on/off then you might consider just sever digital I/O bits.
You might also consider SPI using the SPI V6.c Example with KFLOP as the Master and the Arduino as a Slave.
Regards
Regards
TK http://dynomotion.com
Hi Joanel,
3.3V digital signals are very common. Research LVTTL signals. All the KFLOP 46 I/O pins are 3.3V LVTTL compatible. However some (8 on JP4 and JP6) have 150ohm pull down termination resistors which some LVTTL outputs may not be able to drive. 16ma is required to drive them. Basically a high level must be higher than 2.4V and a low signal must be lower then 0.4V. I'm not familiar with Arduino I/O pins.
Regards
Regards
TK http://dynomotion.com
Hello Tom,
Thank you so much for everything that you have done for me. I was able to complete must of what I needed thanks to you. I now ordered another Kstep because I will most likely need at least 7 axis, and I made sure to tell them that it was the second Kstep that I order. I put everything together, but kmotion can't move the axis for some reason (I tried activating I/O 45 and running step response to figure out the best velocity, but it doesn't move). Do you know why this might be happening? I also modify the c-program so that it recognizes all 8 axis (0 to 7). Sorry for the inconvenience and thanks in advance.
Regards,
Hi Joanel,
How did you connect the second KStep?
Are you jumpering the two KStep J6s together for powers and enable?
Are the 3 LEDs on?
Does the motor hold position?
How did you configure the axes?
Regards
Regards
TK http://dynomotion.com
Hello Tom,
Thanks for the quick reply!
1- I put everything together by connecting the bottom KStep to the KFLop via the JP7, and then I connected the KFlop JP5 to the other KStep JP26.
2- I don't think I am. I'm using KStep J1 for power.
3- No! For the to KStep only the right light is on (close to the screw), and for the bottom KStep the middle and the left lights are on.
4- No! Well the motor resists a little bit, I can still move them easily even after activating I/O 45. With one KStep, I couldn't move them at all after activating I/O 45.
5- Well I modified the initKStep6Axis by adding the following code.
ch7->InputMode=ENCODER_MODE;
ch7->OutputMode=STEP_DIR_MODE;
ch7->Vel=4000;
ch7->Accel=40000;
ch7->Jerk=4e+006;
ch7->P=0;
ch7->I=0.01;
ch7->D=0;
ch7->FFAccel=0;
ch7->FFVel=0;
ch7->MaxI=200;
ch7->MaxErr=1e+006;
ch7->MaxOutput=200;
ch7->DeadBandGain=1;
ch7->DeadBandRange=0;
ch7->InputChan0=6;
ch7->InputChan1=0;
ch7->OutputChan0=30;
ch7->OutputChan1=0;
ch7->MasterAxis=-1;
ch7->LimitSwitchOptions=0x0;
ch7->SoftLimitPos=1e+009;
ch7->SoftLimitNeg=-1e+009;
ch7->InputGain0=-1;
ch7->InputGain1=1;
ch7->InputOffset0=0;
ch7->InputOffset1=0;
ch7->OutputGain=1;
ch7->OutputOffset=0;
ch7->SlaveGain=1;
ch7->BacklashMode=BACKLASH_OFF;
ch7->BacklashAmount=0;
ch7->BacklashRate=0;
ch7->invDistPerCycle=1;
ch7->Lead=0;
ch7->MaxFollowingError=1000000000;
ch7->StepperAmplitude=20;
ch7->iir[0].B0=1;
ch7->iir[0].B1=0;
ch7->iir[0].B2=0;
ch7->iir[0].A1=0;
ch7->iir[0].A2=0;
ch7->iir[1].B0=1;
ch7->iir[1].B1=0;
ch7->iir[1].B2=0;
ch7->iir[1].A1=0;
ch7->iir[1].A2=0;
ch7->iir[2].B0=0.000769;
ch7->iir[2].B1=0.001538;
ch7->iir[2].B2=0.000769;
ch7->iir[2].A1=1.92076;
ch7->iir[2].A2=-0.923833;
EnableAxisDest(7,0);
DefineCoordSystem8(0,1,2,3,4,5,6,7);
I changed the DefineCoordSystem6() to DefineCoordSystem8(). I was looking around to see if I needed to add/change something else, but it looked to me like that was all I needed to change. Sorry for the inconvenience and thanks for everything.
Thanks,
Hi Joanel,
I don't follow your description. You need to enable both KSteps. Normally Enable should be wired from the one KStep J6 to the other KStep J6.
You need all 3 LEDs's on both KSteps on. +5V Power, Enable, Motor power.
I don't understand why you are configuing 8 axes. I thought you had 5 axes.
Regards
TK
Regards
TK http://dynomotion.com
Hello Tom,
Sorry for not being able to explain it well. I'm going to attach some images of my current connection. I based this connection off of a video on YouTube uploaded by Dynomotion called " Dynomotion's 6-Axis Cable-Driven Demonstration Robot". I was able to catch a good glimpse of the connection between the boards and I tried using something similar to that. I know that's not the best way to do it, but I was looking around and couldn't find any information about the connection between a KFlop and 2 KStep.
Also, I was looking through the KStep connector pinouts and I wasn't able to find a J6 for the KStep. Can you please tell me its location? Here is a image of the KStep Connector Pinouts
Okay! So I guess that only motor power was working for one KStep, while Enable and +5 Volts was working for the other KStep. It must be the connection that you were talking about then.
Well I previously had 4-axis only (a single KStep) and the 3D printer was working perfectly fine. I now need 5-axis because I want to add another extruder to the 3D printer. I want to activate all 8-axis because I will need them later on for my project. The 3D printer part of it is only half of what I need to do. Sorry for all this mess and thank you so much for your help. I really appreciate it.
Regards,
Joanel
Hi Joanel,
J6 is the 4 pin screw terminal in the lower left corner of the image.Also, I was looking through the KStep connector pinouts and I wasn't able to find a J6 for the KStep. Can you please tell me its location? Here is a image of the KStep Connector Pinouts
You would normally wire the 4 J6 pins in parallel to supply the power and enables to the 2nd KStep.
The 2nd KStep must also be supplied Motor Power VB
Regards
Regards
TK http://dynomotion.com
Hey Tom,
It worked! The 3 lights were on and I was able to move the first 4-axis without any problem. Thank you so much for everything. I have a couple of questions though.
1- Why is it that the enable light on the KStep turns off when I Compile, Download and Run the C script on KMotion?
2- In order to properly configure the motors correctly, we must first load the axis motor on the Config & Flash screen. For the first 4 axis, I used the KStepAxis0, 1, 2 and 3, but I don't know which ones I should use for the other 4 axes. Should I use the same KStepAxis for the other 4? Sorry for these questions and thanks in advance.
Thanks,
Joanel
Hi Joanel,
Many of the KStep Initialization Examples have a loop at the end to detect no motion and to disable KStep after a period time of time by turning off Output 45. You can remove this loop if it isn't needed. If used it should be expanded to monitor all of your 5 axes.Why is it that the enable light on the KStep turns off when I Compile, Download and Run the C script on KMotion?
To control 8 motors you will need to use KFLOP Axis Channels 0-7. Each KFLOP Axis Channel will need to output to a Step/Dir Generator to drive KStep. Set the OutputChan0 parameter to values 8-15 to do this. See also:In order to properly configure the motors correctly, we must first load the axis motor on the Config & Flash screen. For the first 4 axis, I used the KStepAxis0, 1, 2 and 3, but I don't know which ones I should use for the other 4 axes. Should I use the same KStepAxis for the other 4?
Channels Channels Channels - Dynomotion
HTH
Regards
Regards
TK http://dynomotion.com
Hey Tom,
Thank you so much in advance for everything. You have helped me so much! Now I'm are trying to run a C-script along with the G-Code. I saw in the "Tool setup screen" an action type called "Execute Prog" which seems like it might help me accomplish what I want. I'm just a little confused about how to trigger this action and what is the purpose of the Persist Variable. For example, if I modify the M100 button so that it uses this action, will I call it by writing M100 followed by the Persist Variable in the G-Code reader? Is the Persist Variable a number (from 1-99) that I would be writing after the M100 command so that it knows it has to run the C-script? Or would KMotion know that it needs to run the C-script based on the M100 command alone? I'm really sorry for the bother, but I just want to make sure that I truly understand what's happening here.
Thanks,
Joanel
Hi Joanel,
The "Var" setting allows for a mechanism for the Host Program to send some data to a KFLOP C Program. For example the "S" command will set the Speed in RPM as a floating point value into the specified persist Variable.
If you are simply coding "M100" then there is no related data so KMotionCNC just sets the M Code Index into the specified Persist Variable. This can be useful to have a single C Program handle multiple M Codes (or button actions) because it can determine from the variable what Action invoked the program. If you don't need to know the MCode index just make sure the Var setting points to a variable that is not used by something else.
There is also an option to pass GCode Parameters P Q R into 1-3 consecutive persist variables starting with the specified persist variable. See the help page here:
MCodes with Parameters
HTH
Regards
Regards
TK http://dynomotion.com
Hello Tom,
Thank you so much for everything. We were able to make it work with no inconvenience and everything ran smoothly. I have a different question though. Is there a way to control the KFlop and KStep with MATLAB? I introduced the KFlop and KStep to a friend of mine and he loved it. He has a setup running with MATLAB and he would like to run some stepper motors with his setup. Do we have to call the C functions through MATLAB? or is there another way to do it. Sorry for the inconvenience and thank you in advance.
Thanks,
Joanel
Hi Joanel,
Thanks for the feedback.
I'm not familiar with MATLAB and I don't have a copy. But Googling shows that it supports any .NET interface so it should be fairly simple. See here for an example:
https://www.mathworks.com/help/matla...-assembly.html
Our .NET assembly is called KMotion_dotNet.dll
HTH
Regards
Regards
TK http://dynomotion.com