totally overwhelmed! start over info
Moderators: TomKerekes, dynomotion
Re: totally overwhelmed! start over info
The differential inputs on Kanalog are labelled as if you're going to use them for an encoder. So A0 and B0 inputs mean channel 0, however if you just want to use a single differential input as a more generic input (aka an index signal), you need to check what pin it connects to on the KFlop, then find it's input number.
So going from the Kanalog help page (http://dynomotion.com/Help/SchematicsKa ... analog.htm), JP2 connect to KFlop I/O bits 36-43 via JP5.
So if you run through the inputs in order, you get the following input map-
A4 = 36
B4 = 37
A5 = 38
B5 = 39
A6 = 40
B6 = 41
A7 = 42
B7 = 43
The reason for this, is within the FPGA that all these inputs ultimately go, are some dedicated encoder counters. These rely on the encoder inputs being connected to dedicated pins, however those pins can be configured as general purpose inputs/outputs. When accessing the encoder counters, you access them via a channel number, whereas when you use them as general inputs/outputs, you access them via a bit number bypassing the encoder counter.
So going from the Kanalog help page (http://dynomotion.com/Help/SchematicsKa ... analog.htm), JP2 connect to KFlop I/O bits 36-43 via JP5.
So if you run through the inputs in order, you get the following input map-
A4 = 36
B4 = 37
A5 = 38
B5 = 39
A6 = 40
B6 = 41
A7 = 42
B7 = 43
The reason for this, is within the FPGA that all these inputs ultimately go, are some dedicated encoder counters. These rely on the encoder inputs being connected to dedicated pins, however those pins can be configured as general purpose inputs/outputs. When accessing the encoder counters, you access them via a channel number, whereas when you use them as general inputs/outputs, you access them via a bit number bypassing the encoder counter.
Re: totally overwhelmed! start over info
ya i think thats what i am doing right?
if the output channel uses A2+, A2-, B2+ and B2- encoder inputs, it can use any of the 36-43 for Z index right?
if the output channel uses A2+, A2-, B2+ and B2- encoder inputs, it can use any of the 36-43 for Z index right?
Re: totally overwhelmed! start over info
great
i am not sure why my Z index pulse is not coming through
i think the C program is correct
i am not sure why my Z index pulse is not coming through
i think the C program is correct
Re: totally overwhelmed! start over info
Might be worth writing a small C program that simply prints a message to the terminal when the input changes, to confirm the Z signal is working.
Something like this-
Set the define TESTBIT to the input bit you're wanting to test, and make sure LASTSTATUS is set to an unused virtual bit.
Run that with the Console window open in KMotion, then turn the motor by hand a few times. Each time the index pulse gets passed, "Input changed" should get printed to the Console. If the message doesn't show, then either you're monitoring the wrong bit, or there is an issue with your index pulse.
Something like this-
Code: Select all
#include "KMotionDef.h"
#define TESTBIT 37 // set to bit being watched
#define LASTSTATUS 48 // set to an unused virtual bit
int main()
{
for (;;) // loop forever
{
if(ReadBit(TESTBIT) != ReadBit(LASTSTATUS))
{
if(!ReadBit(LASTSTATUS))
{
printf("Input changed\n");
SetBit(LASTSTATUS);
}
else
{
ClearBit(LASTSTATUS);
}
}
}
}
Run that with the Console window open in KMotion, then turn the motor by hand a few times. Each time the index pulse gets passed, "Input changed" should get printed to the Console. If the message doesn't show, then either you're monitoring the wrong bit, or there is an issue with your index pulse.
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: totally overwhelmed! start over info
Correct, a differential signal takes a + and a - signal/wire to make one bit
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: totally overwhelmed! start over info
i was fixated on the analog outputs being a bit pin each. not in sets!
Re: totally overwhelmed! start over info
got a short video of my numbers and also the strange noise or input going on to the feed rate slider
i punched in axis values that are on my mill with the same version of kmotion and still get the "nan"
https://youtu.be/M0AlbksDLxQ
i punched in axis values that are on my mill with the same version of kmotion and still get the "nan"
https://youtu.be/M0AlbksDLxQ