Gmoccapy - A new screen for linuxcnc

More
18 Mar 2014 02:23 #44929 by newbynobi
Hallo Jim,

I checked the spindle stuff and found some "strange" behavior, but nothing should have influence to spindle at speed, as this is linuxcnc internal, we just lit the LED when the spindle is at speed, I do not control that in gmoccapy again.

But I had several complains about the spindle bar changing its direction for reverse. So I took the opportunity to rework the spindle stuff.
Gmoccapy will from 1.0.10 (just pushed) only work with absolute spindle revs, as physically rpm is an abs value and should not be negative!

I needed to introduce a rt_component in postgui hal for that purpose.

Check and keep me informed.

Norbert

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

More
18 Mar 2014 05:59 - 18 Mar 2014 06:22 #44939 by jbunch
Hi Norbert,

I did a reload and complete rebuild and I am still seeing negitive numbers.

Make clean etc.

When in MIDI mode I can set forward and reverse and I get a spindle at speed.

When in Auto mode I the spindle rotates but no spindle at speed light.

I am using the facingTOOL in NGCGUI with a surface speed of 500.

# ---setup spindle control signals---

net spindle-enable <= motion.spindle-on
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
net spindle-index-enable <=> motion.spindle-index-enable
net spindle-speed-out abs.2.in <= motion.spindle-speed-out

# *** Spindle speed control
# PWM Generator signals/setup

setp hm2_5i20.0.pwmgen.02.output-type 1
setp hm2_5i20.0.pwmgen.02.scale 0.00094
net spindle-enable hm2_5i20.0.pwmgen.02.enable <= pid.2.enable
net spindle-vel-cmd pid.2.command <= abs.2.out
net spin-pid-out pid.2.output hm2_5i20.0.pwmgen.02.value
net spindle-rpm => abs.1.in
net spindle-speed-abs <= abs.1.out

# *** spindle at speed

setp near.0.scale 1.2
net spindle_speed_reqst_scaled near.0.in1 abs.6.in <= motion.spindle-speed-cmd-rps
#net spindle_speed_reqst_pos near.0.in1 <= abs.6.out
net spindle_ena_spindle_spd and2.12.in1 <= near.0.out
net spindle_for_rev and2.12.in0 and2.3.in1 <= or2.5.out


Jim
Last edit: 18 Mar 2014 06:22 by jbunch.

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

More
18 Mar 2014 23:33 #44953 by newbynobi
Hallo Jim,

where are the negative numbers? In the feedback bar? If so, this has influence also on the rest of the display, but not on the spindle_at_speed led. You must feed the spindle feedback bar with an absolut value.

Unfortunately your "hal snipped" of your post does not see all connections, as some abs are not connected and some signals seemed to be created on other parts.

Norbert

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

More
18 Mar 2014 23:35 #44954 by newbynobi
gmoccapy 1.0.2

please update!!!!

- solved a bug in getting active gcodes, because I took also the first
element of linuxcnc.stat.gcodes, but that seems not to be a gcode, but
some kind of control number or something like that, so it causes wrong
code and changed gmoccapy behavior in an erroneous way, may also
result in wrong parts!
- In this bug finding I also needed to change the gladevcp widget combiDRO
to get the correct results

Sorry this was my bug!

Norbert

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

More
19 Mar 2014 03:55 - 19 Mar 2014 03:56 #44960 by jbunch
Hi Norbert,

I have changed some outputs using abs.

I now get positive in both forward and reverse on the readout SXXX.

The bar below still gives me a negitive in reverse and a positive in forward.

What parameter are you looking at for the bar?

This all worked prior to update to 1.x.x

I get at speed light in MDI mode in forward and reverse.

When I run aprogram I do not get spindle at speed anymore.
I also get no axis motion. Synced spindle motion.

Somthing has changed as of 1.x.x.


Jim
Last edit: 19 Mar 2014 03:56 by jbunch.

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

More
19 Mar 2014 05:28 #44964 by newbynobi
Halo Jim,

I do not understand that.

