Hello Guest it is April 29, 2024, 03:48:11 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 - Julie

Pages: « 1 2
11
VB and the development of wizards / VB script : Question()
« on: November 16, 2015, 07:57:24 AM »
Hello,

I tried password message button.
When user enter the PassCode "1234", is it possible to show character " **** "?
Now it shows "1234" intactly.


example vb script:

IF Question("PassCode ?") = 1234 THEN
DoOemButton(232)
End IF

Thank you.


12
Finally, I did it.
The cause of error was the position of definition varibles.
I defined varibles below "Sub MovePos" function. Now it works very well.
I was able to succeed because of your help.
Thank you so much.  b^.^




13
After I modified code as your reply, it didn't prevent m6start.m1s.
But I got 2 error message.
And X axis and y axis is not moving, only z axis is moving.

Error1) Coding like Below.

           Code "G00 G53 x" & xpos1   
           Code "G00 G53 y" & ypos1

      Error  Message : "No characters found in reading real value, Block = G00 G53 y"



Error2) Coding like below.

         Code "G00 G53 X" & xpos1 & " Y" & ypos1

      Error  Message : "Unknown word where unary operation could be, Block = G00 G53 XY"



Variables are defined as below

xpos1 = GetOEMDRO (1205)
ypos1 = GetOEMDRO (1206)
xpos2 = GetOEMDRO (1207)
ypos2 = GetOEMDRO (1208)
xpos3 = GetOEMDRO (1209)
ypos3 = GetOEMDRO (1210)




14
Thanks for reply.
I checked "autotool changer" in Config.
And it works well when the position of each tool is writted in m6start.m1s.
Different point is using of userDRO and variables for the position of each tool.

15
Hi, all

I'm studying auto tool changer macro.
I have 3 tools, now it is setted the position of each tool in m6start.m1s like below code.

Select Case ToolNumber      'Here set the position of each tool.
        Case Is = 1
         Xpos = 12.00
         YPos = 2.00
       Case Is = 2
         Xpos = 14.00
         YPos = 2.00
       Case Is = 3
         Xpos = 16.00
         YPos = 2.00     
End Select

I would like to input coord's of tools location in Mach3 screen not in m6start.m1s.
So I created userDRO to input coord's at Screen4, and edited m6start.m1s like below codes.
But It ignores m6start.m1s and performs next code.
I don't know what's wrong.
Please anybody let me know what's wrong, or is there a better way to do this?

I'm sorry for bad english.
Thank you.



Sub Main()         'Define variables
OldTool = GetOEMDRO (1200)   
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
tool = GetSelectedTool()

1xpos = GetOEMDRO (1205)
1ypos = GetOEMDRO (1206)
2xpos = GetOEMDRO (1207)
2ypos = GetOEMDRO (1208)
3xpos = GetOEMDRO (1209)
3ypos = GetOEMDRO (1210)

NewTool = tool
MaxToolNum = 3            'Maximum number of tools to use.
ToolDown   = -50       'Height for the tool change.
ToolUp     = 0.0          'Height the Z-axis for the tool change.
PosSec      = 50.0      'Safe Position.
If NewTool = OldTool Then
   Exit Sub
End If
While NewTool > MaxToolNum
NewTool = Question ("Place valid tool number (between 1 y 3)")
Wend
Code "G00 G53 Z" & ToolUp     'The z-axis is going to "machine zero"
While IsMoving()
Wend
Code "G53 y" & PosSec       'Going to safe position. 
While IsMoving()
Wend
Code "G53 Z" & ToolDown      'Down to the height of tools
While IsMoving()
Wend
Call MovePos(OldTool)      'Going to the last position to relase the old tool.
While IsMoving()
Wend
ActivateSignal(Output1)    'Relase the tool.
Code "G4 P1.0"
Code "G53 Z" & ToolUp       
While IsMoving()
Wend
Call MovePos(NewTool)      'Go to the new tool position.
While IsMoving()
Wend
Code "G53 Z" & ToolDown      'down the z-axis to hold the tool.
While IsMoving()
Wend
DeActivateSignal(Output1)    'hold the new tool.
Code "G4 P1.0"
Code "G53 y" & PosSec       'Returns to the safe position.
While IsMoving()
Wend
Code "G53 Z" & ToolUp      'Returns z-axis to "machine zero".
Call SetUserDRO (1200,NewTool)
SetCurrentTool( NewTool )
End Sub

