Hello Guest it is November 27, 2020, 06:56:57 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Oldraven

Pages: 1
1
Machscreen Screen Designer / Mach3 and Machscreen.
« on: March 01, 2015, 07:41:08 AM »
Hi,

I encountered a strange behavior of Mach3 Tool number DRO 24.

If I execute this; SetDro(24,x) the the Z- and Z- DRO's (on my lathe screen) also changed value at random.

I made a new profile, in fact copying the one in use and this problem was gone. The SetDrO(924,x) functioned fine and both the X- and Z-axis were OK.

But, AFTER using Machscreen the situation was back as before.
Machscreen, on loading the .lset) reported a corrupted file.
Saving the .lset after changing a Button, caused the SerDro(24,x) the malfunction again.

Working on the .lset file, that causes Machscreen to report as Corrupt File, and after saving the .lset again throws the DRO functions into a faulty behavior.

I do not know why the .lset is reported corrupt. Machscreen gives me no clue.
Any insight in this?

Would using Screen4 be a better choice ?

Thanks,

Jos

2
VB and the development of wizards / Mach3 and Machscreen.
« on: March 01, 2015, 05:38:16 AM »

Hi,

I have posted here earlier (Need Help) about a strange behavior of Mach3 Tool number DRO 24.

If I execute this; SetDro(24,x) the the Z- and Z- DRO's (on my lathe screen) also changed value at random.

I made a new profile, in fact copying the one in use and this problem was gone. The SetDrO(924,x) functioned fine and both the X- and Z-axis were OK.

But, AFTER using Machscreen the situation was back as before.
Machscreen, on loading the .lset) reported a corrupted file.
Saving the .lset after changing a Button, caused the SerDro(24,x) the malfunction again.

Working on the .lset file, that causes Machscreen to report as Corrupt File, and after saving the .lset again throws the DRO functions into a faulty behavior.

I do not know why the .lset is reported corrupt. Machscreen gives me no clue.

Would using Screen4 be a better choice ?

Thanks,

Jos

3
VB and the development of wizards / need help!
« on: February 20, 2015, 05:36:49 AM »
Hello all,

I really could use some help with one command in the VB script below.

This statement works but also seeds the X- and Z-axes DRO's with random digits!
Call SetOEMDRO(824,number)                  'Set tool # in DRO
Why ??
I am working on this for almost a week now.
For the rest the script works OK.

Jos

'REM _________Script to advance ATC/Turret 1 position.____________
 
  maxtool = 6                        '# of tools in turret
  extraAngle = 6                             'Extra angle added to turret rotation
  round = 360                        'One turn in degrees of turret
  oldtool = getcurrenttool                       'Tool # before rotation
  newtool = GetOEMDRO(824)               'Get Tool #
  Angle = round/maxtool                                     'Angle of rotation i.e. 60 degrees
  number = GetOEMDro(824)                                 'Get Tool #
  
Code "G91"                        'Incremental Distance Mode  
If GetOEMDRO(824) = 0 Or GetOEMDRO(824) >6 Then
   number1 = Question("What is current tool # ?")
   Call SetOEMDRO(824,number1)
   Call SetOemDro(803,number1*round/maxtool) '803 = A Turret DRO
   Exit Sub
End If  
number=number+1                                            'add 1 to the #
If nummer>maxtool Then number=1                        'check if tool # is 6  

'After executing the next line the X- and Z- DRO's display random figures.
'I do not know why.
Call SetOEMDRO(824,number)                                 'Set tool # in DRO  

                                          'now calculate the rotation angle of turret
If number=1 Then Call SetOemDro(803,0)
ToolChange = GetOEMDRO(803)                    'Get A position
ToolChange = (round/maxtool)+extraAngle                  'Tool-change turret 60 + 6 CW
                                 
Code "G0 A" & ToolChange                                'execute rotation CW
code "G0 A" & -6                          '6 steps CCW

While IsMoving()
Wend
Call SetOEMDro(803,((number-1)*round/maxtool))
 
Code "G90"                             'back to Absolute Distance Mode

4
VB and the development of wizards / Reaction time IsActive(INPUT)
« on: June 09, 2012, 05:02:52 AM »
Hi,

I am trying to get my M6Start.m1s macro to home at tool #1.

I am using these lines to have the macro look at INPUT1 (port 1, pin 13)

Code "G00 A360"                        'Rotate the ATC
While Not IsActive(INPUT1)       ' Look for ATC Home pulse
 Wend               'Input #1 must be active now

However INPUT1 LED lights up but no reaction. The ATC keeps on turning.

