|
電機仿真機器車仿真原理圖如下(proteus仿真工程文件可到本帖附件中下載)
51hei.png (59.8 KB, 下載次數(shù): 68)
下載附件
2021-4-4 02:35 上傳
流程說明:
1,一上電,先通過按按鍵設(shè)置物塊的高度和體積
2,注意,物塊高度或者體積只要有其中一個為0時,不能開始搬運
3,按下開始搬運按鍵,即開始搬運,
流程是
機械臂先把物塊抓取到機器車上,
機械臂減速
機器車帶著物塊前往目的地
機器車減速
機械臂把物塊放下來
機械臂減速
機器車回到物塊堆積處(此時機器車是空車)
機器車減速
蜂鳴器響,提示本次搬運已經(jīng)完成
4,這時候按下機器復(fù)位按鍵,開始下一次設(shè)置物塊參數(shù)和搬運
搬運物塊完成提示模塊
第一行顯示的是物塊的高度和機器車與物塊堆積處的距離
第二行顯示的是物塊的體積或者直徑或者質(zhì)量
51hei.png (29.51 KB, 下載次數(shù): 45)
下載附件
2021-4-4 02:37 上傳
單片機源程序如下:
- #include"DS18B20.h"
- #include "Lcd1602.h"
- #include"KEY.h"
- #define uint unsigned int
- extern bit Start18B20();
- extern bit Get18B20Temp(int *temp);
- extern uchar keyvalue;
- void display(uint num);
- void read_del8b20();
- unsigned char PuZh[]="Temperature";
- unsigned char SetL[7]="L:";
- unsigned char SetH[7]="H:";
- extern uchar m;
- unsigned char shu[4]={0};
- unsigned char Ltemp[3]={1,2,3};
- unsigned char Htemp[3]={3,2,1};
- extern uchar LNextBit;
- extern uchar HNextBit;
- unsigned char pwm=0,count=0;
- bit res;
- int temp;
- int intT=0,decT;
- int i=0;
- int cha=0;
- int time1=0;
- void main(void)
- {
- unsigned n=0;
- InitLcd1602();
- Start18B20();
-
- while(1)
- {
- read_del8b20();
- delay1(1300);
- if(intT != 85)
- {
- i=intT;
- }
- deal();
- display(i*10);
- alarm();
- }
- }
- void read_del8b20()
- {
- res=Get18B20Temp(&temp);
- if(res)
- {
- intT=(temp>>4);
- decT=temp&0xf;
- }
- Start18B20();
- DelayX10us(5);
- }
- void display(uint num)
- {
- shu[0]=num/100+0x30;
- shu[1]=num%100 /10+0x30;
- shu[2]='.';
- shu[3] = num%10+0x30;
- SetL[2] = Ltemp[0]+0x30;
- SetL[3] = Ltemp[1]+0x30;
- SetL[4] = '.';
- SetL[5] = Ltemp[2]+0x30;
- SetH[2] = Htemp[0]+0x30;
- SetH[3] = Htemp[1]+0x30;
- SetH[4] = '.';
- SetH[5] = Htemp[2]+0x30;
- LcdShowStr(0,0,PuZh);
- LcdShowStr(0,1,SetL);
- LcdShowStr(9,1,SetH);
- LcdShowStr(12,0,shu);
- }
復(fù)制代碼
51hei.png (1.98 KB, 下載次數(shù): 64)
下載附件
2021-4-4 02:37 上傳
所有資料51hei提供下載:
搬運機器人.zip
(226.18 KB, 下載次數(shù): 78)
2021-4-3 15:46 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
|
評分
-
查看全部評分
|