Inputs and Outputs (Background Operations)

Last modified by writer on 2023/09/08 19:05

bool PinGetState (number periphId)

Getting the current state of an input or output.

Options:

  • number periphId - input or output identifier (one of the constants defined in the Inputs или Outputs list should be passed as this parameter).

Return value:

  • 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).
bool MotorPinGetState (number motorId, number motorPeriphId)

Getting the current state of the input or output assigned to the motor.

Options:

  • number motorId - motor number, starting from 0, in the order of the motors in the list of "Motor Parameters";
  • number motorPeriphId – input or output identifier for the specified motor (one of the constants defined in the MotorInputs or MotorOutputs list should be passed as this parameter).

Return value:

  • 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).
void PinSetState (number periphId, bool state)

Set output status.

Options:

  • number periphId - output identifier (one of the constants defined in the Outputs list should be passed as this parameter);
  • 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).
double GetAnalogInput (number index)

Getting an analog input value (from 0 to 1) as real number.

Options:

  • number index – analog input number (starts from 0).

Return value:

  • analog input value (from 0 to 1).
int GetAnalogInputsCount ()

Getting an analog inputs count available for used motion controller.

Return value:

  • count of available analog inputs.