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?
Konnect COM Signature Error - How to Detect in C code?
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Konnect COM Signature Error - How to Detect in C code?
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");
}
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Konnect COM Signature Error - How to Detect in C code?
Thanks Tom!
I've tested this out and implemented into my code.
As always, I appreciate the quick help!
I've tested this out and implemented into my code.
As always, I appreciate the quick help!