お問い合わせ

お問い合わせ

カタログダウンロード

カタログ
ダウンロード

戻る
  • How to
  • プログラム作成
  • 記事
  • 日本語

【協働ロボット/プログラミング】変数同士の四則演算

プログラム(Task)内では、Pythonのルールに従って四則演算が可能

DRL(DoosanRobotLanguage)でコーディングをしたい場合は、"CustomCode"アイコンをクリック

足し算(+)

引き算(-)

掛け算(×)

割り算(÷)

参考プログラム(trans)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

offset_value=get_input_register_int(0)
appro1 = [0, 0, offset_value, 0, 0, 0]
System_Appro = trans(System_pPick, appro1, DR_BASE,DR_BASE)

movel (System_home, vel=150, acc=30)
movel (System_Appro, vel=150, acc=30, radius=100)
movel (System_pPick,vel=150, acc=30, app_type=DR_MV_APP_WELD)
set_output_register_bit(0, ON)
wait(1)
set_output_register_bit(0, OFF)
movel (System_Appro, vel=150, acc=30, radius=100)
movel (System_home, vel=150, acc=30)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

page top