Hello Guest it is October 16, 2021, 11:05:56 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

651
VB and the development of wizards / Re: Turn tool turret macro
« on: April 25, 2020, 02:53:10 AM »
ok if the timer function is not working, you can try to use the time function.

example:
Code: [Select]
Dim TS As Single
Dim TE As Single
Dim TT As Single

'get the starttime
TS = Timer

Sleep 4000

'get the actual time
TE = Timer
TT = TE - TS



MsgBox TT




652
VB and the development of wizards / Re: Turn tool turret macro
« on: April 24, 2020, 01:00:37 PM »
if i run your testcode here in VB Scripter window, i get a result, see attachment

653
VB and the development of wizards / Re: Turn tool turret macro
« on: April 24, 2020, 06:21:30 AM »
did some tests Looks like the Timer Resolution is 10 seconds this code should work better

Code: [Select]
'----------------------------------------------------------------------
'TOOL CHANGE
'----------------------------------------------------------------------

Sub DoToolChange()

SetCurrentTool(NewTool) 'Update the tool DRO
'Call ActivateSignal(OUTPUT6) 'Set tool change allowed signal to PLC
SetTimer(20) 'Clear timer 1
sleep 500

While NOT IsActive(INPUT1)  'While the turret is moving, count down

t = GetTimer(20)
If t > 0.4 Then
Call ToolFailed
End If
Sleep 100
Wend

Call ToolComplete


End Sub
     
 

'----------------------------------------------------------------------
'TOOL COMPLETE
'----------------------------------------------------------------------

Sub ToolComplete()
DeActivateSignal(OUTPUT6)
SetSpinSpeed(PreviousSpeed) 'RPM before tool change called
Message("Tool Change Complete in " & GetTimer(20) & " seconds")
sleep 100
End Sub


654
VB and the development of wizards / Re: Turn tool turret macro
« on: April 23, 2020, 05:46:07 AM »
i think that is what you try to do

Code: [Select]

'Clear timer 1
SetTimer(1)



While IsActive(INPUT1) = False 'While the turret is moving, count down
t = GetTimer(1)

If t > 4000 Then
Call ToolFailed
End If
Sleep 100
Wend

Call ToolComplete




655
VB and the development of wizards / Re: Turn tool turret macro
« on: April 21, 2020, 08:05:19 AM »
what have you selected in Config -> General Config -> Toolchange?

656
VB and the development of wizards / Re: Turn tool turret macro
« on: April 21, 2020, 08:02:47 AM »
put a MSGBox("M6 call") at the beginn of M6 macro just to see that it getting called.

657
VB and the development of wizards / Re: Turn tool turret macro
« on: April 21, 2020, 07:16:53 AM »
if i test here the SetCurrentTool() OEMDro(824) is updated imediatelly

658
VB and the development of wizards / Re: Turn tool turret macro
« on: April 21, 2020, 05:51:15 AM »
you have to tell the System the new Toolnumber by:

    SetCurrentTool( Tool )

659
German / Re: Probleme mit PWM
« on: April 16, 2020, 12:25:08 PM »
Das verstehe wer will, aber Hauptsache es funktioniert.

660
German / Re: Probleme mit PWM
« on: April 16, 2020, 09:51:07 AM »
das:

https://www.youtube.com/watch?v=xxq8zOC9Hxc

habe ich gerade noch gefunden, vielleicht hilft es.