Hello Guest it is March 19, 2024, 06:43:29 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 - jevs

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 »
111
I agree. It is not worth saving $10 if it adds another layer to get things done if ever needed. I posed the same question to the reseller. I will see what they say tomorrow.
I am giving up on this project for tonight. I thought I was gonna do something cool and hook my VFD frequency output up and use that signal to do some stuff, but reading my Machmotion I06 manual shot that down. It seems to only want to take in a 5V signal from what it says. There is only mention of differnt encoders and no mention of using a VFD signal. Mine outputs a 10V pulse stream :( I was thinking this might help me with the toolchange macro in knowing somewhat real spindle speeds to force it to wait for it to stop before going on.....

112
Sounds good.
Is there any downside to buying the license from a re-seller rather than directly from Artsoft?

113
Yes, many times and watched all the videos many times. I don't just have a little router off ebay that I need to move over to a spot and manually pull out a tool.
I need to shut the spindle off, make sure it is off, record the positions, move to z0, move to x, y positions, then move Z up past home to Z5.800 and back down to z3.8 how many ever times it takes to get to the called for tool, go over and measure the tool, then go back to where it all started Etc.
It is a simple tool changer, but not as simple as the example scripts. I made this work with the VB script in much less time, but that was still a learning experience also. Trust me, I have a lot of hours in this changeover already and an overload of info.

Basically this thread we are talking on now is solved though. I got a pretty good handle on the editor at this point. It is not the stall point anymore. 

I have the example scripts for the tool change working, it is just adding what I need in there is the challenge.
I need to duplicate this, but also some things seem to be different with Mach4 and I need to add in the tool measure at some point....
https://www.youtube.com/watch?v=W-0q5uM8jbU

Code: [Select]
'Tool change macro for 7 tool turret
Sub Main()
'Sets variable OldTool to what is currently loaded
OldTool=GetCurrentTool()

'Sets Variable MaxToolNum to the max number of tools possible
MaxToolNum=7

'Sets variable Newtool to the one being selected with M6 T#
NewTool=GetSelectedTool()

'Get positions before moving to do tool change
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )

'If the current tool loaded is 0 or greater than 7 then tool has been lost
'so need to ask what tool is currently loaded
While OldTool=0 Or OldTool>7
OldTool=Question ("Current tool unknown, enter tool in spindle 1 to " & MaxToolNum)
Wend

'Sets CurrentTool to Oldtool in case it was lost and entered above
SetCurrentTool(OldTool)

'When the tool asked for is invalid then this makes you select a valid tool
While NewTool > MaxToolNum Or NewTool <1
NewTool = Question ("Invalid tool chosen, enter tool number 1 to " & MaxToolNum)
Wend

        'If the tool asked for is the same one that is already loaded then exit macro
If NewTool=OldTool Then
Message "Tool already loaded or tool not specified with T# (ex:M6 T4)"
Exit Sub
End If

'Turn off soft limits if they are on
If GetOEMLED(23) Then
DoOEMButton(119)
End If

'Moves To Z home from where ever it is
code "G53G0Z0"
While IsMoving()
Wend

'Sets ChangeNums to 0 for safety in case it is not at 0
ChangeNums=0

'Makes the magic happen and moves the proper number of times if new tool is higher than old
If NewTool>OldTool Then
For ChangeNums=1 To NewTool-OldTool

'Moves Z axis to the top of tool change
code "G53 G1 F70 Z5.800"
While IsMoving()
Wend

'Moves back to bottom of tool change area
code "G53 G1 F70 Z3.8"
While IsMoving()
Wend

Next

'Makes the magic happen and moves the proper number of times if new tool is lower than old
Else
For ChangeNums=(OldTool-NewTool) To 6

'Moves Z axis to the top of tool change
code "G53 G1 F70 Z5.800"
While IsMoving()
Wend

'Moves back to bottom of tool change area
code "G53 G1 F70 Z3.8"
While IsMoving()
Wend

Next
End If

'Move Back to Z Home
code "G53 G1 F70 Z0"
While IsMoving()
Wend

'Should be a succesful tool change at this point so this sets the NewTool as the current tool
SetCurrentTool(NewTool)

'Turn back on soft limits
DoOEMButton(119)
End Sub           


114
Hmm, I guess this is confusing me then at the bottom of their licensing page...

" Important Note: The LICENSE will only work for the Computer for which you supply the PC ID at checkout. Each PC has a unique ID code and the license works in coordination with this code."

I thought I read it will only work on one PC, but you can use that one PC to run multiple machines...or something like that.



