當前位置:編程學習大全網 - 編程語言 - 西門子808D 用戶 自定義鍵怎麽用?

西門子808D 用戶 自定義鍵怎麽用?

沒有參數控制,畫面內容是自己寫的,西門子出廠是沒有畫面的畫面的文本後綴名是.xml

下圖是畫面對應的.MXL的文件,希望對妳有用!

<let name="input_string" type="string"></let>

<let name="var3" type="string">MM</let>

<let name="Temp_Int" type="int"></let>

<let name="length" type="int">0</let> ?

<let name="rvar" type="int">0</let>?

<menu name="tiaoshi">

<open_form name = "setting_code"/>

<softkey Position = "9">

<caption> ?確定</caption>

<function name="string.length" return="length">input_string</function>

<function name="string.cmp"return="rvar">input_string,var3</function>

<update_controls type="false"/>

<if>

<condition> rvar==0 </condition>

<then>

<function name="string.length" return="length">input_string</function>

<function name="string.delete">input_string,0,length</function>

<navigation>tiaoshi2</navigation>

</then>

<else>

<msgbox text="密碼輸入錯誤,請重新輸入密碼!" caption ="信息" retvalue = "Temp_Int" type = "BTN_OK"/>

<if>

<condition>Temp_Int==1</condition>

<then>

<function name="string.length" return="length">input_string</function>

<function name="string.delete">input_string,0,length</function>

<op>Temp_Int=0</op>

</then>

</if>

</else>

</if>

</softkey>

<softkey POSITION="8">

<caption> ?返回%n ?主頁</caption>

<navigation>Main</navigation>

</softkey>

</menu>

<form name="setting_code" >

<init>

<DATA_ACCESS type="true"/>

<caption>密碼設置界面</caption>

<img xpos="230" ypos="270" name="f:/appl/pic.bmp"/>

<control name="cinput" xpos="240" ypos="80" width="100" refvar="input_string" fieldtype="edit" hotlink="true">

<property password="true"/>

</control>

</init>

<paint>

<text xpos="145" ypos="80">請輸入密碼:</text> ?

</paint>

<timer>

<img xpos="230" ypos="270" name="f:/appl/pic.bmp"/>

</timer>

<edit_change>

</edit_change>

<focus_in>

</focus_in>

</form>

<menu name="tiaoshi2">

<open_form name="R_list"/>

<softkey POSITION="1">

<caption>輸入診斷</caption>

<navigation>input1</navigation>

</softkey>

<softkey POSITION="2">

<caption>輸出診斷</caption>

<navigation>output1</navigation>

</softkey>

<softkey POSITION="3"type="user_controlled">

<caption>調試畫面</caption>

<state type="PRESSED" />

</softkey>

<softkey POSITION="4">

<caption>功能選項</caption>

<navigation>function</navigation>

</softkey>

<softkey POSITION="5">

<caption>附加功能</caption>

<navigation>m</navigation>

</softkey>

<softkey Position = "6">

<caption>售後電話</caption>

<navigation>tele</navigation>

</softkey>

<softkey position="9">

<caption> ?數據%n ?激活</caption>

<CONTROL_RESET resetnc="TRUE" />

</softkey>

<softkey position="8">

<caption> ?返回%n ?主頁</caption>

<navigation>main</navigation>

</softkey>

</menu>

<form name="R_list" >

<init>

<caption>調試畫面參數</caption>

<let name ="A9" ?type ="int"></let>

<let name ="A12" type ="int"></let>

<let name ="A15"type ="real"></let>

<let name ="A16"type ="real"></let>

<control name = "A1" xpos = "140" ypos = "30" height="15" width = "80" refvar="nck/Channel/machineAxis/acttoolbasePos[0]" hotlink="true" fieldtype="readonly" format="%9.3F" font = "3"time="super fast"/><!--X軸機械坐標-->

