Robot IO ======================== .. toctree:: :maxdepth: 5 Set control box digital output +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set control box digital output * @param [in] id IO number, range [0~15] * @param [in] status 0-off, 1-on * @param [in] smooth 0-no smoothing, 1-smoothing * @param [in] block 0-blocking, 1-non-blocking * @return Error code */ int SetDO(int id, int status, int smooth, int block); Set tool digital output +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set tool digital output * @param [in] id IO number, range [0~1] * @param [in] status 0-off, 1-on * @param [in] smooth 0-no smoothing, 1-smoothing * @param [in] block 0-blocking, 1-non-blocking * @return Error code */ int SetToolDO(int id, int status, int smooth, int block); Set control box analog output +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set control box analog output * @param [in] id IO number, range [0~1] * @param [in] value Current or voltage value percentage, range [0~100] corresponding to current [0~20mA] or voltage [0~10V] * @param [in] block 0-blocking, 1-non-blocking * @return Error code */ int SetAO(int id, double value, int block); Set tool analog output +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set tool analog output * @param [in] id IO number, range [0] * @param [in] value Current or voltage value percentage, range [0~100] corresponding to current [0~20mA] or voltage [0~10V] * @param [in] block 0-blocking, 1-non-blocking * @return Error code */ int SetToolAO(int id, double value, int block); Digital and analog output setting example +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: public static int TestAODO(Robot robot) { int status = 1; int smooth = 0; int block = 0; for (int i = 0; i < 16; i++) { robot.SetDO(i, status, smooth, block); robot.Sleep(300); } status = 0; for (int i = 0; i < 16; i++) { robot.SetDO(i, status, smooth, block); robot.Sleep(300); } status = 1; for (int i = 0; i < 2; i++) { robot.SetToolDO(i, status, smooth, block); robot.Sleep(1000); } status = 0; for (int i = 0; i < 2; i++) { robot.SetToolDO(i, status, smooth, block); robot.Sleep(1000); } for (int i = 0; i < 100; i++) { robot.SetAO(0, i, block); robot.Sleep(30); } for (int i = 0; i < 100; i++) { robot.SetToolAO(0, i, block); robot.Sleep(30); } robot.CloseRPC(); return 0; } Get control box digital input +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get control box digital input * @param [in] id IO number, range [0~15] * @param [in] block 0-blocking, 1-non-blocking * @param [out] level 0-low level, 1-high level * @return Error code */ int GetDI(int id, int block, int[] level); Get tool digital input +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get tool digital input * @param [in] id IO number, range [0~1] * @param [in] block 0-blocking, 1-non-blocking * @param [out] level 0-low level, 1-high level * @return Error code */ int GetToolDI(int id, int block, int[] level); Get control box analog input +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get control box analog input * @param [in] id IO number, range [0~1] * @param [in] block 0-blocking, 1-non-blocking * @param [out] persent Input current or voltage value percentage, range [0~100] corresponding to current [0~20mA] or voltage [0~10V] * @return Error code */ int GetAI(int id, int block, double[] persent) Get tool analog input +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get tool analog input * @param [in] id IO number, range [0] * @param [in] block 0-blocking, 1-non-blocking * @param [out] persent Input current or voltage value percentage, range [0~100] corresponding to current [0~20mA] or voltage [0~10V] * @return Error code */ int GetToolAI(int id, int block, double[] persent) Get robot end-point record button state +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get robot end-point record button state * @param [out] state Button state, 0-pressed, 1-released * @return Error code */ int GetAxlePointRecordBtnState(int[] state) Get robot end DO output state +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get robot end DO output state * @param [out] do_state DO output state, do0~do1 corresponds to bit1~bit2, starting from bit0 * @return Error code */ int GetToolDO(int[] do_state) Get robot controller DO output state +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get robot controller DO output state * @param [out] do_state_h DO output state, co0~co7 corresponds to bit0~bit7 * @param [out] do_state_l DO output state, do0~do7 corresponds to bit0~bit7 * @return Error code */ int GetDO(int[] do_state_h, int[] do_state_l) Get robot DI/DO state example +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: public static int TestGetDIAI(Robot robot) { int status = 1; int smooth = 0; int block = 0; int[] di =new int[]{0}, tool_di =new int[] {0}; double[] ai =new double[] {0}, tool_ai = new double[]{0}; double value = 0.0; robot.GetDI(0, block, di); System.out.println("di0:"+di[0]); robot.GetToolDI(1, block, tool_di); System.out.println("tool_di1:"+ tool_di[0]); robot.GetAI(0, block, ai); System.out.println("ai0:"+ ai[0]); robot.GetToolAI(0, block, tool_ai); System.out.println("tool_ai0:"+ tool_ai[0]); int[] _button_state=new int[]{0}; robot.GetAxlePointRecordBtnState(_button_state); System.out.println("_button_state is: "+ _button_state[0]); int[] tool_do_state=new int[]{0}; robot.GetToolDO(tool_do_state); System.out.println("tool DO state is: "+ tool_do_state[0]); int[] do_state_h=new int[]{0}; int[] do_state_l=new int[]{0}; robot.GetDO(do_state_h, do_state_l); System.out.println("DO state high is: "+do_state_h[0]+", DO state low is: "+ do_state_l[0]); return 0; } Wait for control box digital input +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Wait for control box digital input * @param [in] id IO number, range [0~15] * @param [in] status 0-off, 1-on * @param [in] max_time Maximum wait time in ms * @param [in] opt Timeout strategy, 0-program stops and prompts timeout, 1-ignore timeout and continue, 2-wait indefinitely * @return Error code */ int WaitDI(int id, int status, int max_time, int opt); Wait for multiple control box digital inputs +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Wait for multiple control box digital inputs * @param [in] mode 0-multi AND, 1-multi OR * @param [in] id IO number, bit0~bit7 corresponds to DI0~DI7, bit8~bit15 corresponds to CI0~CI7 * @param [in] status 0-off, 1-on * @param [in] max_time Maximum wait time in ms * @param [in] opt Timeout strategy, 0-program stops and prompts timeout, 1-ignore timeout and continue, 2-wait indefinitely * @return Error code */ int WaitMultiDI(int mode, int id, int status, int max_time, int opt); Wait for tool digital input +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Wait for tool digital input * @param [in] id IO number, range [0~1] * @param [in] status 0-off, 1-on * @param [in] max_time Maximum wait time in ms * @param [in] opt Timeout strategy, 0-program stops and prompts timeout, 1-ignore timeout and continue, 2-wait indefinitely * @return Error code */ int WaitToolDI(int id, int status, int max_time, int opt); Wait for control box analog input +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Wait for control box analog input * @param [in] id IO number, range [0~1] * @param [in] sign 0-greater than, 1-less than * @param [in] value Input current or voltage value percentage, range [0~100] corresponding to current [0~20mA] or voltage [0~10V] * @param [in] max_time Maximum wait time in ms * @param [in] opt Timeout strategy, 0-program stops and prompts timeout, 1-ignore timeout and continue, 2-wait indefinitely * @return Error code */ int WaitAI(int id, int sign, double value, int max_time, int opt); Wait for tool analog input +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Wait for tool analog input * @param [in] id IO number, range [0] * @param [in] sign 0-greater than, 1-less than * @param [in] value Input current or voltage value percentage, range [0~100] corresponding to current [0~20mA] or voltage [0~10V] * @param [in] max_time Maximum wait time in ms * @param [in] opt Timeout strategy, 0-program stops and prompts timeout, 1-ignore timeout and continue, 2-wait indefinitely * @return Error code */ int WaitToolAI(int id, int sign, double value, int max_time, int opt); Wait for digital/analog input signal example +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: public static int TestWaitDIAI(Robot robot) { int rtn=-1; int status = 1; int smooth = 0; int block = 0; int di = 0, tool_di = 0; double ai = 0.0, tool_ai = 0.0; double value = 0.0; rtn = robot.WaitDI(0, 1, 1000, 1); System.out.println("WaitDI over; rtn is: "+ rtn); robot.WaitMultiDI(1, 3, 3, 1000, 1); System.out.println("WaitDI over; rtn is: "+ rtn); robot.WaitToolDI(1, 1, 1000, 1); System.out.println("WaitDI over; rtn is: " + rtn); robot.WaitAI(0, 0, 50, 1000, 1); System.out.println("WaitDI over; rtn is: " + rtn); robot.WaitToolAI(0, 0, 50, 1000, 1); System.out.println("WaitDI over; rtn is: " + rtn); return 0; } Set Whether Control Box DO Output Resets After Stop/Pause +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set whether control box DO output resets after stop/pause * @param resetFlag 0-Do not reset; 1-Reset * @param reloadFlag Whether to reload after pause resume, 0-Do not load; 1-Load * @return Error code */ public int SetOutputResetCtlBoxDO(int resetFlag, int reloadFlag) Set Whether Control Box AO Output Resets After Stop/Pause +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set whether control box AO output resets after stop/pause * @param resetFlag 0-Do not reset; 1-Reset * @param reloadFlag Whether to reload after pause resume, 0-Do not load; 1-Load * @return Error code */ public int SetOutputResetCtlBoxAO(int resetFlag, int reloadFlag) Set Whether End Tool DO Output Resets After Stop/Pause ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set whether end tool DO output resets after stop/pause * @param resetFlag 0-Do not reset; 1-Reset * @param reloadFlag Whether to reload after pause resume, 0-Do not load; 1-Load * @return Error code */ public int SetOutputResetAxleDO(int resetFlag, int reloadFlag) Set Whether End Tool AO Output Resets After Stop/Pause ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set whether end tool AO output resets after stop/pause * @param resetFlag 0-Do not reset; 1-Reset * @param reloadFlag Whether to reload after pause resume, 0-Do not load; 1-Load * @return Error code */ public int SetOutputResetAxleAO(int resetFlag, int reloadFlag) Set Whether Extended DO Output Resets After Stop/Pause ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set whether extended DO output resets after stop/pause * @param resetFlag 0-Do not reset; 1-Reset * @param reloadFlag Whether to reload after pause resume, 0-Do not load; 1-Load * @return Error code */ public int SetOutputResetExtDO(int resetFlag, int reloadFlag) Set Whether Extended AO Output Resets After Stop/Pause ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set whether extended AO output resets after stop/pause * @param resetFlag 0-Do not reset; 1-Reset * @param reloadFlag Whether to reload after pause resume, 0-Do not load; 1-Load * @return Error code */ public int SetOutputResetExtAO(int resetFlag, int reloadFlag) Set Whether SmartTool Output Resets After Stop/Pause ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set whether SmartTool output resets after stop/pause * @param resetFlag 0-Do not reset; 1-Reset * @param reloadFlag Whether to reload after pause resume, 0-Do not load; 1-Load * @return Error code */ public int SetOutputResetSmartToolDO(int resetFlag, int reloadFlag) Code Example for Setting Output Reset After Lua Program Stop/Pause +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: public static void TestDOReset(Robot robot) { for (int i = 0; i < 16; i++) { robot.SetDO(i, 1, 0, 0); robot.Sleep(200); } int resetFlag = 1; int resumeReloadFlag = 1; int rtn = robot.SetOutputResetCtlBoxDO(resetFlag, resumeReloadFlag); robot.SetOutputResetCtlBoxAO(resetFlag, resumeReloadFlag); robot.SetOutputResetAxleDO(resetFlag, resumeReloadFlag); robot.SetOutputResetAxleAO(resetFlag, resumeReloadFlag); robot.SetOutputResetExtDO(resetFlag, resumeReloadFlag); robot.SetOutputResetExtAO(resetFlag, resumeReloadFlag); robot.SetOutputResetSmartToolDO(resetFlag, resumeReloadFlag); robot.ProgramLoad("/fruser/test.lua"); robot.ProgramRun(); robot.Sleep(2000); robot.PauseMotion(); robot.Sleep(2000); robot.ResumeMotion(); robot.Sleep(2000); robot.CloseRPC(); } Set Configurable CI Port Functions of the Control Box +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set configurable CI port functions of the control box * @param config CI0-CI7 function codes; * 0-None;1-Arc start success;2-Welder ready;3-Conveyor detection;4-Pause;5-Resume;6-Start;7-Stop; 8-Pause/Resume;9-Start/Stop;10-Pedal drag;11-Move to home position;12-Manual/Auto switch; 13-Wire search success;14-Motion interrupt;15-Start main program;16-Start rewind;17-Start confirmation; 18-Photoelectric detection signal X;19-Photoelectric detection signal Y;20-External emergency stop input signal 1;21-External emergency stop input signal 2; 22-Level 1 reduction mode;23-Level 2 reduction mode;24-Level 3 reduction mode (Stop);25-Resume welding;26-Terminate welding; 27-Assist drag enable;28-Assist drag disable;29-Assist drag enable/disable;30-Clear all errors; 31-Manual/Auto switch (high/low level);32-Enable;33-Disable;34-Enable/Disable (rising/falling edge);35-Fixed-point tracking start/end * @return Error code */ public int SetDIConfig(int[] config) Get Configurable CI Port Functions of the Control Box +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get configurable CI port functions of the control box * @param config CI0-CI7 function codes; * 0-None;1-Arc start success;2-Welder ready;3-Conveyor detection;4-Pause;5-Resume;6-Start;7-Stop; 8-Pause/Resume;9-Start/Stop;10-Pedal drag;11-Move to home position;12-Manual/Auto switch; 13-Wire search success;14-Motion interrupt;15-Start main program;16-Start rewind;17-Start confirmation; 18-Photoelectric detection signal X;19-Photoelectric detection signal Y;20-External emergency stop input signal 1;21-External emergency stop input signal 2; 22-Level 1 reduction mode;23-Level 2 reduction mode;24-Level 3 reduction mode (Stop);25-Resume welding;26-Terminate welding; 27-Assist drag enable;28-Assist drag disable;29-Assist drag enable/disable;30-Clear all errors; 31-Manual/Auto switch (high/low level);32-Enable;33-Disable;34-Enable/Disable (rising/falling edge);35-Fixed-point tracking start/end * @return Error code */ public int GetDIConfig(int[] config) Set Configurable CO Port Functions of the Control Box +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set configurable CO port functions of the control box * @param config CO0-CO7 function codes; * 0-None;1-Robot error;2-Robot in motion;3-Spray start/stop;4-Spray gun cleaning;5-Gas supply signal;6-Arc start signal;7-Jog wire feed; 8-Reverse wire feed;9-JOB input port 1;10-JOB input port 2;11-JOB input port 3;12-Conveyor start/stop control;13-Robot paused;14-Reached home position; 15-Reached interference area;16-Wire search start/stop control;17-Robot start completed;18-Program start/stop;19-Auto/Manual mode;20-Emergency stop output signal 1-Safety; 21-Emergency stop output signal 2-Safety;22-Lua script program running/stopped;23-Safety status output-Safety;24-Protective stop status output-Safety; 25-Robot in motion-Safety;26-Robot reduced mode-Safety;27-Robot non-reduced mode-Safety;28-Robot non-stopped;29-Robot error-Instruction point error; 30-Robot error-Driver error;31-Robot error-Soft limit exceeded error;32-Robot error-Collision error;33-Robot error-Active slave count error; 34-Robot error-Slave error;35-Robot error-IO error;36-Robot error-Gripper error;37-Robot error-File error;38-Robot error-Singular pose error; 39-Robot error-Driver communication error;40-Robot error-Parameter error;41-Robot error-External axis soft limit exceeded error;42-Robot warning-Warning; 43-Robot warning-Safety door warning;44-Robot warning-Motion warning;45-Robot warning-Interference area warning;46-Robot warning-Safety wall warning; 47-Enable status;48-Auto lift during disconnection;49-Cube 1 interference warning;50-Cube 2 interference warning;51-Cube 3 interference warning;52-Cube 4 interference warning; * @return Error code */ public int SetDOConfig(int[] config) Get Configurable CO Port Functions of the Control Box +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get configurable CO port functions of the control box * @param config CO0-CO7 function codes; * 0-None;1-Robot error;2-Robot in motion;3-Spray start/stop;4-Spray gun cleaning;5-Gas supply signal;6-Arc start signal;7-Jog wire feed; 8-Reverse wire feed;9-JOB input port 1;10-JOB input port 2;11-JOB input port 3;12-Conveyor start/stop control;13-Robot paused;14-Reached home position; 15-Reached interference area;16-Wire search start/stop control;17-Robot start completed;18-Program start/stop;19-Auto/Manual mode;20-Emergency stop output signal 1-Safety; 21-Emergency stop output signal 2-Safety;22-Lua script program running/stopped;23-Safety status output-Safety;24-Protective stop status output-Safety; 25-Robot in motion-Safety;26-Robot reduced mode-Safety;27-Robot non-reduced mode-Safety;28-Robot non-stopped;29-Robot error-Instruction point error; 30-Robot error-Driver error;31-Robot error-Soft limit exceeded error;32-Robot error-Collision error;33-Robot error-Active slave count error; 34-Robot error-Slave error;35-Robot error-IO error;36-Robot error-Gripper error;37-Robot error-File error;38-Robot error-Singular pose error; 39-Robot error-Driver communication error;40-Robot error-Parameter error;41-Robot error-External axis soft limit exceeded error;42-Robot warning-Warning; 43-Robot warning-Safety door warning;44-Robot warning-Motion warning;45-Robot warning-Interference area warning;46-Robot warning-Safety wall warning; 47-Enable status;48-Auto lift during disconnection;49-Cube 1 interference warning;50-Cube 2 interference warning;51-Cube 3 interference warning;52-Cube 4 interference warning; * @return Error code */ public int GetDOConfig(int[] config) Set Configurable End-CI Port Functions of the End-Effector +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set configurable End-CI port functions of the end-effector * @param config End CI0-CI1 function codes; * 0-None;1-Drag teaching tool switch;2-Point recording signal;3-Manual/Auto switch (pulse signal);4-TPD recording start/stop;5-Pause motion; 6-Resume motion;7-Start;8-Stop;9-Pause/Resume;10-Start/Stop;11-Force sensor assist drag enable;12-Force sensor assist drag disable; 13-Force sensor assist drag enable/disable;14-Laser detection signal X;15-Laser detection signal Y;16-PTP motion to home position;17-Motion interrupt, stop current motion based on signal; 18-Start main program;19-Start rewind;20-Start confirmation;21-Resume welding;22-Terminate welding;23-Clear error;24-Manual/Auto switch (high/low level); 25-Enable;26-Disable;27-Enable/Disable;28-Laser servo tracking start/stop signal; * @return Error code */ public int SetToolDIConfig(int[] config) Get Configurable End-CI Port Functions of the End-Effector +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get configurable End-CI port functions of the end-effector * @param config End CI0-CI1 function codes; * 0-None;1-Drag teaching tool switch;2-Point recording signal;3-Manual/Auto switch (pulse signal);4-TPD recording start/stop;5-Pause motion; 6-Resume motion;7-Start;8-Stop;9-Pause/Resume;10-Start/Stop;11-Force sensor assist drag enable;12-Force sensor assist drag disable; 13-Force sensor assist drag enable/disable;14-Laser detection signal X;15-Laser detection signal Y;16-PTP motion to home position;17-Motion interrupt, stop current motion based on signal; 18-Start main program;19-Start rewind;20-Start confirmation;21-Resume welding;22-Terminate welding;23-Clear error;24-Manual/Auto switch (high/low level); 25-Enable;26-Disable;27-Enable/Disable;28-Laser servo tracking start/stop signal; * @return Error code */ public int GetToolDIConfig(int[] config) Set Configurable CI Active State of the Control Box +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set configurable CI active state of the control box * @param config CI0-CI7 port active state; 0-active high; 1-active low * @return Error code */ public int SetDIConfigLevel(int[] config) Get Configurable CI Active State of the Control Box +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get configurable CI active state of the control box * @param config CI0-CI7 port active state; 0-active high; 1-active low * @return Error code */ public int GetDIConfigLevel(int[] config) Set Configurable CO Active State of the Control Box +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set configurable CO active state of the control box * @param config CO0-CO7 port active state; 0-active high; 1-active low * @return Error code */ public int SetDOConfigLevel(int[] config) Get Configurable CO Active State of the Control Box +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get configurable CO active state of the control box * @param config CO0-CO7 port active state; 0-active high; 1-active low * @return Error code */ public int GetDOConfigLevel(int[] config) Set Configurable CI Active State of the End-Effector +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set configurable CI active state of the end-effector * @param config CI0-CI1 port active state; 0-active high; 1-active low * @return Error code */ public int SetToolDIConfigLevel(int[] config) Get Configurable CI Active State of the End-Effector +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get configurable CI active state of the end-effector * @param config CI0-CI1 port active state; 0-active high; 1-active low * @return Error code */ public int GetToolDIConfigLevel(int[] config) Set Standard DI Active State of the Control Box +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set standard DI active state of the control box * @param config DI0-DI7 port active state; 0-active high; 1-active low * @return Error code */ public int SetStandardDILevel(int[] config) Get Standard DI Active State of the Control Box +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get standard DI active state of the control box * @param config DI0-DI7 port active state; 0-active high; 1-active low * @return Error code */ public int GetStandardDILevel(int[] config) Set Standard DO Active State of the Control Box +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Set standard DO active state of the control box * @param config DO0-DO7 port active state; 0-active high; 1-active low * @return Error code */ public int SetStandardDOLevel(int[] config) Get Standard DO Active State of the Control Box +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: /** * @brief Get standard DO active state of the control box * @param config DO0-DO7 port active state; 0-active high; 1-active low * @return Error code */ public int GetStandardDOLevel(int[] config) Robot IO Configuration Code Example +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: Java :linenos: public static int TestIOConfig(Robot robot) { int[] setDIConfig = new int[]{1, 2, 3, 4, 5, 6, 7, 8}; int[] getDIConfig = new int[8]; int rtn = robot.SetDIConfig(setDIConfig); System.out.println("SetDIConfig rtn is " + rtn); rtn = robot.GetDIConfig(getDIConfig); System.out.println("GetDIConfig rtn is " + rtn + ", value is " + getDIConfig[0] + " " + getDIConfig[1] + " " + getDIConfig[2] + " " + getDIConfig[3] + " " + getDIConfig[4] + " " + getDIConfig[5] + " " + getDIConfig[6] + " " + getDIConfig[7]); int[] setDOConfig = new int[]{9, 10, 11, 12, 13, 14, 15, 16}; int[] getDOConfig = new int[8]; rtn = robot.SetDOConfig(setDOConfig); System.out.println("SetDOConfig rtn is " + rtn); rtn = robot.GetDOConfig(getDOConfig); System.out.println("GetDOConfig rtn is " + rtn + ", value is " + getDOConfig[0] + " " + getDOConfig[1] + " " + getDOConfig[2] + " " + getDOConfig[3] + " " + getDOConfig[4] + " " + getDOConfig[5] + " " + getDOConfig[6] + " " + getDOConfig[7]); int[] setToolDIConfig = new int[]{17, 18}; int[] getToolDIConfig = new int[2]; rtn = robot.SetToolDIConfig(setToolDIConfig); System.out.println("SetToolDIConfig rtn is " + rtn); rtn = robot.GetToolDIConfig(getToolDIConfig); System.out.println("GetToolDIConfig rtn is " + rtn + ", value is " + getToolDIConfig[0] + " " + getToolDIConfig[1]); int[] setDIConfigLevel = new int[]{1, 1, 1, 1, 0, 0, 0, 0}; int[] getDIConfigLevel = new int[8]; rtn = robot.SetDIConfigLevel(setDIConfigLevel); System.out.println("SetDIConfigLevel rtn is " + rtn); rtn = robot.GetDIConfigLevel(getDIConfigLevel); System.out.println("GetDIConfigLevel rtn is " + rtn + ", value is " + getDIConfigLevel[0] + " " + getDIConfigLevel[1] + " " + getDIConfigLevel[2] + " " + getDIConfigLevel[3] + " " + getDIConfigLevel[4] + " " + getDIConfigLevel[5] + " " + getDIConfigLevel[6] + " " + getDIConfigLevel[7]); int[] setDOConfigLevel = new int[]{0, 0, 0, 0, 1, 1, 1, 1}; int[] getDOConfigLevel = new int[8]; rtn = robot.SetDOConfigLevel(setDOConfigLevel); System.out.println("SetDOConfigLevel rtn is " + rtn); rtn = robot.GetDOConfigLevel(getDOConfigLevel); System.out.println("GetDOConfigLevel rtn is " + rtn + ", value is " + getDOConfigLevel[0] + " " + getDOConfigLevel[1] + " " + getDOConfigLevel[2] + " " + getDOConfigLevel[3] + " " + getDOConfigLevel[4] + " " + getDOConfigLevel[5] + " " + getDOConfigLevel[6] + " " + getDOConfigLevel[7]); int[] setToolDIConfigLevel = new int[]{1, 0}; int[] getToolDIConfigLevel = new int[2]; rtn = robot.SetToolDIConfigLevel(setToolDIConfigLevel); System.out.println("SetToolDIConfigLevel rtn is " + rtn); rtn = robot.GetToolDIConfigLevel(getToolDIConfigLevel); System.out.println("GetToolDIConfigLevel rtn is " + rtn + ", value is " + getToolDIConfigLevel[0] + " " + getToolDIConfigLevel[1]); int[] setStandardDILevel = new int[]{1, 1, 1, 1, 0, 0, 0, 0}; int[] getStandardDILevel = new int[8]; rtn = robot.SetStandardDILevel(setStandardDILevel); System.out.println("SetStandardDILevel rtn is " + rtn); rtn = robot.GetStandardDILevel(getStandardDILevel); System.out.println("GetStandardDILevel rtn is " + rtn + ", value is " + getStandardDILevel[0] + " " + getStandardDILevel[1] + " " + getStandardDILevel[2] + " " + getStandardDILevel[3] + " " + getStandardDILevel[4] + " " + getStandardDILevel[5] + " " + getStandardDILevel[6] + " " + getStandardDILevel[7]); int[] setStandardDOLevel = new int[]{0, 0, 0, 0, 1, 1, 1, 1}; int[] getStandardDOLevel = new int[8]; rtn = robot.SetStandardDOLevel(setStandardDOLevel); System.out.println("SetStandardDOLevel rtn is " + rtn); rtn = robot.GetStandardDOLevel(getStandardDOLevel); System.out.println("GetStandardDOLevel rtn is " + rtn + ", value is " + getStandardDOLevel[0] + " " + getStandardDOLevel[1] + " " + getStandardDOLevel[2] + " " + getStandardDOLevel[3] + " " + getStandardDOLevel[4] + " " + getStandardDOLevel[5] + " " + getStandardDOLevel[6] + " " + getStandardDOLevel[7]); robot.Sleep(2000); return 0; }