115
okay, this does seem to be working for changing the RPM. Now that I have a better understanding of how to use the debugger that is helping. However, setting this to zero does not actually take it to zero for me because my min RPM for pulley set 1 is 360, so using this code really sets the speed to 360 instead of OFF.
Code: [Select]
rc = mc.mcSpindleSetCommandRPM (inst, 0)
So, I still have the question about how to make sure it is going to wait for the motor decel time before running the rest of the script if I use the Direction command and setting it to OFF.


116
I am starting to get annoyed at the demo time out while I am in the middle of coding Mach4.
I am using my main computer with bigger monitors and better setup, better comfort, more desktop space for multitasking etc. for the programming, but my CNC machine has a computer in it that will be running the program for the machine. The one in the CNC machine needs to work to test that stuff really works, but I also need to do all the "making it work" on a better setup.

How can I make both computers work with no time outs so I can get more done without the annoyance? I don't think buying the $200 license will solve this because that has to be tied to the computer in the machine and there is no way I can sit there at a swing out keyboard and little monitor sitting on a stool and do all this trial and error coding.

I am willing to buy the license to get rid of the timeout, but I don't think that will solve the issue of needing it to work on both computers?

117
I still have not found a way to set the RPM to zero using the above information, however I did find something that works to stop the spindle motor.
Code: [Select]
rc = mc.mcSpindleSetDirection(inst, mc.MC_SPINDLE_OFF)

However, in Simulator mode anyway, it does not appear to be waiting for the decel time before making the next moves....

So, any ideas on getting the RPM mentioned above to work, or how to make sure it is waiting for the motor to slow down before moving to the next part of the script using of this direction change command (setting to off).

118
"Remember I cautioned you that learning Mach/Lua was quite a challenge and that there are procedures that do not require much,
if any, Lua coding and that I commended them to you to save the grief you are now experiencing."

I am confused. How do I make my tool changer work without using Lua coding?
I don't think I really need to keep getting the warnings. Really, just the answers to questions is what eases the pain most and makes it move faster. I think the secret of it being a pain in the behind is out of the bag LOL. I have accepted that and just doing what has to be done now...

I do believe Mach4 will work. I have it mostly working. I am down to to a few tasks. I just need the tool change to work and then get the pokeys55 replaced with the 57e and setup.....then I should be done other than tweaking as needed when I start using it to make parts.

I will have to figure out probing and auto tool height setting also, but I never had that stuff installed to try with Mach3 either.


119
Quote
I am yet to find a single M6 script for an ATC

The whole idea of the m6 video a while back was to try and explain how you go about setting up your "Own" custom m6 step by step, and nearly everyone has a different way of how they want it to work.

A nice way of seeing your values is to open the watch window from the view menu, right click on the variable you want to watch and add it to watch expression, this will save you having to hover over the script.

DazTheGas
I have been watching your videos and those are much appreciated! However I am stuck on a couple things right now. I cannot even make the spindle motor stop. I think I know which code to use, just not how to type it in so it works. I need it to stop the spindle if it is running (which I hope includes the decel time), then start making moves.
I have learned a lot this weekend for sure, but I am nowhere close to getting this done....
I did learn more from that first video too. Docking the watch and stack up top there seems handy.

120
Hi,

Quote
It has the info you need, just not the exact syntax to know how to use it. I am sure this is clear to people that already know...but tough for a new person that is not a programmer.

Tough luck.....this has afflicted all of us, I was not a Lua programmer when I started either.....and by most measures still not!
Mach4, with its modular structure and Lua scripting language offers a great deal more flexibilty and performance over Mach3 but
it comes at a cost, namely learning curve.

Second issue that you are observing is that the documentation of Mach4 often lags its current state. NFS is a very small company that does not
have the resources to employ a document writer and consequently the documentation has fallen behind. Before you jump up and down just,
weigh the fact that NFS is still releasing new functionality, including script based THC, mcSurface Wizard, Zero Brane editor and mcTouch Off wizard
in the last 12 months alone, verses up-to-date documentation......NFS doesn't have the resources to do both WITHOUT charging a lot more for its
software or some sort of annual subscription.

Craig

They will get my $200 when it works.....so, I guess they will be waiting awhile.....
Like many others I am sure... I am not a programmer and you have to be a programmer to make it work.
I would be willing to bet there are many other people that are not as persistent or computer literate as myself that just walk away, which is ashame.
I would certainly be further along if I could get one line of code to just work without spending hours on how to make it work.
My VB script to do what I am trying to do now seem so much easier.
I am determined to get this done though, so expect a lot more dumb questions to come :) 

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 »