Last modified by writer on 2024/06/11 14:25

From version 3.1
edited by writer
on 2024/06/11 14:25
Change comment: There is no comment for this version
To version 1.1
edited by writer
on 2022/08/19 18:53
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,13 +1,11 @@
1 1  {{info}}
2 -You must have the feature "**Dynamical motor to axis assignment**" for the function to work.  You also need to have the “**Create and edit macros** or **Auto Tool Change** features to implement the motor switching logic.
2 +Для работы функции необходимо наличии опции "**Поочерёдное управление несколькими двигателями, подключенными к оси**", а также опции "**Создание и редактирование макросов**" или "**Автоматическая смена инструмента**" для реализации логики переключения двигателей.
3 3  {{/info}}
4 4  
5 -This feature allows you to disable and enable each of the motors assigned to a specific axis (or several axes).
5 +Данная функция позволяет отключать и подключать каждый из двигателей, назначенных на определённую ось (или несколько осей). Рассмотрим ситуацию, когда необходимо управлять станком с двумя суппортами, каждый из которых приводится в движение своим двигателем по оси Z. В этом случае можно модифицировать макрос M6 таким образом, чтобы при смене инструмента сначала старый отводился на безопасную высоту и затем производилось переключение активных двигателей.
6 6  
7 -Let's consider a situation where it is necessary to control a machine with two supports. Each of them is driven by its own motor along the Z axis. In this case you can modify the M6 ​​macro so that when changing a tool the old one is first retracted to a safe height and then the active motors are switched.
7 +В функции SwitchMotors(0, 1) первый параметр - индекс двигателя (начиная с нуля), который необходимо отключить. Второй параметр - индекс двигателя, который необходимо включить. Таким образом при выполнении данной команды будет произведено переключение активного двигателя с первого на второй по списку в меню Настройки → Двигатели.
8 8  
9 -In the SwitchMotors(0, 1) function the first parameter is the motor index (starts from scratch) to disable. The second parameter is the motor index to enable. Thus the active engine will be switched from the first to the second from the list in the Settings → Motors menu when executing this command.
10 -
11 11  {{code language="lua"}}
12 12  function m6()
13 13   if (Is_THC_Mode() or Is_Oxy_Mode()) then
... ... @@ -25,7 +25,7 @@
25 25   SwitchMotors(1,0)
26 26   end
27 27  
28 - local delta = 200 -- distance between two "heads"
26 + local delta = 200 -- расстояние между двумя "головами"
29 29  
30 30   if (toolSlot == 2 and toolSlot ~= previousToolSlot) then
31 31   local CurrX = AxisGetPos(Axis.X)
... ... @@ -47,8 +47,8 @@
47 47  end
48 48  {{/code}}
49 49  
50 -After work with the second tool is completed you can switch to using the first support using the M6T1 command, in which the SwitchMotors(1,0) function will be called. This will automatically restore the Z-axis machine coordinate to the value it had when the first motor was active.
48 +После того, как работа вторым инструментом завершена, переключиться на использование первого суппорта можно командой M6T1, в которой будет вызвана функция SwitchMotors(1,0). При этом будет автоматически восстановлена машинная координата по оси Z на значение, которое она имела, когда был активен первый двигатель.
51 51  
52 -You can use the MotorDisable and MotorEnable functions which take one parameter (the motor index) if you need to control the disable/enable of each motor separately.
50 +При необходимости управления отключением/подключением каждого двигателя по отдельности можно использовать функции MotorDisable и MotorEnable, принимающие один параметр - индекс двигателя.
53 53  
54 -The Diagnostics tab displays a red "Motor Disabled" indicator for disabled motors. Turn on all motors, i.e. return the default state, you can using the “Set active motors all” button.
52 +На вкладке Диагностика для отключенных двигателей отображается красный индикатор "Двигатель отключен". Включить все двигатели, т.е. вернуть состояние по-умолчанию, можно с помощью кнопки "Сделать все двигатели активными".