Hello Guest it is August 07, 2020, 08:50:51 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 - MojsterMiha

Pages: « 1 2 3 4 5 »
31
General Mach Discussion / Re: MPG Mode Screen load
« on: April 05, 2009, 09:24:42 AM »
Yes, I am.  I have got an empty screen - not MPG screen.
I have try many possibility but nothing - I can load MPG screen only with pressing TAB button.

32
General Mach Discussion / MPG Mode Screen load
« on: April 05, 2009, 05:45:39 AM »
Hi,
I have try to load  a MPG screen from a script - macro, but without success.
It works only with TAB key.

Is there any possibility to load this screen from macro?

regards!

33
Hi,

I wrote a simple macro for gear shifter.
It is working from Script editor but not from G-code  - Compile error. Syntax error in script

In this moment I havent a time to search for mistake (I am not an expert), hope that someone will help!

Regards

'Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long)

'''DoSpinCW()
rpm = GetRPM()
revolutions = GetRPM()
SetSpinSpeed( revolutions )

If rpm < 820 Then
pulleyD = 1       'desired gear
message "gear 1"
End If


If rpm > 800 And rpm < 5000 Then
pulleyD = 2         'desired gear
message "gear 2"

End If


pulley=(GetOEMDRO(56))  ' user DRO  - pulley number - added on screen


Select Case pulleyD
 
   
    Case  1 'pulleyD#1
   
    If pulley = pulleyD Then
    Message "Gear already in position 1"
    Else
   
   
    SetSpinSpeed(50)    'slow rotation for gear changing
    DoSpinCW()
    While isMoving()
    'Sleep 100
    Wend

    Code "G4 P2"
    While isMoving()
    'Sleep 100
    Wend
    DoSpinCW()
     ActivateSignal(OUTPUT1)
     DeActivateSignal(OUTPUT2)
     Code "G4 P2"
     While isMoving()
     'Sleep 100
    Wend

   
    setPulley(1)
    message "gear in position 1"
    Code "G4 P2"
     While isMoving()
     'Sleep 100
    Wend

    message "finished"
   
SetSpinSpeed(revolutions) ' set desired Spindle Speed back
DoSpinCW()

    Exit Sub
   
  End  If
 
 
  Case  2 'pulleyD#2
   
  If pulley = pulleyD Then
    Message "Gear already in position 2"
    Else
   
 
    SetSpinSpeed(50)   'slow rotation for gear changing
    DoSpinCW()
    While isMoving()
    'Sleep 100
    Wend

    Code "G4 P2"
    While isMoving()
    'Sleep 100
    Wend
    DoSpinCW()
     ActivateSignal(OUTPUT2)
     DeActivateSignal(OUTPUT1)
     Code "G4 P2"
     While isMoving()
     'Sleep 100
    Wend

   
    setPulley(2)
    message "gear in position 2"
    Code "G4 P2"
     While isMoving()
     'Sleep 100
    Wend

    message "finished"
   
SetSpinSpeed( revolutions )   ' set desired Spindle Speed back
DoSpinCW()

    Exit Sub
   
  End  If

 
  End Select   

34
Hi,

I have the same problem.
I need exactly the same thing.

If you will have any informations, please let me know.

Regards!

35
General Mach Discussion / Writing results of probing in to G-code
« on: October 25, 2008, 09:15:36 AM »
Hi,
I want to probe three positions (Z height with touch probe) on my raw piece and then mill a groove parallel to the surface (please see sketch)
Please, how can I do this?

My idea is something like this:

G00 X0 Y0 Z20
G00 Z5

G01 Z0 (+read from DRO)    ´it is possible something like this??

G01 X50 Y20  Z5 (+read from DRO)

G01 X100 Y0 Z0 (+read from DRO)

G00 Z20
G30

Please, any suggestion.

Thanx!


36
VB and the development of wizards / Re: Terminating Script
« on: January 17, 2008, 02:04:00 PM »
Hello,

I have work on first code and I find a problem.

The problem is: DooemButton(1003) ' Stop Button
This is the cause for "Terminating Script"
If I put any other OEM Button  all works fine.

If I try to stop moving with DooemButton(1001)  'Pause - Hold , moving stops but it takes too long (~ 90mm) also if I set deceleration to
very small value - 0.4 s (the speed of moving is 1500 mm/min).

I have try also  DooemButton(1002) 'Rewind   The axis stops but then takes too long before  continue with other code.

Is there any other way to stop moving when switch is triggered?
Our machines are with servos, so  quick stop (without long deceleration) isn´t  a problem.




Thanks all for your help.


37
VB and the development of wizards / Re: Terminating Script
« on: January 16, 2008, 01:58:22 PM »
Still nothing!

Does this code works by you or by anybody else or only I have this problem ???

It is possible that there is some Bug in Mach3?


I´m desperate and without hope.




Regards!

38
VB and the development of wizards / Re: Terminating Script
« on: January 16, 2008, 10:38:07 AM »
Thanx,

But still  nothing.
When I running code from Mach3 calling it like M555 (From MDI line and from program)I get message "Terminating Script"

Z moves on position Z 201 and then ... "Terminating Script" (in case where switch is not triggered)
If Itrigger a switch I get "Terminating Script" also.
From VB Script editor works fine - without "Terminating Script"

Regards!

39
VB and the development of wizards / Re: Terminating Script
« on: January 16, 2008, 05:50:43 AM »
No, the switch isn´t the same like for Z homing.

I alredy using a touch probe and I can´t use G31.
(perhaps I didn´t understand this option correct - can you post some sample?)

I don´t understand why my and code from poppabear work from VB Script editor and don´t work from Mach3
Sometimes I also get ERROR message from Mach: "Art Code 9991"
I try  on three diffrent computer and the problem is the same.

My company bought three licenses for Mach 3 last year on my suggest and now I have problem to solve simple tool changer.

I´m in very inconvenient situation.

I would like to move Z axis in  position - on switch and give signal to PLC for starting procedure for
tool change (If switch is not triggered unthil moving, must be reported an ERROR)
After finishing of tool change procedure PLC give back a signal and tool change is finish - program move forward.




I will be very grateful for any suggestion.

Thanx!


40
VB and the development of wizards / Re: Terminating Script
« on: January 15, 2008, 02:34:59 PM »
Hi, again

I try this code running from VB script editor.

Sub Main()

ZPos = GetOEMDRO(802)


Code "G01 Z201 F1000"   'Gives movement past trigger point

If IsActive(INPUT2) Then
DoOEMButton(1003)
Message("Z in position for tool change")
       If ZPos>200 Then  'Gives movement past trigger point
       DoOEMButton(1003)
       Message("ERROR - Switch is not triggered")
       Exit Sub
       End If
End If

   
End Sub
Main

and problem was like I described in previous post.
Now I have try running code from Mach3 and I still get Message "Terminating Script" when switch is triggered.

Regards!

Pages: « 1 2 3 4 5 »