Hi to all -
Andy, I believe the basic lathe 'works' - I have not connected the controller to the lathe in initial tests since I am not sure what will happen and I do not want to damage hardware - also the lathe is in the workshop while it is more convenient to work on this stuff in the electronics lab..
However, I have test switches etc set up to simulate the lathe, ie, limit switches, etc.
I also use an oscilloscope to monitor all stepgens and control signals.
Stepgens all generate step/dir signal, AXIS jog via AXIS UI and mouse works, etc.
NONE of my user control panel controls have any effect ( bar a few switches...)
The MESA cards are all functional, 7i73 LED flashes on/off green, all OK.
I ran pncconf with advanced mode enabled.
On the 7i73 :
I have 4 buttons for jogging X+, X-, Z+, Z-
So selected EXTERNAL BUTTON JOGGING
I have 4 Encoders, X Axis jog, Y Axis Jog, Spindle speed override, and the forth intended for the Live Tool ( milling spindle) speed override - that feature does not exist in lathe config in LinuxCNC, so ignore for now.
I also have a 4 position rotary switch to select jog movement step size.
So , in EXTERNAL MPG JOGGIING with SELECTABLE INCREMENTS
I set a,b,c and D values.
in EXTERNAL FEED OVERRIDE I selected USE MPG
in SPINDLE OVERIDE I selected USE MPG.
Then in the MESA Card Setup Page I selected I/O pins and allocated functions as per my system wiring.
Each axis has a separate HOME button, via 7i76 inputs 28,29,30
An E_STOP input on 7i76 input 27.
Limit switches on 7i76 inputs 16,17,18,19
There are a few more switches similarly wired - Spindle FWD, Spindle ON/OFF, etc ..
ALL of the above I/O shows intended functionality in HAL_Show - the brown/yellow indictor toggles with each switch toggle.
All Encoder counters count up/down correctly.
However, bar the Spindle Speed override encoder , Estop, spindle FWD,
NONE of the other controls have any effect in LinuxCNC. No jogging with manual buttons, or with jog wheels, etc
Spindle Speed override encoder DOES change the Spindle Speed % indicator
Spindle FWD turns on spindle ( but does not turn spindle off when deselected..)
Estop shows ESTOP when active.
No other controls work.
I do suspect that jog does not work because L_CNC is expecting some sort of Axis select input to indicate which axis to jog ( from my limited understanding of the HAL file), but I thought that was taken care of when I selected EXTERNAL MPG JOGGING...ie, no specific axis select needed?
I know the jog wheels work, Hal_Show sees them all, etc.
As I am green in HAL's language, and have a lot to learn, it is difficult to know what all the terms mean and how they link.
Unfortunately, Andy's post of :
A general point: Don't think of HAL as a programming language. It's a network definition. It is only parsed once, and is used to link the HAL component inputs and outputs together.
net signal1 out_pin_1 in_pin_1
net signal1 in_pin_6 in_pin5
net signal1 in_pin2
net signal1 in_pin_3 in_pin_4 in_pin_7
Is still meaningless at this stage!!
There are some functions that I wish to implement that appear to not be catered for in pncconf -
Anything to do with a C_Axis, obviously...An external switch to turn on/off coolant, a switch to select FWD or REV for spindle
direction and an ON/OFF switch for spindle on/off, etc - I am not too concerned about all that now - that can worry me once I understand HAL better..and Components...
But something I thought to be 'simple' - jogging with encoders - certainly is not!
My lack of ability with HAL also makes it very confusing when viewing the HAL file trying to find only those elements that refer to, say, X Axis jogging - the
references to anything 'X Jog' are all over the place and not intuitive at all! So I am battling..
There are :
# --- JOG-X-POS ---
net jog-x-pos <= hm2_7i92.0.7i73.0.1.input-20
net jog-x-pos halui.axis.x.plus
net jog-selected-pos halui.axis.selected.plus
net jog-speed halui.axis.jog-speed
# ---jog button signals---
sets jog-speed 1.000000
net x-jog-count <= hm2_7i92.0.7i73.0.1.enc0.count
# ---mpg signals---
setp axis.x.jog-vel-mode 0
net x-jog-enable => axis.x.jog-enable
net x-jog-count => axis.x.jog-counts
net selected-jog-incr => axis.x.jog-scale
sets x-jog-enable true
# connect selectable mpg jog increments
net jog-incr-a => jogincr.sel0
net jog-incr-b => jogincr.sel1
net jog-incr-c => jogincr.sel2
net jog-incr-d => jogincr.sel3
net selected-jog-incr <= jogincr.out-f
And this poor fool is lost!
It would be so nice to have a simple HAL file with
JUST a single jog wheel driving the X axis, showing each HAL syntax line with explanation of allocation, what each line does, etc!
Not contaminated with all the other stuff - stepgens and PID's, etc..
I have attached HAL and ini files.
However, I need some guidance in forum etiquette here -
I don't think this thread is the place to be discussing HAL and integration issues since it is a show and tell thread - Should I move this elsewhere, or can a moderator do so?
Also, I am obtaining assistance in the process, via emails, from some boffins in South Africa ( our neighbour) , familiar to Henk who joined in earlier, and I don't want to tread on toes and double efforts put in by all those so willing to help me. I feel that any discourse could be useful to those in a similar situation to me, trying to learn, and so any resolution, idea or solution would be useful in posting regardless of source. I realise people may be annoyed when providing help while the recipient sneaks behind obtaining help elsewhere as well, and since its a small, connected world, such behaviour is soon known! So, please tell mw to buzz off if I am annoying you!
Regards
Joe