Hello Guest it is April 19, 2024, 06:21:44 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 - dandonegan

Pages: 1 2 3 »
1
CS-Lab / Re: Looking for feedback on running a CSMIO/IP-A with Mach 4
« on: February 02, 2016, 08:26:40 AM »
Actually I have decided to go with Ajax/Centroid. I have built several machines using both Mach and Ajax. Last machine I put together I used Mach 4 and was quite frustrated with the entire process. If the MD1 did not have a twin changer I probably would have considered staying with Mach but the thought of going through all of the agony of getting that running was too much.

The only thing that I am reusing from the original controls is the transformer and servomotors. I have replaced the encoders and am in the process of wiring up a completely new electrical enclosure. I am using a Delta VFD055C23A AC drive from Wolf Automation for my spindle with indexing capability. This gets rid of the shot pin and the disc brake. It also gives me rigid tapping capability as I have installed in the encoder on the spindle. Please let me know if you would like some info on how I installed the encoder.

I am replacing the proximity switches with APS25-8M-E-D from Automation Direct. These will be 24 V DC. Since their smaller than the originals I am making an intermediate plate to mount the new proxy which is to which will then bolt to the existing locations.

I have removed the spindle motor and had it gone through. New bearings and balanced. I have also pulled the spindle and put new bearings in that  as well as new Belleville washers.

These machines were so ridiculously overbuilt mechanically that I thought was well worth replacing all of the electronics. Should have the super reliable machine for the next 20 years.

Let me know if you're looking for any manual information. I have  all of the manuals for my machine and have scanned quite a bit of them.

dan

2
CS-Lab / X axis limits switch triggering during homing sequence Mach 4
« on: September 13, 2015, 03:00:36 PM »
I am having trouble homing my X axis with my new CSMIO/IP-M runing Mach 4. The axis is set up with a positive and negative limit switch. I am also using the negative limit switch as the home reference switch. When I home the axis I am getting an X axis limit switch tripped message and the machine goes into E stop.

I believe that this is a Mach 4 plug-in problem. I am under the impression that the homing sequences handled by the plug-in.

Does anyone have an idea to solve this?

dan

3
I am working on this code on a development machine which is just running the simulator. I am only referencing the diagnostic screen regarding outputs when I say that I'm not seeing anything.

The actual machine is running a CSMIO/IP-M from CS labs..

dan

4
Good morning,

I added another end to the end and am no longer getting an error. Thanks for the tip on checking the code. Unfortunately when I run it in either MDI or in a program it  makes the buttons on the screen blank for a second like you are normally running a program but it does not trigger an output. This is what I have now.

function m121() --Save the name of the Signal (as stored inside of Mach4)
local inst = mc.mcGetInstance() --Get the instance of Mach4
ActivateSignalTime = 10000 --Time in milliseconds that we want the signal to be active.
local hReg = mc.OSIG_OUTPUT5 --The handle to the signal
-----------------------------

hReg = mc.mcIoGetHandle(inst, IOName)
if hReg == 0 then
   wx.wxMessageBox("Could not locate signal!")
else
   local rc = mc.mcIoGetState(hReg)
   if rc == 1 then --If rc equals 1, then the signal is active.
      wx.wxMessageBox("Signal is already active!")
   else --If rc does not equal 1, then the signal is not active.
      mc.mcIoSetState(hReg, true) --Activate a signal.
      wx.wxMilliSleep(ActivateSignalTime) --Sleep for the commanded time (so that the output stays on as long as we want).
      mc.mcIoSetState(hReg, false) --Set the state of the signal back to false.
   end
end
end

dan

5
Still getting the same error message. Am I correct in naming it m120?

dan

6
I copied and pasted that into the editor. I then saved it as m120.

When I open MachI get this error.

failed to retrieve file times for C;\Mach4Hobby\Profiles\Mach4Mill\Macros\m120.mcc ( error zero; the operation completed successfully,)

This is what it looked like when I pasted it in. Thoughts anyone?

dan

function m120() --Save the name of the Signal (as stored inside of Mach4)
local inst = mc.mcGetInstance() --Get the instance of Mach4
ActivateSignalTime = 5000 --Time in milliseconds that we want the signal to be active.
local hReg = mc.OSIG_OUTPUT0 --The handle to the signal  OUTPUT0  = output 0 if you wonted output 5 you would have mc.OSIG_ OUTPUT5
-----------------------------

hReg = mc.mcIoGetHandle(inst, IOName)
if hReg == 0 then
   wx.wxMessageBox("Could not locate signal!")
else
   local rc = mc.mcIoGetState(hReg)
   if rc == 1 then --If rc equals 1, then the signal is active.
      wx.wxMessageBox("Signal is already active!")
   else --If rc does not equal 1, then the signal is not active.
      mc.mcIoSetState(hReg, true) --Activate a signal.
      wx.wxMilliSleep(ActivateSignalTime) --Sleep for the commanded time (so that the output stays on as long as we want).
      mc.mcIoSetState(hReg, false) --Set the state of the signal back to false.
   end
end

7
This looks great I'm just not sure where to put what value. In the variables section it looks like it's looking for an input To trigger this as opposed to M code. Then it says "local hReg = 0 " is that where I would put the output that I want to turn on?

Could someone modify that example to show where you would put the M code that would activate it and the output that you are triggering?

For example if this was triggered by m120 and turned on output number 5 for 3 seconds.

Thanks for the continued help KingKerf

dan

local inst = mc.mcGetInstance() --Get the instance of Mach4
function m120() --Save the name of the Signal (as stored inside of Mach4)
ActivateSignalTime = 5000 --Time in milliseconds that we want the signal to be active.
local hReg = mc.OSIG_OUTPUT0 --The handle to the signal
-----------------------------

hReg = mc.mcIoGetHandle(inst, IOName)
if hReg == 0 then
   wx.wxMessageBox("Could not locate signal!")
else
   local rc = mc.mcIoGetState(hReg)
   if rc == 1 then --If rc equals 1, then the signal is active.
      wx.wxMessageBox("Signal is already active!")
   else --If rc does not equal 1, then the signal is not active.
      mc.mcIoSetState(hReg, true) --Activate a signal.
      wx.wxMilliSleep(ActivateSignalTime) --Sleep for the commanded time (so that the output stays on as long as we want).
      mc.mcIoSetState(hReg, false) --Set the state of the signal back to false.
   end
end

8
KingKerf

Thank you very much for your help. That is an incredibly well-written and complete explanation. I hope the people over at newfangled included it in their LUA examples section for everyone to use. I understand that everyone is doing somewhat unique stuff with this software but it Would be great if there was a repository of some of the more basic functions most people will be using.

Now I'm wondering if I can up the ante? These signal is going to be used to both cut and notch a part. It would be great to call a single M code that would activate and output, dwell for a specified amount of time and then turn off the output.

Is there anyone that would like to comment on adding that functionality to KingKefs post?

dan


9
I was hoping someone might be able to help me with what is probably the very basic question for most of you.

Could someone show me the code that I would use to have M101 turn on output number one?

I would then like to have M102 turn off output number one

Once I have an mcs firelight know how to load it into the proper folder to make it work but I don't know how to generate the code.

Any help would be greatly appreciated.

dan

10
Mach4 General Discussion / Enabling output during axis movement
« on: July 31, 2015, 05:09:34 PM »
Good afternoon,

I am working on a wire Bender that will be pulling material off of the spool with the X axis motor and feeding it through the machine. I have a pneumatic brake on the spool and would like to turn the break off when the X axis motor is in motion. Does anyone know how I could make an output change state while the X axis is moving?

dan

Pages: 1 2 3 »