Semi-Manual Lathe
I've tryed the .INI and .HAL codes but not everithing works so I've started this new post ( tool change has worked immediately,visualization of the spindle speed after some mods, a mult2 added )
Please Log in or Create an account to join the conversation.
unfortunately no,
I've tryed the .INI and .HAL codes but not everithing works
OK, so what doesn't work, and how does it not work?
Please Log in or Create an account to join the conversation.
in your files there is also "pyvcp_widgets.py" but Ive fuond no use of this
It mus be linked in some way?
Please Log in or Create an account to join the conversation.
the only routine that seems to do something is the drilling
That's curious. One possibility is that you still specify the default number of analogue and digital inputs, what does your "loadrt motmod" line in the hal file say?
(This probably looks like)
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES num_aio=8 num_dio=10
Note the increased number of analogue and digital pins.
You should be able to check in Halmeter if the mdi_command pins are being set high when you press a button.
You should also be able to manually launch the subroutines from the MDI tab, to check that they get found and work.
This allows you to use "enter" to register a value in the spinboxes. Otherwise the values are not seen by the system until you press the up-down arrows.in your files there is also "pyvcp_widgets.py" but Ive fuond no use of this
It mus be linked in some way?
You need to put that new version of pyvcp_widgets.py in the place of the old one on your HDD.
Please Log in or Create an account to join the conversation.
I've checked in Halmeter all the signals ,pins ecc and all seems to be ok
I've entered all the values and also moved whit the arrows,I've selected the tool and if I use turning or facing the axis makes only one movement,the go to the starting position and then nothing more.
Shurely somewhere I've make a mistake but I don't understand where
Please Log in or Create an account to join the conversation.
the axis makes only one movement,the go to the starting position and then nothing more.
The macros use feed-per-rev mode. Do you have a spindle encoder?
motion.spindle-speed-in needs to be connected and working for feed-per-rev mode
Please Log in or Create an account to join the conversation.
Probably (I'm working on the turning mode ) reading the HAL meter data the turning.ngc waits the spindle speed to be at a set value, I've a gearbox and no inverter so the exact speed needed is never reaced and the program dosn't start.
I'm studing your gcode but I don't have found a reference for well understand how it works(the most problem is about variables)
I would like to make it more simple and step by step add the value passed in the interface to find out my error
Please Log in or Create an account to join the conversation.
If you Halscope them, do they appear to be working?Yes they are connected,
Negative spindle speed might cause confusion, for example.
I didn't put any wait for spindle-at-speed in my G-code, but it might be in your HAL file.Probably (I'm working on the turning mode ) reading the HAL meter data the turning.ngc waits the spindle speed to be at a set value
Please Log in or Create an account to join the conversation.
;Turning
O<turning> sub
(axis,hide)
G18 G7
M66 E4 L00
#5 = #5399 (Finish Z )
M66 E3 L00
#1 = #5399 (Finish X)
M66 E0 L0
#2 = #5399 (metres/min surface speed)
M66 E2 L0
#3 = #5399 (Cut / Increment )
M66 E1 L0
#4 = #5399 (Feed / Pitch)
M66 E5 L0
#6 = #5399 (Radius)
M66 E6 L0
#7 = #5399 (angle)
G92 x0 z0 (store position)
g92.2
#14 = [#5211 * 2] (starting X)
#13 = #5213 (starting Z)
g92.1
G7 ; Lathe Diameter Mode
G18 ; XZ Plane
G21 ; Metric Units
G90 ; Absolute Distance
G91.1 ; but not or arcs
G96 D1500 S#2 ; Constant Surface Speed Mode
g95 F#4 ; Feed-Per-Rev Mode
m3 ;Start Spindle
g4p1 ; Wait to reach speed
;Turning
(axis,show)
/ (debug, Turning finish dia #1 start dia #14 start length #13 finish length #5)
/ m1
O100 WHILE [#14 GT [#1+#3]]
g0 X #14
#14=[#14-#3]
G1 X #14
G1 Z [#5 + #6] X[#14 + [#13 - [#5 + #6]]*TAN[#7]]
O101 IF [#6 GT 0]
G2 Z#5 X[#14 + 2 * #6 + [#13 - [#5 + #6]]*TAN[#7]] I[#6]
O101 ELSE
G1 X[#14 + #3 + [#13 - [#5 + #6]]*TAN[#7] + 0.3]
O101 ENDIF
G0 Z[#13]
O100 ENDWHILE
G0 x#1
G1 Z [#5 + #6] X[#1 + [#13 - [#5 + #6]]*TAN[#7]]
O102 IF [#6 GT 0]
G2 Z#5 X[#1 + 2 * #6 + [#13 - [#5 + #6]]*TAN[#7]] I[#6]
O102 ELSE
G1 X[#1 + #3 + [#13 - [#5 + #6]]*TAN[#7] + 0.3]
O102 ENDIF
G0 Z #13
G0 X #1 ; For touch-off
M5
O<turning> endsub
M2
Please Log in or Create an account to join the conversation.
g4p1 ; Wait to reach speed
It's a G4. Just a pause (for one second)
Please Log in or Create an account to join the conversation.