Hello Guest it is April 16, 2024, 03:08:56 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 - fabhund

Pages: 1 2 3 4 5 »
1
VB and the development of wizards / Re: ATC CW/CCW rotation
« on: February 22, 2016, 04:20:33 PM »
GREAT, seems you got it sorted out. Nice job.

2
General Mach Discussion / Re: Newbie question about push buttons
« on: January 02, 2016, 06:23:33 AM »
PoKeys USB has a MACH3 plugin, so you can set up, an input matix that triggers doOEMbutton. It can give feedbach with LEDs, control LCD 4x20. MPG etc.
I made my self a rather decent operator panel with it.
https://www.youtube.com/watch?v=Z351UbtLujs
Now the USB version _can_ be setup as keyboad emulation, but in 99% of the cases it's not needed.

3
VB and the development of wizards / Re: ATC CW/CCW rotation
« on: December 13, 2015, 05:03:27 PM »
Now I'm a novice here so bare with me, but I think you are using the "Call" sub routine incorrect. And by luck it seems to be working in one direction....
You assume the variables you define in you Main program (Global variables) are also available in the Sub routine, this is wrong.
A sub routine uses "Local variable" and is, by default, not aware of the main program, or main program variables at all !

Now to use the "Call StartTool" you must send the variable to that sub routine, that the routine needs which is "NewTool and Tool"
So the correct code would look like "Call StartTool(Newtool,Tool)" here you send 2 values beloning to NewTool, and Tool AND IN THAT ORDER !!

Now the Sub Routine need to know what kind of information to recieve.
Again "Sub StartTool(Newtool, Tool)" AND IN THAT ORDER This is because you use the same variablenames in you main program as in the sub routine.


This also messes up your other subroutine, where you Call for a tool position, here you expect that a Subroutine (Local variables), updates the Global variables of you main program.
They dont !
Here you must tell the Sub-routine that the variables are linked "ByRef" allowing a sub-routine to update global variables.

Perhaps you can find a bit of help here: https://youtu.be/duULYFBjDnk?t=530
Here I walk through a script for Tool Probing, and here I use, Call and Call "ByRef"
-Bo-


Code: [Select]
Call StartTool

While NewTool <> Tool
   Call CheckPins
   While IsMoving()
   Wend
Wend

Call StopTool

Call SetUserDRO (1200, NewTool)
SetCurrentTool(NewTool)


Sub StartTool

If NevTool< Tool Then
ActivateSignal(Output2)
Exit Sub
End If

While IsMoving()
   Wend

If NevTool>Tool Then

ActivateSignal(Output4)
Exit Sub
End If



   ActivateSignal(Output3)
   
      While IsMoving()
      Wend
End Sub

4
General Mach Discussion / Re: non repeating z moves
« on: November 24, 2015, 03:45:22 PM »
You can also setup "Soft limits" so it will not hit the hard-stops, given that the steppers not loose steps :-)

5
VB and the development of wizards / Re: M6ATC Macro Help
« on: November 24, 2015, 03:37:24 PM »
What about a simple :
While IsActive() = True/False
Pause 250
Wend

So using the IsActive() in a loop, instead of SystemWaitFor()

6
General Mach Discussion / Re: slave axis aleatory movement
« on: August 16, 2015, 12:34:09 AM »
Hi. You can try to use a different output on your TB-controller. f.x. use the Z-axis output for testing.
Fx. Switching A - Z axis. Testing if all the TB outputs are working correct.

Further I would go for 1/16 microstepping giving 80steps/unit , and a low acceleration to begin with, perhaps 0,05g
Also try to set the DIR timing to 5us, as you did with the Step.

Else triple check wiring again, and settings again.

7
Added the DoOEMButton(316) to the script, it works like a charm.
Also thanks for the xls, much better than the "OEM list" I have.

Thanks again.

Best Regards, Bo Andersen.

8
Hi,

DoOEMButton(316)

is your friend.

Thomas

The good old 316, yeah. How could I miss that one ;-)

Great. Thanks alot for the heads up.
-Bo Andersen-

9
Dear All.
I wrote a script that picks up my tools from 1-8, moves to a fixed probe plate, probes each tool, twice.

Then I update the Tool length offset with: SetToolParam(x, 2, yy.yyy)
Now the Tool length offset DRO is updated, and if I open up the tool database, then all tool length offsets are correct.

When I exit MACH3, I'm NOT promted to save the Tool Table, and all changes are lost.

Only if I manually update the DRO and/or manually change in the Tool Table.
Then I'm being prompted to save the Tool Table.

Is there a checkmark I missed in a menu somewhere, or is this a know bug or ?

10
Video P*r*o*b*i*n*g / Re: Offset and Probe Help
« on: August 07, 2015, 04:59:01 AM »
Don't know if you figured this out ? I'm having the same problem.
The code above fails when G43 is active, right ?

I think the problem lies within the GetVar(2002) as this takes the ToolLengthOffset into consideration when G43 is active.
Try to put in a message after the GetVar(2002) line
Message "The value of GetVar 2002 = " & ZProbePos
Sleep(5000) 'Wait 5 sec

Then you can see the values is different depending weather G43 is on or off !

I'm planning on in my code, to check, is G43 is ON ?
If it is, turn it off, and then run the probe routine.

After the probe routine, read the ToolLengthOffset from the tooldatabase
GetToolParam(CurrentToolNum,2) and add (+) the value to the z-axis DRO

And then Re-enable the G43
Code "G43 H" & CurrentToolNum

Pages: 1 2 3 4 5 »