KFLOP Servo alarm sensing
Just for some background I am retrofitting a Tree Journeyman 325 Mill.
So far most of the project is going better then expected. I am using AASD-30A 1.5KW servos and a Lepond 7.5 KW VFD to drive the original Fanuc spindle Motor.
The machine runs good and I can easily get rapids in 400IPM range.
There are two safety issues I am having:
1. When I shut down the computer after initializing, the servos stay enabled. I need them to disable once the software is shut down.
2. I need the control to sense if one of the drives has a fault output that goes low and stop all motion.
I changed the setting in the main program to Setbit (48) to enable the drives during INIT.
I am using bits 1050-1053 on a Konnect to monitor the servo ready signals from the drives.
I have scoured the documentation and cannot seam to find a solution is there something I am missing?
Re: KFLOP Servo alarm sensing
To follow up on this post. I did get the system to monitor the servo ready signals and shut it down if it detected a low signal. I just used a simple IF, ELSE command to monitor the input bits and Disable the appropriate axis.
I'm still trying to find a way to disable the servos if the PC freezes or is shutdown.
Re: KFLOP Servo alarm sensing
Hi Crasher,
See the WatchdogStatusRequests.c example.
HTH
Code:
#include "KMotionDef.h"
void ServiceWatchdogStatus(void);
void WatchdogTripped(void);
void WatchdogOK(void);
#define WATCHDOG_DELAY 5.0 // seconds after host stops to Trigger
// for testing
main()
{
for (;;)
{
WaitNextTimeSlice();
ServiceWatchdogStatus();
}
}
// Watchdog Trips after all host applications stop requesting status
// Watchdog OK is called when communication and status requests Resume
void ServiceWatchdogStatus(void)
{
static int Alive=FALSE;
static int PrevStatusRequestCounter=-1;
static double WatchdogTime=0;
double T=Time_sec();
// check if Host is requesting Status
if (StatusRequestCounter != PrevStatusRequestCounter)
{
// yes, save time
WatchdogTime = T + WATCHDOG_DELAY;
PrevStatusRequestCounter=StatusRequestCounter;
if (!Alive) WatchdogOK();
Alive=TRUE;
}
else
{
if (T > WatchdogTime) // time to trigger?
{
if (Alive) WatchdogTripped();
Alive=FALSE;
}
}
}
void WatchdogOK(void)
{
ClearBit(47); // KFLOP LED off
Delay_sec(1);
SetBit(47);
Delay_sec(1);
}
void WatchdogTripped(void)
{
ClearBit(46); // KFLOP LED off
Delay_sec(1);
SetBit(46);
Delay_sec(1);
}