Hello Guest it is March 19, 2024, 05:06:06 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 »
101
Mach4 General Discussion / How to use a variable in a Gcode script line?
« on: August 06, 2019, 11:28:22 PM »
mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 X"VariableforXhere" Y"VariabeforYhere"")

I have tried about everything I can think of at this point. I tried a bunch of other ways to use the variables. This format above is not necessarily what I expect to work, but I am looking for the correct format to do this.

 I want to use a variable value for the X and Y in a Gcode command. At the beginning of my M6 script I store the X and Y positions before I move anything. Then I do all my tool change stuff, and I want to go back where I started.

There may be a better way to do this....if so, what is it?

I thought I was done with my M6 script and then this causes an error in the real run. I got it in a format that it would compile, but then it didn't move anywhere on this line. Everything I try either does nothing or won't compile with an error so far. 

102
Mach4 General Discussion / Tool Table and Tool Changer question
« on: August 06, 2019, 12:20:17 PM »
In working on my M6 script it gave me some questions about how the tool table will work and how that may affect how I write the script.

My machine can only hold 7 tools and a tool cannot be used unless it is in the tool changer. I cannot manually add a tool in the spindle without the changer holding the tool. The tool is actually still in the changer when it is working. It is a turret setup.

So does this mean I can only have 7 tools in my tool table and I have to change all that data and reset the tool heights and all of that each time I setup for a different job?

Or, is there a way to make my tool table in Mach4 have all of my tools matching with my CAM tool table, but then assign the tool table tool number to a tool changer position as needed or something?

Next will bring up the question of what happens if you need more than 7 tools for a job?


103
Actually this brings up something I was not even considering. I was just going to limit it to 7 tools (my turret capacity). I was not considering if if I need more than 7 tools what to do. Is your M6 script something you share?

104
Okay. Well if that is the case. I can work around it in another way. I was hoping to correct the values rather than just give a warning and dump out of the script.
However that will still serve the purpose.
Does mach have anything built in to use that can know your "legal" tool number range?

105
I am getting this error when a message box pops up to enter information when tripped within the M6 Script.

I check to see if the current tool is a valid one and also if the asked for tool is a valid one. If not, I pop up a window to accept correct values to be selected.

If either message box pops up, I get this error. Once I hit Cancel to ignore it, then everything works fine from that point on as far as the message boxes operation and M6 macro.

The error happens before anything is selected with the message box.

I did submit this to Artsoft.

Wondering if anyone knows if I am doing something wrong or if this is a known bug or what?

Maybe popping up a box to enter something from an M code script is a rule violation? Not sure why it would be. I did this in Mach3 with my M6 script. 

106
I did some testing based on something else I read in an old post.
Be aware that the Accel and Decel times when used with these commands are computed down. The number you put in for accel and decel are for max RPM. Mach4 will calculate this time down from there based on the RPM. It will not use the number you put in at lower RPM, it will be a shorter time.
I did time my machine vs the Mach calculated and used values and it is not too bad for my machine. It was close though so I added a second to the times just to be safer. 
I would recommend timing your spindle speed times by hand at 500 or 1000 RPM intervals and compare it to the time Mach uses. You can stretch the max number until every RPM on your largest tool has enough time (if it does not work out with the real time used for it to decel from max RPM).

 


107
I figured it out!

Code: [Select]
rc = mc.mcCntlGcodeExecuteWait(inst, "M05") --Turns the spindle off and waits decel time
It seems so simple now. Not sure why this was so hard to get. I finally thought....well maybe just running an M code in the script will not ignore the decel time. So I found this in the API list.

Anyway, I tested this is in the debugger and it waits exactly correct for my decel time in the spindle motor table before going to the next line of code.

So, this particular thread is solved.

108
Unfortunately those tool change examples do not exist in the latest download that I have. I only get the one stripped out M6 that is in the profile macros folder. I did notice in one of the Artsoft videos I saw that they had this folder you mention in their examples, but she did not go into it to see what is in there. After I noticed that, I double checked mine and it is no longer included I guess.
I would love to have some examples of something more for an ATC that has the code for shutting off the spindle and waiting for it to slow down before moving etc. 
I did send them an email to ask them for the code or an example late last night. I am back to work today, so may not get to do much with this today. Maybe tonight if nothing else comes up I will work on it more. Maybe I will get something in the email by then.
I was thinking adding the frequency feedback might open some options for monitoring the speed for some added code abilities. Like I said that got shut down also unless I reduce the signal voltage from the VFD or add an encoder. I am still looking into doing that. I already have the wire ran to send it over to the BoB.
However, you should not really need that to do this. Mach3 didn't need it. I am sure there is a correct code to do it. I just need more time to figure it out or someone else may give me the answer by then. I am sure this has been done many times by people by now surely. It is a pretty basic need for a tool changer I would think.

109
It does not have modbus :( It is a Cutler Hammer AF91. 

110
I was talking about the frequency monitor signal coming from the VFD back to the BoB input so i could get a motor RPM feedback. Driving the VFD works great other than there is no feedback. 4000 rpm is right on the money, but there is some slight variance along the range using an rpm optical meter to compare. I stumbled into finding some stuff i was not using from my VFD that might be benifical to use with Mach4, but the BoB says it will only accept a 5V pulse input from an encoder. My VFD sends 10V digital pulse stream out.
I dont even know how good this feedback would work but it would give a couple extra programming options and possibly better spindle speed control if it worked.
I will research options more tommorow. Maybe there is an inexpensive seperate spindle encoder that would would work also.

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 »