Hello Guest it is June 24, 2021, 03:05:59 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 - linuxfan

Pages: 1
1
Mach4 General Discussion / Re: Mach4 MPG axis stop after inc steps overflow
« on: February 26, 2019, 01:19:19 PM »
One could argue it contradicts idea of mpg step mode, and yes, steps would get ingored. But it makes sense to me to stop axis when mpg is not turning, and it is the way industrial controllers work. It will follow step inc, as long as it won't violate max machine speed, if you spin it too fast, it will just let go those extra pulses. I've checked video of how vista pendant works, and how it is presented there, faster you turn the mpg, the faster axis moves, if you move it as fast as G0or faster, it will run at G0. As soon as you stop, motion stops. If you turn mpg one click, it makes almost random move every time. I am 99% sure plugin uses JOG function, so when you start rotating your mpg, it triggers jog, and it constantly calculates percentage of jog depending on how fast you turn the mpg. As you stop turning it, it releases jog, and motion stops. But correct me if I am wrong.

2
Mach4 General Discussion / Re: Mach4 MPG axis stop after inc steps overflow
« on: February 26, 2019, 12:49:21 PM »
Yes I've tried. The thing is, I saw you are using vista pendant, which has plugin doing the communication with m3/m4. And the way velocity mode works is, like you would be holding jog button down and constantly adjust jog rate % up to 100% depending on how fast you turn the wheel. This is why step overflow doesn't happen. Sadly this is not what I am trying to achieve, I would still like to have precise one encoder pulse equals set inc distance, I just want to prevent steps overflow, or steps building up.

3
Mach4 General Discussion / Re: Mach4 MPG axis stop after inc steps overflow
« on: February 26, 2019, 12:12:42 PM »
Craig, Continuous mode has effect only on how jog button behaves, and whether it excecutes one increment or drives machine as long as you hold it. It won't affect behavior of mpg.
MN300 yes, this would be nice addition. Lua function to prevent stacking up increments faster than machine can execute them is what we need.

4
Mach4 General Discussion / Re: Mach4 MPG axis stop after inc steps overflow
« on: February 25, 2019, 11:14:48 AM »
joeaverage and everybody else, thanks for quick reply. MN300 about your first solution, I have to say I admire your simplistic approach :D. Sadly I need something more robust. I touht there is a simple solution to this, as this is how industrial grade controllers work. No matter pulses left in buffer, motion will stop as mpg stops. Otherwise its a crash waiting to happen. About solution to check if mpg is still turning and stopping motion with loop script after some time span, this would work, but it would result in slugish response. What I want is almost instant response.
One solution came to my mind. One could create two registers and feed them with encoder pulses, than map registers to mpgs with MpgSetEncoderReg. This way I could constantly monitor pulserate from mpg, and as soon as it approaches maximum machine speed, I could take over and feed registers with maximum machine speed, ignoring actual encoder pulserate. As soon as encoder pulserate would drop, I could then instantly map it back. This would solve problem with overflow of steps. But I am a bit worried of overall response of mpg. I would like to have less than 60ms response, I use 25ms buffer time on pokeys, and I am worried how much of a delay plc loop would make. For now, I have other things to solve, so I will just go with ugly solution of allowing max step of  0.1mm, and as safety turn it to 0.01mm in startup script.   

Anyway, I have to say I am impressed with M4 compared to M3. I have sucesfully create acceleration ramps for pwm depending on gear lathe is, automatic gear changing with hydraulic solenoid.. The ease of adopting your screen, creating script and screen for carousel type tool changer on machinning centre.. it is absolutly great and a huge step forward compared to M3..

5
Mach4 General Discussion / Mach4 MPG axis stop after inc steps overflow
« on: February 23, 2019, 05:09:22 PM »
I am using pokeys57E to drive lathe on m4, and it works great. However I can't figure out how to achieve that axis stops after one would stop rotating MPG.
When inc steps are small, it is ok, but when 1mm per step is choosed, inc overlow happens if you turn mpg too fast. So machine wants to execute all commanded steps, and it runs even when mpg is not turned anymore. What I would like is, that when mpg encoder is not turned, motion of axis stops not matter if all steps were not executed.
I assign mpg to axes with mcMpgSetAxis on startup script, and I use fast enc. 1 and fast enc 2 on pokeys, as this is cyclic lathe.
I have looked at function mcJogIncStop and it seems it has something to do with what I want to achive, but if I put it in PLC loop script, it will stop axis right away, but steps aren't working properly, so 0.01mm inc won't actually make machine step 0.01mm etc.. Could someone advise what would be the correct approach to this?
Thanks

6
Modbus / Re: Simple tutorial on analog inputs with Arduino
« on: November 30, 2015, 12:05:37 PM »
Thank you for this really great piece of arduino code! Reading arduino pins, and sending data to mach3 is awsome feature. Can you please point me on how to send data from mach3 to arduino?
I would like to send for example X position DRO value to arduino, and then print out data on display. Can I just define variable as double, and ecquire its value like this in loop:

my_variable=regs[10];

And then in mach3 brains select data input as X DRO, and then terminate as modbus address 10, and select it as Output?
Or does this code work only one way, from arduino to mach3, and some major code correction has to be done to work other way?

Thank you,
Simon

Pages: 1