Hello Guest it is April 25, 2024, 12:36:41 AM

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 - nso

Pages: 1 2 3 4 »
1
VB and the development of wizards / Re: Tool Changer Timed Out as safety
« on: October 19, 2015, 12:00:09 AM »
thanks a million dear BR549,that was what i need exactly also worked great   :)

'ToolChange Macro For milling machine (liner type)
Sub Main()
OldTool = GetOEMDRO (1200) 'Tool In spindle DRO You must add this to your settings screen
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
tool = GetSelectedTool()
NewTool = tool
'Tool Changer Macro (Bed Type)
MaxToolNum = 2      'Max number off tools for the changer
ToolDown   = -60 'Z Pos to Get or drop a tool
ToolUp     = 0   'Z Hieght to Rapid from tool to tool
If NewTool = OldTool Then
   Exit Sub
End If
While NewTool > MaxToolNum
NewTool = Question ("Enter New Tool Number up to " & MaxToolNum)
Wend
Code "G00 G53 Z" & ToolUp
While IsMoving()
Wend
Call MovePos(OldTool)
While IsMoving()
Wend
Code "G53 Z" & ToolDown
Code "G4 P.01"
While IsMoving()
Wend
=========================================
just for make sure the input 1 worked rightly at defined time because sometime the air pressure might isn't enough  so, i tried to do something like that here but didn't work    :-\
Do                                                 'Start loop
ActivateSignal(Output2)                   'This is signal to activate your drawbar
If IsActive (Input1) Then Exit Do        'This is your  signal to say drawbar has released
Loop
=======================================
Code "G53 Z" & ToolUp
Call MovePos(NewTool)
While IsMoving()
Wend
Code "G53 Z" & ToolDown
Code "G4 P.01"
While IsMoving()
Wend
DeActivateSignal(Output2) 'Turn Off Draw bar to Clamp the tool
Code "G4 P4.01"    'Wait for the tool to Clamp
While IsMoving()
Wend
Lcnt = 0        ' Set loop Counter to Zero

Do   While   isactive( input2)  = false       'Start loop
Lcnt = (Lcnt+1)                                  ' Add to counter
If Lcnt >= 1000 Then                           ' Check for max count, if then do
DooemButton(1021)
MsgBox(" Tool Change Timed Out/ tool isn't clamped correctly")       ' Notify Operator  Or use Message" Tool Changer timed out" to write to the status line
End
End If

Loop
Code "G53 Z" & ToolUp
Call SetUserDRO (1200,NewTool)
SetCurrentTool( NewTool )
Code "G00 X" & x & " Y" & y 'Move back to where the tool change was prompted
End Sub

Sub MovePos(ByVal ToolNumber As Integer)

Select Case ToolNumber
       Case Is = 1
         Xpos = 10
         YPos = 10
       Case Is = 2
         Xpos = 20
         YPos = 20
  
End Select

Code "G53 X" & XPos & " Y" & YPos
End Sub
Main    

          

2
VB and the development of wizards / Tool Changer Timed Out as safety
« on: October 18, 2015, 03:56:10 PM »
hi everyone
i need to add a macro as( time out) also i have tried to write something but that isn't worked...anyway i need to help


'ToolChange Macro For milling machine (liner type)
Sub Main()

OldTool = GetOEMDRO (1200) 'Tool In spindle DRO You must add this to your settings screen
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
tool = GetSelectedTool()
NewTool = tool
'Tool Changer Macro (Bed Type)
MaxToolNum = 2      'Max number off tools for the changer
ToolDown   = -60 'Z Pos to Get or drop a tool
ToolUp     = 0   'Z Hieght to Rapid from tool to tool
If NewTool = OldTool Then
   Exit Sub
