1756-L72S 程序容易閱讀,便于診斷和維護(hù)

1、程序容易閱讀,便于診斷和維護(hù);
? ? 2、程序容易在不同廠家之間的PLC之間轉(zhuǎn)換。
? ? 西門(mén)子的STL語(yǔ)言是強(qiáng)大,但難于閱讀,編寫(xiě)程序也需要異常小心,其強(qiáng)大的可能是它的寄存器尋址(類(lèi)似于一些計(jì)算機(jī)高級(jí)語(yǔ)言中的地址指針),SCL沒(méi)有這個(gè)功能,那就多費(fèi)一些程序代碼來(lái)實(shí)現(xiàn)同樣的功能,程序是否優(yōu)秀更應(yīng)該看重程序的架構(gòu)和提高程序生產(chǎn)效率的標(biāo)準(zhǔn)化,好的PLC程序不應(yīng)該只有自己明白,而是讓更多的人明白。在西門(mén)子PLC中使用SCL語(yǔ)言的場(chǎng)合一般是編寫(xiě)標(biāo)準(zhǔn)功能塊FB,其編程方式和西門(mén)子的其他編程語(yǔ)言,如梯形圖Lad、語(yǔ)句表STL是完全不同的,同時(shí)為了實(shí)現(xiàn)程序的國(guó)際標(biāo)準(zhǔn)化,即為了方便的將程序代碼移植到不同廠家的PLC系統(tǒng)上,盡量不要在SCL中使用西門(mén)子獨(dú)有的功能塊。
分類(lèi):

描述

1756-L72S 程序容易閱讀,便于診斷和維護(hù)

?它的優(yōu)點(diǎn):
? ? 1、程序容易閱讀,便于診斷和維護(hù);
? ? 2、程序容易在不同廠家之間的PLC之間轉(zhuǎn)換。
? ? 西門(mén)子的STL語(yǔ)言是強(qiáng)大,但難于閱讀,編寫(xiě)程序也需要異常小心,其強(qiáng)大的可能是它的寄存器尋址(類(lèi)似于一些計(jì)算機(jī)高級(jí)語(yǔ)言中的地址指針),SCL沒(méi)有這個(gè)功能,那就多費(fèi)一些程序代碼來(lái)實(shí)現(xiàn)同樣的功能,程序是否優(yōu)秀更應(yīng)該看重程序的架構(gòu)和提高程序生產(chǎn)效率的標(biāo)準(zhǔn)化,好的PLC程序不應(yīng)該只有自己明白,而是讓更多的人明白。在西門(mén)子PLC中使用SCL語(yǔ)言的場(chǎng)合一般是編寫(xiě)標(biāo)準(zhǔn)功能塊FB,其編程方式和西門(mén)子的其他編程語(yǔ)言,如梯形圖Lad、語(yǔ)句表STL是完全不同的,同時(shí)為了實(shí)現(xiàn)程序的國(guó)際標(biāo)準(zhǔn)化,即為了方便的將程序代碼移植到不同廠家的PLC系統(tǒng)上,盡量不要在SCL中使用西門(mén)子獨(dú)有的功能塊。
? 對(duì)于PLC編程,一般做工控的人都會(huì),有經(jīng)驗(yàn)的人也許對(duì)一些小小的技巧算不上什么,但對(duì)于生手來(lái)說(shuō),那可能是要很長(zhǎng)時(shí)間才能體會(huì)得到的。
? ? 1.在編寫(xiě)數(shù)據(jù)轉(zhuǎn)換的時(shí)候,特別是步進(jìn)伺服的位置或速度切換的時(shí)候,一定要給一個(gè)緩沖時(shí)間,不要寫(xiě)那種無(wú)縫對(duì)接的程序,如果無(wú)縫對(duì)接,常常會(huì)出錯(cuò),位置可能會(huì)產(chǎn)生走不準(zhǔn)。一般來(lái)說(shuō)應(yīng)該要給一個(gè)0.05s以上或者大于二個(gè)以上的掃描周期。
? ? 2.位置控制指令,在每次回原點(diǎn)或者啟動(dòng)瞬間,是把當(dāng)前位置清零。否則也會(huì)產(chǎn)生位置誤差和累計(jì)誤差。
? ? 3.位置控制在回原點(diǎn)的時(shí)候,一定要用回原點(diǎn)指令,不可以走數(shù)據(jù)。
? ? 4.位置控制時(shí),盡可能的用位置控制,不要走相對(duì)指令,位置對(duì)于編程來(lái)說(shuō),也比相對(duì)位置控制簡(jiǎn)單好用。
? ? 5.位置控制時(shí),用脈沖+方向控制。盡量不要用雙脈沖。
? ? 6.手動(dòng)和自動(dòng)程序分開(kāi)寫(xiě)。做成一個(gè)程序塊的方式。
? ? 7.有用到上升沿或下降沿的時(shí)候,觸點(diǎn)一定要放在輸出線圈的后面,否則會(huì)掃描不上或者不穩(wěn)定。
? ? 8.一般感應(yīng)開(kāi)關(guān),特別是氣缸的磁感應(yīng)開(kāi)關(guān)有一個(gè)感應(yīng)區(qū)域,執(zhí)行時(shí),一定要給一個(gè)0.1s以上的時(shí)間。否則可能會(huì)產(chǎn)生機(jī)械沒(méi)有到位,而程序就開(kāi)始執(zhí)行下一步了。
? ? 9.精密傳感器,特別是數(shù)字測(cè)量的,不要機(jī)械到位后立馬檢測(cè),這個(gè)時(shí)候檢測(cè)的東西基本上都是不準(zhǔn)確的,也同樣是要給一個(gè)緩沖時(shí)間。
? ? 10.程序越復(fù)雜,操作越簡(jiǎn)單,這樣的機(jī)器現(xiàn)場(chǎng)操作員是喜歡用的了。別人要求程序簡(jiǎn)單化,我的要求是復(fù)雜化,智能化。
? ? 11.并不一定非要用上高級(jí)指令,一般來(lái)說(shuō)達(dá)到要求就可以了。

