Urgent help required with EMC please

More
12 Aug 2016 13:34 #78669 by sxyuklad
I inverted the home all signal, pin 13 and now Z is homing towards the right direction but now X is looking for home switch at the wrong end. So Z homing is towards the chuck and is negative which is now it is doing fine.

But the problem is X home switch is away from the chuck which means towards positive. How can I tell it to look for Z axis in negative direction and X axis towards positive direction.

Please Log in or Create an account to join the conversation.

More
12 Aug 2016 13:44 #78670 by Todd Zuercher
It might help if you posted a zip file of your config folder. To find your config files look in a folder in your home dir called "Linuxcnc", within that is a folder called "configs" within that will be a folder that contains all of your configuration files you've made for your machine. In that folder will be one or more files with a .hal file extension. Those are your Hal files, and where most of the machine configuration takes place. The other important config file is your .ini file. Most of the axis setting and homing stuff is in there

I'll start at the bottom of your questions and work up, answering what I can.

To reverse your homing direction simply change the sign of your homing velocity. (Using a text editor in your ini file look for a section that I think should be called [AXIS_2] and change the sign of the HOME_SEARCH_VEL)

Bear with me, I am a router guy, and I'm not familiar with lathe configurations, nor have I messed about with spindle PWMs. Hopefully someone else may chime in for how to set this up.

No Idea why your X doesn't home, need more info. It might be just waiting for the Z to finish its homing process???
In the Axis Machine pull down menu there are selection options for homing individual axis, instead of the Home All button on the screen.

The example line of hal code I posted could go just about anywhere in a hal file, but in your "main" hal file there is a lot of important stuff that is order dependent and needs to be first. Other wise anywhere after the last addf line is fare game, put it in a location that seems logical for you.

Latency tests, the image you posted showing latency test results, were not going to be good enough. You are going to need to try to make some adjustments to the settings of that computer to improve those numbers or try a different machine. Start by turning off any Hyperthreading in the bios, then turning off all power saving features and wait states. For a software stepping machine with a software read encoder like you are trying to set up you are going to want a very good latency score (smaller numbers in the jitter column). Probably will need to be sub 20,000 or preferably better. What hardware do you have (cpu, motherboard, video)?
The following user(s) said Thank You: sxyuklad

Please Log in or Create an account to join the conversation.

More
12 Aug 2016 14:02 #78671 by Todd Zuercher

I inverted the home all signal, pin 13 and now Z is homing towards the right direction but now X is looking for home switch at the wrong end. So Z homing is towards the chuck and is negative which is now it is doing fine.

But the problem is X home switch is away from the chuck which means towards positive. How can I tell it to look for Z axis in negative direction and X axis towards positive direction.


Inverting the home pin probably is fooling Linuxcnc into thinking the axis is already against the home switch, and it is now trying to move off of the switch.

The setting HOME_SEARCH_VEL in your ini file determines the speed AND direction of the home movement. A positive number will move in the positive direction negative in the minus direction. For your set up you need the X to be positve and the Z needs to be negative.
The following user(s) said Thank You: sxyuklad

Please Log in or Create an account to join the conversation.

More
12 Aug 2016 14:35 #78672 by Todd Zuercher
You were asking about faster help. Your best bet might be the IRC chat room.
webchat.freenode.net/?channels=%23linuxcnc
That, this forum and the Linuxcnc mailing lists are the best help resources there are for Linuxcnc.
Also internet search engines are very helpful for quickly finding answers to most questions. (Google regularly picks up stuff from here and archives of the mailing list)

Please Log in or Create an account to join the conversation.

More
13 Aug 2016 08:48 #78699 by sxyuklad
Thank you again

I will try to change the sign of the axis which is looking for home switch in the wrong direction as you explained.

Yes, I was wondering why is there always a delay timer error on l]\
my linucnc whenever I start it up. Could this latency number be a problem? I have an old but not that old PC, I do not know why it is not running the PC so smoothly. I have a pentium 4 - 2.4 Ghz with 1 GB ram and it is an Lenovo desktop. I will capture a screenshot of the specifications and upload it. Hyper threading is on in the bios and I thought it should remain on for better performance. Other than that Linuxcnc will not let me put the vcalue I have in Latency test. The max seems to be 50000 and my test was around 350000. So I think I really need some tweaking with the PC. Can you please guide what else than turning off hyper threading can I go changing? I do not have any other software installed which could slow down my PC. It is a fresh install linux system.

