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

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

Summary

Details

Page properties
Content
... ... @@ -1,11 +1,13 @@
1 1  {{info}}
2 -Для работы функции необходимо наличии опции "**Поочерёдное управление несколькими двигателями, подключенными к оси**", а также опции "**Создание и редактирование макросов**" или "**Автоматическая смена инструмента**" для реализации логики переключения двигателей.
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.
3 3  {{/info}}
4 4  
5 -Данная функция позволяет отключать и подключать каждый из двигателей, назначенных на определённую ось (или несколько осей). Рассмотрим ситуацию, когда необходимо управлять станком с двумя суппортами, каждый из которых приводится в движение своим двигателем по оси Z. В этом случае можно модифицировать макрос M6 таким образом, чтобы при смене инструмента сначала старый отводился на безопасную высоту и затем производилось переключение активных двигателей.
5 +This feature allows you to disable and enable each of the motors assigned to a specific axis (or several axes).
6 6  
7 -В функции SwitchMotors(0, 1) первый параметр - индекс двигателя (начиная с нуля), который необходимо отключить. Второй параметр - индекс двигателя, который необходимо включить. Таким образом при выполнении данной команды будет произведено переключение активного двигателя с первого на второй по списку в меню Настройки → Двигатели.
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.
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 +
9 9  {{code language="lua"}}
10 10  function m6()
11 11   if (Is_THC_Mode() or Is_Oxy_Mode()) then
... ... @@ -23,7 +23,7 @@
23 23   SwitchMotors(1,0)
24 24   end
25 25  
26 - local delta = 200 -- расстояние между двумя "головами"
28 + local delta = 200 -- distance between two "heads"
27 27  
28 28   if (toolSlot == 2 and toolSlot ~= previousToolSlot) then
29 29   local CurrX = AxisGetPos(Axis.X)
... ... @@ -45,8 +45,8 @@
45 45  end
46 46  {{/code}}
47 47  
48 -После того, как работа вторым инструментом завершена, переключиться на использование первого суппорта можно командой M6T1, в которой будет вызвана функция SwitchMotors(1,0). При этом будет автоматически восстановлена машинная координата по оси Z на значение, которое она имела, когда был активен первый двигатель.
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.
49 49  
50 -При необходимости управления отключением/подключением каждого двигателя по отдельности можно использовать функции MotorDisable и MotorEnable, принимающие один параметр - индекс двигателя.
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.
51 51  
52 -На вкладке Диагностика для отключенных двигателей отображается красный индикатор "Двигатель отключен". Включить все двигатели, т.е. вернуть состояние по-умолчанию, можно с помощью кнопки "Сделать все двигатели активными".
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.