<control name = "A2" xpos = "140" ypos = "60" height="15" width = "80" refvar="nck/Channel/machineAxis/acttoolbasePos[1]" hotlink="true" fieldtype="readonly" format="%9.3F" font = "3"time="super fast"/><!--Z軸機械坐標-->

<control name = "A3" xpos = "400" ypos = "30" height="15" width = "80" refvar="nck/Nck/MachineAxis/toolBaseDistToGo[0]" hotlink="true" fieldtype="readonly" format="%9.3F" font = "3"time="super fast"/><!--X軸剩余行程-->

<control name = "A4" xpos = "400" ypos = "60" height="15" width = "80" refvar="nck/Nck/MachineAxis/toolBaseDistToGo[2]" hotlink="true" fieldtype="readonly" format="%9.3F" font = "3"time="super fast"/><!--Z軸剩余行程-->

<control name="A5" xpos= "180" ypos="90" width="80"refvar="$MA_POS_LIMIT_PLUS[AX1]" ?hotlink="true" fieldtype="edit"/><!--X軸正向軟限位-->

<control name="A6" xpos= "460" ypos="90" width="80"refvar="$MA_POS_LIMIT_MINUS[AX1]" hotlink="true" fieldtype="edit"/><!--X軸負向軟限位-->

<control name="A7" xpos= "180" ypos="120"width="80"refvar="$MA_POS_LIMIT_PLUS[AX3]" ?hotlink="true" fieldtype="edit"/><!--Z軸正向軟限位-->

<control name="A8" xpos= "460" ypos="120"width="80"refvar="$MA_POS_LIMIT_MINUS[AX3]" hotlink="true" fieldtype="edit"/> <!--Z軸負向軟限位-->

<control name="A9" ?xpos= "180" ypos="150"width="80"refvar="$MA_AX_MOTION_DIR[AX1]" hotlink="true" fieldtype="edit"/> <!--X軸運動方向-->

<control name="A10" xpos= "180" ypos="180"width="80"refvar="$MA_ENC_FEEDBACK_POL[0,AX1]"hotlink="true" fieldtype="edit"/> <!--X軸位置反饋極性-->

<control name="A11" xpos= "180" ypos="210"width="80"refvar="$MA_BACKLASH[0,AX1]" hotlink="true" fieldtype="edit"/><!--X軸反向間隙-->

<control name="A12" xpos= "460" ypos="150"width="80"refvar="$MA_AX_MOTION_DIR[AX3]" hotlink="true" fieldtype="edit"/><!--Z軸運動方向-->

<control name="A13" xpos= "460" ypos="180"width="80"refvar="$MA_ENC_FEEDBACK_POL[0,AX3]"hotlink="true" fieldtype="edit"/><!--Z軸位置反饋極性-->

<control name="A14" xpos= "460" ypos="210"width="80"refvar="$MA_BACKLASH[0,AX3]" hotlink="true" fieldtype="edit"/><!--Z軸反向間隙-->

<control name="A15" xpos= "180" ypos="240" width="80"refvar="$MA_LEADSCREW_PITCH[AX1]" hotlink="true" fieldtype="edit"/><!--X軸螺距-->

<control name="A16" xpos= "460" ypos="240" width="80"refvar="$MA_LEADSCREW_PITCH[AX3]" hotlink="true" fieldtype="edit"/><!--Z軸螺距-->

<control name="A17" xpos= "180" ypos="270" width="80"refvar="$MA_NUM_ENCS[0,AX4]" hotlink="true" fieldtype="edit"/><!--編碼器數量-->

<control name="A18" xpos= "460" ypos="270" width="80"refvar="$MA_JOG_VELO[0,AX4]" hotlink="true" fieldtype="edit"/><!--主軸點動速度-->

<control name="A19" xpos= "180" ypos="300" width="80"refvar="$MA_AX_MOTION_DIR[0,AX4]" hotlink="true" fieldtype="edit"/><!--主軸運動方向-->

