A0845A控制模塊,3BSE045584R1使用配置教程
硬件維護(hù)模塊實(shí)現(xiàn)硬件調(diào)試功能,可對(duì)各個(gè)測(cè)量?jī)x器進(jìn)行維護(hù)操作。步進(jìn)電機(jī)的控制,目前有很多種方法,PLC,運(yùn)動(dòng)控制卡,PC,單片機(jī)。用單片機(jī)控制步進(jìn)電機(jī)成本低,保密性高,專用型強(qiáng)。做好足夠的保密措施,產(chǎn)品相對(duì)于其他方式不容易被人模仿。所以基于單片機(jī)的運(yùn)動(dòng)控制方案在領(lǐng)域內(nèi)也占有一席之地。
A0845A控制模塊,3BSE045584R1使用配置教程步進(jìn)電機(jī)驅(qū)動(dòng)器接收脈沖信號(hào),每接收一個(gè)跳變沿驅(qū)動(dòng)步進(jìn)電機(jī)走一個(gè)步距角。一般都是脈沖和方向信號(hào),脈沖信號(hào)控制電機(jī)的運(yùn)行距離,方向信號(hào)控制電機(jī)的旋轉(zhuǎn)方向。單片機(jī)的兩個(gè)I/O口一個(gè)用來產(chǎn)生脈沖信號(hào),一個(gè)產(chǎn)生方向信號(hào)。步進(jìn)電機(jī)的轉(zhuǎn)速和脈沖頻率成正比。片機(jī)都含有定時(shí)器,可以根據(jù)精確計(jì)時(shí)。本案例使用AVR單片機(jī)內(nèi)置的16位定時(shí)器來精確定時(shí),控制脈沖跳變沿的間隔時(shí)間。同時(shí)在定時(shí)器中斷處理程序中進(jìn)行位置計(jì)算,如果達(dá)到設(shè)定值立即停止發(fā)脈沖。通過串口更新LCD顯示器的顯示信息,定時(shí)掃描鍵盤。
注意事項(xiàng):
1 中斷時(shí)間非常寶貴,盡量減少占用時(shí)間。本例只在中斷中進(jìn)行加減和比較運(yùn)算,并且計(jì)算出這些運(yùn)算所消耗的時(shí)間,從而修正定時(shí)器,使發(fā)出的脈沖頻率更加精準(zhǔn),穩(wěn)定。如使用16M的晶振,定時(shí)器的最小單位是1/16 us.如果脈沖頻率在100KHz以下,頻率誤差完全可以控制在0.625%以下。以常用的三相步進(jìn)電機(jī)為例,在10000步/轉(zhuǎn)的細(xì)分情況下,可以控制電機(jī)最高轉(zhuǎn)速達(dá)到600rpm.這個(gè)轉(zhuǎn)速基本上滿足大部分的控制需求。如果需要更高的轉(zhuǎn)速,可以降低細(xì)分設(shè)置。
2 步進(jìn)電機(jī)和驅(qū)動(dòng)器之間是開環(huán)控制,有可能出現(xiàn)丟步現(xiàn)象,必須盡量避免。采用多段加速的辦法可以降低加速度從而減小輸出扭力,可以有效解決丟步現(xiàn)象。段數(shù)越多,電機(jī)加速越平滑。在轉(zhuǎn)速低的場(chǎng)合,甚至可以逐步調(diào)節(jié)頻率,這是轉(zhuǎn)速變化是最平滑的。當(dāng)然分段會(huì)占用更多的中斷時(shí)間,降低所能產(chǎn)生的最高頻率,根據(jù)不同的單片機(jī),應(yīng)該視其性能靈活選擇。
3 有的單片機(jī)如AVR,其中的定時(shí)器有CTC功能,定時(shí)器發(fā)生匹配事件時(shí)自動(dòng)更新輸出腳狀態(tài),非常適合發(fā)出頻率可變的脈沖。不占用中斷時(shí)間,無疑是最佳選擇。具有智能作用的自動(dòng)感知和驅(qū)動(dòng)裝置 自動(dòng)門系統(tǒng)可以通過光感應(yīng)系統(tǒng)識(shí)別虛假的購物行為并自動(dòng)將入口封閉。強(qiáng)行出或破壞行為將立即通過警報(bào)傳達(dá)到工作人員那里,這樣就可以有效地制止那些將入口誤用為出口的人。此外,盜竊行為將變得更加困難,盤點(diǎn)存貨時(shí)出現(xiàn)的差額也會(huì)下降。
protocol, establish the mapping of variables and registers, and then download the configured program to the gateway hardware. The protocol gateway is generally a system based on arm. The manufacturer has integrated various protocols, and the communication setting method is basically the same as that of touch screen and configuration software. Generally, the technicians who work in industrial control are familiar with it and are very easy to get started. The temperature of the first circuit is 20h, function code 03, address of zone 4. Convert to decimal plus 1, it is 40033, and read 16 data. 16 bit sign integer. The real temperature value is the data divided by 10, as shown in the following figure:
5. Do a good job of communication processing, timing delay processing, you can collect several hundreds of thousands of points of temperature measurement.
Note: the module can not only be connected with PLC, but also can be connected with Kunhang acquisition module as long as the hardware or software with Modbus protocol, such as Siemens, Mitsubishi, Omron, Schneider PLC. Configuration software such as Kingview, 3D force control, MCGS, etc. MODBUS switching value module communicates with PLC. 1. Prepare a S7200 or smart200 PLC.
2. Prepare a khdq-1600, 16 channel switching value acquisition module of Kunhang technology. Write the program, the baud rate is 9600 by default, there is no verification, and the device address is 1. The first input is 40H, function code 02, zone 1 address.