I also wonder this latency may have been a problem with Mach3 too, that might have been a cause I was not receiving proper index pulses and the thread timing was after a while. The more I think, the more I believe now. I am happy at least linuxcnc showed me there is problem with my PC. But I do want to switch to linuxcnc anyway now. If someone could help me to setup my full spindle control and my ATC the way it works.

I will also upload my config and hal files for you to look at.

Bilal

Please Log in or Create an account to join the conversation.

More
13 Aug 2016 09:08 #78700 by sxyuklad
Yes, that is correct. My Z axis switch is in negative direction and X is in positive,very common lathe setup. So at the moment, both switches are looking for home switch in negative so that is why Z axis properly homes while X does not.

In mach3, there is a diagnostics screen where I can see all port signals whether high or low and then I can easily decide whether I want it to be active low or active high. Is there a screen where I can monitor the pin states and I think Invert is doing the same thing here. It is basically making active high or active low, am I correct? So I have switches NC (Series connected normally connected), so I believe I may need to invert this signal. What I cant figure out in linuxcnc is, when I invert a signal is it equivalent to active low or active high? Do you have an idea?

My X axis does not move when homing, I think the problem may be that Z is not releasing the switch as you also pointed out but the only way I can know is if I can monitor pins realtime so see the states whether active or low. Thank you.

Please Log in or Create an account to join the conversation.

More
13 Aug 2016 16:20 #78714 by sxyuklad
Wow, Todd, you really helped me out at the first stage... Homing has been taken care of. I unchecked the "Invert" on the signal. So X was homing correct now the Z was going opposite direction. Then I entered - sign before velocity and it worked. Though I did not open the config files. I just used stepconf and entered the - sign in the Z axis velocity (since its home switch is in negative direction). Plus I realized I needed to change Latch option from same to opposite for both axis because they were going past the limit switch means latching in the same direction. These two fixes and all the homing is perfect now. Thank you again.

I am still not comfortable with this PC, I do not know why the Latency test is so bad like 350000. It is not that old PC. I checked it is Pentium 4, 3.0 Ghz, 1 GB RAM... I disabled most of the option is BIOS including hyper-threading. But latency number is still to big. No difference. What you suggest? Is it because I simply need better PC or there is something wrong with this PC in particular, looking at the specifications, what you suggest?

Now, the real fun and hair pulling part begins. Setting spindle, calibrating, encoder and the ATC coding and stuff. I am really looking for someone to guide me forward from here now. Can you?

Anyone please, I want to have full spindle control from Linuxcnc via vfd and plus if someone can convert my vb macro from Mach3 to Linuxcnc equivalent, that will be wonderful. Bytheway, I have Toshiba vfd so it does have Modbus-RTU but I do not have enough knowledge of Modbus so I just ran it simple 0 to 10v option. So if anyone has some time and go through the manual and tell me what I need to configure on vfd and on the linuxcnc side to have Mosbus communication that will be so wonderful and will save me at least to more parallel inputs to hook something else. I just need guidance and I am sure I will be able to handle it from there on. VFNC3M-2007PY-A30 is my vfd model.

Link to the manuals: www.motorsystem.com.br/inversor-de-frequ.../tosvert-vf-nc3m.php
Attached are the two manuals I found online. I did go through it but do not know how to communicate with Modbus though I tried. The actual manual is larger than permitted size so unfortunately cannot attach. Please visit the link. Anyone can get it filling out a simple form. Communications manual is attached though.

Thank you and awaiting for a quick solution.
Attachments:

Please Log in or Create an account to join the conversation.

More
13 Aug 2016 20:11 #78729 by Todd Zuercher
Latency will vary from motherboard model to model, some are just not well suited for real time work.

