Hello Guest it is February 07, 2023, 01:59:03 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 - mark4

Pages: 1 2 3 4 »
Mach4 General Discussion / Enable momentary spindle reset on reset
« on: April 27, 2020, 09:31:48 PM »
Hello a while ago i was trying to get this to work and it still is not quite what i need. First I need to reset the spindle like enable but it needs to wait for a few things to start after pressing enable say 5 seconds then needs to turn on output 1 for say 5 seconds. Then it needs to turn the output off or the spindle will not start.

Last go I received this code for help
if (testcount==50)then
   local outHandle=mc.mcSignalGetHandle(inst,mc.OSIG_OUTPUT5)

It works on the testcount of the plc. The output turn on and the timer waits and turns it off. The timer has not functioned for me except after I listened to Das then i got it to work but not quite what i was looking for. I came up with this after much experimentation

if (testcount == 200) then
   local SpinHandle = mc.mcSignalGetHandle (inst, mc.OSIG_OUTPUT1)
--   mc.mcSignalWait (inst,mc.ISIG_INPUT60, 1, 10)
   mc.mcSignalWait (inst,mc.ISIG_INPUT60, 1, 5)

This works except it only runs the one time at startup and after exiting screen editing. I do not know but think the plc continues to run its cycles and does not stop because of a reset so the testcount never restarts from zero from a standard reset. I need it to do this. When reset is pressed wait 5 seconds then turn on the output for 5 seconds then turn it off. As you can see there is another wait in the code. The problem is when I added that it hung everything until it completed. then the things it was waiting for ran and of course the second timer was to early to properly reset. This is so close if somebody has an idea of how i can trigger this code. Right now it is in the plc script.
Thank you

Mach4 General Discussion / Dro counter
« on: April 25, 2020, 10:36:01 AM »
Hello I have not been able to find information on how to set up a dro to count on an input.
I am programming an automatic tool changer and it has 21 tools. the changer has a sensor that
triggers once per tool. The dro needs to count to 21 then reset to 1. I am then planning a homing
routine that will move the carousal to the home position and trigger a sensor and reset the dro also. that should be easy after i get it to count.

This is an extra tidbit. The machine i am upgrading is a cincinati millicron with a 6000 rpm spindle. the question is in the original control that i never saw work. when the spindle is screaming along at 6000 rpm and you call for 0rpm or dead stop was it immediate or was there some delay. In other words from 10v to 0v instantly? If anybody has seen one actually running.

Thank you

Mach4 General Discussion / ok lua lost on screen button
« on: March 17, 2020, 10:28:09 PM »
I am just confused and have read so much that I am even more lost. LOL
Can somebody help
I want a screen button to read input 9 and if input 9 is off then turn on output 8
until input 9 is on. then turn off output 8. seemed simple

The object is a tool changer manual button to go to the spindle so you click the button and
if the tool holder is at park then the switch "input 9" is off so turn the motor on "output 8"
when the "input 9" turns on turn the motor "output 8" off.

This is what i have so far notice their are two different as not sure which signal get handle are the proper form.
And the signal get state if then loop just has to be all kinds of wrong

local inst = mc.mcGetInstance()
local ToolDrumAtSpindle = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT9)
local ToolDrumToSpindle = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT8)

   if mc.mcSignalGetState(ToolDrumAtSpindle ==1 )  then

--local inst = mc.mcGetInstance()
--local ToolDrumAtSpindle = mc.ISIG_INPUT9
--local ToolDrumToSpindle = mc.OSIG_OUTPUT8

--   if mc.mcSignalGetState(ToolDrumAtSpindle,1)  then
--      mc.mcSignalSetState(ToolDrumToSpindle,0)
--   else
--      mc.mcSignalSetState(ToolDrumToSpindle,1)

Never did a button before except to just turn on or off an input.
Thank you

Mach4 General Discussion / Lua confusion simple switch spindle range
« on: January 21, 2020, 01:02:25 PM »
Lua continues to be a struggle. Every time I learn something. i need to change the spindle range from 0 to 1. The machine I am retrofitting has a high/ low gear switch. so i thought use screen load script and when the switch is activated then low gear and not activated high gear. I also wanted to have two leds on the screen to tell you which gear you are in. Thought I had it figured out. But it doesnt seem to work.
I started with this
[mc.ISIG_INPUT6] = function (state)
    if (state == 1) then
Thought it would work in one go.
Then I went to this

