//sure,
//Here is a few vars that you may need.
int m_FeedSpeed = 0; //these can come from your dialog screen, or pull out of UserDRO's on your Mach screen,
double m_RotationDistance = 0; //or pull out of UserDRO's on your Mach screen,
int m_Direction = 0; //(1 is CW, -1 is CCW),
//I will assume your're screen. (I will list them with the member var, in case from dialog)
BOOL RotateAaxis = FALSE; //have something turn this on, and the conditional will turn it off.
CString AxisCode = "";
CString AxisDirection = "";
m_FeedSpeed = GetDRO( 2000 ); //from your Axis setup screen or area if setting your vars from your screen.
m_RotationDistance = GetDRO( 2001 ); //from your Axis setup screen or area.
m_Direction = GetDRO( 2002 ); //from your Axis setup screen or area.
if( m_Direction == 1 ) AxisDirection = "";
if( m_Direction == -1 ) AxisDirection = "-";
if( RotateAaxis ) //if your running this from a physical input, you will need to add run once/btn push interlocks.
{
if( m_FeedSpeed == 0 || m_RotationDistance == 0 || m_Direction == 0 )
{
m_RotateAaxis = FALSE;
return;
}
else
{
AxisCode.Format("G01 A %s%i F%i", AxisDirection, m_RotationDistance, m_FeedSpeed);
Code(AxisCode);
m_RotateAaxis = FALSE;
}
//show us what your doing on your machine when you get this working!
//Scott