Hi delcon,
If I want to configure an axis without any output and all the available channels are already taken, what would I write in the config file?
I'm not sure I understand. Are you really using all 8 available channels already? If not just use the next one? Configure the new Axis in KMotion.exe then use the C Code->ClipBoard button to create the C code for you whenever you need it. All that matters is the Input Mode, Input Channel 0, and Input Gain 0 as the axis channel will never be enabled.
So how would I connect the two line encoder?
This is a common source of confusion. I suppose because some systems configure input IO or pins (like Mach3). But in KFLOP the "Input Device Channel" is configured. You can basically think of an Encoder Counter as a physical hardware device that is hard wired to some particular IO pins. You are selecting which Device to be used. Some Input Modes require two input devices but with Encoder Input Mode you only need to specify one so the other is grayed out to make this clear. This Functional Diagram may help:
KFLOP doesn't have any hardware pulse counters (only quadrature up/downcounters), but your pulses are probably slow enough that you could just count them in software. Assuming 3000RPM Max and 50% duty cycle on the sensor, the sensor input should change about every:
60 / (3000 x 13 x 2) = 796us
KFLOP User C programs are guaranteed to execute every 180us. Here is a C Program that you could try if you can't add the B channel to your encoder:
Code:
#include "KMotionDef.h"
main()
{
int last=0;
for (;;)
{
WaitNextTimeSlice();
if (ReadBit(4) != last) // input change?
{
ch2->Position++; // count
last=1-last;
}
}
}
Regards