Retrofit Gloria Europa 2/40 machining centre

More
21 Jun 2016 17:06 #76357 by backtime
The only possibility is that i have problems with the connection, i have to disconnect all cards and I/O ports and test with only 24V vfield.

This is dmesg output
[  456.294834] hm2: loading Mesa HostMot2 driver version 0.15
[  456.295935] hm2_pci: loading Mesa AnyIO HostMot2 driver version 0.7
[  456.296036] hm2_pci: discovered 5i25 at 0000:02:00.0
[  456.296436] hm2/hm2_5i25.0: Smart Serial Firmware Version 43
[  456.298740] hm2/hm2_5i25.0: 34 I/O Pins used:
[  456.298742] hm2/hm2_5i25.0:     IO Pin 000 (P3-01): IOPort
[  456.298744] hm2/hm2_5i25.0:     IO Pin 001 (P3-14): IOPort
[  456.298745] hm2/hm2_5i25.0:     IO Pin 002 (P3-02): IOPort
[  456.298747] hm2/hm2_5i25.0:     IO Pin 003 (P3-15): IOPort
[  456.298748] hm2/hm2_5i25.0:     IO Pin 004 (P3-03): IOPort
[  456.298749] hm2/hm2_5i25.0:     IO Pin 005 (P3-16): IOPort
[  456.298751] hm2/hm2_5i25.0:     IO Pin 006 (P3-04): IOPort
[  456.298753] hm2/hm2_5i25.0:     IO Pin 007 (P3-17): Muxed Encoder Select #0, pin Mux Select 0 (Output)
[  456.298755] hm2/hm2_5i25.0:     IO Pin 008 (P3-05): Muxed Encoder #0, pin Muxed A (Input)
[  456.298756] hm2/hm2_5i25.0:     IO Pin 009 (P3-06): Muxed Encoder #0, pin Muxed B (Input)
[  456.298758] hm2/hm2_5i25.0:     IO Pin 010 (P3-07): Muxed Encoder #0, pin Muxed Index (Input)
[  456.298760] hm2/hm2_5i25.0:     IO Pin 011 (P3-08): Muxed Encoder #1, pin Muxed A (Input)
[  456.298762] hm2/hm2_5i25.0:     IO Pin 012 (P3-09): Muxed Encoder #1, pin Muxed B (Input)
[  456.298763] hm2/hm2_5i25.0:     IO Pin 013 (P3-10): Muxed Encoder #1, pin Muxed Index (Input)
[  456.298765] hm2/hm2_5i25.0:     IO Pin 014 (P3-11): Muxed Encoder #2, pin Muxed A (Input)
[  456.298766] hm2/hm2_5i25.0:     IO Pin 015 (P3-12): Muxed Encoder #2, pin Muxed B (Input)
[  456.298768] hm2/hm2_5i25.0:     IO Pin 016 (P3-13): Muxed Encoder #2, pin Muxed Index (Input)
[  456.298770] hm2/hm2_5i25.0:     IO Pin 017 (P2-01): StepGen #0, pin Direction (Output)
[  456.298772] hm2/hm2_5i25.0:     IO Pin 018 (P2-14): StepGen #0, pin Step (Output)
[  456.298773] hm2/hm2_5i25.0:     IO Pin 019 (P2-02): StepGen #1, pin Direction (Output)
[  456.298775] hm2/hm2_5i25.0:     IO Pin 020 (P2-15): StepGen #1, pin Step (Output)
[  456.298777] hm2/hm2_5i25.0:     IO Pin 021 (P2-03): StepGen #2, pin Direction (Output)
[  456.298778] hm2/hm2_5i25.0:     IO Pin 022 (P2-16): StepGen #2, pin Step (Output)
[  456.298780] hm2/hm2_5i25.0:     IO Pin 023 (P2-04): StepGen #3, pin Direction (Output)
[  456.298781] hm2/hm2_5i25.0:     IO Pin 024 (P2-17): StepGen #3, pin Step (Output)
[  456.298783] hm2/hm2_5i25.0:     IO Pin 025 (P2-05): StepGen #4, pin Direction (Output)
[  456.298785] hm2/hm2_5i25.0:     IO Pin 026 (P2-06): StepGen #4, pin Step (Output)
[  456.298786] hm2/hm2_5i25.0:     IO Pin 027 (P2-07): IOPort
[  456.298787] hm2/hm2_5i25.0:     IO Pin 028 (P2-08): IOPort
[  456.298789] hm2/hm2_5i25.0:     IO Pin 029 (P2-09): IOPort
[  456.298790] hm2/hm2_5i25.0:     IO Pin 030 (P2-10): IOPort
[  456.298791] hm2/hm2_5i25.0:     IO Pin 031 (P2-11): IOPort
[  456.298793] hm2/hm2_5i25.0:     IO Pin 032 (P2-12): IOPort
[  456.298794] hm2/hm2_5i25.0:     IO Pin 033 (P2-13): IOPort
[  456.298825] hm2/hm2_5i25.0: registered
[  456.298826] hm2_5i25.0: initialized AnyIO board at 0000:02:00.0

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

More
21 Jun 2016 17:16 #76359 by andypugh
It seems that smart-serial is not working on either card. Is VIN connected to both?
What is your hm2_pci config string?

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

More
21 Jun 2016 17:41 - 21 Jun 2016 17:41 #76362 by PCW
For the sserial interfaces to work, you need

