freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于單片機(jī)的plc編譯程序設(shè)計(jì)研究畢業(yè)設(shè)計(jì)論文(留存版)

2024-09-07 20:35上一頁面

下一頁面
  

【正文】 下面是對(duì)此類 PLC邏輯指令的單片機(jī)程序模塊建立過程的分析。因?yàn)閱纹瑱C(jī)芯片不同,內(nèi)部的硬件資源也 就不同,目標(biāo)指令代碼和目標(biāo)程序框架結(jié)構(gòu)也就不同。然后,定義了基于單片機(jī)的 PLC的源程序語句標(biāo)準(zhǔn)集合,提出了源程序語句標(biāo)準(zhǔn)集合的數(shù)組表示方法;定 義了目標(biāo)代碼集合,提出了用口映射來建立源程序語句標(biāo)準(zhǔn)集合和目標(biāo)代碼集合之間的關(guān)系,為編譯程序結(jié)構(gòu)的實(shí)現(xiàn)提供了條件和方法;提出了盲碼預(yù)填和盲碼修正的思想提出了依據(jù) M數(shù)組對(duì)源程序查錯(cuò)的思路,通過列表文件名和列表文件的建立、整句識(shí)別、語句語法檢查中的 M數(shù)組逐行搜索、核對(duì)關(guān)鍵詞是否相等、核對(duì)語句長(zhǎng)度是否正確等一系列環(huán)節(jié),實(shí)現(xiàn)對(duì)源程序的查錯(cuò)處理;論述了翻譯過程中向目標(biāo)文件里裝配固定代碼的過程;論述了翻譯和裝配活動(dòng)代碼的整體思路和流程;運(yùn)用 M數(shù)組進(jìn)行源程序語句的類型識(shí)別,初步實(shí)現(xiàn)了盯映射的預(yù)定位;有效定義了引用名 (位地 址 )的字符轉(zhuǎn)化函數(shù);分別給出了實(shí)現(xiàn)盯映射的第一種程序結(jié)構(gòu)和第二種程序結(jié)構(gòu),有效的完成了簡(jiǎn)單活動(dòng)代碼和復(fù)雜活動(dòng)代碼的翻譯和目標(biāo)文件的裝配任務(wù);提出并論述了第一類盲碼修正和第二類盲碼修正的程序?qū)崿F(xiàn)方法。 關(guān)鍵詞 : 單片機(jī),可編程邏輯控制器,編譯程序,盲碼,源程序,目標(biāo)程序 7 Abstract Sometimes, one kind of extremely inexpensive logic controller is needed in design and the development of the automation device and the integration oelectro—mechanical product. In order to meet this kind of needs. the author carried Oll the hardware and the sofhvare research of having directly realized the ladder diagram logic control with the monolithic microputer. In which. most essential technology is how to design the piler for PLC based on monolithic microputer,and is how to translate PLC instruction source program which conf01Tn ladder diagram logic into monolithic microputer targetprogram. This paper elaborated design theory and the method of the piler for PLC based on the monolithic microputer,has studied the monolithic microputer program module and the target program frame for PLC based on the monolithic microputer,has c ried on the analysis to . elaborated design method for the checking mistaken module as well as the assembly method for goal code, has carried on the analysis to expedmental result and debugging experiment system position for the piler for PLC based on the monolithicmicroputer. First,the research on the monolithic microputer program module for PLC based on the monolithic microputer has been conducted. The alone characteristic frame construction for targetprogram has been constructed. Then. the paper has defined the standard set of the source program sentence for PLC based on the monolithic microputer,proposed the array expression method for the standard setof the source program sentence. The goal code set has been defined. Establishing the relations between the source program sentence standard set and the goal code set with sigma the mapping has been proposed, so that the condition and the method for realization of the pile structure has been provided. A thought ofthe filling blind code in advance and the revising blind code has been proposed。此外在設(shè)計(jì)中采用盲碼預(yù)填及修正技術(shù)。實(shí)現(xiàn) TIM指令所需要的片內(nèi)資源有:①延時(shí)計(jì)時(shí)器的邏輯位 Ti,位地址 30H. 3FH;②延時(shí)計(jì)時(shí)器的狀態(tài)標(biāo)志位 Si,位地址 40H. 4FH;⑨延時(shí)計(jì)時(shí)器的軟加 1計(jì)數(shù)器 Zi, Zi由兩字節(jié)寄存器組成,由 TO中斷服務(wù)程序?qū)ζ鋵?shí)行加 1計(jì)數(shù),可記錄 4位 BCD數(shù),字節(jié) 地址 50H, 51H, 52H, 53H, CNT Ci計(jì)數(shù)指令的單片機(jī)程序模塊如下: 14 1. 4 PLS. 8 Yi 脈沖微分語句的單片機(jī)程序模塊的構(gòu)建 本系統(tǒng)共設(shè)有 8個(gè)脈沖微分寄存器。其中,固定代碼的編譯結(jié)果基本是固定的。 m iJ是其元素, m i j ? M, m i j為 1字節(jié) ASCII字符,且有子集 Mi ? M Mi: {m?mi2, ??, mik} (1) Mi為 M數(shù)組行元素集合,其前 k— 1個(gè)字符組成的字符串記為: String Mi=mi1mi2??mik1 假如 String Mi的值等于基于單片機(jī)的 PLC某種源程序語句 (簡(jiǎn)稱為“源語句 ) 助記符串中的標(biāo)識(shí)符串,并且 Mi中的元素 mi k的值等于這種源語句長(zhǎng)度的 ASCII值, 則稱子集 Mi為這種源語句的標(biāo)準(zhǔn)子集。例如,源程序語句 LD 20共 5 個(gè) ASCII字符 (空格算一個(gè) ASCII字符 ),所以,子集 M1={L, D, , 5)中的最后一 個(gè)數(shù)字為 5。目標(biāo)代碼都是 16進(jìn)制代碼。其特點(diǎn)是:翻譯時(shí), 一次掃描 源程序文件,逐條翻譯,依 Fi=a(Mi)裝配活動(dòng)代碼。一旦識(shí)別出一個(gè)整句,就進(jìn)行語句語法檢查,并將查錯(cuò)結(jié)果寫入列表文件。 3. 1. 2 列表文件 (. 1st)的建立 下面的程序,先用 fopen,以 rb的方式打開源程序文件。用 c[i1]=ch語句實(shí)現(xiàn)源語句字符送 C數(shù)組操作。因此實(shí)行 J加 1(做j++:操作 ),到 M數(shù)組的下一行中繼續(xù)搜索。 30 3. 4. 4 錯(cuò)誤標(biāo)記寫入錯(cuò)誤信息文件 在 3. 1. 2中我們已經(jīng)知道指針變量 fp指向源程序文件 (. asm),指針變量 fpl 指向列表文件 (. 1st)。 結(jié)果,實(shí)現(xiàn)了用 b數(shù)組記錄一個(gè)文件名和源程序文件名相同,但擴(kuò)展名和源程序文件名不同的目標(biāo)文件名,該目標(biāo)文件名的擴(kuò)展名為“. bin。所以,目標(biāo)文件的擴(kuò)展名為“. bin。 上例中的標(biāo)準(zhǔn)有: mE4][5]=’\ x06’。 若找不到相同的,則該源程序語句語法不正確。當(dāng)識(shí)別出一個(gè)整句時(shí),進(jìn)行一次語句語法檢查。} If(i36) {b1=2。 y=09H, 其中, 09H值是從源語句 PLS 09中的參數(shù) 09得到, 19H是計(jì)算得到。定理 1證畢。 fi。 性質(zhì) 3: M數(shù)組的行數(shù)等于基于單片機(jī)的 PLC語句的條數(shù)。等編譯程序中執(zhí)行“掃描源程序文件,逐條翻譯... 時(shí),得到源程序 提供的定時(shí)器初值,再在用正式代碼 (以 MOV指令目標(biāo)代碼的形式,并含定時(shí)器初值 ) 代替相應(yīng)位置上的盲碼。其功能是將 輸入端的邏輯值暫存在 Gi中,供 SFT指令使用;第二個(gè)是對(duì)應(yīng)于 SFT Mi的移位操作 程序模塊,其功能是依據(jù)已知的當(dāng)前邏輯運(yùn)算值 (在累加器 C中 ),以及 Hi的值,判斷 16 移位脈沖是否到;當(dāng)移位脈沖到時(shí),將輸入暫存位 Gi中的值移入移位寄存器 Mi。這是一個(gè)對(duì)第 i個(gè)延時(shí)計(jì)時(shí)器進(jìn)行邏輯運(yùn)算處理的模塊,運(yùn)算的依據(jù)是已知的當(dāng)前邏輯運(yùn)算值 (在累加器 C中 )。 (如延時(shí)計(jì)時(shí)器類、脈沖微分類、計(jì)數(shù)器類、移位類等 )的單片機(jī)程序模塊需十幾條或 幾十條單片機(jī)指令組成。 (2)其次,目標(biāo)程序框架結(jié)構(gòu)也不同。首先,進(jìn)行了基于單片機(jī)的 PLC的單片機(jī)程序模塊研究,構(gòu)建了獨(dú)具特點(diǎn)的目標(biāo)程序框架結(jié)構(gòu)。A mentality of checking mistaken to the source program according to the Marray has been proposed. The processing of the checking mistaken to the source program has been realized through a series of procedure such as the establishment of list filename and list documenL the recognition to entire sentence. the search by line using M array in sentence grammar inspection, the checkup to key word whether equal, the checkup to sentence length whether correct and so on. The process of assembling the fixed code into the goal document during the translation has been elaborated. Overall mentality and the procedure 8 of the translation and the assembly code have been elaborated. The prelocalization of the sigma mapping bycarrying on the type recognition to source program sentence depend on the array M has initially beenrealized. The character transformation function for quotation name(bit address)has been definedeffectively, e first kind of procedure structure and the second kind of procedure structure for realizationsigma mapping has separately been given, so that the translation of the simple active code and the plex active code has effective been pleted, and that the assembly of the goal document has been pleted. The procedure realization method for the first kind of blind code revision and the second kind of blind code revision has been proposed and elaborated. The experimental system which using the research of piler design for PLC based on monolithic microputer has been established. We had carried on the confirmation and pare to the each function of the piler. After the severaI procedure trials。 總之,基于單片機(jī)的 PLC編譯程序設(shè)計(jì)研究是一項(xiàng)具有創(chuàng)造性的工作,需要充分吸 收前人 經(jīng)驗(yàn),開創(chuàng)創(chuàng)新,建立新的模型,新的結(jié)構(gòu),新的方法 1 基于單片機(jī)的 PLC的單片機(jī)程序模
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1