Hello Guest it is September 27, 2023, 08:15:16 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 - Mauri

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 33 »
241
Hi,
I have scripted some Lua to make changes to the DRO's simulating "first start up" change for the "Machine Coordinates" X/Y/Z with the saved values of the saved Mach4 last Mill Table position as well as trying to Zero the DRO's "Current Position" X/Y/Z, however the values change and then revert back?
Any idea.
Regards,
Mauri.

242
Daz,
Thanks for your reply, I have read that topic.
If your Machine Location for example is:
X = +175
Y = +75
And your Current Position is:
X = 0
Y = 0
You then Exit Mach4 and say yes.
Then reload Mach4
The Machine location is:
X = 0
Y = 0
And your Current Position is:
X = -175
Y = -75
Now you do not want to move the Mill Table as this is where you want to do the next cut on the same part with a different same cutter (but this is the next day).
We would do this process over 5 days (with some cuts taking 16 hours) and we switch off after each days process.
Now the machine location is not correct to the Mill Table location.
If you ZERO your current Position then all is positions on the DRO's become ZERO.

Do those functions in the Startup Script need to be activated with some button or script?
The Button names to activate the Functions seem to be different "Position Remember" and "Position Return" and seem to do nothing?

I can write my own script to save the Machine Coordinates to the machine.ini file at shutdown and then read them at startup and rewrite the Current Position and Machine Coordinates Position if there is no other way.

We can home the Mill and it will go to the same place within .001 of a mm on the DRO's, we also have reasonably accurate ball screws, but do not want to Home and reset our job every time we want to do another cutting process the following day.

I still have now answer on what the Function actually do and how they are activated.

Regards,
Mauri.

243
Hi,
Sequence of events.
Mach4 and Controller are started.
Mill is homed.
DRO's are Zeroed.
Mill is move at the Center of X/Y of Table.
This shows Machine Coordinated Table position exactly correct.
When are shut down Mach4 and Controller are restarted.
Now the Current Position DROs shows the machine position values, but the Machine Coordinated DROs are now Zero requiring to rehome the machine every time?

This code is in the Load Screen Script.
What does it do?
It does not appear to store anything in the machine.ini file or the registry at least the one under Diagnostics.
Should the Machine Coordinates be saved each time Mach4 closes down and then be recalled with the code below at startup showing the Machine Coordinates current position?
Please advise.
Regards,
Mauri.
---------------------------------------------------------------
-- Remember Position function.
---------------------------------------------------------------
function RememberPosition()
    local pos = mc.mcAxisGetMachinePos(inst, 0) -- Get current X (0) Machine Coordinates
    mc.mcProfileWriteString(inst, "RememberPos", "X", string.format (pos)) --Create a register and write the machine coordinates to it
    local pos = mc.mcAxisGetMachinePos(inst, 1) -- Get current Y (1) Machine Coordinates
    mc.mcProfileWriteString(inst, "RememberPos", "Y", string.format (pos)) --Create a register and write the machine coordinates to it
    local pos = mc.mcAxisGetMachinePos(inst, 2) -- Get current Z (2) Machine Coordinates
    mc.mcProfileWriteString(inst, "RememberPos", "Z", string.format (pos)) --Create a register and write the machine coordinates to it
end

---------------------------------------------------------------
-- Return to Position function.
---------------------------------------------------------------
function ReturnToPosition()
    local xval = mc.mcProfileGetString(inst, "RememberPos", "X", "NotFound") -- Get the register Value
    local yval = mc.mcProfileGetString(inst, "RememberPos", "Y", "NotFound") -- Get the register Value
    local zval = mc.mcProfileGetString(inst, "RememberPos", "Z", "NotFound") -- Get the register Value
   
    if(xval == "NotFound")then -- check to see if the register is found
        wx.wxMessageBox('Register xval does not exist.\nYou must remember a postion before you can return to it.'); -- If the register does not exist tell us in a message box
    elseif (yval == "NotFound")then -- check to see if the register is found
        wx.wxMessageBox('Register yval does not exist.\nYou must remember a postion before you can return to it.'); -- If the register does not exist tell us in a message box
    elseif (zval == "NotFound")then -- check to see if the register is found
        wx.wxMessageBox('Register zval does not exist.\nYou must remember a postion before you can return to it.'); -- If the register does not exist tell us in a message box
    else
        mc.mcCntlMdiExecute(inst, "G00 G53 Z0.0000 \n G00 G53 X" .. xval .. "\n G00 G53 Y" .. yval .. "\n G00 G53 Z" .. zval)
    end
end

244
Mach4 General Discussion / Re: Need Help on Lua Calc and Tab setup
« on: March 28, 2017, 09:30:50 PM »
Hi,
I have worked it out myself.
Regards,
Mauri.