1. Correct firmware that matches the daughter card(s) (you appear to have firmware for a 7I77 on P3 (DB25) and a 7I76 onP2 (header)
2. Field,VIN and 5V power to the daughtercards ( both daughtercards W1s should be in the left hand positions
and the two yellow LEDs on the top edge of the daughter card should be illuminated)
Last edit: 21 Jun 2016 17:41 by PCW.

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

More
23 Jun 2016 17:23 #76506 by backtime
Thanks to all, the cause was a faulty cable connected to 7i76, today with new cable all pins load with correct names.

There is a configurations on main hal file that i think is wrong, i have this lines for X axis:
# ---closedloop stepper signals---

net x-pos-cmd    <= axis.0.motor-pos-cmd
net x-vel-cmd    <= axis.0.joint-vel-cmd
net x-output     <= hm2_5i25.0.stepgen.00.velocity-cmd
net x-pos-fb     <= hm2_5i25.0.stepgen.00.position-fb
net x-pos-fb     => axis.0.motor-pos-fb
net x-enable     <= axis.0.amp-enable-out
net x-enable     => hm2_5i25.0.stepgen.00.enable

# ---Encoder feedback signals/setup---

setp    hm2_5i25.0.encoder.00.counter-mode 0
setp    hm2_5i25.0.encoder.00.filter 1
setp    hm2_5i25.0.encoder.00.index-invert 0
setp    hm2_5i25.0.encoder.00.index-mask 0
setp    hm2_5i25.0.encoder.00.index-mask-invert 0
setp    hm2_5i25.0.encoder.00.scale  [AXIS_0]ENCODER_SCALE

net x-pos-fb                              <=  hm2_5i25.0.encoder.00.position
net x-vel-fb                              <=  hm2_5i25.0.encoder.00.velocity
net x-pos-fb                              =>  axis.0.motor-pos-fb
net x-index-enable    axis.0.index-enable <=  hm2_5i25.0.encoder.00.index-enable
net x-pos-rawcounts                       <=  hm2_5i25.0.encoder.00.rawcounts

The x-pos-fb signal cannot be connected to hm2_5i25.0.stepgen.00.position-fb and to hm2_5i25.0.encoder.00.position.
The first is for stepper motor without erncoder. I have servo motor with encoder, the driver input signal is step and dir.
I can connect x-pos-fb to hm2_5i25.0.encoder.00.position and remove the first line is correct?

Another question is about PID, the main HAL load PID module but using step and dir signals can I remove it and all related configuration or not?

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

More
23 Jun 2016 17:33 #76507 by andypugh

The x-pos-fb signal cannot be connected to hm2_5i25.0.stepgen.00.position-fb and to hm2_5i25.0.encoder.00.position.
The first is for stepper motor without erncoder. I have servo motor with encoder, the driver input signal is step and dir.


If the encoder goes back to LinuxCNC then it does seem to be the one to use.

Where is the position control loop?

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

More
23 Jun 2016 21:17 #76516 by backtime

Where is the position control loop?

Motor encoder is connected to driver, then the driver have a "virtual encoder programmable output"
connected to mesa card. So i can use this output to driver motor position feedback.

For the PID i don't understand if it is required driving motor with step and dir signals, i think
i can do without, tomorrow I'll try to comment PID module and settings and make some test.

Thank you Andy.

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

More
23 Jun 2016 21:26 - 23 Jun 2016 21:27 #76517 by PCW
You can use PID for the stepgen with or without encoder feedback

if you have encoder feedback you connect

x-pos-fb to hm2_5i25.0.encoder.00.position

if you have a open loop step system you connect

x-pos-fb to hm2_5i25.0.stepgen.00.position-fb

tuning will be different in the 2 cases but the basic PID/hal file structure remains the same
Last edit: 23 Jun 2016 21:27 by PCW.

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

More
23 Jun 2016 21:47 #76519 by backtime
This is exactly what I do not understand, I thought that the use of PID requires a feedback system for pin pid.N.feedback.
Without feedback what is the advantage of PID?

For example it the case of simple systems with stepper motors without encoder what use would have the PID?

Thanks for your time.

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

More
23 Jun 2016 23:19 - 23 Jun 2016 23:20 #76522 by PCW
hm2_5i25.0.stepgen.00.position-fb is the PID feedback in the step/dir case.

LinuxCNC step generators _always_ have feedback, you can use the built in feedback
by using the stepgen in position mode (its still a feedback loop, its just hidden from you in the driver)
The advantages of bringing the stepgen control loop out in the open with hal are mainly

1. The built in driver is less tolerant of host jitter

2. The PID tuning can be optimized to be more accurate than the
built in driver (with FF2 for example)

3. internal/external feedback systems are now equivalent structurally
so if you want change between encoder feedback or no encoder feedback
in a step/dir system, its trivial
Last edit: 23 Jun 2016 23:20 by PCW.
The following user(s) said Thank You: backtime

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

More
24 Jun 2016 13:09 #76550 by Todd Zuercher

This is exactly what I do not understand, I thought that the use of PID requires a feedback system for pin pid.N.feedback.
Without feedback what is the advantage of PID?

For example it the case of simple systems with stepper motors without encoder what use would have the PID?

Thanks for your time.


Linuxcnc is designed in a way that it always requires some form of position feed back. A long long time ago, a very clever person created a way to work around this for open loop stepping by making a step generator that sends a sudo position feedback back to Linuxcnc. It is this artificial position from the step-generator that is used in the PID.

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

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