不是很明白这段程序,哪位大侠可以详细答案吗,最后在旁边注释。
L “stacker_setup_data”. discharge_3x DB1018DBW24
L 0
ITD
+D
T “stacker_setup_data”.work_speces[0].def[3].min.x DB1018.DBD1784
T “stacker_setup_data”.work_speces[0].def[3].max.x DB1018.DBD41796
T “stacker_setup_data”.work_speces[0].def[23].min.x DB1018.DBD2264
T “stacker_setup_data”.work_speces[0].def[23].max.x DB1018.DBD2276
T “stacker_setup_data”.robot_manual_setup.man_pos_x[3] DB1018.DBD1176
L L#10
-D
T “stacker_setup_data”.work_speces[0].def[13].min.x DB1018.DBD2024
L “stacker_setup_data”.work_speces[0].def[3].max.x DB1018.DBD1796
L L#10
-D
T “stacker_setup_data”.work_speces[0].def[13].min.x DB1018.DBD2024
L “stacker_setup_data”.work_speces[0].def[3].max.x DB1018.DBD1796
L L#10
+D
T “stacker_setup_data”.work_speces[0].def[13].min.x DB1018.DBD2036
L "stacker_setpu_data".discharge_3.z DB1018.DBW28
L "Stacker_setup_data".discharge_3.Z
L 0 //offset
ITD
+D
T "Stacker_setup_data".work_spaces[0].def[3].min.Z
T "Stacker_setup_data".work_spaces[0].def[23].min.Z
T "Stacker_setup_data".work_spaces[0].def[23].max.Z
L "Stacker_setup_data".pos_values_Z.P31 //position 31: maximum
T "Stacker_setup_data".work_spaces[0].def[3].max.Z
T "Stacker_setup_data".work_spaces[0].def[13].max.Z
L L#50
-D
T "Stacker_setup_data".work_spaces[0].def[13].min.Z
A(
L "Stacker_global_data".gripper_status
L 1 // bale in gripper
==I
)
A(
L "Stacker_global_data".actual_bales_on_disch_3
L 3 // less than 3 bales on conveyor
<I
)
AN "conv_global_data".discharge_3_is_full
A(
L "Stacker_setup_data".pos_values_Z.P0
L "Stacker_setup_data".work_spaces[0].def[31].min.Z
>=D
O "=13-B222"
)
O "BTS_Stacker_global_data".OP_mode.op_mode.setting
= "Stacker_global_data".enable_work_space[3]
A "BTS_Stacker_global_data".OP_mode.op_mode.auto
= "Stacker_global_data".enable_work_space[13] // work space discharge 3 approx.operation (躡erschleifen)
A "ALWAYS_FALSE" //never allowed
= "Stacker_global_data".enable_work_space[23] // work space discharge 3 (narrow)
A "Stacker_global_data".in_work_space[3]
= "Stacker_global_data".robot_at_discharge_3
最佳答案
这个不难啊
L “stacker_setup_data”. discharge_3x
L 0
ITD
+D
T “stacker_setup_data”.work_speces[0].def[3].min.x
T “stacker_setup_data”.work_speces[0].def[3].max.x
T “stacker_setup_data”.work_speces[0].def[23].min.x
T “stacker_setup_data”.work_speces[0].def[23].max.x
T “stacker_setup_data”.robot_manual_setup.man_pos_x[3]
上面这几行就是吧 “stacker_setup_data”. discharge_3x 转成双整数+0后送到下面这个地址里面
L L#10
-D
T “stacker_setup_data”.work_speces[0].def[13].min.x DB1018.DBD2024
这个是把-10送到T这个笛子里面
L “stacker_setup_data”.work_speces[0].def[3].max.x DB1018.DBD1796
L L#10
-D
T “stacker_setup_data”.work_speces[0].def[13].min.x DB1018.DBD2024
上面这三行是def[13].min.x=def[3].max.x -10
L “stacker_setup_data”.work_speces[0].def[3].max.x DB1018.DBD1796
L L#10
+D
T “stacker_setup_data”.work_speces[0].def[13].min.x DB1018.DBD2036
上面三行:def[13].min.x =def[3].max.x +10 这个和再上面好像一样的啊,你是不是搞错了?
L "stacker_setpu_data".discharge_3.z DB1018.DBW28
L "Stacker_setup_data".discharge_3.Z
L 0 //offset
ITD
+D
T "Stacker_setup_data".work_spaces[0].def[3].min.Z
T "Stacker_setup_data".work_spaces[0].def[23].min.Z
T "Stacker_setup_data".work_spaces[0].def[23].max.Z
上面:def[3].min.Z/def[23].min.Z=discharge_3.Z+0
L "Stacker_setup_data".pos_values_Z.P31 //position 31: maximum
T "Stacker_setup_data".work_spaces[0].def[3].max.Z
T "Stacker_setup_data".work_spaces[0].def[13].max.Z
L L#50
-D
T "Stacker_setup_data".work_spaces[0].def[13].min.Z
这也是数据传送,然后计算def[13].min.Z=pos_values_Z.P31 +50
A(
L "Stacker_global_data".gripper_status
L 1 // bale in gripper
==I
)
A(
L "Stacker_global_data".actual_bales_on_disch_3
L 3 // less than 3 bales on conveyor
<I
)
AN "conv_global_data".discharge_3_is_full
A(
L "Stacker_setup_data".pos_values_Z.P0
L "Stacker_setup_data".work_spaces[0].def[31].min.Z
>=D
O "=13-B222"
)
O "BTS_Stacker_global_data".OP_mode.op_mode.setting
= "Stacker_global_data".enable_work_space[3]
上面是几个逻辑判断了 你这个脚本字数太多,输入不进去了....
A "BTS_Stacker_global_data".OP_mode.op_mode.auto
= "Stacker_global_data".enable_work_space[13] // work space discharge 3 approx.operation (躡erschleifen)
A "ALWAYS_FALSE" //never allowed
= "Stacker_global_data".enable_work_space[23] // work space discharge 3 (narrow)
A "Stacker_global_data".in_work_space[3]
= "Stacker_global_data".robot_at_discharge_3
提问者对于答案的评价:
谢谢。
原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc290356.html