UCCNC Sycotec 4033 AC Spindle

Post anything you want to discuss with others about the software.

UCCNC Sycotec 4033 AC Spindle

Postby figher_ionut » Thu Aug 24, 2017 9:39 am

Hello,
I have a cnc machine from the bungard whose controller I modified and adapted for the ucccc software.
The controller I'm using is uc100.
The spindle chuck is pneumatically driven and I would like to do it by pressing a button in the uccn interface. How can I do this?
The cnc machine is equipped with ATC for 14 tools but I did not intend to use it for the time being.
figher_ionut
 
Posts: 1
Joined: Thu Aug 24, 2017 9:26 am

Re: UCCNC Sycotec 4033 AC Spindle

Postby dezsoe » Thu Aug 24, 2017 11:03 am

Add a button to your screenset. (See documentation for details.) Use a button picture like yellowempty_down.png and yellowempty_up.png to show chuck state. Set buttonnumber to 20105.

Add this macro to your macro folder as M20105.txt:
Code: Select all
// ================================================================================================
// Chuck open/close
// ================================================================================================

if (AS3.Getbuttonstate(ChuckButton))
{                                                                     // Chuck is open -> close it
  if (OpenChuckOn1)
    exec.Clroutpin(ChuckPort, ChuckPin);
  else
    exec.Setoutpin(ChuckPort, ChuckPin);
  AS3.Switchbutton(false, ChuckButton);
}
else
{                                                                     // Chuck is closed -> open it
  if (OpenChuckOn1)
    exec.Setoutpin(ChuckPort, ChuckPin);
  else
    exec.Clroutpin(ChuckPort, ChuckPin);
  AS3.Switchbutton(true, ChuckButton);
}

// ================================================================================================

#Events

// ================================================================================================

const int ChuckButton = 20105;                                        // Must be the same as macro and button number

const int ChuckPort = 1;                                              // UC100 is always port 1
const int ChuckPin = 1;                                               // Set this to the output pin for chuck

const bool OpenChuckOn1 = true;                                       // True if chuck opens on pin high level else set to false

If your chuck opens on low level output, change in the last line true to false. Set ChuckPin to your output. If you changed OpenChuckOn1 to false, only then add the following line to M99998.txt (it will set the output high on stratup):
Code: Select all
exec.Setoutpin(1,1); // Port and pin, where port is always 1, pin is your output
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 41 guests