What is happening? Is the input pulse too short?

Any help would be greatly appreciated.

Jos
Holland

5
General Mach Discussion / G53 Z0 Strange Behavior.
« on: July 11, 2011, 03:57:45 AM »

Hello all,

I need some insight here.
At the first encounter of G53 Z0 the Z-axis rises very slow.
At the next tool changes a call for G53 Z0 is made and the Z-axis rises in normal speed.

I am at a loss, no idea what is going on.
I General Config I only have G21 in the Initialization String.

What is going on?

My G-code;
(PROGRAM NAME - BASE-2D-3.NC)
(POST - MACH 3 MILL METRIC)
(DATE - SAT. 07/09/2011)
(TIME - 09:33AM)

N01 G21 G40 G49 G54 G80 G90 G91.1
N02 G53 Z0. >>>>>                                        Here the Z-axis goes up very slowly <<<<<<

(JOB 1 CENTER HOLE RANDOM POINT PATTERN)
(2MM CENTER DRILL)

N03 M06 T1
N04 S1901 M03
ETC.

Thanks,

Jos
Holland

6
VB and the development of wizards / M6Start for Toolchanger again.
« on: June 07, 2011, 07:43:22 AM »
Hi ,

I used a M6Start macro that someone had written for a 6 tool Boxford ATC.
That worked, sort of, for my Emco5 ATC converted with a stepper motor and one optical slot for homing.

The problem was that the macro could not see if the ATC was homed in the Manual screen, Home All.
It would turn at random, tool positions were not absolute.

I inserted this piece of VB code in the beginning of the macro;

'----------------------------------------
' First check if ATC is homed.

If IsActive(INPUT1) Then
  Message " Input 1 is Active"
  SensorState = "Active"
Else  
  Message " Input 1 is NOT Active, Home first."
  
  Code "M30"   'End the execution of the G-Code.
End
End If
If SensorState = "Active" Then
Current_Tool = 1      'Set ATC Home as Current Tool.
End If         

'-----------------------------------------

That set the Current_Tool as tool # one.
But, when a second tool change was asked for in the G-code things went wrong.
The macro insists to be homed again.

I need some code or place to store the information that the part homing command is to be skipped.
Say that I insert a variable like Homing_Done just before the   end If;

If SensorState = "Active" Then
Current_Tool = 1      'Set ATC Home as Current Tool.
Homing_Done = 1
End If

I want to store this Homing_Done somewhere. Can that be done outside the macro and have the macro look for it each time the M6Start
is called in the current G-code?

This is the total macro;

' Boxford 160TCL Toolchanger Macro.
'
' Works by turning CW to just past the tool position
' and then CCW into a stop.
' Axis setup as rotary e.g. move 360 = 1 full turn.

' Adapted for the EMCO5cnc Automatic Tool Changer.
' Checks if ATC is Homed first and sets Current_Tool as #1.
' If not Homed it ends the program.

If IsLoading() Then
' Do Nothing, program loading
Else


' Dim Variables

Dim Num_Tools As Integer
Dim CW_Steps_Per_Tool As Integer
Dim CCW_Steps As Integer
Dim HoldingDRO As Integer
Dim Requested_Tool As Integer
Dim Current_Tool As Integer
Dim CW_Feed As Integer
Dim CCW_Feed As Integer

Dim moves As Integer
Dim total_move As Integer

'----------------------------------------
' First check if ATC is homed.

If IsActive(INPUT1) Then
  Message " Input 1 is Active"
  SensorState = "Active"
Else  
  Message " Input 1 is NOT Active, Home first."
  
  Code "M30"   'End the execution of the G-Code.
End
End If
If SensorState = "Active" Then
Current_Tool = 1      'Set ATC Home as Current Tool.
End If         

'-----------------------------------------
' set up some vars

Num_Tools = 6
CW_Move_Per_Tool = 360/Num_Tools
CCW_Move = 10
HoldingDRO = 1050
Requested_Tool = GetSelectedTool()
'  Current_Tool = GetUserDRO(HoldingDRO)
CW_Feed = 700      
CCW_Feed = 700
Current_Feed = GetOEMDRO(818)



' start tool change

Message ("Requested Tool No=" & Requested_Tool)

If Requested_Tool > Num_Tools Then
Message "Requested Tool No. too high, program stopped."
Code "M30"
End
End If

If Requested_Tool < 1 Then
Message "Requested Tool No. too low, program stopped."
Code "M30"
End
End If

