git commit -m "first commit for v2"
This commit is contained in:
42
Controllers/Packages/nova5_control/README.md
Normal file
42
Controllers/Packages/nova5_control/README.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Reference
|
||||
https://docs.google.com/spreadsheets/d/1LkLH5IGXDXprNB6_w0-2-jNupRHEH-4PBC6LIrh3G1I/edit?gid=0#gid=0
|
||||
https://www.dobot-robots.com/service/download-center?keyword=&products%5B%5D=535
|
||||
https://tranduc-my.sharepoint.com/:w:/g/personal/tranduong1692_tranduc_onmicrosoft_com/EVSb3HeS-HZPlmAMflUsuLMBLrq5_Dnm5ku2Kj9Bu8C8Rw?e=FEROOU
|
||||
# Require
|
||||
Clone: http://git.pnkx/HiepLM/modbus.git
|
||||
http://git.pnkx/HiepLM/libserial.git
|
||||
# Guide
|
||||
// Nên chạy trong một thread//
|
||||
// Khởi tạo cổng kết nối robot thông qua modbus tcp //
|
||||
cnt_nova5 *nova5 = nullptr;
|
||||
nova5 = new cnt_nova5(IP,PORT);
|
||||
//==================================================//
|
||||
|
||||
// Quy trình kết nối robot //
|
||||
if((*nova5).nova_connect())
|
||||
{
|
||||
// Kiểm tra xem robot có đang trong trạng thái EMC không
|
||||
if((*nova5).nova_robotMode() == 3) (*nova5).nova_powerOn();
|
||||
|
||||
// Sau khi kết nối thành công cần enable robot
|
||||
if((*nova5).nova_robotMode() == 4) (*nova5).nova_enable();
|
||||
|
||||
// Sau khi enable robot thành công cần bắt đầu chương trình của ccbox
|
||||
if((*nova5).nova_robotMode() == 5) (*nova5).nova_startProgram();
|
||||
}
|
||||
else (*nova5).nova_close();
|
||||
//==========================//
|
||||
|
||||
// Sử dụng hàm nova_movePoint() cần đưa vào vòng lặp chờ đến khi robot di chuyển xong và trả về phản hồi, sau đó mới được đưa ra lệnh điều khiển tiếp theo
|
||||
|
||||
// Ví dụ hàm nova_movePoint() //
|
||||
if(count == 0)
|
||||
{
|
||||
// Set tốc độ global tay máy
|
||||
nova5->nova_speedGlobal(50.0);
|
||||
|
||||
if(nova5->nova_movePoint(ORIGIN_COOR)==1 && count == 0) count ++;
|
||||
}
|
||||
//============================//
|
||||
|
||||
|
||||
Reference in New Issue
Block a user