On the latency front lets start with with what version of Linux do you have installed? Did you install from the latest Linuxcnc iso?
For an older single gore processor like your P4 the latest version of the operating system may not work quite as well as some older operating systems that used to ship with Linuxcnc that were better optimized for single core cpus. Ubuntu10.04 and 8.04, however 8.04 is no longer supported by the current version of Linuxcnc, and 10.04 is end of life as far as Ubuntu is concerned.
Here is a link to some latency test scores others have gotten with certain hardware combinations.
wiki.linuxcnc.org/cgi-bin/wiki.pl?Latency-Test
Does your system have a video card, Sometimes adding or changing an inexpensive video card can make a big difference in the latency of an old P4, but don't bother trying anything by Nvidia and ATI can be hit or miss. Most newer Intel stuff works well with onboard video (chips after Cedarville)
Some other Latency tips and tricks
wiki.linuxcnc.org/cgi-bin/wiki.pl?RealTime

I have one machine still running an old P4 but it was set up a long time ago and I don't remember it's details. I have had some good luck with some newer Celeron board, they are nice because of their passive cooling. Linuxcnc doesn't need a high horsepower system, or a lot of resources, just good stable reliable timing.

Please Log in or Create an account to join the conversation.

More
13 Aug 2016 20:20 #78730 by Todd Zuercher
It could be possible that your latency is so bad that it is screwing with your PWM timing. I suggest we try to straighten that out before we worry too much about that sort of thing..
If you already had the spindle control sorted for Mach3 through the parallel port, it is probably simplest to stick with that, rather than worry about trying to configure modbus control, which I don't consider a beginner subject. (baby steps first).

Please Log in or Create an account to join the conversation.

More
14 Aug 2016 15:04 #78749 by sxyuklad
Hey Todd

Thanks again for the reply. In tried everything on the PC but latency will just jum from 20000 to 350000 like in a moment. I tried not to open any other application while running but no luck. So I believe there is definitely something wrong with the PC itself rather than the old PC issue. It is not that old you know.

I am sure it just used to ruin my pwm with Mach3 too that is why mach3 just started ruining my threads after an inch or so.

Now, I had another PC around and I setup fresh linux system onto it. It is core 2 duo, 3.0 Ghz, 3GB of RAM. I ran the latency test for like 10 minutes and opening and closing bunch of other applications while running the test. I am sharing a screenshot, please have a look and guide if that latency score will do for me the kind of setup I am trying to have? Or it is still bad?

The strange thing is, believing that my other PC had issues with latency and hence ruined my threads with Mach3, I also installed windows on this newer PC and installed Mach3 and everything but there is simply no luck, even the new PC is not that different results when it comes to threading with Mach3. So I have come to a conclusion that my older PC did have some problems but not only that, Mach3 is just not capable of keeping up with timing with single index pulse.

And yes, I downloaded the latest version ISO from Linuxcnc.org and made a bootable USB and installing the system from there. After that, I run even UPDATE MANAGER so that everything including linuxcnc is completely up to date.

So if you think this latency is good enough, IT IS TIME FOR ME TO GO AHEAD, do you not think? It started at 13k and the final score was the one I am sharing after running about 10 minutes.

It has been working fine controlling the spindle with 0 to 10v (or PWM) and relays for M03, M04 with mach3. But I was just a little curious and fond of setting it up with Modbus since it is difficult at the beginning but once hooked up, it gives less trouble and the results are very close as far as controlling the vfd goes. But anyway, for now, I am just trying to control it with PWM and relays for M03 M04 just the way it was with Mach3 till I find someone who could help me with Modbus. Another reason I was interested in Modbus was it could free up some pins or a pin for me. I have not got any input left for spindle encoder phase A. There are total 5 on a parallel port, 10 is for encoder spindle-index, 11 and 12 are two inputs for my ATC, 13 is home switches for both axis and 15 is Estop in. So I do not know how to tackle this problem because without phase A for spindle encoder, there will be no difference left between mach3 and linuxcnc other than if linuxcnc is performance is better itself, you know what I mean. So what I am thinking is just leave out Estop for now and hook up phase A for spindle instead.

Thank you and awaiting to hear from you.
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.164 seconds
Powered by Kunena Forum