How does the welding robot logic instruction work?_Technical Solutions , case_cnkwg.com

Laser Cladding and Welding Robot, Stamping Robot, Bending Robot, Robot Ground Rail, Robot Positioning Machine, Robot C Gantry Frame Manufacturer.

cnkwg.com

cnkwg.comcontact us
Technical Solutions , case

How does the welding robot logic instruction work?

How does the welding robot logic instruction work?


(1) GLOBAL_VAR: "global variable" task type, you can define "global variables" and assign values to "global variables" and "operate" them.


(2) MODBUS_VAR: "MODBUS Register" task type, which can define "global variables" and assign values to "global variables" and "operate" them. The "MODBUS communication protocol" is associated with "system programming" via the "MODBUS_VAR" task type.


天津快乐十分开奖结果(3) "WAIT" task type: "waiting for event" task type, which needs to be used with the I/O input port. When selecting the "WAIT" task type, you need to set the "waiting type", "waiting sequence number", "waiting state" and "event relationship".


Waiting type - divided into four types: "input port", "PLC", "register variable" and "global variable".


Waiting sequence number - determined by the selected "waiting type": when selecting the "input port" waiting type, it is "input port number"; "relay number" and "register variable" and "global variable" when "PLC" waits for type "Variable sequence number when waiting for type。"


Waiting state - also determined by the "waiting type".


天津快乐十分开奖结果Event Relationships - There are two kinds of event relationships: "and" and "or".


Apply the "WAIT" task type format: After selecting the "WAIT" task type, set the "waiting sequence number", "waiting state" and "event relationship" according to the selected "waiting type", and click the [Add] button to complete the operation。


After selecting the "WAIT" task type, enter the corresponding values in the "Input Port Number", "Input Level Value" and "Event Relationship" prompt boxes, and click the "Add Task" button to complete the operation.


The system provides a total of 20 "coupled isolation" input ports numbered "0-19" and the initial state of the system is also the default low level "0"; when multiple "input port number" and "input level value" are set at the same time, The middle is connected by the connector "-".


 The relationship between the "and" and "or" events in the system "waiting for event" task type: the "and" event relationship indicates that only the "waiting events" are satisfied, the program can then continue to run; the "or" event relationship is only You need to meet some of the "waiting events" to let the program run down。


(4) IF: Conditional judgment instruction, used in conjunction with ELSE, ELSE_IF, and END_IF.


Instruction format: a。 IF。。。END_IF;


天津快乐十分开奖结果             b. IF...ELSE...END_IF;


             c. IF...ELSE_IF...ELSE...END_IF;


a. Determine whether the content in the IF condition is satisfied. If the condition is true (the condition is satisfied), execute the following program; if the condition is false (the condition is not satisfied), the program does not execute "IF...END_IF" Contained content.


b. Determine whether the content in the IF condition is satisfied. If the condition is true (the condition is satisfied), the content contained in "IF...ELSE" is executed; if the condition is false (the condition is not satisfied), the program executes " The content contained in ELSE...END_IF".


c。 If multiple conditions are required for judgment, you can use the "IF。。。ELSE_IF。。。ELSE。。。END_IF" format instruction (where ELSE_IF can be used multiple times in an "IF。。。END_IF", ELSE can also No need to)。


Each IF must correspond to an END_IF, which is used in conjunction with "IF...END_IF".


E.g:


GLOBAL_VAR_OP: GV_0 = 0 // Create global variable 0 and assign GV_0 to 0


天津快乐十分开奖结果IF(GV_0 == 0) // IF condition


OUTPUT: Y1 = 1 // I/O output port 1 outputs "high potential 1"


ELSE_ IF(GV_0 == 1) // ELSE_IF condition


OUTPUT: Y1 = 0 // I/O output port 1 outputs "low potential 0"


ELSE


OUTPUT: Y1 = 0 // I/O output port 1 outputs "high potential 1"


OUTPUT: Y2 = 1 // I/O output port 2 outputs "high potential 1"


END_IF // IF program ends


Program description: If the condition GV_0 == 0 is satisfied, then Y1 = 1; if the condition GV_0 == 1, the Y1 = 0; if both conditions are not met, then Y1 = 0 and Y2 = 1.