<control name="A20" xpos= "460" ypos="300" width="80"refvar="$MA_ENC_FEEDBACK_POL[0,AX4]" hotlink="true" fieldtype="edit"/><!--主軸位置反饋極性-->

<control name="A21" xpos= "180" ypos="330" width="80"fieldtype="EDIT" refvar="$MN_USER_DATA_INT[24]" hotlink="true" font = "6" />><!--潤滑時間間隔-->

<control name="A22" xpos= "460" ypos="330" width="80"fieldtype="EDIT" refvar="$MN_USER_DATA_INT[25]" hotlink="true" font = "6" /><!--潤滑輸出時間-->

<control name="A23" xpos= "180" ypos="360" width="80"fieldtype="EDIT" refvar="$MN_USER_DATA_INT[20]" hotlink="true" font = "6" /><!--刀塔4,6工位選擇-->

</init>

<paint>

<!--box xpos="0" ypos="20"width="1"height="560" color="#000000"/>

<box xpos="559" ypos="20"width="1"height="560" color="#000000"/>

<box xpos="1" ypos="20"width="560"height="3" color="#000000"/-->

<text xpos= "10" ?ypos="30" font="6" >X軸機床坐標</text>

<text xpos= "10" ?ypos="60" font="6" >Z軸機床坐標</text>

<text xpos= "290" ypos="30" font="6" >X軸剩余行程</text>

<text xpos= "290" ypos="60" font="6" >Z軸剩余行程</text>

<text xpos= "230" ?ypos="30" font="6" >mm</text>

<text xpos= "490" ?ypos="30" font="6" >mm</text>

<text xpos= "230" ?ypos="60" font="6" >mm</text>

<text xpos= "490" ?ypos="60" font="6" >mm</text>

<text xpos= "10" ?ypos="90" font="6">X軸正向軟限位MD36110</text>

<text xpos= "290" ypos="90" font="6">X軸負向軟限位MD36100</text>

<text xpos= "10" ?ypos="120" ? font="6">Z軸正向軟限位MD36110</text>

<text xpos= "290" ypos="120" ? font="6">Z軸負向軟限位MD36100</text>

<text xpos= "10" ypos="150" font="6">X軸運動方向 ?MD32100</text>

<text xpos= "10" ypos="180" font="6">X軸反饋極性 ?MD32110</text>

<text xpos= "10" ypos="210" font="6">X軸反向間隙 ?MD32450</text>

<text xpos= "290" ypos="150" ? font="6">Z軸運動方向 ?MD32100</text>

<text xpos= "290" ypos="180" ? font="6">Z軸反饋極性 ?MD32110</text>

<text xpos= "290" ypos="210" ? font="6">Z軸反向間隙 ?MD32450</text>

<text xpos= "10" ?ypos="240" ? font="6">X軸螺距 ?MD31030</text>

<text xpos= "290" ypos="240" ? font="6">Z軸螺距 ?MD31030</text>

<text xpos= "10" ?ypos="270" ? font="6">編碼器數量 ? MD30200</text>

<text xpos= "290" ypos="270" ? font="6">主軸點動速度 MD32020</text>

<text xpos= "10" ?ypos="300" ? font="6">主軸運動方向 MD32100</text>

<text xpos= "290" ypos="300" ? font="6">主軸反饋極性 MD32110</text>

<text xpos= "10" ?ypos="330" ? font="6">潤滑時間間隔單位min</text>

<text xpos= "290" ypos="330" ? font="6">每次潤滑時間單位0.1s</text>

<text xpos= "10" ?ypos="360" ? font="6">刀位的選擇(4或6)</text>

<timer>

<MSGBOX text="測試消息" caption="信息" retvalue="result" type="BTN_OK" />

</timer>

</paint>

</form>

  • 上一篇:節目制作
  • 下一篇:學設計應該用什麽筆記本?
  • copyright 2024編程學習大全網