The bar should be connected to spindle-rpm as abs value.
The LED ist just a led, it has no connection to gmoccapy internals and should be connected to spindle-at-speed.

Yes, there has been some chsnges from 0.9.9 to 1.0, as that was the change for stand alone.
In MDI, do you enter s1000m3 and s1000m4, or do you use the buttom?

Could you post your complete config?

Norbert

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

More
19 Mar 2014 06:13 #44965 by jbunch
Norbert,

From my perspective it seems there is some underlying
support code that is now missing.

In MDI I enter s1000m03 and s1000m04.

File Attachment:

File Name: yam-lathe.hal
File Size:13 KB


File Attachment:

File Name: yam-postgui.hal
File Size:2 KB



I know this is a pain and I Thank you for your help Norbert.

Jim
Attachments:

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

More
20 Mar 2014 04:35 #44991 by newbynobi
Halo Jim,

I only had a few time to look at you hal files. They are very complicated and no optimized for the use with gmoccapy. You do use a mux to select jog rates, but you can connect directly to the coresponding gmoccapy pin. You take halui pin to connect overrides and do not connect to the offered pins. You use hal manuell toolchange, but you shouldn't.

I strongly recommend to read the hal pin part of the Wiki and try to avoid halui pin, when there are corresponding gmoccapy pin, as then gmoccapy will take care not to excecute commands not allowed, like jogging in mdi mode. This way your config would be a lot simpler.

You spindle connection is so complicated, that i do not understand how it works.
Could you support a flow diagramm?

Within the next days i will disconnect the spindle Feedback bar from taking influence to the speed label.
As mentioned, the at speed led is only an indicator and gmoccapy has no influence to lit or not, only the hal pin is responsable for that.

Please take a look at the sim spindle connections and the postgui file. I am realy wondering why it does work in mdi and not in auto. Please test with a file just containing s1000m3 and a m1, so that the program does not end imidiately.

What gmoccapy Version do you use?

Norbert

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

More
20 Mar 2014 11:44 - 20 Mar 2014 11:51 #45006 by jbunch
Hi Norbert,

I have looked at this some more. It seem s that I am able to run a program with the spindle in forward. Threading.

I am unable to run any program with the spindle in reverse. IE backtool lathe. I hope this helps.

Here is the logic for my spindle control.
I made and tested it with my logic simulator.


Jim
Attachments:
Last edit: 20 Mar 2014 11:51 by jbunch.

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

More
20 Mar 2014 15:03 #45008 by newbynobi
OK Jim,

that part is clear, but I recommend to make it as simple as possible, until we solved the problem, so the spindle part should be something like:
net spindle_is_at_speed      gmoccapy.spindle_at_speed_led  <=  motion.spindle-at-speed
net spindle_speed_actual    gmoccapy.spindle_feedback_bar  <=  scale.1.out

I cut now all reactions from gmoccapy to the feedback bar and the at speed led, so both do just indicate values and do not have any influence to gmoccapy nor gmoccapy to its values. I just pushed 1.0.2.1 for that purpose.

As far as I see, you convert to abs to early, only the last value , witch will be the feedback to the spindle bar should be absolute, all before need to be also with negative values, as the values are needed for at speed detection.

I also do not understand, how you can connect thinks like:
net sclale_speed_1 or2.1.in0 gmoccapy.jog-inc-4 <= hm2_5i20.0.gpio.049.in_not
gmoccapy.jog-inc-4 is an in pin and has to be connected to an out pin! So something like:
net speed_1    gmoccapy.jog-inc-4   <=   hm2_5i20.0.gpio.049.out.0
would look fine.

I strongly recommend to split your hal files in several files, so they are easier to read, take a own hal file for the spindle stuff, and a other for jogging etc.

As I do not have the machine to test, I would recommend to reduce to the basics first according to: spindle feedback So all abs, ors and so on are gone. If that works, you can add again all your control structures.

Norbert

P.S: If someone can send me an encoder for my lathe, I would be able to test ;-)

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

Moderators: newbynobiHansU
Time to create page: 0.191 seconds
Powered by Kunena Forum