Page 1 of 1

Konnect COM Signature Error - How to Detect in C code?

Posted: Fri Oct 21, 2022 6:37 pm
by jtremel
I have a machine I have been developing/running over the last several months.

It uses two Konnect boards to handle a bunch of IO.

The GUI interface for the machine handles the KM_Controller.MessageReceived event and displays/logs all console messages. Today I was at the machine and it faulted out... the culprit being a Konnect COM signature error as reported by the MessageReceived event.

The Konnect after the signature error was unresponsive and required a reload of my Main initialization C program with the AddKonnect() call in it. (I guess the is the expected behavior after a signature error).

My first question is how to detect this error in a C program? I want to immediately stop the machine from my Kflop C programs if the Konnect is not reporting correctly and I do not want to rely on the GUI to know the error happened.

I am also scratching my head on what caused the communication error. This machine has been running for several months. I have short ribbon cables connecting everything (though a few inches longer than the one shipped with the Konnect boards). With short ribbon cables and good grounding practices would you expect to ever see the signature error?

Re: Konnect COM Signature Error - How to Detect in C code?

Posted: Fri Oct 21, 2022 9:04 pm
by TomKerekes
Here is an example

Code: Select all

#include "KMotionDef.h"

typedef void AUX_FUNCTION(void);
extern AUX_FUNCTION *ServiceAux;
void Idle(void);

main()
{
	if (ServiceAux==Idle) 
		printf("Konnect Idle\n");
	else
		printf("Konnect being serviced\n");
}

Re: Konnect COM Signature Error - How to Detect in C code?

Posted: Sat Oct 22, 2022 12:15 pm
by jtremel
Thanks Tom!
I've tested this out and implemented into my code.

As always, I appreciate the quick help!