rozważania o CNC

Luty 25, 2018, 04:41:09
Witamy, Gość. Zaloguj się lub zarejestruj.

Zaloguj się podając nazwę użytkownika, hasło i długość sesji
Strony: [1]   Do dołu
  Drukuj  
Autor Wątek: EMC2: M62-65 , M67-68 - sterowanie cyfrowymi i analogowymi wyjściami z gcodu  (Przeczytany 13100 razy)
markcomp
Administrator
*****
Offline Offline

Wiadomości: 10737



WWW
« : Czerwiec 19, 2011, 11:31:12 »

M62 to M65 Output Control
http://www.linuxcnc.org/docview/html/gcode_main.html#sec:M62-to-M65


To control a digital output bit, program M- P-, where the M-word ranges from 62 to 65, and the P-word ranges from 0 to a default value of 3. If needed the the number of I/O can be increased by using the num_dio parameter when loading the motion controller. See the Integrators Manual Configuration Section EMC and HAL section for more information.

The P- word specifies the digital output number.

M62 Turn on digital output synchronized with motion
M63 Turn off digital output synchronized with motion
M64 Turn on digital output immediately
M65 Turn off digital output immediately

The M62 & M63 commands will be queued. Subsequent commands referring to the same output number will overwrite the older settings. More than one output change can be specified by issuing more than one M62/M63 command.

The actual change of the specified outputs will happen at the beginning of the next motion command. If there is no subsequent motion command, the queued output changes won't happen. It's best to always program a motion g-code (G0, G1, etc) right after the M62/63.

M64 & M65 happen immediately as they are received by the motion controller. They are not synchronized with movement, and they will break blending.

« Ostatnia zmiana: Czerwiec 20, 2011, 09:56:15 wysłane przez markcomp » Zapisane

markcomp
Administrator
*****
Offline Offline

Wiadomości: 10737



WWW
« Odpowiedz #1 : Czerwiec 19, 2011, 11:52:16 »

M67 Analog Output
http://linuxcnc.org/docs/html/gcode_main.html#M67%20Analog%20Motion%20Output%20Control


To control an analog output synchronized with motion, program M67 E- Q-, where the E word ranges from 0 to the default maximum of 3 and Q is the value to set. The number of I/O can be increased by using the num_aio parameter when loading the motion controller. See the "EMC2 and HAL" chapter in the Configuration Section of the Integrators Manual for more information on the Motion Controller. M67 functions the same as M62-63. See the M62-65 section for information about queuing output commands synchronized with motion.



M68 Analog Output
http://linuxcnc.org/docs/html/gcode_main.html#M68%20Analog%20Aux%20Output%20Control


To control an analog output immediately, program M68 E- Q-, where the E word ranges from 0 to the default maximum of 3 and Q is the value to set. The number of I/O can be increased by using the num_aio parameter when loading the motion controller. See the "EMC2 and HAL" chapter in the Configuration Section of the Integrators Manual for more information on the Motion Controller. M68 functions the same as M64-65. See the M62-65 section for information about immediate output commands.



Can EMC2 control machine with independent spindles
http://www.linuxcnc.org/component/option,com_kunena/Itemid,20/func,view/catid,38/id,7195/lang,french/


If you want to use two spindles at the same time, then things are a little bit harder. Not because of a limitation of EMC2, but because of a limitation of G-code. G-code has only one "S" word, to control the speed of only one spindle.
 If you always want to use both spindles at the same time, at the same speed, or at a fixed ratio, then it is fairly easy, just link the motion.spindle-speed-out pin in HAL to two PWM generators with different input scales (or fix the scales in the VFD setups).
 You could also link the PWM scales to Pyvcp input boxes or dials in the GUI.
 If the G-code needs to control the second spindle speed directly, then I think you would need to control it with M67 analog output rather than S so that a typical line of G code to set one spindle to 1000rpm and the other to 3000 would beCode:

S1000 M67 E0 Q3000


Zapisane

markcomp
Administrator
*****
Offline Offline

Wiadomości: 10737



WWW
« Odpowiedz #2 : Czerwiec 20, 2011, 12:24:42 »

motion − accepts NML motion commands, interacts with HAL in realtime

SYNOPSIS
loadrt motmod [base_period_nsec=period] [servo_period_nsec=period] [traj_period_nsec=period]
[num_joints=[0-9]] ([num_dio=[1-64]] [num_aio=[1-16]])

DESCRIPTION

These pins and parameters are created by the realtime motmod module. This module provides a HAL interface
for EMC’s motion planner. Basically motmod takes in a list of waypoints and generates a nice blended
and constraint-limited stream of joint positions to be fed to the motor drives.
Optionally the number of Digital I/O is set with num_dio. The number of Analog I/O is set with num_aio.
The default is 4 each.
Pin names starting with "axis" are actually joint values, but the pins and parameters are still called "axis.N".
They are read and updated by the motion-controller function.

motion.analog-out-NN OUT float  --- These pins are used by M67-68.
Zapisane

markcomp
Administrator
*****
Offline Offline

Wiadomości: 10737



WWW
« Odpowiedz #3 : Czerwiec 20, 2011, 08:49:25 »

G Code Reference



http://emc.mah.priv.at/docs/html/gcode/main.html#sec:M67-Analog-Output

M67 Analog Output

To control an analog output synchronized with motion, program M67 E- Q- , where the E word ranges from 0 to the default maximum of 3 and Q is the value to set. The number of I/O can be increased by using the num_aio parameter when loading the motion controller. See the "EMC2 and HAL" chapter in the Configuration Section of the Integrators Manual for more information on the Motion Controller. M67 functions the same as M62-63. See the M62-65 section for information about queuing output commands synchronized with motion.
« Ostatnia zmiana: Czerwiec 20, 2011, 08:58:04 wysłane przez markcomp » Zapisane

markcomp
Administrator
*****
Offline Offline

Wiadomości: 10737



WWW
« Odpowiedz #4 : Czerwiec 20, 2011, 09:13:42 »

motion (realtime)



Motion is loaded with the motmod command. A kins should be loaded before mo-
tion.

Cytuj
loadrt motmod [base_period_nsec=period] [servo_period_nsec=period] [traj_period_nsec=period] [num_joints=[0-9] ([num_dio=1-64] num_aio=1-16])]

If the number of digital I/O needed is above the default of 4 you can add up to 64
digital I/O by using the num_dio option when loading motmod.
If the number of analog I/O needed is more that the default of 4 you can add up to
16 analog I/O by using the num_aio option when loading motmod.

motion.analog-in-00 (float, in) These pins (00, 01, 02, 03 or more if configured) are controlled by M66.

motion.analog-out-00 (float, out) These pins (00, 01, 02, 03 or more if configured) are controlled by M67 or M68.

motion.digital-in-00 (bit, in) These pins (00, 01, 02, 03 or more if configured) are controlled by M62-65.

motion.digital-out-00 (bit, out) These pins (00, 01, 02, 03 or more if configured) are controlled by the M62-65.
« Ostatnia zmiana: Czerwiec 20, 2011, 09:18:01 wysłane przez markcomp » Zapisane

Strony: [1]   Do góry
  Drukuj  
 
Skocz do:  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Manuscript design by Bloc Strona wygenerowana w 0.049 sekund z 17 zapytaniami.