Hello Guest it is April 28, 2024, 12:50:14 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.


Topics - mcardoso

Pages: « 1 2 3 4 »
11
How do I create a desktop icon for my custom Mach 4 profile? I have modified the standard 4 axis profile for my needs. I can use the general Mach 4 icon to launch the loader screen, then my profile, but how can I create an icon to load my profile directly (skipping the loader window)?

12
I have been successfully using Mach 4 and my computer's embedded serial port for some months now (using the LUARS232 module included with Mach 4). I definitely had some trouble understanding it at the beginning, but now it is a framework for serial communications with my servo drives and works great.

At the recommendation of several members and admins on this forum, I have implemented rigorous error checking and handling throughout all of my scripting. Unfortunately this has been giving me new headaches by... catching errors  ;D

I have been able to correct my code to fix all but a handful of errors, mostly thrown by calls to the serial API. Those calls do return error codes to help troubleshoot, however I have been completely unable to find documentation on the RS232 module, either within the Mach 4 documentation or on the greater internet.

For example, I have the line of code:
Code: [Select]
local err, data_read, size = p:read(4096, 100)
where 4096 is the length of buffer to be read and 100 is the timeout in ms.

This returns the error code "09", but I cannot find ANYTHING to tell me what "09" indicates or how to correct it. I am at a loss.

Any suggestions where to look would be greatly appreciated.

Thanks! - Mike

13
Mach4 General Discussion / Help me troubleshoot the Cycle Timer
« on: November 05, 2019, 09:18:57 AM »
Hi All,

I have posted here before that my cycle timer is not working, but unfortunately I have not been able to fix it.

It persistently shows 0:00:22 and does not increment or reset. It is certainly possible that I broke the LUA code as I have made massive modifications to the LUA code to customize the capabilities of Mach 4 to my machine (mostly behind the scenes stuff, very little changes to the GUI).

My hangup is that I cannot find where in the LUA code the cycle timer is incremented? It is possible I accidentally deleted it, but I don't think I did. I also don't understand where in the screen element you actually pull the data into it? It just looks like a plain old string display with no linked registers or DROs.

Any information on how this screen element works behind the scenes or tips on how to troubleshoot its (non)functionality would be greatly appreciated.

14
Mach4 General Discussion / What can cause a Corrupter Mach 4 profile?
« on: November 04, 2019, 11:19:51 AM »
Hi All,

Over the weekend I somehow ended up with a corrupted Mach 4 profile. Fortunately I had a relatively recent backup and was able to copy my scripts back into it. Maybe cost me two hours - no big deal.

I am curious why it got corrupted. Are there common pitfalls that cause this?

15
Mach4 General Discussion / ISIG/OSIG Master List
« on: October 14, 2019, 02:37:47 PM »
Is there a good reference for all of the ISIG and OSIG variables available within Mach? It is easy to find the I/O ones but a little less obvious for the system state variables.

16
Mach4 General Discussion / How to mark an axis as "Homed"
« on: October 06, 2019, 01:30:30 PM »
When you run the out-of-the-box homing script, the axes are homed one at a time and each one has a LED which changes from red to green to mark that the homing has completed on that axis.

I am writing my own homing script which doesn't use the built in "drive to home switch" type of homing. What API call can I use to set that LED green, and mark in software that the axis has been homed?

Thanks,

Mike

17
Mach4 General Discussion / Axis Enable API Call?
« on: October 02, 2019, 05:10:26 PM »
Hi All,

Any idea what API call to use to enable the axes in the same way that clicking the "ENABLE" button on screen does? I would like to enable motion, set the enable output, and change the color of the on-screen enable button at the same time. Again, essentially mimicking what clicking the Enable button does.

I have tried mc.mcAxisEnable(inst, axisID, TRUE) but did not get any response from the motors (but no errors either?)

Thanks!

18
Mach4 General Discussion / Request for LUA advice: Rigid Tapping
« on: September 22, 2019, 03:10:45 PM »
Another post here!

Similar to my post about absolute homing, I am able to message my servo drives using serial commands and configure them to have different gear ratios to the Step/Dir input from Mach 4. I have also added a relay in my control cabinet (tied to an output from Mach 4) which physically disconnects the Z axis drive from the Smoothstepper Step/Dir signals and connects it to the encoder output of my spindle motor drive. Using this method, I can cause the Z axis to follow the exact motion generated by my spindle in a true closed loop fashion. By changing the gear ratio at the drive, I can program the threads per inch of the tap that I am using.

With this, I hope to be able to accomplish rigid tapping using the spindle encoder to drive axis motion. This all happens after the smoothstepper and does not rely on any Mach 4 controlled hardware.

My question is, can I modify Mach 4's behavior to a G84 call, or do I need to create a custom M function? Will these functions wait for my code to complete before continuing through the rest of the G code?

19
Mach4 General Discussion / Request for LUA advice: Absolute homing
« on: September 22, 2019, 02:45:33 PM »
Hi again,

I have developed a serial interface from Mach 4 to my Allen Bradley Ultra 3000 servo drives using LUA. One of the capabilities of this interface is to define the zero (home) position of the motor in the servo drive, and later read the current position of the motor back into Mach 4. Since my motors have magnetic multiturn encoders, this position will be stored through power cycles and even when the motor is moved by hand when the machine is powered off. This means that once the home position is set in the servo drive, I will never need to home my CNC again unless the motor is decoupled from the drive or ballscrew.

What I am hoping to do is run the normal homing routine in Mach 4, but modify it to set the zero position in the drive at the same time as it is set in Mach 4. Then going forward, clicking Ref All Home need only ask the drive where it is currently located and copy that data into Mach 4 axis positions.

My questions is this, if I have all my axes dereferenced, can I copy my known motor position into the axis position using mcAxisSetPos(Inst, 0, XPosition)? If so, how do I mark that axis as referenced without running the Mach 4 homing sequence to drive the axes to their limit switches?

Thanks in advance for any help or thoughts on this.

20
Mach4 General Discussion / Request for LUA advice: Startup menu script
« on: September 22, 2019, 01:49:50 PM »
Hi All,

I am looking to create a simple pop-up menu which requires me to click through a number of steps before I can start using the machine. Ideally it would come up as soon as the Mach 4 graphics load, and have the following steps:

1) Oiling reminder
2) Configure my machines servo drives over serial (unique to my machine)
3) Enable the Axes
4) Home the machine
5) Enable Soft Limits
6) Ask if I want to run a spindle warm-up program
etc.

What would be the best LUA element to use for this menu? I guess I could just pop up lots of message boxes, but I was hoping there might be a more intelligent element to use.

Pages: « 1 2 3 4 »