Wiki source code of Входы и выходы (фоновые операции)
Last modified by writer on 2023/09/08 19:05
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
5.2 | 1 | ===== bool PinGetState (number periphId) ===== |
![]() |
1.1 | 2 | |
![]() |
5.2 | 3 | Getting the current state of an input or output. |
![]() |
1.1 | 4 | |
![]() |
5.2 | 5 | Options: |
![]() |
1.1 | 6 | |
![]() |
5.2 | 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). |
![]() |
1.1 | 8 | |
![]() |
5.2 | 9 | Return value: |
![]() |
1.1 | 10 | |
![]() |
5.2 | 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). |
![]() |
1.1 | 12 | |
![]() |
5.2 | 13 | ===== bool MotorPinGetState (number motorId, number motorPeriphId) ===== |
![]() |
1.1 | 14 | |
![]() |
5.2 | 15 | Getting the current state of the input or output assigned to the motor. |
![]() |
1.1 | 16 | |
![]() |
5.2 | 17 | Options: |
![]() |
1.1 | 18 | |
![]() |
5.2 | 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;"]]//; |
![]() |
1.1 | 20 | |
![]() |
5.2 | 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). |
![]() |
1.1 | 22 | |
![]() |
5.2 | 23 | Return value: |
![]() |
1.1 | 24 | |
![]() |
5.2 | 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). |
![]() |
1.1 | 26 | |
![]() |
5.2 | 27 | ===== void PinSetState (number periphId, bool state) ===== |
![]() |
1.1 | 28 | |
![]() |
5.2 | 29 | Set output status. |
![]() |
1.1 | 30 | |
![]() |
5.2 | 31 | Options: |
![]() |
1.1 | 32 | |
![]() |
5.2 | 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); |
![]() |
1.1 | 34 | |
![]() |
5.2 | 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). |
![]() |
1.1 | 36 | |
![]() |
5.2 | 37 | ===== double GetAnalogInput (number index) ===== |
![]() |
1.1 | 38 | |
![]() |
5.2 | 39 | Getting an analog input value (from 0 to 1) as real number. |
![]() |
1.1 | 40 | |
![]() |
5.2 | 41 | Options: |
![]() |
1.1 | 42 | |
![]() |
5.2 | 43 | * number index – analog input number (starts from 0). |
![]() |
1.1 | 44 | |
![]() |
5.2 | 45 | Return value: |
![]() |
1.1 | 46 | |
![]() |
5.2 | 47 | * analog input value (from 0 to 1). |
![]() |
1.1 | 48 | |
![]() |
5.2 | 49 | ===== int GetAnalogInputsCount () ===== |
![]() |
1.1 | 50 | |
![]() |
5.2 | 51 | Getting an analog inputs count available for used motion controller. |
52 | |||
53 | Return value: | ||
54 | |||
55 | * count of available analog inputs. |