IC693ACC302
INDRAMAT AC SERVO POWER SUPPLY TVR 3.1-W015-03
REXROTH INDRAMAT 2AD132C-B350B1-CS03-D2V1 REMAN
REXROTH INDRAMAT MDD115D-N-020-N2M-130-PA2
INDRAMAT MAC112C-2-ED-4-C/130-A-2/WI520LV/S018 NEW
INDRAMAT DSC3.1-150-115 USPP DSC31150115
MAC112C-0-ED-4-C/130-A-0/WI524L/S05 INDRAMAT
MAC112C-0-ED-4-C/130-A-0/WI524/S05 INDRAMAT
MAC112C-0-ED-4-C/130-A-0/WI538/S05 INDRAMAT
INDRAMAT 2AD160B-B350A1-BS27-A2N1 USPP 2AD160BB350A1BS2
INDRAMAT TVD1.3-15-03 USPP TVD131503
INDRAMAT CCD01.1KE19-01FW USPP CCD011KE1901FW
INDRAMAT DSC1.7-50-115 USPP DSC1750115
Indramat AC Spindle Drive Rac 2 RAC2.2-150-460-A00-W1_230736-05407_109-0743
INDRAMAT SERVO DRIVE MOTOR W/ BRAKE MAC112DOED4XC130A2AM164SG/S018
Indramat Induction Motor 2AD132D-B350B2-AS11-B2N1 _ 2AD132D-B35OB2
Indramat MAC 112D-0-ED-4-C/130-A-2/WI520LV Servo Motor
1 INDRAMAT DSC1.7-50 MOTOR CONTROL Q7-5
INDRAMAT AC SPINDLE DRIVE RAC 3.1-150-460-A00-W1-220
Indramat 2AD132D-B350B1-AS03-B2N1 3-Phase Induction Spindle Motor 22kW 54A
INDRAMAT AC SPINDLE DRIVE RAC 2.1-150-460-A0I-W1-220
INDRAMAT 2AD132D-B350B1AS01/S007 USPP 2AD132DB350B1AS0
2AD132C-B350B2-AD01/S07 INDRAMAT
2AD132C-B350B2-CS03-D2V1 INDRAMAT
INDRAMAT TVD1.2-08-03 USPP TVD120803
Indramat 3 Phase Induction Motor_2AD134C-B350B1-DS06-B2N1_ 2AD1340
INDRAMAT HDS04.1-W200N-HS45-01-FW/HDS4.1-W200N-H AC SERVO CONTROLLER ***RFB***
INDRAMAT KDS1.3-150-300-W1 AC SERVO CONTROLLER ***XLNT***
INDRAMAT TVD1.3-15-03 Servo Power Supply Module 15KW 320VAC
INDRAMAT AC SERVO COMPACT CONTROLLER DKS01.2-W100A-DL01
Indramat AC-Main Spindle Drive RAC 2.1-200-380 #7087SO
INDRAMAT MAC112D-0-HD-3-C/130-A-0 USPP MAC112D0HD3C130A
Indramat AC - Main / Spindle Drive 32-250-460 #7153DC
INDRAMAT DDS DIAX02 DRIVE CONTROLLER DDS02.1-W015-D
INDRAMAT KDV1.3-100-220/300-W1/115/220 NSFP KDV13100220300W1
INDRAMAT AC SERVO COMPACT CONTROLLER DKS01.2-W100A-DS6
INDRAMAT 3 PHASE PERMANENT MOTOR MKE098B-047-KP1-BUNN
DSC3.1-150-115V INDRAMAT
INDRAMAT KDS1.1-150-300-W1-115 USPP KDS11150300W1115
INDRAMAT MAC112D-2-HD-4-C/130-A-0/WI520LX/S018 USPP MAC112D2HD4C1301
問:FUNCTION_BLOCK FB_HOMING
VAR_INPUT
myaxis : posaxis;
starthoming : BOOL;
offset : LREAL;
END_VAR
VAR
myRetDINT : DINT;
mystarthomingrtrig : r_trig;
mystarthoming : BOOL;
myaxishomedrtrig : r_trig;
END_VAR
VAR_OUTPUT
my_axishomed : BOOL;
END_VAR
mystarthomingrtrig(clk := starthoming);
myaxishomedrtrig(clk := my_axishomed);
IF mystarthomingrtrig.q THEN
mystarthoming := TRUE;
ELSIF myaxishomedrtrig.q THEN
mystarthoming := FALSE;
END_IF;
myaxis.setconfigdata.typeofaxis.numberofencoders.
encoder_1.inchomingencoder.proceedshiftpos := offset;
IF mystarthomingrtrig.q AND myaxis.control=ACTIVE THEN
myRetDINT :=
_homing(
axis := myaxis,
homingmode := ACTIVE_HOMING,
homebtype :=DIRECT,
homeb := 0.0,
velocityprofile := TRAPEZOIDAL,
mergemode := IMMEDIATELY,
nextcommand := WHEN_BUFFER_READY,
commandid := _getcommandid()
);
END_IF;
IF myaxis.bingstate.homed = yes THEN
my_axishomed := TRUE;
ELSE
my_axishomed := FALSE;
END_IF;
END_FUNCTION_BLOCK
問題補(bǔ)充:這段程序,前幾段關(guān)于變量的定義基本看的懂,后面就不怎么懂了,myaxis.setconfigdata.typeofaxis.numberofencoders.
encoder_1.inchomingencoder.proceedshiftpos := offset,又是上面意思呢,myRetDINT,是什么意思? 那位幫忙解釋下?
答:這是一段主動回零的程序。
可以參考一下資料
1、程序首先定義了兩個(gè)上升沿,當(dāng)starthoming和axishomed來臨時(shí)觸發(fā)兩個(gè)上升沿。
2、當(dāng)上升沿mystarthomingrtrig觸發(fā)后,賦值變量mystarthoming
表示開始回零,當(dāng)上升沿myaxishomedrtrig觸發(fā),變量復(fù)位,回零結(jié)束(這個(gè)上升沿后面將觸發(fā))
3、myaxis.setconfigdata.typeofaxis.numberofencoders.
encoder_1.inchomingencoder.proceedshiftpos := offset;
是設(shè)定一個(gè)偏移量,類型為LREAL,具體變量解釋可以點(diǎn)擊相應(yīng)的軸看symbol browse,找到這個(gè)變量,看它的屬性。
4、前面那個(gè)上升沿觸發(fā),并且軸使能后開始回零指令。myRetDINT只是在執(zhí)行回零指令_homing()所要求定義的返回值,在VAR里面也定義了,可以隨便定義名稱的,是一個(gè)DINT型,有時(shí)可以根據(jù)這個(gè)返回值確定程序執(zhí)行的狀態(tài)。
5、當(dāng)回零完成后,用軸的回零變量置位my_axishomed, 變量my_axishomed同時(shí)又觸發(fā)上面的上升沿程序。
廈門潤星貿(mào)易有限公司
聯(lián)系人:吳偉杰
QQ:2563095702
郵箱:2563095702@qq.com
電話:0592-6895320
手機(jī):18030263579
傳真:0592-6034581〔備注吳偉杰收〕