(5) WHILE: Loop instruction, used in conjunction with END_WHILE。


Instruction format: WHILE。。。END_WHILE


When the condition behind WHILE is satisfied, that is, when the condition is true (the condition is satisfied), the program in "WHILE...END_WHILE" is executed until the condition after WHILE is false (the condition is not satisfied), then the WHILE loop is exited.


Each WHILE must correspond to an END_WHILE, which is used by "WHILE...END_WHILE".


E.g:


天津快乐十分开奖结果    GLOBAL_VAR_OP: GV_0 = 0 // Create global variable 0 and assign GV_0 to 0


WHILE(GV_0 < 3) // WHILE condition


GLOBAL_VAR_OP: GV_0 = GV_0 + 1 // global variable plus 1


OUTPUT: Y2 = 1 // I/O output port 2 outputs "high potential 1"


END_WHILE // End of WHILE loop


OUTPUT: Y2 = 0 // I/O output 2 port output "low potential 0"


Program description: If GV_0 < 3, then GV_0 = GV_0 + 1 , Y2 = 1; otherwise Y2 = 0, that is, the condition is not satisfied after 3 consecutive outputs Y2=1, the WHILE loop ends, and the output Y2=0.


(6) BREAK: Exit the loop instruction.


The BREAK directive is used in the middle of the "WHILE...END_WHILE" directive to terminate the "WHILE...END_WHILE" loop statement. Usually the BREAK command is used with IF...END_IF to jump out of the loop body when the condition is met.


E.g:


    GLOBAL_VAR_OP: GV_0 = 0 // Create global variable 0 and assign GV_0 to 0


WHILE(GV_0 < 10) // WHILE condition


IF(GV_0 == 5) // IF condition


BREAK // interrupt the program


END_IF // IF program ends


GLOBAL_VAR_OP: GV_0 = GV_0 + 1 // global variable plus 1


OUTPUT: Y2 = 1 // I/O output port 2 outputs "high potential 1"


END_WHILE // End of WHILE loop


OUTPUT: Y2 = 0 // I/O output 2 port output "low potential 0"


Program Description: When IF(GV_0 == 5) is satisfied, WHILE terminates the loop, that is, after 5 consecutive outputs of Y2=1, IF(GV_0 == 5) satisfies the condition, exits the WHILE loop, and outputs Y2=0。


(7) CONTINUE: Exit this loop instruction.


The CONTINUE instruction is used in the middle of the WHILE。。。END_WHILE instruction to skip the remaining statements in the WHILE。。。END_WHILE loop body and force the next loop。 Usually the CONTINUE instruction is used in conjunction with IF。。。END_IF, which jumps out of the loop when the condition is met, to speed up the loop。


E.g:


 GLOBAL_VAR_OP: GV_0 = 0 // Create global variable 0 and assign GV_0 to 0


WHILE(GV_0 < 10) // WHILE condition


GLOBAL_VAR_OP: GV_0 = GV_0 + 1 // global variable plus 1


IF(GV_0 == 5) // IF condition


OUTPUT: Y3 = 1 // I/O output port 3 outputs "high potential 1"


CONTINUE // Terminate this loop


END_IF // IF program ends


OUTPUT: Y2 = 1 // I/O output port 2 outputs "high potential 1"


END_WHILE // End of WHILE loop


天津快乐十分开奖结果OUTPUT: Y2 = 0 // I/O output port 2 outputs "low potential 0"


Program Description: When IF(GV_0 == 5) is satisfied, the statement following this cycle CONTINUE will not be executed (bounce this loop, the WHILE loop continues), that is, after 5 consecutive outputs Y2=1, the 6th output Y3 =1, and then 7th, 8th, 9th, and 10th consecutive times output Y2=1, the condition is not satisfied, the WHILE loop ends, and the output Y2=0.


Previous:What type of welding robot type is used? NEXT:How does the welding robot motion command work?

 天津快乐十分 天津快乐十分 天津快乐十分 掌上彩票 天津快乐十分 天津快乐十分 天津快乐十分 天津快乐十分开奖结果 天津快乐十分 天津快乐十分