Wiki source code of Входы и выходы (фоновые операции)
Last modified by writer on 2023/09/08 19:05
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | ===== bool PinGetState (number periphId) ===== | ||
| 2 | |||
| 3 | Getting the current state of an input or output. | ||
| 4 | |||
| 5 | Options: | ||
| 6 | |||
| 7 | * number periphId - input or output identifier (one of the constants defined in the **[[Inputs>>doc:Руководство пользователя.Описание M-кодов.Описание функций макроязыка.Входы и выходы.WebHome||rel="nofollow" shape="rect" style="text-decoration: none;"]]** или **[[Outputs>>doc:Руководство пользователя.Описание M-кодов.Описание функций макроязыка.Входы и выходы.WebHome||rel="nofollow" shape="rect" style="text-decoration: none;"]] **list should be passed as this parameter). | ||
| 8 | |||
| 9 | Return value: | ||
| 10 | |||
| 11 | * the current state of the input (output): true - active, false - inactive (if the "Invert" checkbox is selected in the output settings, the physical output corresponds to the physical signal level 0, and vice versa). | ||
| 12 | |||
| 13 | ===== bool MotorPinGetState (number motorId, number motorPeriphId) ===== | ||
| 14 | |||
| 15 | Getting the current state of the input or output assigned to the motor. | ||
| 16 | |||
| 17 | Options: | ||
| 18 | |||
| 19 | * number motorId - motor number, starting from 0, in the order of the motors in the list of //[["Motor Parameters">>doc:Руководство пользователя.Настройка ПО.Настройка двигателей.WebHome||shape="rect" style="text-decoration: none;"]]//; | ||
| 20 | |||
| 21 | * number motorPeriphId – input or output identifier for the specified motor (one of the constants defined in the **[[MotorInputs>>doc:Руководство пользователя.Описание M-кодов.Описание функций макроязыка.Входы и выходы.WebHome||rel="nofollow" shape="rect" style="text-decoration: none;"]]** or **[[MotorOutputs>>doc:Руководство пользователя.Описание M-кодов.Описание функций макроязыка.Входы и выходы.WebHome||rel="nofollow" shape="rect" style="text-decoration: none;"]] **list should be passed as this parameter). | ||
| 22 | |||
| 23 | Return value: | ||
| 24 | |||
| 25 | * current state of the motor input (output): true - active, false - inactive (if the “Invert” checkbox is selected in the output settings, the physical output corresponds to the physical signal level 0, and vice versa). | ||
| 26 | |||
| 27 | ===== void PinSetState (number periphId, bool state) ===== | ||
| 28 | |||
| 29 | Set output status. | ||
| 30 | |||
| 31 | Options: | ||
| 32 | |||
| 33 | * number periphId - output identifier (one of the constants defined in the **[[Outputs>>doc:Руководство пользователя.Описание M-кодов.Описание функций макроязыка.Входы и выходы.WebHome||rel="nofollow" shape="rect" style="text-decoration: none;"]] **list should be passed as this parameter); | ||
| 34 | |||
| 35 | * bool state – the state of the output that needs to be set: true - active, false - inactive (if the "Invert" checkbox is selected in the output settings, the physical output corresponds to a physical signal level of 0, and vice versa). | ||
| 36 | |||
| 37 | ===== double GetAnalogInput (number index) ===== | ||
| 38 | |||
| 39 | Getting an analog input value (from 0 to 1) as real number. | ||
| 40 | |||
| 41 | Options: | ||
| 42 | |||
| 43 | * number index – analog input number (starts from 0). | ||
| 44 | |||
| 45 | Return value: | ||
| 46 | |||
| 47 | * analog input value (from 0 to 1). | ||
| 48 | |||
| 49 | ===== int GetAnalogInputsCount () ===== | ||
| 50 | |||
| 51 | Getting an analog inputs count available for used motion controller. | ||
| 52 | |||
| 53 | Return value: | ||
| 54 | |||
| 55 | * count of available analog inputs. |