I/O Control

IO Device Types

  • "ROBOT": Control cabinet, with 4DI/4DO/2AI/2AO, interface correspondence detailed in User Manual.
  • "FLANGE": Flange plate, with 2DI/2DO, interface correspondence detailed in User Manual.
  • "EXTRA": Extension board, with 12DI/12DO/2AI/2AO, interface correspondence detailed in User Manual.
  • "SHOULDER": Shoulder light board, with 1DI, used as button
  • "FLANGE_BTN": Flange button, with 2DI, used as buttons

Set Digital Output

lebai:set_do(device, pin, value)
  • Parameters
    • device Device type
    • pin Port, starting from 0
    • value Value to set, 0 off/1 on

Get Digital Output

value = lebai:get_do(device, pin)
  • Parameters
    • device Device type
    • pin Port, starting from 0
  • Returns
    • value 0 off/1 on

Get Multiple Digital Outputs

values = lebai:get_dos(device, pin, num)
  • Parameters
    • device Device type
    • pin Port, starting from 0
    • num Consecutive quantity
  • Returns
    • values Array

Get Digital Input

value = lebai:get_di(device, pin)
  • Parameters
    • device Device type
    • pin Port, starting from 0
  • Returns
    • value 0 off/1 on

Get Multiple Digital Inputs

values = lebai:get_dis(device, pin, num)
  • Parameters
    • device Device type
    • pin Port, starting from 0
    • num Consecutive quantity
  • Returns
    • values Array

Set Analog Output

lebai:set_ao(device, pin, value)
  • Parameters
    • device Device type
    • pin Port, starting from 0
    • value Value to set

Get Analog Output

value = lebai:get_ao(device, pin)
  • Parameters
    • device Device type
    • pin Port, starting from 0
  • Returns
    • value

Get Multiple Analog Outputs

values = lebai:get_aos(device, pin, num)
  • Parameters
    • device Device type
    • pin Port, starting from 0
    • num Consecutive quantity
  • Returns
    • values Array

Get Analog Input

value = lebai:get_ai(device, pin)
  • Parameters
    • device Device type
    • pin Port, starting from 0
  • Returns
    • value

Get Multiple Analog Inputs

values = lebai:get_ais(device, pin, num)
  • Parameters
    • device Device type
    • pin Port, starting from 0
    • num Consecutive quantity
  • Returns
    • values Array