[mc.ISIG_INPUT6] = function (state)
    if (state == 1) then
-- Gear Hi / Low
--function GearHiLow()
--   local hSig = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT6)
--   local Gear = mc.mcSignalGetState (hSig)
--   if (Gear == 1) then
--      mc.mcSpindleSetRange (inst,0)
--      mc.mcCntlSetLastError (inst,"range 0")
--   else
--      mc.mcSpindleSetRange (inst,1)
--      mc.mcCntlSetLastError (inst,"range 1")
--   end

This is the final so far and there have been a few versions.
If anybody can point me in the right direction. Thank you

Mach4 General Discussion / AVG got me twice
« on: November 05, 2019, 12:07:44 AM »
Stat away from AVG antivirus. Every time I have tried it on a machine it makes movement jerky and abrupt. Remove it and all goes well. This is with the Ethernet smooth stepper. I am planning to stick with microsoft essentials. I would also be interested in what you use and what success or failure you have had.

Mach4 General Discussion / Windows 10 home and mach4
« on: October 31, 2019, 04:12:48 PM »
I am upgrading a mill and just received a intel nuc I use these all the time. But they either come programmed or I install windows 10 pro and only pro on them. So i get a unit with windows 10 home install and a digital license. I figure just install windows 10 pro all good right. I attempt to install windows 10 pro and attempt to insert oem and it doesnt take the oem. then proceeds to change the install to home.

looks like i am stuck with home as i do not know how to get around this. Has anybody used mach4 successfully with windows 10 home and do you have any pointers. I know home has mandatory update but if you disconnect the WiFi then you have control over when it updates.
thank you

Mach4 General Discussion / VFD in box or not
« on: October 28, 2019, 06:52:51 PM »
Hello I see lots of panels with VFDs mounted in them. And yet VFDs are noisy so that would say keep them away from motion control and drives. Anyhow I want you opinion on weather to put it in a box or not and if you ever had trouble.
thank you

Mach4 General Discussion / Tool Change and Bright Idea
« on: July 28, 2019, 09:07:46 PM »
Hello All I am writing a tool change program for a rebuilt Cincinati Milicron. Just starting really. I made a screen tab and plotted all my inputs and outputs to leds. Then I got an idea for displaying the carousel. i started with a circle and that failed. So i increased an led to ridiculous size and placed 21 dro's around it. The object to display which tool is in the spindle and each tool number and position in the carousel. Easy math just take tool in spindle and add or subtract for which position you are in and repeat around the carousel. So i will post the tab if i can figure out how. Can somebody point me to a place i can read up on how to do this to a dro. Or tell me how to program this into a dro. clueless right now but it should be simple. Thank you Mark

Mach4 General Discussion / Enable momentary on reset
« on: June 29, 2019, 11:53:39 PM »
I am upgrading a Cincinnati Millicron with kollmorgen motors and added a dspmc controller. It is starting to come together with some help from vital systems. Anyway here is my problem for the spindle upon startup I need to turn on a reset for a few seconds on startup to start the spindle. The catch is the input cannot stay on it has to turn off. I tried using an enable but by not turning off it doesnt start. the spindle is actually quit sophisticated glad I have drawings.

How to accomplish this in mach4 ? I have an idea of how to program the script. Only an idea. But where to put the script and have the reset call it up and execute I am unsure how to do. And I am fuzzy as to where to program this script. The plc script comes to mind but maybe screen load will be better.
Thank you for any advice

Mach4 General Discussion / MPG strange behavior
« on: April 12, 2018, 12:35:53 AM »
i have a strange problem this is my setup. mach4,Ethernet smooth stepper, intel nuc with windows 10, ace 22 plc modbus over usb.
so the only job the plc has is to control two rotary switches one for axis X,Y,Z and A and one for X1,X10,X100 increment.
sometimes the axis will be set to say Y and X will jog. when you see this behavior all you need to do is flip the switch to one of
the other axises and back and it will jog on the proper axis. this usually happens after homing. the problem is i haven't been able to
successfully recreate the problem on demand so i cant tell whats wrong. if i were to guess i think it looses its way and doesn't look at the switch again if that makes sense. i am going to attach my screen load script please look at my switches and see if there is a problem. also i need to have an off position for the axis rotary switch and am not sure how to program that so when all switches are off mpg is off and no jog or the arrow buttons are active either would work for my setup.
thank you

Pages: 1 2 3 4 »