Hi Chris,
You now seem to have both signals properly wired as 5V Open Collector mode.
But I think you have Step and Dir reversed.
KFLOP JP7 Pin 15 is Step. JP7 Pin 16 is Dir.
See:
Step and Direction Setup
Regards
Okay, again Thanks All,
But this is getting frustrating.
I have Clearpath Enable +, A+ and B+ all connected to Kflops 5v+,
Then Enable - to Kflop Digital Ground
Dir to A- ....kflop j7 15
Step to B-....kflop j716
Still no action.
I've checked my pins, the connector spells out the pin numbers on the back of the mating connector.
What the hell am I missing.
Hi Chris,
You now seem to have both signals properly wired as 5V Open Collector mode.
But I think you have Step and Dir reversed.
KFLOP JP7 Pin 15 is Step. JP7 Pin 16 is Dir.
See:
Step and Direction Setup
Regards
Regards
TK http://dynomotion.com
Thanks all for the help getting my motors moving.
Now I'm trying to get the general i/o pins to turn on my spindle, coolant and maybe a setup to touch off my tool lengths. I'm not well versed in C, but can someone help me choosing the pins on the board to use, and how to related that to a c program already written?
Thanks,
T
Hi T,
Can you tell us what kind o spindle you have and how it is controlled? Do you intend to control the speed? Or just on/off? CW/CCW?
Do you have a electronic probe?
Regards
Regards
TK http://dynomotion.com
So the spindle just needs a switch to close, same thing with the air solenoid relay. I just need to know how to wire the pins to the fkop, find the code and implement it into the board.
Thanks
Hi T,
You need to also know what voltage and current the switch needs to be able to switch. Most VFD's require to switch 10 or 24V at about 10ma. A solenoid usually requires more current.
KFLOP only has 3.3V IO. If you only have KFLOP it wouldn't work without some interface. Our Konnect adds that type of IO. Or you might add a Solid state relay (that can be controlled with 3V). Or a FET Transistor that can be controlled with 3V. Or a 3rd party relay board such as:
Relay Board: TTL Logic Level Inputs, 2 SPDT 15A Relays - Winford Engineering
Regards
Regards
TK http://dynomotion.com
Right, So I already have the relays. I just need to know now to implement the code with the pins.
Hi T,
What are the specifications on the relays? Is it interfaced? To what pins?
Regards
Regards
TK http://dynomotion.com
I've chosen some arbitrary pins on J4, the general i/o pins to turn on the spindle, air and maybe a tool offsetter. I'm using s solid state relay able to swich at 3 volts.
How do I pick which pins to use? How do I choose the program, and direct the program to which pins I've chosen?
toolbag33,
look where you installed Kmotion and then look in the directory C programs. There are many examples of how you make a small C program to output or read a bit from a given port.
Here is a little snipit of code on how I am reading i/o pins for the switches on my MPG. Look at the examples and you will learn a great deal.
Russ
// ADD THE MPG CHANNEL RIGHT HERE
DefineCoordSystem(0,1,2,-1);
EnableAxisDest(0,ch0->Position);
Pos = chan[MPG_INPUT_AXIS].Position;
for (;
{
NewPos = chan[MPG_INPUT_AXIS].Position;
Change1 = NewPos - Pos;
Pos = NewPos;
if (ReadBit(16)) // if pressed ignore the encoder.
Change1 = 0;
else if (ReadBit(21)) // is X1 selected? FACTOR1
Factor = 2;
else if (ReadBit(22)) // is X10 selected? FACTOR20
Factor = 20;
else if (ReadBit(23)) // is X100 selected? FACTOR200
Factor = 200;
else
Factor = 0.0;
if (ReadBit(17)) // is x selected?
Axis=0;
else if (ReadBit(18)) // is y selected?
Axis=1;
else if (ReadBit(19)) // is z selected?
Axis=2;
else if (Readbit(20)) // is a selected?
Axis=3;
// check if the Axis just changed or we have been
// converging to the target for a long time
if (Axis != LastAxis ||
(InMotion && Time_sec() > LastChangeTime+FINAL_TIME))
{
if (InMotion)
Move(LastAxis,Target); //finalize any motion
LastAxis = Axis;
InMotion = FALSE;
}
Hi T,
The first step is to wire up your 3V Relays to KFLOP JP4. 8 of the IO on JP4 have 150ohm pull down resistors. The last 2 do not. You may want to use those as they can source more current (16ma).
After that you can test your hardware by using the KMotion.exe Digital IO Screen to see if it works.
Regards
Regards
TK http://dynomotion.com
As Tom has said, once things are wired up, you can test they're working by flipping the relevant bits in KMotion.
Once you're happy things are working, for basic on/off functionality you just need to assign the relevant port/pin to the function within Mach. To work out the port/pin for use in Mach, check out section 6 on this page - Mach3 Plugin + KMotion
If you want to implement a tool setter/touch probe, you do need to use some C code.
Rather than use the basic NotifyMach3.c, look at the NotifyProbeMach3.c, which contains some extra code to handle probing.
The only thing you need to alter in that file (other than the Axis constants listed at the top*), is the bit number for the probe -
#define PROBE_BIT 0
Change the 0 to whatever bit you have the probe connected to, and you may also need to change the PROBE_ACTIVE_STATE depending on what way the bit changes when the probe is activated.
*The basic file assumes X is channel 0, Y is 1, and Z is 2. If that's what you're using in your init.c file I.e, DefineCoordMotion(0,1,2,-1), then you don't need to change them.