Hello Guest it is March 19, 2024, 12:36:49 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 - TPS

691
if you stepper is tuned to 360 is 1 rev,
you know 1 Station shift is 45 geg

you know for example 3 station's to go postive

code will be:
Code: [Select]
Code "G91 G01 Y"& staionstogo*45 & " F100"
Code "G90"
While IsMoving()
Wend

for nagative:
code will be:
Code: [Select]
Code "G91 G01 Y-"& staionstogo*45 & " F100"
Code "G90"
While IsMoving()
Wend

692
you can set up your stepper (Motor tunnig step/per) that you get with a G91 Y360 Fxx one full rev.
the rest i simple calulation ?


ypu can use G-Gode commands in a macro as well:

Code: [Select]
Code "G91 G1 Y********* F*********"
is the same like in MDI or G-Code file

693
don't use all this jog stuf in the macro anyway, use incremantal moves.

a Code "G91 G1 Y(+- *********) F10" will do better Job like all this Manual jog and Stop things.

don't Forget to Switch Back with Code "G90"

694
General Mach Discussion / Re: Mach3turn Stop button?
« on: December 07, 2020, 03:34:13 PM »
ypo have to customize your stop button from a "normal" buttonpress to a custom macro, where you do the stopbutton and seperate DeActivate(output4).

695
hello Eric,

Config -> Ports&Pins -> Motor Outputs -> enable B-axis

Pins will not matter because this is handled by the plugin.

Regards Tom

696
hello Eric,
in the XML you sent B-Axis is not enabled?
if enabled do not forget the Motor Tuning

i would set 10 steps/per 10000 velocity and 10000 accel, to make sure
b-axis will not slow down the other axis.

697
hello Eric,

tested your code here, and it is running without stopping movement.

can you pls post your prifile XML, than i will have a look.

Regards Tom.

698
General Mach Discussion / Re: Macro pauses my program
« on: December 05, 2020, 04:08:52 AM »
code for macropump:
Code: [Select]

'------------------------------------------------------------------------------------------------------------
Private Declare Function GetTickCount Lib "kernel32" () As Long
'------------------------------------------------------------------------------------------------------------

Const LastMsDRO = 1300 'DRO for data
Const StateDro = 1301 'DRO for data
Dim CurrentMs As Long
Dim LastMs As Long
Dim State As Long
'------------------------------------------------------------------------------------------------------------

Const BlowTime = 1000  'Blowing Time
Const PauseTime = 5000  'Pausing Time

Sub Main


'Read data
'-------------------------------------------------------
CurrentMs = GetTickCount()
LastMs = GetUserDRO(LastMsDRO)
State = GetUserDRO(StateDRO)

If(CurrentMs < LastMs) Then
LastMs = CurrentMs
End If

If ((State < 0) Or (State > 2)) Then
State = 0
End If

'check OEMLED to activate
If ((GetUserLed(1300) = 1) And (State = 0)) Then
ActivateSignal(OUTPUT2)
LastMs = CurrentMs
State = 1
End If

If ((CurrentMs > (LastMs + BlowTime)) And (State = 1)) Then
DeactivateSignal(OUTPUT2)
LastMs = CurrentMs
State = 2
End If

If ((CurrentMs > (LastMs + PauseTime)) And (State = 2)) Then
State = 0
End If

'save Data
'-------------------------------------------------------
SetUserDRO(LastMsDRO, LastMs)
SetUserDRO(StateDRO, State)


End Sub

code to activate:
Code: [Select]
  SetUserLed(1300,1)

code to deactivate:
Code: [Select]
  SetUserLed(1300,0)


699
is the b axis enabled and assigned in CSLAB plugin?

700
a

G1 X100 Y100 B100 F50
G1 X0 Y0 B0

should not stop Motion

metric if in imperial use suitable values