Hello Guest it is October 26, 2021, 06:04:54 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.


Messages - TPS

2181
VB and the development of wizards / Re: homing macro and Ismoving
« on: September 07, 2014, 03:09:25 AM »
Brett,

at the end this machine will be used in prof. conditions for drilling,tapping and labeling
for mounting plates for elecrical cabinets.

the normal work will be, load part, load programm hit start.
therefore a homing will be done at the beginning of every program to make sure
to start with the same conditions.

the machine will be operated of non CNC spezialists so have to create a easy to use
software. i have choosen Mach3/CSLabs for controlling the machine because
- its cheap
- its easy to use
- and on the main point with the screenset's, scripts and all the other open
functionality it gives me all the possibilities to create a package witch is exactly
what i need for this machine.

therefore i have to create test scenarios to make sure that all the particular
functions are working propperly.

i have also tested the homing by using dobutton(24) dobutton(23) and dobutton(22).

it ended up in a Error found Art Code 3336.
i was not able to find a list, witch discribes what this code means.

as long i am not not able to get this basic functionality working lets say up to 99%
stable it makes no sense to test further functions.

Thomas
 

2182
VB and the development of wizards / Re: homing macro and Ismoving
« on: September 06, 2014, 03:12:42 AM »
Brett,

this macro is only a part of the final macro.

what i want at the end is

home Z
depending on my setup i only can check after homing z whether there is a tool loaded or not

if tool loaded
- home Y
- if Y is finshed home X, possibilty of crash

if no tool loaded
- home x/y together to save time

the code with the check of reset and reference via GetOemLed was the
workaround CS-Labs prevered, because IsMoving() is not stable.

maybe i am not seeing the forrest depending on all the trees.

Thomas

2183
VB and the development of wizards / Re: homing macro and Ismoving
« on: September 05, 2014, 07:04:10 AM »
Hello Brett,

here the macro witch hangs:

Code: [Select]
Sub Main()
' -------------------------------------------------------------------------------
' TPS 04.09.2014 
' zuerst Z dann X/Y Referenzieren
' -------------------------------------------------------------------------------
'beim Laden des Files Abbrechen
If IsLoading() Then
    GoTo Ende
End If

Message ("Automatische Referenzfahrt")

    'Z referenzieren
    Message ("Z-Achse referenzieren")
RefCombination(4)   'Zuerst Z
    Sleep(200)
    While GetOemLed(809) = true
        Sleep(50)
        If GetOemLed(800) Then
            Sleep(500)
            Message"Fehler Referenzfahrt Z"
            End
        End If
    Wend
   
    'X und Y referenzieren
    Message ("X/Y-Achse referenzieren")
RefCombination(3) ' dann X und Y
    Sleep(200)
    While ((GetOemLed(807) = true) or (GetOemLed(808) = true))
        Sleep(50)
        If GetOemLed(800) Then
            Sleep(500)
            Message"Fehler Referenzfahrt X/Y"
            End
        End If
    Wend

Code "G54" 'Koordinatenverschiebung ein
Sleep(200) 'warten
    Message (" ") 'Stauszeile löschen
Exit Sub
 '--------------------------------------------------------------------------------

Ende:
 
 Message ("Automatisches Referenzieren Abgebrochen")
   
End Sub   
Thomas

2184
VB and the development of wizards / Re: homing macro and Ismoving
« on: September 05, 2014, 02:08:38 AM »
Hello Brett,

small update

its clearing the home limts itself if in ->General Config the option ->Home Sw. Safety is disabled.
so i was able to delete the code for clearing the switches. but still the problem that the macro
hangs sometimes.

Home Off distance works after the homing to drive a declared distance after the homing was
finished.

Thomas

2185
VB and the development of wizards / Re: homing macro and Ismoving
« on: September 04, 2014, 02:51:56 AM »
I think it will but would have to test to be certain..........

no its doing just nothing. only a message is created, that the limit switch is active.
i think CS-labs addon is not the problem, i think Mach is not notifying the addon
to do a reference because its checking the limit switch.

thats what i think, dont know for sure.

i am still in contact with CS-Labs, because with the new code the macros
still hangs up, but now without any internal error.

keep you informed.

Thomas

2186
VB and the development of wizards / Re: Act sometimes
« on: September 04, 2014, 02:26:51 AM »
hi,

looks like you have found the way.
probbably i could give you some ideas.

Thomas

2187
VB and the development of wizards / Re: homing macro and Ismoving
« on: September 03, 2014, 04:43:21 AM »
Hello Brett,

her the answer for CSLab

Quote
Dear sir,
Homing is an autonomous function of CSMIO/IP motion controllers and Mach3 may have a problem with IsMoving() function.

To control if homing is finished you can use LED diodes  GetOemLed(807)  / GetOemLed(808) / GetOemLed(809).

DoButton( 22 )
Sleep(200)
While GetOemLed(807) = true
    Sleep(50)
    If GetOemLed(800) Then
        Sleep(500)
        Message"Error"
        End
    End If

Wend
Message"Axis referenced"

 The way shown above works perfect

Regards

Wojtek Trawicki

Thomas

2188
VB and the development of wizards / Re: Act sometimes
« on: September 03, 2014, 03:48:14 AM »
ok then i expanded the sample a little bit:

Code: [Select]
let's say
'marker red = tool 5
'marker blue = tool 6
'marker black = tool 7

' Get actual tool # and new tool #
ToolOld = GetCurrentTool()
ToolNew = GetSelectedTool()

'here we do the marker things

'here we do the code to deactivate the markers
If ((ToolOld = 5) or (ToolOld = 6) or (ToolOld = 7))
    'code to desactivate markers
    code "G01 X?? Y??"
    'and so on
End If


If ((ToolNew = 5) or (ToolNew = 6) or (ToolNew = 7))

    If (ToolNew = 5) Then
        'add here the code activate red marker
        code " G01 X?? Y??"
        'and so on
    End If

    If (ToolNew = 6) Then
        'add here the code activate blue marker
        code " G01 X?? Y??"
        'and so on
    End If

    If (ToolNew = 7) Then
        'add here the code activate black marker
        code " G01 X?? Y??"
        'and so on
    End If
    Exit Sub

else
'here we do the original M6Start things

End If

regards Thomas

2189
VB and the development of wizards / Re: Act sometimes
« on: September 03, 2014, 03:10:29 AM »
Hello,

i think i understans now what you want.

needs a little bit of code in the start macro:

lets say
marker red = tool 5
marker blue = tool 6
marker black = tool 7

' Get actual tool # and new tool #
ToolOld = GetCurrentTool()
ToolNew = GetSelectedTool()

If (ToolNew = 5) Then
    'add here the code activate red marker
    code " G01 X?? Y??"
    'and so on
End If

If (ToolNew = 6) Then
    'add here the code activate blue marker
    code " G01 X?? Y??"
    'and so on
End If

If (ToolNew = 7) Then
    'add here the code activate black marker
    code " G01 X?? Y??"
    'and so on
End If

hope i understood what you realy wnat to do.

Thomas

2190
VB and the development of wizards / Re: homing macro and Ismoving
« on: September 03, 2014, 02:52:12 AM »
Hello Brett,

i thought this HOME OFF DISTANCE is the distance
witch is driven after the homing, i am gona test this today.

what i want to do with my script is to clear the homing limits
before i start a homing, because it is not homing when its
on an limit.

Thomas