Changes for page Динамическое отключение/подключение двигателей, привязанных к оси
Last modified by writer on 2024/06/11 14:25
Summary
-
Page properties (1 modified, 0 added, 0 removed)
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.