245
Mach4 General Discussion / Re: Need Help on Lua Calc and Tab setup
« on: March 28, 2017, 09:08:56 PM »
Hi,
I can get the value for min/max Machine Extents, But cannot get the DRO Machine Coordinates value.
I have tried "X Machine Pos" and "dro Machine Coordinates X(1)" but get no numbers.
Machine Coordinates are not stored in the Register.
I am not sure it is stored anywhere.
Does anyone know how what Lua code is required to get the Machine Coordinates values?
Regards,
Mauri.

246
Mach4 General Discussion / Need Help on Lua Calc and Tab setup
« on: March 28, 2017, 03:52:59 PM »
Hi,
I have used the Daz code for the Homing of X/Y/Z Axis with Soft Limits button Off when I home it makes X/Y/Z all Zero. (0/0/0)
When I then move X/Y to where I want to Centre of my part the DRO shows that Position. (175/75/0)
When I Zero the DRO for that Position these values then go to the Machine Coordinates. (175/75/0)
When I load a G-Code for example a Circle say 100mm dia., the Program extents show the following (example):
X Min = 125        X Max = 225
Y Min = 25          Y Max = 125

Now what I would like is another Tab showing “Part Extents”
Minimum            Extents                 Maximum
-50.000                 X                             50.000
-50.000                 Y                              50.000

Using Program Extents and Machine Coordinates I would like the following calculation to display the number above.

Xminpartextents = X Program Extents Min - X Machine Coordinates Min               (-50=125-175)
Xmaxpartextents = X Program Extents Max - X Machine Coordinates Max            ( 50=225-175)
Yminpartextents = X Program Extents Min - X Machine Coordinates Min               (-50=25-75)
Ymaxpartextents = X Program Extents Max - X Machine Coordinates Max            ( 50=125-75)

We machine a number of circular medallions and each side require multiple cuts over a number of days, we therefore need to be sure that it is always in centre position. In the past we have had power failures and the tip of the .1mm cutter broken plus the restart of the Mill the next day.
So this display will quickly show that we are still on centre with the Part without having to do any manual calcuations.
Can anyone please help me with this as my Lua is very weak in this area?

Regards,
Mauri.

247
HiCON Motion Controller / Motor Curver Display Graph on HiCON Config?
« on: March 23, 2017, 02:28:25 PM »
Hi,
I used to be able to show the motor graphs in HiCON COnfig, now it shows nothing (see attachment below)?
Has something changed?
There may be an issue with the Velocity Scale.
I Have tired moving the scale but it I still could not get any graph.
Please advise how I can redisplay the motor graphs again.

Below is the graph I was getting back in 21 Aug 2015.
This HiCON Config had no issue in displaying every motor graph.
It shows a totally different Velocity Scale than the current.

Regards,
Mauri.

248
Mach4 General Discussion / Mach4 3axis only? Still waiting for 4 Axis.
« on: March 03, 2017, 05:47:45 PM »
Hi,
Mach4 has been sold for around now for 2 years and 3 axis seems to be functional.
Mach4 was also sold as 4/5/6 axis capable software, but to this day, it still cannot display Toolpaths that have any representation of the actual G-Code, how long does it take for a programmer to be able to draw a 3D Circle?
Is there anyone programing at Newfangled solutions?
Regards,
Mauri.

249
Turmite,
You can do all those things with the HiCON card.
Have you downloaded all the manuals, there are examples in them.
Marc and Rufi from Vital Systems, if asked on there forum will help you with most of these questions and more.
http://www.machsupport.com/forum/index.php/board,89.0.html
You have to take great care on wiring up a controller both to your self and the voltages you set up on the HiCON card/s.
Please ask someone that you know to help you that knows electronics and also involve Marc and Rufi.
Q1.
There are many ways to wire-up limit and homing switches and there are also two optional cards to do this as well if you do not have electronics experience.
Each motor X/Y/Z/A etc. (6 max) is wired up separately on the HiCON.
For example:
J13 INP12/13/14/15 would be Home X/Y/Z/A.
J13 INP8/9/10/11 would be Limit X/Y/Z/A.
Sequencing of homing can be controlled by Mach4.
Q2.
Settings are made in both Mach4 Settings and the HiCON card firmware settings.
J12 would connect the VFD relays on the Card.
GND = ACM
DAC = VI
RLC = DCM
RL1 = FOR
RL2 = REV
Q3.
You can have as many E-Stops as you care to wire up.
For example:
One on the controller.
One or more on the Mill.
One on the MPG.
Yes pressing any E-Stop will perform the same function.
You will have to write some Script code todo some of this.
Hope this helps.
Regards,
Mauri.

250
Daz,
Thanks for your great video.
The reason mine did not work is that I had mine setup in another TAB not on the initial screen as loaded.
By putting in on the load screen it works OK, however if you TAB to another screen then it disappears.
If there a way to keep it there so this does not happen?
Regards,
Mauri.

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 33 »