Hello Guest it is February 25, 2020, 11:38:24 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 - Denford Miracle

Pages: 1
1
VB and the development of wizards / Macro Help
« on: December 18, 2015, 10:13:17 AM »
Need help with the below program, can someone tell me what's wrong?

oldtool = GetCurrentTool()         'Get the current tool postion
newtool = GetSelectedTool()         'Get the new tool position

if newtool < 1 or newtool > 8 Then      'make sure new tool isnt a number
   DoOemButton(1003)         'below 1 or above 8
   MsgBox("Tool Number Not Valid")
   End
End if

if oldtool = newtool Then            'if new tool is same as current tool
   End               'quit and do nothing
End if

if newtool = 1 Then            'if tool number 1 selected
   ActivateSignal(Output2)         'output2 is turret foward
   While IsActive(OEMtrig#1)      'oem trig #1 is tool position 1
   Wend
   Deactivate(Output2)         'turn off output 2
   ActiveSignal(Output3)         'output 3 is turret reverse
   While IsActive(Input1)         'input 1 is turret clamped
   Wend
   Code ("G4 P1")            'wait 1 sec to ensure turret clamped
   Deactivate(Output3)         'turn off output 3
End if

if newtool = 2 Then            'if tool number 2 selected
   ActivateSignal(Output2)         'output2 is turret foward
   While IsActive(OEMtrig#2)      'oem trig #2 is tool position 2
   Wend
   Deactivate(Output2)         'turn off output 2
   ActiveSignal(Output3)         'output 3 is turret reverse
   While IsActive(Input1)         'input 1 is turret clamped
   Wend
   Code ("G4 P1")            'wait 1 sec to ensure turret clamped
   Deactivate(Output3)         'turn off output 3
End if

if newtool = 3 Then            'if tool number 3 selected
   ActivateSignal(Output2)         'output2 is turret foward
   While IsActive(OEMtrig#3)      'oem trig #3 is tool position 3
   Wend
   Deactivate(Output2)         'turn off output 2
   ActiveSignal(Output3)         'output 3 is turret reverse
   While IsActive(Input1)         'input 1 is turret clamped
   Wend
   Code ("G4 P1")            'wait 1 sec to ensure turret clamped
   Deactivate(Output3)         'turn off output 3
End if

if newtool = 4 Then            'if tool number 4 selected
   ActivateSignal(Output2)         'output2 is turret foward
   While IsActive(OEMtrig#4)      'oem trig #4 is tool position 4
   Wend
   Deactivate(Output2)         'turn off output 2
   ActiveSignal(Output3)         'output 3 is turret reverse
   While IsActive(Input1)         'input 1 is turret clamped
   Wend
   Code ("G4 P1")            'wait 1 sec to ensure turret clamped
   Deactivate(Output3)         'turn off output 3
End if

if newtool = 5 Then            'if tool number 5 selected
   ActivateSignal(Output2)         'output2 is turret foward
   While IsActive(OEMtrig#5)      'oem trig #5 is tool position 5
   Wend
   Deactivate(Output2)         'turn off output 2
   ActiveSignal(Output3)         'output 3 is turret reverse
   While IsActive(Input1)         'input 1 is turret clamped
   Wend
   Code ("G4 P1")            'wait 1 sec to ensure turret clamped
   Deactivate(Output3)         'turn off output 3
End if

if newtool = 6 Then            'if tool number 6 selected
   ActivateSignal(Output2)         'output2 is turret foward
   While IsActive(OEMtrig#6)      'oem trig #6 is tool position 6
   Wend
   Deactivate(Output2)         'turn off output 2
   ActiveSignal(Output3)         'output 3 is turret reverse
   While IsActive(Input1)         'input 1 is turret clamped
   Wend
   Code ("G4 P1")            'wait 1 sec to ensure turret clamped
   Deactivate(Output3)         'turn off output 3
End if

if newtool = 7 Then            'if tool number 7 selected
   ActivateSignal(Output2)         'output2 is turret foward
   While IsActive(OEMtrig#7)      'oem trig #7 is tool position 7
   Wend
   Deactivate(Output2)         'turn off output 2
   ActiveSignal(Output3)         'output 3 is turret reverse
   While IsActive(Input1)         'input 1 is turret clamped
   Wend
   Code ("G4 P1")            'wait 1 sec to ensure turret clamped
   Deactivate(Output3)         'turn off output 3
End if

if newtool = 8 Then            'if tool number 8 selected
   ActivateSignal(Output2)         'output2 is turret foward
   While IsActive(OEMtrig#8)      'oem trig #8 is tool position 8
   Wend
   Deactivate(Output2)         'turn off output 2
   ActiveSignal(Output3)         'output 3 is turret reverse
   While IsActive(Input1)         'input 1 is turret clamped
   Wend
   Code ("G4 P1")            'wait 1 sec to ensure turret clamped
   Deactivate(Output3)         'turn off output 3
End if

SetCurrentTool(newtool)
End

2
General Mach Discussion / Need help. Motors dont work properly.
« on: October 27, 2015, 06:13:15 PM »
Hello everyone, Im Andy. I am very new to this forum and not really sure if this is being posted in the correct place or not(moderator, please correct me if I'm wrong by moving this thread). I have read MANY threads on all kinds of problems. I just haven't found a thread on my problem. I guess the best way to start is to tell you what I have:

Mach3 3.043.066  using the Mach3Turn profile
PMDX-126
PMDX-133
G203V
PCI p-port which is ECP

calculations: 5mm/rev of the ball screw. So that's 25.4/5=5.08 turns of screw to get 1 unit. A ratio of 2.5:1 reduction from motor then 5.08*2.5=12.7 turns of motor to get 1 unit inch(im setup in inches also). motor is a 1.8deg... G203V are 10 micro so that's 2000/rev. 2000*12.7=25400 pulses/unit.

Im including pics on everything too so that you can see what I have. I have made outputs and inputs work fine. For example: turning off/on the coolant pump via K2 and home switch's turn on for the corresponding switch.

The problem is when I go to the tuning dialog window thingie I put in the pulses per unit and I first try 0us and 0us. When I try the up/down arrow keys my motors "click" in one direction then "click" back in the other direction. I have heard people calling the "glitching" or "hick-ups" on this forum so maybe that's what its called. But either way I can not get it to smoothly move in either direction. Same is true for the other axis.

Any help would be greatly appreciated. I don't know what to do. I'm at my wits end, please help.  (insert guy praying here)

Pages: 1