Hello Guest it is May 06, 2024, 10:21:22 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

2491
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

2492
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

2493
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

2494
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

2495
VB and the development of wizards / Re: Act sometimes
« on: September 02, 2014, 03:16:40 PM »
hello Daregone,

for my mind i think you have to find your 'own' way for
a tool change macro, however its called.

i think with this M6Start stop thing you will not get happy.

excuse my bad english.

Thomas

2496
VB and the development of wizards / Re: homing macro and Ismoving
« on: September 02, 2014, 03:12:01 PM »
ok, small update,

i am sure it is not the Ismoving() thing.

replaced it with:

While GetOEMled(999)
Wend

should be the same i thought.
but i am geting no internal error anymore, it just hangs.

for the moment i am out off any ideas.

looks like i have to to accept, that it is not
working 'sometimes'.
with no idea what i can do if it is not working (automaticly)

just frustraiting.

Regards Thomas

2497
VB and the development of wizards / Re: homing macro and Ismoving
« on: September 02, 2014, 04:26:50 AM »
Hello Brett,

i emailed CSlabs the problem.
will get back to you with the response.

Thomas

2498
VB and the development of wizards / Re: Act sometimes
« on: September 02, 2014, 04:15:06 AM »
Hi,

this needs a little bit of code like this

Code: [Select]

'move to tool change position
Code "G1 X?? Y?? Z??"

'check tool present
Again:

If IsActive(INPUT1) Then
    ' tool is present       
    ' do code when tool present
Else
    'tool not present
    'ask operator
    Response = MsGBox ("tool loaded ?" , 4)
    If Response = 6 then
        Go To Again
    Else   
        GoTo Ende
    End If   

End If

'Code if everything was fine

Exit Sub

Ende:
   'code if operator pressed abort



it's just a sample not tested.

regards Thomas

2499
VB and the development of wizards / Re: homing macro and Ismoving
« on: September 02, 2014, 02:14:15 AM »
Hello,

back again after additional testing.

i tryed

Code: [Select]
Sleep(200)
While IsMoving()
Wend

crashed at line While IsMoving() with internal error

i tryed

Code: [Select]
While IsMoving()
Wend

did not stop after the DoButton(24)

i tryed

Code: [Select]
Sleep(200)
While Not IsStopped()
Wend

crashed allways at line While Not IsStopped() with internal error


maybe i am searching at the wrong side of the road, because i am
using a csmio/ip motion controller and do not know whether this
function call (IsMoving()) is only handled by Mach Software or
also by the plugin.

possibly i have to talk to the csmio/ip people.

Thanks Thomas






2500
VB and the development of wizards / Re: homing macro and Ismoving
« on: August 31, 2014, 01:25:26 PM »
Hello Gerry,

tryed this already, but i figured out
that without the sleep it does not
wait after the

DoButton(24)

for z-reference.

Thanks Thomas