5. Robot IO
5.1. Set control box digital output
1/**
2* @brief Set control box digital output
3* @param [in] id IO number, range [0~15]
4* @param [in] status 0-off, 1-on
5* @param [in] smooth 0-no smoothing, 1-smoothing
6* @param [in] block 0-blocking, 1-non-blocking
7* @return Error code
8*/
9int SetDO(int id, int status, int smooth, int block);
5.2. Set tool digital output
1/**
2* @brief Set tool digital output
3* @param [in] id IO number, range [0~1]
4* @param [in] status 0-off, 1-on
5* @param [in] smooth 0-no smoothing, 1-smoothing
6* @param [in] block 0-blocking, 1-non-blocking
7* @return Error code
8*/
9int SetToolDO(int id, int status, int smooth, int block);
5.3. Set control box analog output
1/**
2* @brief Set control box analog output
3* @param [in] id IO number, range [0~1]
4* @param [in] value Current or voltage value percentage, range [0~100] corresponding to current [0~20mA] or voltage [0~10V]
5* @param [in] block 0-blocking, 1-non-blocking
6* @return Error code
7*/
8int SetAO(int id, double value, int block);
5.4. Set tool analog output
1/**
2* @brief Set tool analog output
3* @param [in] id IO number, range [0]
4* @param [in] value Current or voltage value percentage, range [0~100] corresponding to current [0~20mA] or voltage [0~10V]
5* @param [in] block 0-blocking, 1-non-blocking
6* @return Error code
7*/
8int SetToolAO(int id, double value, int block);
5.5. Digital and analog output setting example
1public static int TestAODO(Robot robot)
2{
3 int status = 1;
4 int smooth = 0;
5 int block = 0;
6
7 for (int i = 0; i < 16; i++)
8 {
9 robot.SetDO(i, status, smooth, block);
10 robot.Sleep(300);
11 }
12
13 status = 0;
14
15 for (int i = 0; i < 16; i++)
16 {
17 robot.SetDO(i, status, smooth, block);
18 robot.Sleep(300);
19 }
20
21 status = 1;
22
23 for (int i = 0; i < 2; i++)
24 {
25 robot.SetToolDO(i, status, smooth, block);
26 robot.Sleep(1000);
27 }
28
29 status = 0;
30
31 for (int i = 0; i < 2; i++)
32 {
33 robot.SetToolDO(i, status, smooth, block);
34 robot.Sleep(1000);
35 }
36
37 for (int i = 0; i < 100; i++)
38 {
39 robot.SetAO(0, i, block);
40 robot.Sleep(30);
41 }
42
43 for (int i = 0; i < 100; i++)
44 {
45 robot.SetToolAO(0, i, block);
46 robot.Sleep(30);
47 }
48
49 robot.CloseRPC();
50 return 0;
51}
5.6. Get control box digital input
1/**
2* @brief Get control box digital input
3* @param [in] id IO number, range [0~15]
4* @param [in] block 0-blocking, 1-non-blocking
5* @param [out] level 0-low level, 1-high level
6* @return Error code
7*/
8int GetDI(int id, int block, int[] level);
5.7. Get tool digital input
1/**
2* @brief Get tool digital input
3* @param [in] id IO number, range [0~1]
4* @param [in] block 0-blocking, 1-non-blocking
5* @param [out] level 0-low level, 1-high level
6* @return Error code
7*/
8int GetToolDI(int id, int block, int[] level);
5.8. Get control box analog input
1/**
2* @brief Get control box analog input
3* @param [in] id IO number, range [0~1]
4* @param [in] block 0-blocking, 1-non-blocking
5* @param [out] persent Input current or voltage value percentage, range [0~100] corresponding to current [0~20mA] or voltage [0~10V]
6* @return Error code
7*/
8int GetAI(int id, int block, double[] persent)
5.9. Get tool analog input
1/**
2* @brief Get tool analog input
3* @param [in] id IO number, range [0]
4* @param [in] block 0-blocking, 1-non-blocking
5* @param [out] persent Input current or voltage value percentage, range [0~100] corresponding to current [0~20mA] or voltage [0~10V]
6* @return Error code
7*/
8int GetToolAI(int id, int block, double[] persent)
5.11. Get robot end DO output state
1/**
2* @brief Get robot end DO output state
3* @param [out] do_state DO output state, do0~do1 corresponds to bit1~bit2, starting from bit0
4* @return Error code
5*/
6int GetToolDO(int[] do_state)
5.12. Get robot controller DO output state
1/**
2* @brief Get robot controller DO output state
3* @param [out] do_state_h DO output state, co0~co7 corresponds to bit0~bit7
4* @param [out] do_state_l DO output state, do0~do7 corresponds to bit0~bit7
5* @return Error code
6*/
7int GetDO(int[] do_state_h, int[] do_state_l)
5.13. Get robot DI/DO state example
1public static int TestGetDIAI(Robot robot)
2{
3 int status = 1;
4 int smooth = 0;
5 int block = 0;
6 int[] di =new int[]{0}, tool_di =new int[] {0};
7 double[] ai =new double[] {0}, tool_ai = new double[]{0};
8 double value = 0.0;
9
10 robot.GetDI(0, block, di);
11 System.out.println("di0:"+di[0]);
12
13 robot.GetToolDI(1, block, tool_di);
14 System.out.println("tool_di1:"+ tool_di[0]);
15
16 robot.GetAI(0, block, ai);
17 System.out.println("ai0:"+ ai[0]);
18
19 robot.GetToolAI(0, block, tool_ai);
20 System.out.println("tool_ai0:"+ tool_ai[0]);
21
22 int[] _button_state=new int[]{0};
23 robot.GetAxlePointRecordBtnState(_button_state);
24 System.out.println("_button_state is: "+ _button_state[0]);
25
26 int[] tool_do_state=new int[]{0};
27 robot.GetToolDO(tool_do_state);
28 System.out.println("tool DO state is: "+ tool_do_state[0]);
29
30 int[] do_state_h=new int[]{0};
31 int[] do_state_l=new int[]{0};
32 robot.GetDO(do_state_h, do_state_l);
33 System.out.println("DO state high is: "+do_state_h[0]+", DO state low is: "+ do_state_l[0]);
34
35 return 0;
36}
5.14. Wait for control box digital input
1/**
2* @brief Wait for control box digital input
3* @param [in] id IO number, range [0~15]
4* @param [in] status 0-off, 1-on
5* @param [in] max_time Maximum wait time in ms
6* @param [in] opt Timeout strategy, 0-program stops and prompts timeout, 1-ignore timeout and continue, 2-wait indefinitely
7* @return Error code
8*/
9int WaitDI(int id, int status, int max_time, int opt);
5.15. Wait for multiple control box digital inputs
1/**
2* @brief Wait for multiple control box digital inputs
3* @param [in] mode 0-multi AND, 1-multi OR
4* @param [in] id IO number, bit0~bit7 corresponds to DI0~DI7, bit8~bit15 corresponds to CI0~CI7
5* @param [in] status 0-off, 1-on
6* @param [in] max_time Maximum wait time in ms
7* @param [in] opt Timeout strategy, 0-program stops and prompts timeout, 1-ignore timeout and continue, 2-wait indefinitely
8* @return Error code
9*/
10int WaitMultiDI(int mode, int id, int status, int max_time, int opt);
5.16. Wait for tool digital input
1/**
2* @brief Wait for tool digital input
3* @param [in] id IO number, range [0~1]
4* @param [in] status 0-off, 1-on
5* @param [in] max_time Maximum wait time in ms
6* @param [in] opt Timeout strategy, 0-program stops and prompts timeout, 1-ignore timeout and continue, 2-wait indefinitely
7* @return Error code
8*/
9int WaitToolDI(int id, int status, int max_time, int opt);
5.17. Wait for control box analog input
1/**
2* @brief Wait for control box analog input
3* @param [in] id IO number, range [0~1]
4* @param [in] sign 0-greater than, 1-less than
5* @param [in] value Input current or voltage value percentage, range [0~100] corresponding to current [0~20mA] or voltage [0~10V]
6* @param [in] max_time Maximum wait time in ms
7* @param [in] opt Timeout strategy, 0-program stops and prompts timeout, 1-ignore timeout and continue, 2-wait indefinitely
8* @return Error code
9*/
10int WaitAI(int id, int sign, double value, int max_time, int opt);
5.18. Wait for tool analog input
1/**
2* @brief Wait for tool analog input
3* @param [in] id IO number, range [0]
4* @param [in] sign 0-greater than, 1-less than
5* @param [in] value Input current or voltage value percentage, range [0~100] corresponding to current [0~20mA] or voltage [0~10V]
6* @param [in] max_time Maximum wait time in ms
7* @param [in] opt Timeout strategy, 0-program stops and prompts timeout, 1-ignore timeout and continue, 2-wait indefinitely
8* @return Error code
9*/
10int WaitToolAI(int id, int sign, double value, int max_time, int opt);
5.19. Wait for digital/analog input signal example
1public static int TestWaitDIAI(Robot robot)
2{
3 int rtn=-1;
4
5 int status = 1;
6 int smooth = 0;
7 int block = 0;
8 int di = 0, tool_di = 0;
9 double ai = 0.0, tool_ai = 0.0;
10 double value = 0.0;
11
12 rtn = robot.WaitDI(0, 1, 1000, 1);
13 System.out.println("WaitDI over; rtn is: "+ rtn);
14
15 robot.WaitMultiDI(1, 3, 3, 1000, 1);
16 System.out.println("WaitDI over; rtn is: "+ rtn);
17
18 robot.WaitToolDI(1, 1, 1000, 1);
19 System.out.println("WaitDI over; rtn is: " + rtn);
20
21 robot.WaitAI(0, 0, 50, 1000, 1);
22 System.out.println("WaitDI over; rtn is: " + rtn);
23
24 robot.WaitToolAI(0, 0, 50, 1000, 1);
25 System.out.println("WaitDI over; rtn is: " + rtn);
26 return 0;
27}
5.20. Set Whether Control Box DO Output Resets After Stop/Pause
1/**
2* @brief Set whether control box DO output resets after stop/pause
3* @param resetFlag 0-Do not reset; 1-Reset
4* @param reloadFlag Whether to reload after pause resume, 0-Do not load; 1-Load
5* @return Error code
6*/
7public int SetOutputResetCtlBoxDO(int resetFlag, int reloadFlag)
5.21. Set Whether Control Box AO Output Resets After Stop/Pause
1/**
2* @brief Set whether control box AO output resets after stop/pause
3* @param resetFlag 0-Do not reset; 1-Reset
4* @param reloadFlag Whether to reload after pause resume, 0-Do not load; 1-Load
5* @return Error code
6*/
7public int SetOutputResetCtlBoxAO(int resetFlag, int reloadFlag)
5.22. Set Whether End Tool DO Output Resets After Stop/Pause
1/**
2* @brief Set whether end tool DO output resets after stop/pause
3* @param resetFlag 0-Do not reset; 1-Reset
4* @param reloadFlag Whether to reload after pause resume, 0-Do not load; 1-Load
5* @return Error code
6*/
7public int SetOutputResetAxleDO(int resetFlag, int reloadFlag)
5.23. Set Whether End Tool AO Output Resets After Stop/Pause
1/**
2* @brief Set whether end tool AO output resets after stop/pause
3* @param resetFlag 0-Do not reset; 1-Reset
4* @param reloadFlag Whether to reload after pause resume, 0-Do not load; 1-Load
5* @return Error code
6*/
7public int SetOutputResetAxleAO(int resetFlag, int reloadFlag)
5.24. Set Whether Extended DO Output Resets After Stop/Pause
1/**
2* @brief Set whether extended DO output resets after stop/pause
3* @param resetFlag 0-Do not reset; 1-Reset
4* @param reloadFlag Whether to reload after pause resume, 0-Do not load; 1-Load
5* @return Error code
6*/
7public int SetOutputResetExtDO(int resetFlag, int reloadFlag)
5.25. Set Whether Extended AO Output Resets After Stop/Pause
1/**
2* @brief Set whether extended AO output resets after stop/pause
3* @param resetFlag 0-Do not reset; 1-Reset
4* @param reloadFlag Whether to reload after pause resume, 0-Do not load; 1-Load
5* @return Error code
6*/
7public int SetOutputResetExtAO(int resetFlag, int reloadFlag)
5.26. Set Whether SmartTool Output Resets After Stop/Pause
1/**
2* @brief Set whether SmartTool output resets after stop/pause
3* @param resetFlag 0-Do not reset; 1-Reset
4* @param reloadFlag Whether to reload after pause resume, 0-Do not load; 1-Load
5* @return Error code
6*/
7public int SetOutputResetSmartToolDO(int resetFlag, int reloadFlag)
5.27. Code Example for Setting Output Reset After Lua Program Stop/Pause
1public static void TestDOReset(Robot robot)
2{
3 for (int i = 0; i < 16; i++)
4 {
5 robot.SetDO(i, 1, 0, 0);
6 robot.Sleep(200);
7 }
8 int resetFlag = 1;
9 int resumeReloadFlag = 1;
10 int rtn = robot.SetOutputResetCtlBoxDO(resetFlag, resumeReloadFlag);
11 robot.SetOutputResetCtlBoxAO(resetFlag, resumeReloadFlag);
12 robot.SetOutputResetAxleDO(resetFlag, resumeReloadFlag);
13 robot.SetOutputResetAxleAO(resetFlag, resumeReloadFlag);
14 robot.SetOutputResetExtDO(resetFlag, resumeReloadFlag);
15 robot.SetOutputResetExtAO(resetFlag, resumeReloadFlag);
16 robot.SetOutputResetSmartToolDO(resetFlag, resumeReloadFlag);
17 robot.ProgramLoad("/fruser/test.lua");
18 robot.ProgramRun();
19 robot.Sleep(2000);
20 robot.PauseMotion();
21 robot.Sleep(2000);
22 robot.ResumeMotion();
23 robot.Sleep(2000);
24 robot.CloseRPC();
25}
5.28. Set Configurable CI Port Functions of the Control Box
1/**
2* @brief Set configurable CI port functions of the control box
3* @param config CI0-CI7 function codes;
4* 0-None;1-Arc start success;2-Welder ready;3-Conveyor detection;4-Pause;5-Resume;6-Start;7-Stop;
58-Pause/Resume;9-Start/Stop;10-Pedal drag;11-Move to home position;12-Manual/Auto switch;
613-Wire search success;14-Motion interrupt;15-Start main program;16-Start rewind;17-Start confirmation;
718-Photoelectric detection signal X;19-Photoelectric detection signal Y;20-External emergency stop input signal 1;21-External emergency stop input signal 2;
822-Level 1 reduction mode;23-Level 2 reduction mode;24-Level 3 reduction mode (Stop);25-Resume welding;26-Terminate welding;
927-Assist drag enable;28-Assist drag disable;29-Assist drag enable/disable;30-Clear all errors;
1031-Manual/Auto switch (high/low level);32-Enable;33-Disable;34-Enable/Disable (rising/falling edge);35-Fixed-point tracking start/end
11* @return Error code
12*/
13public int SetDIConfig(int[] config)
5.29. Get Configurable CI Port Functions of the Control Box
1/**
2* @brief Get configurable CI port functions of the control box
3* @param config CI0-CI7 function codes;
4* 0-None;1-Arc start success;2-Welder ready;3-Conveyor detection;4-Pause;5-Resume;6-Start;7-Stop;
58-Pause/Resume;9-Start/Stop;10-Pedal drag;11-Move to home position;12-Manual/Auto switch;
613-Wire search success;14-Motion interrupt;15-Start main program;16-Start rewind;17-Start confirmation;
718-Photoelectric detection signal X;19-Photoelectric detection signal Y;20-External emergency stop input signal 1;21-External emergency stop input signal 2;
822-Level 1 reduction mode;23-Level 2 reduction mode;24-Level 3 reduction mode (Stop);25-Resume welding;26-Terminate welding;
927-Assist drag enable;28-Assist drag disable;29-Assist drag enable/disable;30-Clear all errors;
1031-Manual/Auto switch (high/low level);32-Enable;33-Disable;34-Enable/Disable (rising/falling edge);35-Fixed-point tracking start/end
11* @return Error code
12*/
13public int GetDIConfig(int[] config)
5.30. Set Configurable CO Port Functions of the Control Box
1/**
2* @brief Set configurable CO port functions of the control box
3* @param config CO0-CO7 function codes;
4* 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;
58-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;
615-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;
721-Emergency stop output signal 2-Safety;22-Lua script program running/stopped;23-Safety status output-Safety;24-Protective stop status output-Safety;
825-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;
930-Robot error-Driver error;31-Robot error-Soft limit exceeded error;32-Robot error-Collision error;33-Robot error-Active slave count error;
1034-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;
1139-Robot error-Driver communication error;40-Robot error-Parameter error;41-Robot error-External axis soft limit exceeded error;42-Robot warning-Warning;
1243-Robot warning-Safety door warning;44-Robot warning-Motion warning;45-Robot warning-Interference area warning;46-Robot warning-Safety wall warning;
1347-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;
14* @return Error code
15*/
16public int SetDOConfig(int[] config)
5.31. Get Configurable CO Port Functions of the Control Box
1/**
2* @brief Get configurable CO port functions of the control box
3* @param config CO0-CO7 function codes;
4* 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;
58-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;
615-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;
721-Emergency stop output signal 2-Safety;22-Lua script program running/stopped;23-Safety status output-Safety;24-Protective stop status output-Safety;
825-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;
930-Robot error-Driver error;31-Robot error-Soft limit exceeded error;32-Robot error-Collision error;33-Robot error-Active slave count error;
1034-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;
1139-Robot error-Driver communication error;40-Robot error-Parameter error;41-Robot error-External axis soft limit exceeded error;42-Robot warning-Warning;
1243-Robot warning-Safety door warning;44-Robot warning-Motion warning;45-Robot warning-Interference area warning;46-Robot warning-Safety wall warning;
1347-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;
14* @return Error code
15*/
16public int GetDOConfig(int[] config)
5.32. Set Configurable End-CI Port Functions of the End-Effector
1/**
2* @brief Set configurable End-CI port functions of the end-effector
3* @param config End CI0-CI1 function codes;
4* 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;
56-Resume motion;7-Start;8-Stop;9-Pause/Resume;10-Start/Stop;11-Force sensor assist drag enable;12-Force sensor assist drag disable;
613-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;
718-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);
825-Enable;26-Disable;27-Enable/Disable;28-Laser servo tracking start/stop signal;
9* @return Error code
10*/
11public int SetToolDIConfig(int[] config)
5.33. Get Configurable End-CI Port Functions of the End-Effector
1/**
2* @brief Get configurable End-CI port functions of the end-effector
3* @param config End CI0-CI1 function codes;
4* 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;
56-Resume motion;7-Start;8-Stop;9-Pause/Resume;10-Start/Stop;11-Force sensor assist drag enable;12-Force sensor assist drag disable;
613-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;
718-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);
825-Enable;26-Disable;27-Enable/Disable;28-Laser servo tracking start/stop signal;
9* @return Error code
10*/
11public int GetToolDIConfig(int[] config)
5.34. Set Configurable CI Active State of the Control Box
1/**
2* @brief Set configurable CI active state of the control box
3* @param config CI0-CI7 port active state; 0-active high; 1-active low
4* @return Error code
5*/
6public int SetDIConfigLevel(int[] config)
5.35. Get Configurable CI Active State of the Control Box
1/**
2* @brief Get configurable CI active state of the control box
3* @param config CI0-CI7 port active state; 0-active high; 1-active low
4* @return Error code
5*/
6public int GetDIConfigLevel(int[] config)
5.36. Set Configurable CO Active State of the Control Box
1/**
2* @brief Set configurable CO active state of the control box
3* @param config CO0-CO7 port active state; 0-active high; 1-active low
4* @return Error code
5*/
6public int SetDOConfigLevel(int[] config)
5.37. Get Configurable CO Active State of the Control Box
1/**
2* @brief Get configurable CO active state of the control box
3* @param config CO0-CO7 port active state; 0-active high; 1-active low
4* @return Error code
5*/
6public int GetDOConfigLevel(int[] config)
5.38. Set Configurable CI Active State of the End-Effector
1/**
2* @brief Set configurable CI active state of the end-effector
3* @param config CI0-CI1 port active state; 0-active high; 1-active low
4* @return Error code
5*/
6public int SetToolDIConfigLevel(int[] config)
5.39. Get Configurable CI Active State of the End-Effector
1/**
2* @brief Get configurable CI active state of the end-effector
3* @param config CI0-CI1 port active state; 0-active high; 1-active low
4* @return Error code
5*/
6public int GetToolDIConfigLevel(int[] config)
5.40. Set Standard DI Active State of the Control Box
1/**
2* @brief Set standard DI active state of the control box
3* @param config DI0-DI7 port active state; 0-active high; 1-active low
4* @return Error code
5*/
6public int SetStandardDILevel(int[] config)
5.41. Get Standard DI Active State of the Control Box
1/**
2* @brief Get standard DI active state of the control box
3* @param config DI0-DI7 port active state; 0-active high; 1-active low
4* @return Error code
5*/
6public int GetStandardDILevel(int[] config)
5.42. Set Standard DO Active State of the Control Box
1/**
2* @brief Set standard DO active state of the control box
3* @param config DO0-DO7 port active state; 0-active high; 1-active low
4* @return Error code
5*/
6public int SetStandardDOLevel(int[] config)
5.43. Get Standard DO Active State of the Control Box
1/**
2* @brief Get standard DO active state of the control box
3* @param config DO0-DO7 port active state; 0-active high; 1-active low
4* @return Error code
5*/
6public int GetStandardDOLevel(int[] config)
5.44. Robot IO Configuration Code Example
1public static int TestIOConfig(Robot robot) {
2 int[] setDIConfig = new int[]{1, 2, 3, 4, 5, 6, 7, 8};
3 int[] getDIConfig = new int[8];
4 int rtn = robot.SetDIConfig(setDIConfig);
5 System.out.println("SetDIConfig rtn is " + rtn);
6 rtn = robot.GetDIConfig(getDIConfig);
7 System.out.println("GetDIConfig rtn is " + rtn + ", value is " +
8 getDIConfig[0] + " " + getDIConfig[1] + " " + getDIConfig[2] + " " + getDIConfig[3] + " " +
9 getDIConfig[4] + " " + getDIConfig[5] + " " + getDIConfig[6] + " " + getDIConfig[7]);
10
11 int[] setDOConfig = new int[]{9, 10, 11, 12, 13, 14, 15, 16};
12 int[] getDOConfig = new int[8];
13 rtn = robot.SetDOConfig(setDOConfig);
14 System.out.println("SetDOConfig rtn is " + rtn);
15 rtn = robot.GetDOConfig(getDOConfig);
16 System.out.println("GetDOConfig rtn is " + rtn + ", value is " +
17 getDOConfig[0] + " " + getDOConfig[1] + " " + getDOConfig[2] + " " + getDOConfig[3] + " " +
18 getDOConfig[4] + " " + getDOConfig[5] + " " + getDOConfig[6] + " " + getDOConfig[7]);
19
20 int[] setToolDIConfig = new int[]{17, 18};
21 int[] getToolDIConfig = new int[2];
22 rtn = robot.SetToolDIConfig(setToolDIConfig);
23 System.out.println("SetToolDIConfig rtn is " + rtn);
24 rtn = robot.GetToolDIConfig(getToolDIConfig);
25 System.out.println("GetToolDIConfig rtn is " + rtn + ", value is " + getToolDIConfig[0] + " " + getToolDIConfig[1]);
26
27 int[] setDIConfigLevel = new int[]{1, 1, 1, 1, 0, 0, 0, 0};
28 int[] getDIConfigLevel = new int[8];
29 rtn = robot.SetDIConfigLevel(setDIConfigLevel);
30 System.out.println("SetDIConfigLevel rtn is " + rtn);
31 rtn = robot.GetDIConfigLevel(getDIConfigLevel);
32 System.out.println("GetDIConfigLevel rtn is " + rtn + ", value is " +
33 getDIConfigLevel[0] + " " + getDIConfigLevel[1] + " " + getDIConfigLevel[2] + " " + getDIConfigLevel[3] + " " +
34 getDIConfigLevel[4] + " " + getDIConfigLevel[5] + " " + getDIConfigLevel[6] + " " + getDIConfigLevel[7]);
35
36 int[] setDOConfigLevel = new int[]{0, 0, 0, 0, 1, 1, 1, 1};
37 int[] getDOConfigLevel = new int[8];
38 rtn = robot.SetDOConfigLevel(setDOConfigLevel);
39 System.out.println("SetDOConfigLevel rtn is " + rtn);
40 rtn = robot.GetDOConfigLevel(getDOConfigLevel);
41 System.out.println("GetDOConfigLevel rtn is " + rtn + ", value is " +
42 getDOConfigLevel[0] + " " + getDOConfigLevel[1] + " " + getDOConfigLevel[2] + " " + getDOConfigLevel[3] + " " +
43 getDOConfigLevel[4] + " " + getDOConfigLevel[5] + " " + getDOConfigLevel[6] + " " + getDOConfigLevel[7]);
44
45 int[] setToolDIConfigLevel = new int[]{1, 0};
46 int[] getToolDIConfigLevel = new int[2];
47 rtn = robot.SetToolDIConfigLevel(setToolDIConfigLevel);
48 System.out.println("SetToolDIConfigLevel rtn is " + rtn);
49 rtn = robot.GetToolDIConfigLevel(getToolDIConfigLevel);
50 System.out.println("GetToolDIConfigLevel rtn is " + rtn + ", value is " + getToolDIConfigLevel[0] + " " + getToolDIConfigLevel[1]);
51
52 int[] setStandardDILevel = new int[]{1, 1, 1, 1, 0, 0, 0, 0};
53 int[] getStandardDILevel = new int[8];
54 rtn = robot.SetStandardDILevel(setStandardDILevel);
55 System.out.println("SetStandardDILevel rtn is " + rtn);
56 rtn = robot.GetStandardDILevel(getStandardDILevel);
57 System.out.println("GetStandardDILevel rtn is " + rtn + ", value is " +
58 getStandardDILevel[0] + " " + getStandardDILevel[1] + " " + getStandardDILevel[2] + " " + getStandardDILevel[3] + " " +
59 getStandardDILevel[4] + " " + getStandardDILevel[5] + " " + getStandardDILevel[6] + " " + getStandardDILevel[7]);
60
61 int[] setStandardDOLevel = new int[]{0, 0, 0, 0, 1, 1, 1, 1};
62 int[] getStandardDOLevel = new int[8];
63 rtn = robot.SetStandardDOLevel(setStandardDOLevel);
64 System.out.println("SetStandardDOLevel rtn is " + rtn);
65 rtn = robot.GetStandardDOLevel(getStandardDOLevel);
66 System.out.println("GetStandardDOLevel rtn is " + rtn + ", value is " +
67 getStandardDOLevel[0] + " " + getStandardDOLevel[1] + " " + getStandardDOLevel[2] + " " + getStandardDOLevel[3] + " " +
68 getStandardDOLevel[4] + " " + getStandardDOLevel[5] + " " + getStandardDOLevel[6] + " " + getStandardDOLevel[7]);
69
70 robot.Sleep(2000);
71 return 0;
72}