Hitting spindle CW and CCW buttons don't call M3, M4, M5

If you think you've found a bug post it here.

Re: Hitting spindle CW and CCW buttons don't call M3, M4, M5

Postby A_Camera » Sat Oct 01, 2016 10:46 am

The problem is when non-programmers are giving advice about programming and they don't understand basic principles of programming.

But never mind, I really don't care. :D
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: Hitting spindle CW and CCW buttons don't call M3, M4, M5

Postby ger21 » Sat Oct 01, 2016 11:01 am

This has nothing to do with programming.
It's about how to properly control a machine tool.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: Hitting spindle CW and CCW buttons don't call M3, M4, M5

Postby A_Camera » Sat Oct 01, 2016 11:04 am

cncdrive wrote:
"In fact, it seems that no action, which normally MUST stop the spindle does actually stop it. E-Stop, hard limits or any other stop command just ignores M5 and only reset the spindle relay if such relay is defined in the configuration, so as it is now, it is pretty dangerous to use it with Modbus in my opinion. I think you should put out a warning about this because it is pretty nasty to see the spindle continuing to spin when you expect it to be stopped. As it is now, only spindles controlled by the spindle relay are stopped.


Stop and Reset and hardlimit etc. actions all stop the spindle also accidental disconnection of the motion controller stops the spindle.
The stop is done with the spindle relay off and the PWM set to it's defined inactive state or the step signal to zero frequency depending on how the spindle is configured.
The spindle signals are special kind of signals in the software (we call them hardware signals, because they are controlled directly by the motion controller with highest priority), the motion controller handles these in a special way where if a stop is requested or anything problematic happens then the configured inactive states of these signals are output by the motion controller to make sure the spindle will stop.
With modbus the software has no idea which register and what value of that register will stop your spindle, there is no configuration for that, you could freely code that many different ways for different hardwares.
Also I'm not sure how safe is that to leave the spindle stop on a modbus or any kind of serial communication, I would probably not do that and instead would use the relay signals,
because however they still depends on software, but depends only on the closest level of software piece to the device, because that part of the software runs on the motion controller microcontroller.
As far as I remember the spindle to comply the CE rules must directly disabled it by the external e-stop button with the e-stop button must have at least 2 normally closed contacts and the signal must go through on both in series so if any of the contactors will fail the circuit will still disconnect in case of an e-stop button activation. Or at least this was the rule about a year ago when I read them.
I don't know how would you comply these safety rules without using at least one physical input on the VFD instead of the modbus or a power relay discharger.
My description started getting a bit long, so I cut it short now so the most important is that I don't think leaving the spindle enable signal to depend from modbus register values is a safe way of controlling a spindle.

And I think that a solution for your suggestion can be is if you running a macro loop you could add a poll to the stop button press and if it is pressed then you could change your modbus variable which stops your spindle. Also you could check the reset button or LED state and do the same. But again I don't feel this a safe solution...


Szia Balázs, majd legközelebb írok e-mailen keresztül ha lesz időm...

OK, thanks. Yes, I know how to implement it via macro loops and yes, I know that M5 is not a safety switch or an emergency stop, that was not my point at all. I also know that hardware switch is the only 100% safe switch, but NOTHING of what I meant would violate any CE regulations or prevent ANYONE to use their machine any way they like. Apparently those people don't understand me and don't understand the basic principles of programming, yet they pretend that they do. I will stop here and let you continue the development as you like and follow the advices given by those people. I am finished giving advice, will do my testing as I have time and if people are interested they can visit my blog. Sorry that I interrupted the peace.
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: Hitting spindle CW and CCW buttons don't call M3, M4, M5

Postby A_Camera » Sat Oct 01, 2016 11:10 am

ger21 wrote:This has nothing to do with programming.
It's about how to properly control a machine tool.


NONE of what I proposed would interfere with ANY way of controlling your machine. It has indeed to do with programming, but like I said, I'll stop here.
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: Hitting spindle CW and CCW buttons don't call M3, M4, M5

Postby Robertspark » Sat Oct 01, 2016 11:32 am

A_Camera, you surprised me with that comment
Szia Balázs, majd legközelebb írok e-mailen keresztül ha lesz időm...
=
Balázs Hey, next time I'm writing via e-mail if you have time ...


Why not sound out your ideas amongst others but accept that perspective is relative to position and your viewpoint or those of others can be changed by explaining your position. If it takes a little bit longer that's fine, we all speak many languages here and we accept that it may take a little more explaining and consideration / understanding by others to try to understand your position.

"having a quiet word" in the hope of changing something is not a good idea as it is only a self serving perspective where as there are many uccnc users and hopefully with the way things are going there will be many more users

Some of the wise cracks (myself included, which I did apologise for, but equally your demands for change appeared a little self serving) are unhelpful when all we actually want is a better cut object at the end of the day.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Hitting spindle CW and CCW buttons don't call M3, M4, M5

Postby A_Camera » Sat Oct 01, 2016 11:51 am

