Hello Guest it is April 18, 2024, 08:46:15 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 - Mortenx

Pages: 1
1
General Mach Discussion / Live counter Brain
« on: January 10, 2022, 01:38:02 PM »
Hi,

I have made a serial-modbus live counter in the macropump code, it reads an external frame counter in an inverter and after a time compare the old and new values, and if equal it triggers an estop and tell modbus com fail, it works, or I believed it did... I have used it for a month and had to extend the time to 1.5 sec. otherwise it would sometime trigger estop in strange situations. this weekend i ran a gcode and had to use "run from here" and when it popup with the preoperational move it triggers my code? If I view the brain where I read the framecounter from, I can see the brain stops reading data when I use "run from here".

So I would like to make a brain that reads the modbus frame value, saves it, a timer and then compare values, and if equal values then trigger an estop. Then it should not trigger when starting "run from here".

I have tried and tried but without luck... Can anybody share a little light on how to make a brain that: read a value, timer, read new value, compare A=B

any help is appreciated.

Regards Morten

2
General Mach Discussion / Mach3 macro homing
« on: June 10, 2021, 09:40:45 AM »
Hi,

I have a lathe with a C-axis that is engaged with an electrical clutch to the spindle that works very well, I have a macro that enables the clutch and it works fine, then I have an other macro that also homes the C-axis that also works fine, the use of this is when I do more operations that have normal turning in between c-axis operations and these operations needs to be angled to each other. Every time a program calls my macro with homing and it's done I have to press cycle start to continue? guess it has something to do with the homing. My macros are like this:

with auto homing:

While IsMoving()
Wend
DoSpinStop()
While GetOEMled(1000)
Wend
If getoemled(164) Or getoemled(165) Then

Else

ActivateSignal(OUTPUT4)
Sleep(300)
   If GetOEMLED(845)   Then
      Code "G91 G0 C35"
      While isMoving()
      Wend
   End If
Code "G90"
DoOEMButton(1027)
While ismoving()
Wend
End If



without homing:

While IsMoving()
Wend
DoSpinStop()
While GetOEMled(1000)
Wend
If getoemled(164) Or getoemled(165) Then

Else

ActivateSignal(OUTPUT4)
Sleep(300)
End If   



Hope you can help me out, or give me a clue what to look for.

Regards Morten.

3
General Mach Discussion / Mach3turn rapid override problem
« on: February 17, 2021, 10:57:52 AM »
Hi all,

I have a problem with rapid override that's been bugging me for the last 2 weeks. I have feed override, spindle override both working perfect, but the rapid override I can't seem to get working, my lathe has a ESS controller and Mach3 v3.043.062, I have made slider for it (1-100%) and made buttons with setOEMdro 223 value 10, 50... but no change in the rapidspeed, If I move the slider the dro changes so why is it not working.

I can get this to work - made a toggle button to 227, and set dro 104 to 200, and it's sloowing the rapid down!

I have read and watched videos of other people making this, so what am I missing, any ideas, or is it mach3 that needs a reinstall?

Regards Morten

4
General Mach Discussion / Mach3 custom macro with value question
« on: December 08, 2020, 04:46:50 AM »
Hi all,

I have a lathe with 2 vfd's one for the spindle and one for a livetool, I use a custom macro M133 to activate an output that then goes via modbus to the livetool inverter, the speed for the livetool I take from the spindle DRO, as the spindle does not work while in C axis mode, I have an electrical clutch that connects a nema 34 to the C-axis - all this works just fine.

But, the spindle have a max rpm, and the livetool a higher rpm, is there anyway to say I could do something like this:

M133 P2500

that "P" value could be another rpm register, or just take that value to the M133 and set in in there?


Regards Morten

5
General Mach Discussion / Mach3turn Stop button?
« on: December 07, 2020, 10:45:01 AM »
Hi all,

I have a lathe with 2 vfds, one for the spindle and one for a livetool, they are both controlled via modbus and I have made macros for the livetool and is started with m133/m134 cw/ccw (output4/5) and stopped with m135 and working fine.

But if I start the spindle and press "Stop" it stops, but if I start the livetool and press "Stop" it just keeps running, is there anyway to add a "deactivate (output4)" in the "stop" command?

Or any other way/suggestions?

Any help is appreciated.

Regards Morten

6
General Mach Discussion / Mach3turn spindle and c-axis macro
« on: September 01, 2020, 08:56:26 AM »
Hi,

Been reading a lot on this forum and always found help to my problems, but this time I can't so I hope for some help - just registred, thanks.

I have build a new cnc machine - a lathe with atc and c-axis, the spindle motor is always connected to the spindle, and I have an electric clutch to engage a nema 34 motor, everything works I can pull output3 and the clutch engage, so I have made a button to enable C-axis that stops the spindle (if running) short pause and enables the clutch - working. Electrical it's blocked, if I enable the clutch it removes the enable signal to the vfd so both cannot run at the same time. I have changed the m3 (and m4) macro to:

If IsActive(OUTPUT3) Then
   While IsMoving()
   Wend
   DeactivateSignal(OUTPUT3)
   Sleep(250)
   DoSpinCW()
Else
    DoSpinCW()
End if

so if the output3 is active it wait if any movement and then swith off output3, pause and spindle start... if output3 is not active it should not waste time and just start the spindle...

but it always jump to start the spindle right away, even if output3 is enabled?

hope someone can point me in the right direction.


Regards Morten

Pages: 1