Screwcutting

More
08 Jun 2009 17:06 #398 by BigJohnT
Replied by BigJohnT on topic Re:Screwcutting
You need to remove the line "setp encoder.0.counter-mode 1" that is an error in the manual and I will correct it this evening.

John

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

More
09 Jun 2009 14:41 #403 by welderfabrod
Replied by welderfabrod on topic Re:Screwcutting
John when you say "setp encoder.0.counter-mode 1" should'nt be there I'm not sure what you mean as this was included by stepconf and not myself. Also acondit on the cnczone has posted his hal file for his spindle sensor which is the same as mine i.e. 1 index slot and 100 counter slots and he has this line in there. But I will # it out to see if it makes any difference. If it does'nt I'll have a go with his and see what happens. As soon as I can get out to the workshop. It would be nice to know why stepconf is unable create a suitable hal file though. Unless I'm doing something really dumb. (would'nt be the first time.)

Rod

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

More
09 Jun 2009 16:03 #404 by BigJohnT
Replied by BigJohnT on topic Re:Screwcutting
One of the developers spotted that in my example. Counter mode is by default 0 so you just don't need that line. Counter mode = 1 means that you take one signal in on phase A only and use the velocity out for something.

John

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

More
09 Jun 2009 22:51 - 09 Jun 2009 22:57 #412 by acondit
Replied by acondit on topic Re:Screwcutting
John,

On my machine I am only running Channel A and Index, so if Rod is using CH A and CH B, his setup would be different than mine. My understanding of the mode bit was that it controlled whether you were running x4 (quadrature mode) or x1 (single count mode). Is that not correct?

Alan
Last edit: 09 Jun 2009 22:57 by acondit. Reason: Additional question

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

More
10 Jun 2009 15:06 #414 by BigJohnT
Replied by BigJohnT on topic Re:Screwcutting
Alan,

Just reading the docs I'm not exactly sure what the difference is between encoder.n.x4 0 and encoder.n.counter-mode 1... but I bet there is some difference :)


This is from the docs.
encoder.N.counter-mode bit rw


Enables counter mode. When true, the counter counts each rising edge of the phase-A input, ignoring the value on phase-B. This is useful for counting the output of a single channel (non-quadrature) sensor. When false (the default), it counts in quadrature mode.


encoder.N.x4-mode bit rw


Enables times-4 mode. When true (the default), the counter counts each edge of the quadrature waveform (four counts per full cycle). When false, it only counts once per full cycle. In counter-mode, this parameter is ignored.

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

More
10 Jun 2009 20:10 #416 by acondit
Replied by acondit on topic Re:Screwcutting
I asked Rod on CNCZone what he is using. Like me, he is only using CH A plus Index so it would seem that he does need that line in his ".hal" file. I guess it would have been clearer, if he had commented out or deleted the CH B connection in his hal file.

Alan

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

More
10 Jun 2009 20:39 - 10 Jun 2009 20:40 #417 by acondit
Replied by acondit on topic Re:Screwcutting
BigJohnT wrote:

Alan,

Just reading the docs I'm not exactly sure what the difference is between encoder.n.x4 0 and encoder.n.counter-mode 1... but I bet there is some difference :)


This is from the docs.
encoder.N.counter-mode bit rw


Enables counter mode. When true, the counter counts each rising edge of the phase-A input, ignoring the value on phase-B. This is useful for counting the output of a single channel (non-quadrature) sensor. When false (the default), it counts in quadrature mode.


encoder.N.x4-mode bit rw


Enables times-4 mode. When true (the default), the counter counts each edge of the quadrature waveform (four counts per full cycle). When false, it only counts once per full cycle. In counter-mode, this parameter is ignored.


John,

I searched through the 2.3 versions of the EMC2_User_Manual, the EMC2_Integrator_Manual, and the Hal_User_Manual but didn't find the info on setting the modes. Where did you find those?

Alan
Last edit: 10 Jun 2009 20:40 by acondit. Reason: correct manual name

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

More
11 Jun 2009 10:45 #419 by alex_joni
Replied by alex_joni on topic Re:Screwcutting
acondit wrote:

Where did you find those?


man encoder

or online: www.linuxcnc.org/docview/html//man/man9/encoder.9.html

Regards,
Alex

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

More
11 Jun 2009 11:47 #420 by BigJohnT
Replied by BigJohnT on topic Re:Screwcutting
Alan,

As Alex mentions the man pages and the online html docs are the best place to find info on the components. Many of the more complicated ones including encoder are also detailed in the Integrators Manual in the HAL section under the Internal Components subsection.

My quote was from the html docs.


Regards
John

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

More
11 Jun 2009 17:33 #421 by welderfabrod
Replied by welderfabrod on topic Re:Screwcutting
Alan I did comment out the line that refers to phase B but it made no difference. But I ran stepconf again and removed phase A and index from the parallel port set up
to remove the spindle control from the hal file I then typed your hal file into the custom.hal file. When I tried the G33 again in MDI I no longer got the spindle not turning message. A great step forward. However I still got no motion I then remembered that one of the developers had suggested that G33 may need an M03 whether I needed it or not so I wrote a short programme without M03 at first no motion I then added M03 hey presto syncronized motion. But it was strange motion in the sense that it would travel the -Z distance I think it was twice ( I'll check this again tomorrow). Although it does'nt say so in the manual is G33 intended for rigid taping i.e it would travel the -Z distance reverse the spindle and come back out, which it can't do on my lathe as I have no reverse facility and nothing in the hal file to control this so therefore it just switches the spindle back on again and moves the crossslide forward the -Z distance again. I maybe barking up the wrong tree here but if I don't ask I won't know. I'm just really chuffed that I'm getting somewhere now and I at least know that the lathe is OK. Tomorrow I'll do a G76 and see if that works. The other thing I'm going to try is to get a rev counter up on the AXIS screen as I know that the EMCO rev counter that I still use is not that accurate it can be out anything between 50 to 100 revs, I've checked this with a rev counter. I'll let you know if the G76 works OK. Thanks for all your help and patience Guy's.

Rod.

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

Time to create page: 0.100 seconds
Powered by Kunena Forum