Bridgeport/Romi EZPath S Retrofit Planning

More
17 Jun 2022 18:11 #245339 by PCW
#*******************
# AXIS Z JOINT 1
#*******************

# ---PWM Generator signals/setup---

setp [HMOT](CARD0).pwmgen.01.output-type 1
setp [HMOT](CARD0).pwmgen.00.offset-mode 1 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
setp [HMOT](CARD0).pwmgen.01.scale [JOINT_1]OUTPUT_SCALE
The following user(s) said Thank You: TurboStreetCar

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

More
17 Jun 2022 18:49 #245341 by TurboStreetCar

#*******************
# AXIS Z JOINT 1
#*******************

# ---PWM Generator signals/setup---

setp [HMOT](CARD0).pwmgen.01.output-type 1
setp [HMOT](CARD0).pwmgen.00.offset-mode 1 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
setp [HMOT](CARD0).pwmgen.01.scale [JOINT_1]OUTPUT_SCALE

DOH! Would ya look at that!

Thank you! 

Sometimes i feel like after looking at this code for so long i get crosseyed!

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

More
17 Jun 2022 19:11 #245344 by TurboStreetCar
Verified, Z Axis rests at 0V!

Also switched card to 10.10.10.10 as i would like to get a wifi connection to the machine for transferring files through my home network.

Well, i think next step is to attempt a machine test when i have the needed connections ready.

I have the Yaskawa servopak connectors, so i just need to wire up the encoder and control pins to the connector and connect to the Mesa card.

I think im going to attempt to power the machine on with the control connectors unplugged from the drives and the mesa card plugged into the drives. All the accessory power should be where it needs to go in other parts of the machine, but control of the servos will be under the control of linuxcnc. I can do some testing and then power the machine off and reconnect the original control.

Looking at the diagrams, i would use all of the machine power and grounds, so i don't think i need to worry about a ground loop, or difference of ground levels as if i was using a different power supply.

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

More
25 Aug 2023 20:12 #278950 by TurboStreetCar
Hello, Ive had some time to work on this again, and ive actually successfully interfaced LinuxCNC with one of my Servo Drives and have controlled motion of a spare servo motor. Ive verified encoder functionality and turning the motor with the servo disabled, shows a change on the screen, and seems to align with the linear motion to rotation ratio.

Im working on playing with the PID tuning, and i was just curious to hear some opinions on how this seems.

Things to keep in mind, This is just a bare servo motor, its not moving any of the machine. So i know its not exactly accurate, but im just playing around trying to get the hang of how this works.

Ive attached my INI file with the configuration data, and it seems like the servo P value is up around 250, and i still have error in the "cruise" phase of the motion. Ive also attached a log from HALSCOPE.
Attachments:

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

More
01 Sep 2023 15:34 #279585 by andypugh
It's often hard to tune a bare servo motor, so I wouldn't worry about it too much yet.

To reduce error in the "cruise" you probably need to look beyond P to I and maybe the FF terms.

If the servo drives are velocity-mode then one approach is to carefully tune the FF1 term so that the actual velocity is as close to commanded as you can get, and then add just enough P to make up for any errors. LinuxCNC outputs a mathematically exact velocity command, and in an ideal world that would give perfect position control all by itself.
The following user(s) said Thank You: TurboStreetCar

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

More
03 Sep 2023 22:00 #279764 by TurboStreetCar
So good news, i figured some more things out.

Sometimes i think about things too much and totally miss important pieces of information.

I hooked up the machine drive so i could power the actual axis. I had a deadman switch for E-Stop so if anything began moving in a way i didnt like, i just let go of the button and everything loses power.

I verified my encoder scale. Which i was super happy about.

Upon moving the axis around i still had strange error in Halscope. So i played with the P gain, and the FF2, but it just didnt seem right. I had P gain up to 120 and still seemed like it was just lagging and not happy.

Then it happened, a big realization i came to was setting my output scale. I had my output scale set to "35".

I came to 35, because my Yaskawa servo drive was set to a scale of 210/Volt.

So i did 210 * 10 volts = 2100, 2100/60seconds, 35inch/sec.

However, i completely disregarded the fact that the drive only knows SPEED, and not linear motion.

SO its 210RPM/volt * 10volts, 2100RPM. 2100RPM, is equal to 661inches/min based upon the gear ratio and leadscrew pitch. 661/60seconds = 11.01 inches/second.

This was the Ah HA! that i needed. Upon setting the scale properly, the drive tracks sub 0.001 error.

I just dont know how perfect this should be so im posting images of the setup and the halscope plot.

I do see some oscilation in the "cruise phase", so i belive i need to lower my P gain, but i figured i would post it here to get some more experienced opinions.
Attachments:

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

More
04 Sep 2023 09:49 #279809 by andypugh
Do you have pid.N.command-deriv connected to joint.N.vel-cmd ?

That might be worth trying.

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

More
04 Sep 2023 11:48 #279814 by TurboStreetCar
I've seen that mentioned before. Is there a pro and con to having that in the HAL file?

Is there a reason it isn't there by default?

Does my error look acceptable? Its peak is about 0.0005 inch.

The halscope trace was made by doing a G1 X-1.0 F50 from X0.0 position.

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

More
04 Sep 2023 11:53 #279815 by andypugh
The velocity pin is marked as "debug" so possibly it is not used by default as there was a worry that it might be deleted in the future (it won't be)

Your f-error is probably OK, bearing in mind that it is a positional error _along_ the path rather than perpendicular to the path.

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

More
06 Sep 2023 01:10 #280041 by TurboStreetCar
Hmm ill have to add that to the HAL file and see what kind of difference it makes.

What do you mean by along the path, rather then perpendicular to the path?

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

Moderators: cncbasher
Time to create page: 0.234 seconds
Powered by Kunena Forum