1、台达VFD通讯示例台达VFD-B变频器串口通信中,频率设定,还有正转、反转、停止字符串是怎样写?范例1:设定VFD-B系列变频器的频率为30.00Hz,通讯格式为9600,8,N,2,RTU01 06 2001 0BB8 D488 范例2:设定VFD-B系列变频器正转,通讯格式为9600,8,N,2,RTU 01 06 2000 0022 0213范例3:设定VFD-B系列变频器停止,通讯格式为9600,8,N,2,RTU01 06 2000 0001 43CA西门子与台达变频器通讯ORGANIZATION_BLOCK主程序:OB1TITLE=实现S7-200PLC与台达变频器通信/实现功能是
2、PLC通过RS485通信控制变频器的正转启动、反转启动、停止、加速、减速和读取输出频率。变频器通过Modbus通信方式进行/要求台达变频器设置基本通信参数:/P00=d03(主频率由RS485控制)/P01=d03(运转/停止由RS485通信控制)/P88=d01(站点定义为1号站)/P90d00P91=d00P92=d02P113=d01/(其他参数都是出厂默认值,可根据实际情况调节)/BEGINNetwork1LDSM0.1CALLSBR0Network2/正转启动命令LDM10.0EUMOVB16#30,VB104MOVB16#36,VB105MOVB16#32,VB106MOVB16#
3、30,VB107MOVB16#30,VB108MOVB16#30,VB109MOVB16#30,VB110MOVB16#30,VB111MOVB16#31,VB112MOVB16#32,VB113CALLSBR1Network3/反转启动指令LDM10.1EUMOVB16#30,VB104MOVB16#36,VB105MOVB16#32,VB106MOVB16#30,VB107MOVB16#30,VB108MOVB16#30,VB109MOVB16#30,VB110MOVB16#30,VB111MOVB16#32,VB112MOVB16#32,VB113CALLSBR1Network4/停止指
4、令LDM10.2EUMOVB16#30,VB104MOVB16#36,VB105MOVB16#32,VB106MOVB16#30,VB107MOVB16#30,VB108MOVB16#30,VB109MOVB16#30,VB110MOVB16#30,VB111MOVB16#30,VB112MOVB16#31,VB113CALLSBR1Network5/1秒脉冲LDNT37TONT37,10Network6/加速指令(每1秒步进加速0.01Hz)LDM10.3AT37INCWVW135Network7/减速指令(每1秒步进减速0.01Hz)LDM10.4AT37DECWVW135Network8
5、/上限频率50.00HzLDW=VW135,5000MOVW5000,VW135Network9/下限频率0.1HzLDW=VW135,10MOVW10,VW135Network10/凡有频率改变,调用子程序3LDWVW135,VW145OSM0.1CALLSBR3Network11/读取输出频率指令LDM10.5EUMOVB16#30,VB104MOVB16#33,VB105MOVB16#32,VB106MOVB16#31,VB107MOVB16#30,VB108MOVB16#33,VB109MOVB16#30,VB110MOVB16#30,VB111MOVB16#30,VB112MOVB1
6、6#31,VB113SM20.0,1CALLSBR1Network12/当读取频率时,执行频率显示运算子程序LDSM4.5AM20.1CALLSBR2Network13/SMB86=0表示正在接收,但本例是利用中断来接收LDBSMB86,0MOVBSMB86,VB400Network14/发送完成标志LDSM4.5=Q0.0END_ORGANIZATION_BLOCKSUBROUTINE_BLOCKSBR_0:SBR0TITLE=通信初始化参数子程序BEGINNetwork1/初始化通信参数及定义开始符、终止符等接收信息LDSM0.0MOVB16#69,SMB30MOVB16#E0,SMB88
7、MOVB16#3A,SMB89MOVB18,SMB94Network2/初始化固定参数LDSM0.0MOVB16#3A,VB101MOVB16#30,VB102MOVB16#31,VB103MOVB16#0D,VB116MOVB16#0A,VB117Network3/声明使用发送完成中断LDSM0.0ATCHINT0,9ENIEND_SUBROUTINE_BLOCKSUBROUTINE_BLOCKSBR_1:SBR1TITLE=计算校验及子程序BEGINNetwork1/建立指针及参数清零等初始化LDSM0.0MOVD&VB101,VD131MOVW0,VW129MOVW6,VW127MOVW
8、0,AC0MOVW0,AC1MOVW0,AC2MOVW0,AC3Network2/循环计算原始累加和LDSM0.0FORVW125,1,VW127Network3LDSM0.0LPSMOVW*VD131,AC0ANDW16#FF,AC0ABAC0,16#39MOVWAC0,AC1-I16#37,AC1LRDABAC0,16#39MOVWAC0,AC2-I16#37,AC2LRDABAC2,9+I16#37,AC2LRDMOVBAC2,*VD131LRD+D1,VD131LRDMOVBVB801,AC3ANDB16#0F,AC3LRDAWAC3,9+I16#37,AC3LRDAWLW0,16#4
9、0MOVWLW0,AC0-I16#37,AC0LPPAWLW2,16#40MOVWLW2,AC1-I16#37,AC1LPPAWLW4,16#40MOVWLW4,AC2-I16#37,AC2LPPAWLW6,16#40MOVWLW6,AC3-I16#37,AC3LPPAWAC0,9+I16#37,AC0LRDAWAC1,9+I16#37,AC1LRDAWAC2,9+I16#37,AC2LRDAWAC3,9+I16#37,AC3LRDAW=AC3,9+I16#30,AC3LRDITBAC3,VB112LRDMOVWVW135,VW145LPPCALLSBR1END_SUBROUTINE_BLOCKINTERRUPT_BLOCKINT_0:INT0TITLE=发送完成中断程序BEGINNetwork1/除读取频率其他指令返回信息LDM20.0RCVVB200,0Network2/读取频率返回信息LDM20.0RCVVB2000,0SM20.1,1RM20.0,1END_INTERRUPT_BLOCK
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1