Hello Guest it is April 19, 2024, 07:51:45 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.


Messages - TPS

701
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.

702
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)


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

704
a

G1 X100 Y100 B100 F50
G1 X0 Y0 B0

should not stop Motion

metric if in imperial use suitable values

705
General Mach Discussion / Re: Looking for good DIY controller kit supplier
« on: December 03, 2020, 04:14:46 AM »
Wow :O Are those switches made from outback gold nuggets?

Parker Schnabel and his Team is coming over to mine the Gold for the contact's. .)

706
General Mach Discussion / Re: Macro pauses my program
« on: December 03, 2020, 02:09:35 AM »
sorry there was a small mistake in the code.

Code: [Select]

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

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

Const BlowTime = 1000  'Blowing Time


Sub Main

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

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

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

If(CurrentMs > (LastMs + BlowTime)) Then
DeactivateSignal(OUTPUT2)
End If

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

End Sub



707
with
Code: [Select]
SetModOutput(81,GetOemDro(804)*4.095)

the value is scaled to 0-100 not to 0-1000

for 0-1000 use
Code: [Select]
SetModOutput(81,GetOemDro(804)*0.4095)

to set b axis to Zero use

Code: [Select]
SetOemDro(804,0)

708
Hi Tom,

Thank you for your information.
I meant the value of the GetOemDro(804).
Your assumption is that its range is 1-1000. But, where can we set that range?
Is it like a default value?



see it like a virtual axis there is no range to define, only Thing is to Zero it before you start.

709
---I put B... if the value is over a certain value,

witch value?

710
General Mach Discussion / Re: Macro pauses my program
« on: December 02, 2020, 09:34:08 AM »
code for macropump would be something like this:
Code: [Select]

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

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

Const BlowTime = 1000  'Blowing Time


Sub Main

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

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

'check OEMLED to activate
If GetUserLed(1300) = True Then
SetUserLed(1300,0)
ActivateSignal(OUTPUT2)
LastMs = CurrentMs
End If

If(CurrentMs > (LastMs + BlowTime)) Then
DeactivateSignal(OUTPUT2)
End If

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

End Sub

code for activation macro would be this:
Code: [Select]
SetUserLed(1300,1)