***RS485 站號(Node ID) 設定:
* 透過AMP ” Step-Servo Quick Tunner ”軟體內設定馬達ID,如下:
![](https://montrol.com.tw/wp-content/uploads/2018/09/馬達ID.jpg)
*** 開啟VB軟體 :
步驟一: 專案>設定使用元件>勾選”Microsoft Comm Control 6.0”
![](https://montrol.com.tw/wp-content/uploads/2018/09/comm-control-6.0.png)
步驟二: 先製作介面
![](https://montrol.com.tw/wp-content/uploads/2018/09/form1-1.jpg)
步驟三: 編寫程式碼
Private Sub Form_Load()
If (MSComm1.PortOpen = True) Then MSComm1.PortOpen = False
MSComm1.CommPort = 3
MSComm1.PortOpen = True
MSComm1.Settings = “9600,N,8,1”
End Sub
Private Sub Command3_Click()
MSComm1.Output = “1FL20000″ + Chr(13)
End Sub
Private Sub Command4_Click()
MSComm1.Output = “2FL20000″ + Chr(13)
End Sub
Private Sub Command5_Click()
MSComm1.Output = “1FL20000″ + Chr(13)
MSComm1.Output = “2FL20000″ + Chr(13)
End Sub