Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 09:57:34 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Mach Screens
| | |-+  Screen designer tips and tutorials
| | | |-+  Add a A DRO
Pages: 1 2 »   Go Down
Print
Author Topic: Add a A DRO  (Read 1684 times)
0 Members and 1 Guest are viewing this topic.
gabi68
Active Member

Offline Offline

Posts: 45


View Profile
« on: October 11, 2009, 08:39:29 AM »

Hi to all,

I have this macro (writen by Graham I think):

' Boxford 160TCL Toolchanger Macro.
'
' Works by turning CW to just past the tool position
' and then CCW into a stop.
' Axis setup as rotary e.g. move 360 = 1 full turn.



If IsLoading() Then
' Do Nothing, program loading
Else

' Dim Variables

Dim Num_Tools As Integer
Dim CW_Steps_Per_Tool As Integer
Dim CCW_Steps As Integer
Dim HoldingDRO As Integer
Dim Requested_Tool As Integer
Dim Current_Tool As Integer
Dim CW_Feed As Integer
Dim CCW_Feed As Integer

Dim moves As Integer
Dim total_move As Integer


' set up some vars

Num_Tools = 6
CW_Move_Per_Tool = 360/Num_Tools
CCW_Move = 10
HoldingDRO = 1050
Requested_Tool = GetSelectedTool()
Current_Tool = GetUserDRO(HoldingDRO)
CW_Feed = 1500
CCW_Feed = 1000
Current_Feed = GetOEMDRO(818)


' start tool change

Message ("Requested Tool No=" & Requested_Tool)

If Requested_Tool > Num_Tools Then
Message "Requested Tool No. too high, program stopped."
Code "M30"
End
End If

If Requested_Tool < 1 Then
'Message "Requested Tool No. too low, program stopped."
Code "M30"
End
End If

If Requested_Tool = Current_Tool Then
' do nothing
Else
' lets do some changing
If Requested_Tool > Current_Tool Then moves = Requested_Tool -Current_Tool
If Requested_Tool < Current_Tool Then moves = Num_Tools - Current_Tool +Requested_Tool

total_move = (moves * CW_Move_Per_Tool)+(CCW_Move/2)

Code "G0 z-10 F1300"
Code "G0 x-10"
Code "G91 G94" 'incremental & Feed per minute
Code "G0 A" & total_move '& "F" & CW_Feed
Code "G0 A" & "-" & CCW_Move '& "F" & CCW_Feed
While IsMoving()
Wend

SetCurrentTool Requested_Tool
SetUserDRO HoldingDRO, Requested_Tool
Code "G90" ' back to absolute movement
Code "F" & Current_Feed
End If
End If

' end of tool change       
I need to put a A DRO on my lathe screen to see if my A axis is running. I don't have anything connects yet. I just want a simulation.
How can I do that?

RGDS
Gabi
Logged
Chaoticone
South Carolina, US
Administrator
*
Offline Offline

Posts: 3,566


Precision Chaos



View Profile WWW
« Reply #1 on: October 11, 2009, 09:58:43 AM »

Download Mach Screen or screen 4 and open your screen set and add a dro and save the screen set. You can look in the Wiki to find the a axis dro number. Also, video tutorials that will help can be found in the support tab at the top of this page.  

Mach Screen link.  http://www.kd-dietz.de/index.htm   Click on the english button then project.

Screen 4 link.  http://www.machsupport.com/downloads/Screen4.zip

Brett
« Last Edit: October 11, 2009, 10:02:25 AM by Chaoticone » Logged

Grin If you could see the things I have in my head, you would be laughing too. Grin
www.precisionchaos1.com
My guard dog is not what you need to worry about!
gabi68
Active Member

Offline Offline

Posts: 45


View Profile
« Reply #2 on: October 11, 2009, 07:14:17 PM »

Hi Brett,

I already try that. Here it is what I do:
-  I put that DRO on screen
- OEM code is 86
- X an Z axis show the right value from macro

A DRO dosent show anything. Why?

RGDS
Gabi
Logged
Chaoticone
South Carolina, US
Administrator
*
Offline Offline

Posts: 3,566


Precision Chaos



View Profile WWW
« Reply #3 on: October 11, 2009, 07:48:08 PM »

Instead of makeing the DRO an OEM number, make it a system function, a axis.

Brett


* OFFICE 2009-10-11ScreenHunter_ 20.46.571.jpg (39.79 KB, 500x489 - viewed 141 times.)
Logged

Grin If you could see the things I have in my head, you would be laughing too. Grin
www.precisionchaos1.com
My guard dog is not what you need to worry about!
gabi68
Active Member

Offline Offline

Posts: 45


View Profile
« Reply #4 on: October 11, 2009, 08:31:44 PM »

Hi Brett,

I try that too and I don't see any numeber moving. Remember it is a screen for a lathe. Sorry to be a PITA but I don't know how to do that. Please help me

RGDS
Gabi
Logged
Klaus1311
Active Member

Offline Offline

Posts: 297


View Profile WWW
« Reply #5 on: October 12, 2009, 03:34:10 AM »

Hi Gabi,

is the macro in the correct directory? Try putting a "message" like  Message ("Test toolchange") on top of the macro and run it from the mdi. This message should appear in the status line. 


Klaus
Logged
gabi68
Active Member

Offline Offline

Posts: 45


View Profile
« Reply #6 on: October 12, 2009, 04:38:08 AM »

Hi Klaus,

I think it is. The  path it is: C:\Mach3\macros\Mach3Turn and the name of that file it is m6661.m1s.

RGDS
Gabi


* Mach3 Turn MDI.JPG (128.01 KB, 1280x800 - viewed 118 times.)
Logged
Klaus1311
Active Member

Offline Offline

Posts: 297


View Profile WWW
« Reply #7 on: October 12, 2009, 04:47:19 AM »

Hi Gabi

did you see the message in the status line?


Klaus
Logged
gabi68
Active Member

Offline Offline

Posts: 45


View Profile
« Reply #8 on: October 12, 2009, 04:52:28 AM »

Hi Klaus,

I think so. In the macro message it is "Requested Tool NO=1 till 6" It apperas on message line. That is the message you are talking about?

RGDS
Gabi
Logged
Klaus1311
Active Member

Offline Offline

Posts: 297


View Profile WWW
« Reply #9 on: October 12, 2009, 05:29:12 AM »

Hi Gabi,

I just made a test screen.set and it worked OK, I couldn't test on a machine, because I don't have a cnc lathe. One nother thing came into my mind, do you have the A-axis enabled in your pin/port settings?

Klaus
Logged
Pages: 1 2 »   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!