End If
While NewTool > MaxToolNum
NewTool = Question ("Enter New Tool Number up to " & MaxToolNum)
Wend
Code "G00 G53 Z" & ToolUp
While IsMoving()
Wend
Call MovePos(OldTool)
While IsMoving()
Wend
Code "G53 Z" & ToolDown
Code "G4 P.1"
While IsMoving()
Wend
Do                                                 'Start loop
ActivateSignal(Output2)                   'This is signal to activate  drawbar
If IsActive (Input1) Then Exit Do        'This is a  signal to say drawbar has released
Loop
Code "G53 Z" & ToolUp
Call MovePos(NewTool)
While IsMoving()
Wend
Code "G53 Z" & ToolDown
Code "G4 P.1"
While IsMoving()
Wend
DeActivateSignal(Output2) 'Turn Off Draw bar to Clamp the tool
Code "G4 P4.1"    'Wait for the tool to Clamp
While IsMoving()
Wend
============================================
its good but i think not enough ,i need something like this: if (input 2 ) not active after a time (10 ms) then show a (msgbox "tool isn't locked "   ) then active (emergency )
Do                                                 'Start loop
If IsActive (Input2)  Then  Exit Do      'This is a signal to say tool locked correctly
Loop


===========================
Code "G53 Z" & ToolUp
Call SetUserDRO (1200,NewTool)
SetCurrentTool( NewTool )
Code "G00 X" & x & " Y" & y 'Move back to where the tool change was prompted
End Sub

Sub MovePos(ByVal ToolNumber As Integer)

Select Case ToolNumber
       Case Is = 1
         Xpos = 10
         YPos = 10
       Case Is = 2
         Xpos = 20
         YPos = 20
   
End Select

Code "G53 X" & XPos & " Y" & YPos
End Sub
Main       

3
Modbus / Re: Arduino Modbus, Complete, Documented and free
« on: October 05, 2015, 11:18:11 PM »
no problem,anyway thank you.

4
Modbus / Re: Arduino Modbus, Complete, Documented and free
« on: October 05, 2015, 02:00:40 PM »
thanks for your quick replay ,after that i am sure about usb port and arduino  version because i have done it  whit zafar s sketch  (analog input) and that is worked great ....then when i tried whit shilling sketch that error happened.
sorry ,i know my English is awful

5
Modbus / Re: Arduino Modbus, Complete, Documented and free
« on: October 05, 2015, 12:22:48 AM »
hi everyone
i have a problem,  i have tried to upload arduino uno i got an error message. so what shall i do to handle it?

6
VB and the development of wizards / Re: encoder dro with m/c dro Comparison
« on: December 23, 2013, 11:24:47 PM »
Alex ,you right... i tried with 0.1 mm lag error at 2000 mm feed rate the 9 mm !! so that is too big and i looking for less like( 0.2 or 0.3 mm) maximum  in this case i take my answer with your advise ,in fact can t do this just because brain & macro too slow...
anyway i want say thank you and other  :)

7
VB and the development of wizards / Re: encoder dro with m/c dro Comparison
« on: December 23, 2013, 01:01:43 PM »
Bodini ,thanks for your support...

However, if you are having any sort of luck at all, I encourage you to keep pushing and see what you can get it to do! :-)

8
VB and the development of wizards / Re: encoder dro with m/c dro Comparison
« on: December 23, 2013, 10:32:34 AM »
thanks dear friend ,you kind of to me ,so your comment is my result ... after see your last reply, i searching at pdf of servo drive manual about    
decrease encoder pulse, and i find a parameter can change ratio pulse output i guess may can help me but i don't try yet...  ;D

9
VB and the development of wizards / Re: encoder dro with m/c dro Comparison
« on: December 22, 2013, 11:39:03 PM »
yes exactly true .... for example : when move axis rapid ,230 mm then dro show true but encoder show 237,234,236 in fact random ...

10
VB and the development of wizards / Re: encoder dro with m/c dro Comparison
« on: December 22, 2013, 12:39:55 PM »
dear cncalex , i am sure  my servo motor and drive is tuning correct ...so perhaps encoder pulse too fast because 2500 per r
if  use (1000 per r or less) encoder  then possible solved this problem?

BR549 hi,thanks for replay i see rogers website and i know how to work...i can t buy that (from my country)  :-\
so i tried find result and i know maybe cant do that but just tried...  

Pages: 1 2 3 4 »