Inputs and Outputs

Last modified by writer on 2023/09/08 18:35

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 or 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).
void PushPinState(number periphId)

Saves the state of the current output. The output state will automatically be restored when exiting a macro for any reason.

Options:

  • number periphId – output id (must be passed one of the constants defined in the Outputs list).
void PushSpecificPinState(number periphId, bool state)

Saves the current state of the current output. The output state will be automatically restored to the saved value when exiting a macro for any reason.

Options:

  • number periphId – output id (must be passed one of the constants defined in the Outputs list).
  • bool state – output state that will be restored when exiting the macro.
bool IsProbingPinConfigured()

Allows you to check whether the input for probing is assigned in the input signal parameters.

Return value:

  • true – if the input for probing is assigned;
  • false – if the input is not assigned.
bool IsSpecificProbingPinConfigured(number index)

Allows you to check if a specific probe is assigned in the parameters of the input signals.

Options:

  • number index – probing input number (from 1 to 3).

Return valut:

  • true – if the specified probing input is assigned;
  • false – if the specified probing input is not assigned.
Inputs

The binding of a specific device input to the input identifier is carried out in the settings in the "Input Signals Parameters".

  • Estop;
  • Probing;
  • Collision;
  • OxyExternalZLimitHigh;
  • UserInput_0;
  • UserInput_1;
  • UserInput_2;
  • UserInput_3;
  • UserInput_4;
  • UserInput_5;
  • UserInput_6;
  • UserInput_7;
  • UserInput_8;
  • UserInput_9;
  • UserInput_10;
  • UserInput_11;
  • UserInput_12;
  • UserInput_13;

  • UserInput_14.
Outputs

The binding of a specific output of the device to the output identifier is carried out in the settings in the "Output Signal Parameters".

  • Mist;
  • Flood;
  • OxyRegUp;
  • OxyRegDown;
  • OxyActive;
  • UserOutput_0;
  • UserOutput_1;
  • UserOutput_2;
  • UserOutput_3;
  • UserOutput_4;
  • UserOutput_5;
  • UserOutput_6;
  • UserOutput_7;
  • UserOutput_8;
  • UserOutput_9;
  • UserOutput_10;
  • UserOutput_11;
  • UserOutput_12;
  • UserOutput_13;
  • UserOutput_14.
MotorInputs (motor input identifiers)
  • Home;
  • LimitLow;
  • LimitHigh.
MotorOutputs (motor output identifiers)
  • Step;
  • Dir;
  • Enable.
Usage example
if (PinGetState(Inputs.UserInput_0)) then
 PinSetState(Outputs.UserOutput_5, true)
 Sleep(1000)
 PinSetState(Outputs.UserOutput_5, false)
end4.