1756-L72S 程序容易閱讀,便于診斷和維護(hù)

Its advantages:
1, the program is easy to read, easy to diagnose and maintain;
2, the program is easy to convert between PLC between different manufacturers.
Siemens STL language is powerful, but difficult to read, writing programs also need to be extremely careful, its powerful may be its register addressing (similar to the address pointer in some computer high-level languages), SCL does not have this function, then spend more program code to achieve the same function, Whether the program is excellent should pay more attention to the structure of the program and improve the standardization of program production efficiency, a good PLC program should not only understand themselves, but let more people understand. SCL language is generally used in Siemens PLC to write standard function block FB, and its programming method is completely different from other programming languages of Siemens, such as ladder diagram Lad and statement table STL. At the same time, in order to achieve international standardization of the program, that is, in order to facilitate the transplantation of program code to PLC systems of different manufacturers. Try not to use a Siemens-only feature block in SCL.
For PLC programming, people who generally do industrial control will, experienced people may not be anything for some small skills, but for beginners, it may take a long time to realize.
1. When writing data conversion, especially when the stepper servo position or speed switch, be sure to give a buffer time, do not write the kind of seamless docking program, if seamless docking, often make mistakes, the position may produce inaccurate. In general, it should be given a scan cycle of more than 0.05s or more than two.
2. Position control command, in each return to the origin or start the moment, is to clear the current position to zero. Otherwise, positional errors and cumulative errors will occur.
3. When the position control is back to the origin, it must be used to return to the origin command, and the data can not be taken.
4. When controlling position, use position control as much as possible, do not go relative command, position for programming, but also easier than relative position control.
5. For position control, use pulse + direction control. Try not to double pulse.
6. Write manual and automatic programs separately. The way to make a block.
7. When it is used to rise or fall along the edge, the contact must be placed behind the output coil, otherwise it will not be scanned or unstable.
8. General induction switch, especially the magnetic induction switch of the cylinder has a induction area, and it must be given a time of more than 0.1s when executed. Otherwise, the machine may not be in place, and the program will proceed to the next step.
9. Precision sensors, especially digital measurements, should not be detected immediately after the mechanical position, and the things detected at this time are basically inaccurate, and it is also necessary to give a buffer time.
10. The more complex the program, the simpler the operation, such a machine field operator is like to use. Others ask for simplicity, I ask for complexity, intelligence.
11. It is not necessary to use advanced instructions, generally just meet the requirements.

公司介紹:
成都陽(yáng)光不斷創(chuàng)新致力于提升停產(chǎn)的自動(dòng)化零件供應(yīng)水平,無(wú)論客戶身處何地,無(wú)論所需配件多么稀有,我們總能將客戶與所需產(chǎn)品緊密連接 ,成都陽(yáng)光零部件覆蓋廣泛。
急切需要自動(dòng)化或控制零件? 全新、Used和已停產(chǎn)的自動(dòng)化機(jī)械零件的全球供應(yīng)商。
客戶支持快速響應(yīng)
合作伙伴網(wǎng)絡(luò)橫跨各個(gè)大洲
全球合作伙伴網(wǎng)絡(luò)




Company Introduction:
Chengdu Sunshine Xihe Co., Ltd. specializes in one-stop procurement consulting for imported industrial spare parts, offering original equipment and professional discontinued parts services. We are committed to providing efficient and reliable automation solutions for our customers. Customer support fast responseThe network of partners spans all continentsGlobal partner networkAlways achieve more delivery, be it parts, service or speed



始終實(shí)現(xiàn)更多的交付,無(wú)論是零件、服務(wù)還是速度