Encoder Pins linked to LCNC

More
7 years 7 months ago #129143 by pl7i92
Replied by pl7i92 on topic Encoder Pins linked to LCNC
you may give the infos of this reread also THE Base Controller
so Users dont ned to find out on backsides what hardware you are using

most pins are OUT state

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

More
7 years 7 months ago #129150 by andypugh
Replied by andypugh on topic Encoder Pins linked to LCNC
First check if you see any changes in the in-a, in-b and in-c pins. Those should pulse as the encoder rotates.

If those are changing then the count should change too.

I don't know anything at all about EtherCAT, though, so can't help with the specifics.

How are you monitoring the pins? With Halmeter?

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

More
7 years 7 months ago #129432 by CORBETT
Replied by CORBETT on topic Encoder Pins linked to LCNC
Yeah, the more that I think about it the more that I believe there is a parameter that needs to be set in the Beckhoff module. I am starting to think that it needs to be setup or re-set in the Beckhoff Twin-CAT software. I don't see any change in the A or B channel output or anything changing on any of the other pins. I know the module can have several modes, and I think they may be set wrong and not outputting when looking at them in LCNC. I may jump over to the "EtherCAT HAL driver" thread and see if anyone there has set one up or is familiar with this specific module.

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

More
7 years 6 months ago #132062 by CORBETT
Replied by CORBETT on topic Encoder Pins linked to LCNC
Ok, here is a update and my current problem.

I knew that something was up with the Beckhoff EL5151's as it has to be a parameter or something setup in Beckhofff TwinCAT.

I have a test setup in the house that is identical to the unit that is installed in my Hurco out in the shop. I have been using a Beckhoff CX computer tied to the EK1100 & Slave's. These particular units are PC104 type motherboards and therefore do not have a PCI or PCIe slot, so I decided to go pull one of our office computers (Dell OptiPlex 9020) and added a DB25 PCIe card. Then found a older CNC4PC C10 breakout board that we had on the shelf and hooked the existing 5v encoders to the inputs. Then re-worked the HAL code to use hal_parport for the encoder inputs and finally have the encoders showing up and working. Then after a bit of trial and error, have gotten the SCALE really close. I put a dial indicator in the spindle and when moving the Y ballscrew 0.10" manually by hand, I was getting 0.1002 on the Axis GUI readout. Then did the same process with Z to get it SCALED, as I can easily get to the Y & Z ballscrews and move them by hand with amp shunted. X is not as quick to get to, but have it scaled.

Also, I have gotten everything else hooked up and working correctly through EtherCAT. The proximity switches are tied in, the spindle is fully working in forward and reverse plus brake. Also re-built the pendant and have the pushbuttons working. Plus have the analog outputs from the EL4132's hooked to the Servomate Amp. Before I had gotten the encoders working through the breakout board, I wrote some wacky HAL code using sim.encoders to at least check if each axis was moving in the correct direction. I had the proximity switches tied in and working, plus my E-stop is tied in both to LCNC and directly to the controller to shunt the servomate amp if anything went wrong. Everything did move in the correct directions, but was drifting when the amp was enabled. I thought that it was something wrong with my HAL code and brushed it off at the time.

Well now I have the encoders working and since they work, I can see that when I enable the machine all three encoders start moving in one direction. I kept thinking I had something wrong in the HAL code, but then I decided to remove the signal wires from the amp and when I enabled the amp it drifted the same way as before.

SO my problem and question is do I need to adjust the amp and stop the drift, or do I get the HAL code correct by closing the loop and let LCNC control the drift? I have read conflicting things on the net and not quite sure what is the correct path. I would assume the amps are tuned fine as everything was working ok until my OEM Hurco computer went out.

If the amp needs adjusting, my future question is does anyone know what POT that I need to adjust to stop the drift. Each board has 6 pots on it. (CLM, GAN, BAL, TAC, AUX, SIG), which I believe is CLM - current limit, GAN - gain adjustment, BAL - balance for -10/+10, TAC - tach feedback, AUX - auxilary???, and SIG - signal. Everywhere I looked on the net shows a process for tuning the amps, but I believe I had seen somewhere that you back off on the gain to stop drift, but I am not sure.

I wanted to ask here before just messing with the POT's as I know it is easy to screw the tuning up. Plus I know my HAL code is most likely off as I not completely sure the pid part is correct, but wanted to find out which direction is the proper way to go from here.

Thanks,
Robert

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

More
7 years 6 months ago #132082 by tommylight
Replied by tommylight on topic Encoder Pins linked to LCNC
Adjusting the drives should be avoided, they are supposed to drift slowly when no input is present.
Have to read the rest of the thread as i read everything and i do not want to mess something.
Linuxcnc when properly set and enabled, no drift should occur and if you try to move the motors manually they should resist vigorously.
The following user(s) said Thank You: CORBETT

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

More
7 years 6 months ago #132159 by CORBETT
Replied by CORBETT on topic Encoder Pins linked to LCNC
Tommy,

Thanks for responding so quick. I was thinking that it should be done with LCNC at this point, but wanted to make sure as I had seen a different post that had me second guessing myself.

Originally, I was reading some older info I saved years ago from Jon Elson, and he had stated servo drift would happen and that when the loop was closed in EMC that it would control the drift.... but I had read part of John Thornton's tuning page and one of the first things was to stop the drift, which made me second guess everything. In other words, I was starting think that the amps needed re-tuning to the Beckhoff hardware, but that didn't make sense as it's -10/+10 voltage which is nothing special between hardware, so therefore I was positive that the amps were ok and I was simply wrong on my HAL code and not closing the loop. I am not totally verse in all of the PID code and linking everything together, so that is why I am second guessing things and needed confirmation of which route to take. I definitely did not want to mess up the tuning since they were fine before. I feel that I am close on the code and hope I can get it figured out soon.

Once again, thanks for taking part of your time to help point me in the correct direction as it is easy to waste time on dead ends…. It is much appreciated.

Thanks,
Robert

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

Time to create page: 0.337 seconds
Powered by Kunena Forum