Sub MovePos(ByVal ToolNumber As Integer)

Select Case ToolNumber      'Here set the position of each tool.
       Case Is = 1
         Code "G00 G53 x" & 1xpos
         Code "G00 G53 y" & 1ypos
       Case Is = 2
         Code "G00 G53 x" & 2xpos
         Code "G00 G53 y" & 2ypos
       Case Is = 3
         Code "G00 G53 x" & 3xpos
         Code "G00 G53 y" & 3ypos
     
End Select

End Sub
Main

16
Works in progress / to edit contents of Status(Error massage) ?
« on: November 28, 2014, 12:17:31 PM »
Hello, All!
I'm changing Mach3 Screen in other language.
I want to edit contents of Status(error massage), it is not the design(like font size, color..)
Example : Estop Button Pressed, End of file Estop selected, Safe Z ignored..  etc    -> In Swedish
But I don't know how to change any file(?..).
Please tell me how to change contents of Status.
Thanks in advance for any help. : )


17
Thank you!!
You are the BEST!!!

18
Hello,All.
I'm studying ATC macro. I reference below script.
But tool's down move feed rate is too fast, so i modifying it.
I inserted [ Code "F200"] above red font code, but have no effect.
How can i solve a problem? ???
Please help me!
Thank you!

 



Sub Main()         'Define variables
OldTool = GetOEMDRO (1200)    
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )
tool = GetSelectedTool()
NewTool = tool
MaxToolNum = 5            'Maximum number of tools to use.
ToolDown   = -50       'Height for the tool change.
ToolUp     = 0.0          'Height the Z-axis for the tool change.
PosSec      = 50.0      'Safe Position.
If NewTool = OldTool Then
   Exit Sub
End If
While NewTool > MaxToolNum
NewTool = Question ("Place valid tool number (between 1 y 5)")
Wend
Code "G00 G53 Z" & ToolUp     'The z-axis is going to "machine zero"
While IsMoving()
Wend
Code "G53 y" & PosSec       'Going to safe position.  
While IsMoving()
Wend
Code "G53 Z" & ToolDown      'Down to the height of tools
While IsMoving()
Wend
Call MovePos(OldTool)      'Going to the last position to relase the old tool.
While IsMoving()
Wend
ActivateSignal(Output1)    'Relase the tool.
Code "G4 P1.0"
Code "G53 Z" & ToolUp        
While IsMoving()
Wend
Call MovePos(NewTool)      'Go to the new tool position.
While IsMoving()
Wend
Code "G53 Z" & ToolDown      'down the z-axis to hold the tool.
While IsMoving()
Wend
DeActivateSignal(Output1)    'hold the new tool.
Code "G4 P1.0"
Code "G53 y" & PosSec       'Returns to the safe position.
While IsMoving()
Wend
Code "G53 Z" & ToolUp      'Returns z-axis to "machine zero".
Call SetUserDRO (1200,NewTool)
SetCurrentTool( NewTool )
End Sub

Sub MovePos(ByVal ToolNumber As Integer)

Select Case ToolNumber      'Here set the position of each tool.
       Case Is = 1
         Code "G00 G53 x12.0"
    Code "G00 G53 y5.0"
       Case Is = 2
         Code "G00 G53 x24.0"
    Code "G00 G53 y5.0"
       Case Is = 3
         Code "G00 G53 x36.0"
    Code "G00 G53 y5.0"
       Case Is = 4
         Code "G00 G53 x48.0"
    Code "G00 G53 y5.0"
       Case Is = 5
         Code "G00 G53 x60.0"
    Code "G00 G53 y5.0"
End Select

End Sub
Main  

Pages: « 1 2