If Requested_Tool = Current_Tool Then
' do nothing
Else
' lets do some changing
If Requested_Tool > Current_Tool Then moves = Requested_Tool -Current_Tool
If Requested_Tool < Current_Tool Then moves = Num_Tools - Current_Tool +Requested_Tool

total_move = (moves * CW_Move_Per_Tool)+(CCW_Move/2)

'Code "G01 x-10 F700"
'Code "z-10"
Code "G91 G94" 'incremental & Feed per minute
Code "G0 A" & total_move '& "F" & CW_Feed
Code "G0 A" & "-" & CCW_Move '& "F" & CCW_Feed
While IsMoving()
Wend

SetCurrentTool Requested_Tool
SetUserDRO HoldingDRO, Requested_Tool
Code "G90" ' back to absolute movement
Code "F" & Current_Feed
End If
End If

' end of tool change          

Thanks for looking,

Jos
Holland

7
General Mach Discussion / G74 for turning not recognized in Mach3.
« on: April 27, 2011, 05:07:35 AM »
Hello,

I am struggling with my postprocessor to do some turning with Mach3.
I have generated a g-code with Solidcam and there is the G74 code. Mach3 does not accept this.

I do not understand the G81 code and I think that this is intended for drilling on the mill, not for drilling while turning.
This is the part in my .gpp file for turning;

@turn_drill
        local string for for1 for2  for3
        for1 = '2/2.0(P)'
        for2 = '2/2.0(P*10)'
        for3 = '5.0(P*1000)'

    local numeric save_feed xc_new
    gcode = 74
    if drill_type eq drilling then
        r = 0
        q = abs(drill_lower_z + r)
    endif
    if drill_type eq peck then
        r = r
        q = (down_step)
    endif
    if drill_type <> tapping
        {nb 'G'gcode, ' R'r }
        {nb 'G'gcode, ' Z'drill_lower_z ' Q'q:for3}
        if drill_type eq peck then
               {' R0.'}
        endif
        if feed_unit eq css
            {' F'feed }
        else
            {' F'feed:'5.0(p)' }
        endif
    else
        gcode = 32
        save_feed =feed
        xc_new = 100-p_feed
        feed = feed*xc_new/100
        { nb 'G'gcode ' Z'drill_lower_z}
        if feed_unit eq css
            {' F'feed }
        else
            {' F'feed:'5.0(p)' }
        endif
        ;tbd.. check for a maximum of 10 mm mistake (BIG MISTAKE)
        ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        feed = save_feed
        {nb 'M5'}
        {nb 'G'gcode ' Z'drill_upper_z ' S'(spin*1.3):integer_def_f  ' M4'}
        if feed_unit eq css
            {' F'feed }
        else
            {' F'feed:'5.0(p)' }
        endif
    endif
endp

Someone has been working at this, see the comment.

Can G81 be used for turning?
Any ideas how to solve this?? Please??

Jos Raven
Holland

8
VB and the development of wizards / Need help with Macro A-axis.
« on: March 04, 2011, 08:38:27 AM »
I am wrestling with the VB language to make a macro for turning a stepper on the A-axis.
Complete newbie to Visual Basic.

There is an optical sensor on the tool changer axis, one pulse per revolution.
I want first to home the tools to this optical pulse.

This is what I have;

'M6start.own 
'Input is an optical sensor for homing the ATC. 
'Get OEMLED ATC-Home. Check if ATC opto is lit.
'One pulse as a home reference generated by Emco5cnc ATC.   

While GetOEMLED(821) = False    
Call Rotate_1
Wend 

Private Sub Rotate_1()
Code "G91"
Code "G00 A259" 
GetOEMLED(821) 
Code "G00 A-10"
Code "G90" 

End Sub 

any ideas please.

Jos

9
G-Code, CAD, and CAM discussions / Need Help A-axis.
« on: February 24, 2011, 09:10:24 AM »
Hello all,

I am new to this forum and need some help in setting up the A-axis for driving a tool turret on my Emco5cnc lathe.
The turret has a new stepper motor and an optical 1 slot detector.
The turret will turn if I give out the G-code ; g00 a60 .
It should go 60 degrees, sometimes it does this and most times not it will turn forever.

The zero slot lights up in A-home in the diag screen.
What does Mach3 do with the A-home light?
I want to use a code or macro so that the turret turns around to the zero pulse output by the optical slot.
Then turn as many degrees as needed by the tool # input. I.E. 3 = 180 degrees.

The turret is a 6 position, the stepper needs to go forward to the position indicated and reverse back a little to the stop pawl.

Any advice is very welcome.

Regards,

Jos Raven
Holland

Pages: 1