Vmax549 wrote:Please leave teh M3/4/5 macros as they are and leave teh system buttons as they are. I understand why they are like they are and it is a very good idea.

Trying to run a VFD from the M3/4/5 macros is NOT a good method of handling things with Modbus control . Doing it that way you are leaving out a lot of control over the spindle speed. EVERY time you add something elseto teh M3/4/5 macros it slows teh responce down . As you know the macros are NOT precompiled so it takes time to spool one up.

A macro loop on the other hand runs outside teh main loop and it can monitor teh functions and apply teh needed responce directly to the modbus plugin. AND not slow down teh m3/4/5 macro responce.

THE SYSTEM works fine you just need to learn HOW to use it to your advantage.

(;-) TP

Now you are an expert on Modbus as well... :D

TP, you don't have ANY knowledge of how to handle a VFD with Modbus, you have ZERO education in programming and know VERY little about programming in general and have ZERO knowledge about me or my background, so I am honestly pretty tired of you and your "expert" advices regarding programming. I know very well what I am doing, and what I tried to get some people to see and understand. Apparently, I failed.

It is obvious that you have no clue, because you talk about my M3/M4/M5 modification slowing down the spindle reactions and the macro executions... Well, that's a joke, right? Did you know that a spindle takes a few seconds to run up to speed? To handle that, you MUST have a delay. Most users have a a fixed delay of a few seconds, during that time the M3/M4 and the G-code execution is stopped. Now, my few lines introduce a delay, that is true, but that delay is in the order of microseconds (hopefully you know the magnitude of that unit). There is a loop in my M3, that loop checks and waits for the spindle speed to be reached and the M3/M4 continues when this happens. The total delay depends on the spindle speed set, not constant. Of course, you must understand first, or at least have an open mind to see any benefits...

Anyway, YOU are the one who don't understand programming. I have my 40 years in my bag... many of that with safety critical systems, and 15 of those 40 in time critical firmware programming and about 10 of those with actually serial protocols, Modbus was one of them, so I am pretty confident in my position and know exactly what is possible and what is not, or what I am doing and why, as well as what can be done WITHOUT interfering with anybody's preference or with any other way (including how it is today) of doing it.

BTW, did you provide the list of your VFDs oven on CNCZone? It would be good to know as reference... :P

Lastly, you can delete this message if you want to, or can even ban me for flaming if you feel this hurt your feelings, but I hope you read this before somebody else deletes it.
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: Hitting spindle CW and CCW buttons don't call M3, M4, M5

Postby Robertspark » Sat Oct 01, 2016 11:52 am

I remember having a very interesting idea which I'd taken some time to implement as a good idea.... I posted about it in a discussion on the Mach3 forum and at first I was given The "it won't work" short answer .... "its a bad idea" (it was to do with plasma torch height control).... after the initial short shift answers in what was a very fast moving thread I did not have the time to explain and it moved on.... a week or so went by and I got a second opportunity to question.... this time the Mach3 users took the time to explain to me why.... and it took a few goes ... but I got it loud and clear and I'll never forget it (that was TP + Beefy and a few of the others still over on the mach forum).

I am always ready to learn and be guided, and I'll usually open up by explaining what my viewpoint is politely and do accept that I'm here to learn (professionally I hold a masters degree and am the top of my game I cannot earn any more in my field or be promoted any higher and am very highly paid and work as a consulting engineer, I wish I could do cnc full time, but could not accept the pay cut... ). Just please take the time to understand that some of these guys may have been doing this a lifetime and may have even taught others many many times and gleen from that what you can. If you have what looks like a good idea, talk about it accept that you'll be advised either way, but that won't stop you doing whatever you want just give you every angle.

If I stop learning stuff I loose interest and move on (that's probably why I'm on here so much)

I guess the point is .... not everything is a bug .... and quite a few posts about uccnc start that way.... instead of opening up with "I've found this..... is it suppose to work this way?" ... would it not work better this way?

Tin hat and sandbags at the ready
http://i.dailymail.co.uk/i/pix/2012/11/01/article-2226235-15CB16A9000005DC-512_964x643.jpg
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Hitting spindle CW and CCW buttons don't call M3, M4, M5

Postby A_Camera » Sat Oct 01, 2016 11:54 am

Robertspark wrote:A_Camera, you surprised me with that comment
Szia Balázs, majd legközelebb írok e-mailen keresztül ha lesz időm...
=
Balázs Hey, next time I'm writing via e-mail if you have time ...


Actually, your interpretation is wrong... but never mind. :D
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: Hitting spindle CW and CCW buttons don't call M3, M4, M5

Postby Derek » Sat Oct 01, 2016 3:59 pm

Anyway, YOU are the one who don't understand programming. I have my 40 years in my bag


Then why are you here asking questions.

Maybe it's a language barrier but you sound like you should stay over at CNC Zone where they appreciate this kind of drama.
Derek
 
Posts: 341
Joined: Mon Sep 05, 2016 9:57 am

Previous

Return to Report a bug

Who is online

Users browsing this forum: No registered users and 18 guests