`
fourfireliu
  • 浏览: 95956 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

停止Tomcat webapp报错的尝试解决

阅读更多

ubuntu12下 tomcat的版本是7.0.40.0

 

状况:

    发现某个web项目最近往往执行bin/shutdown.sh无法关闭tomcat服务器,必须手动kill进程才行。

    该web项目主要执行定时执行大量的http请求 将返回结果处理后存入mongo数据库

    因此查看catalina.out日志,发现停止tomcat时抛出很多内存泄漏的警告 以下:

 

INFO: Stopping service Catalina
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [AsyncAppender-Worker-Thread-2] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [ZkClient-EventThread-14-192.168.161.35:2181,192.168.161.36:2181,192.168.161.37:2181] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [localhost-startStop-1-SendThread(192.168.161.37:2181)] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [localhost-startStop-1-EventThread] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [cluster-1-thread-1] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [cluster-1-thread-2] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [cluster-1-thread-3] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [MongoCleaner1479337147] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [cluster-2-thread-1] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [cluster-2-thread-2] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [cluster-2-thread-3] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [MongoCleaner58644297] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [pool-4-thread-1] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [pool-4-thread-2] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [pool-4-thread-3] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [pool-4-thread-4] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads

....

SEVERE: The web application [xxxxx] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@5a2224fb]) and a value of type [aaaaa] (value [aaaaa@77aa08f7]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [xxxxx] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@5a2224fb]) and a value of type [aaaaa] (value [aaaaa@3c32cd81]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [xxxxx] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@5a2224fb]) and a value of type [aaaaa] (value [aaaaa@2b51ef07]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [xxxxx] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@5a2224fb]) and a value of type [aaaaa] (value [aaaaa@1023cac9]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [xxxxx] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@5a2224fb]) and a value of type [aaaaa] (value [aaaaa@1dd65a66]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks

 

其中线程名pool-4-thread-xxx引起了注意,应该是一个线程池,查看代码,发现为批量发送HTTP请求有建了一个ThreadPoolExecutor

 

    private static ThreadPoolService threadPoolService = new ThreadPoolService();

    private ThreadPoolService() {
        this.threadPoolExecutor = new ThreadPoolExecutor(100, 150, 500, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new ThreadPoolExecutor.CallerRunsPolicy());
        // this.completionService = new
        // ExecutorCompletionService<Object>(this.threadPoolExecutor);
    }

 日志中名叫pool-4-thread-xxx 有100个,很明显,tomcat没能关掉ThreadPoolExecutor的核心线程,因此需要在关闭tomcat前手动关闭,因此在web.xml中新增一个ServletContextListener的实现

 

	@Override
	public void contextDestroyed(ServletContextEvent sce) {
		ThreadPoolService.getInstance().shutdownNow();	

	}

 重新尝试 果然所有的

 

SEVERE: The web application [xxxxx] appears to have started a thread named [pool-4-thread-x] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads

没有了,还剩下一些ThreadLocal无法释放以及剩下一些Thread无法释放的警告

查资料

http://stackoverflow.com/questions/5292349/is-this-very-likely-to-create-a-memory-leak-in-tomcat

回复中给出了ThreadLocal的解决方案

 

public Integer immolate() {
        int count = 0;
        try {
            final Field threadLocalsField = Thread.class.getDeclaredField("threadLocals");
            threadLocalsField.setAccessible(true);
            final Field inheritableThreadLocalsField = Thread.class.getDeclaredField("inheritableThreadLocals");
            inheritableThreadLocalsField.setAccessible(true);
            for (final Thread thread : Thread.getAllStackTraces().keySet()) {
                    count += clear(threadLocalsField.get(thread));
                    count += clear(inheritableThreadLocalsField.get(thread));
            }
            logger.info("immolated " + count + " values in ThreadLocals");
        } catch (Exception e) {
            throw new Error("ThreadLocalImmolater.immolate()", e);
        }
        return count;
    }

    private int clear(final Object threadLocalMap) throws Exception {
        if (threadLocalMap == null)
                return 0;
        int count = 0;
        final Field tableField = threadLocalMap.getClass().getDeclaredField("table");
        tableField.setAccessible(true);
        final Object table = tableField.get(threadLocalMap);
        for (int i = 0, length = Array.getLength(table); i < length; ++i) {
            final Object entry = Array.get(table, i);
            if (entry != null) {
                final Object threadLocal = ((WeakReference)entry).get();
                if (threadLocal != null) {
                    log(i, threadLocal);
                    Array.set(table, i, null);
                    ++count;
                }
            }
        }
        return count;
    }

 

 

根据答复中的代码猜想,ThreadLocal的报错 估计是某些线程的ThreadLocal无法释放,为什么无法释放,因为那些线程还没停掉,每个ThreadLocal都是被一个Thread的ThreadMap下以<ThreadLocalObject, Object>的entry形式维护着,

这些entry继承了WeakReference,以上代码应该是将每个thread的threadMap的entry设成null,这样原来的entry没有引用源,作为一个WeakReference会在GC中被清除掉。

 

事实上也是如此,在将ServletContextListener换成

	public void contextDestroyed(ServletContextEvent sce) {
		ThreadPoolService.getInstance().shutdownNow();	
		
		immolate();
	}

 后,tomcat关闭报错只剩下一些Thread无法停止了

INFO: Stopping service Catalina
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [AsyncAppender-Worker-Thread-2] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [ZkClient-EventThread-14-192.168.161.35:2181,192.168.161.36:2181,192.168.161.37:2181] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [localhost-startStop-1-SendThread(192.168.161.37:2181)] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [localhost-startStop-1-EventThread] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [cluster-1-thread-1] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [cluster-1-thread-2] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [cluster-1-thread-3] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [MongoCleaner1479337147] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [cluster-2-thread-1] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [cluster-2-thread-2] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [cluster-2-thread-3] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [xxxxx] appears to have started a thread named [MongoCleaner58644297] but has failed to stop it. This is very likely to create a memory leak.
Feb 28, 2015 9:45:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads

 

这些线程可能来自于各种框架以及各种未知...很难获取到它们去挨个停止,如果根据名称去找然后停止的话,又比较傻...继续查资料

http://wiki.apache.org/tomcat/MemoryLeakProtection 了解到

 

If a webapp creates a thread, by default its context classloader is set to the one of the parent thread (the thread that created the new thread). In a webapp, this parent thread is one of tomcat worker threads, whose context classloader is set to the webapp classloader when it executes webapp code.

Furthermore, the spawned thread may be executing (or blocked in) some code that involves classes loaded by the webapp, thus preventing the webapp classloader from being collected.

So, if the spawned thread is not properly terminated when the application is stopped, the webapp classloader will leak because of the strong reference held by the spawned thread.

 

就是说 在tomcat容器里,每个线程的ClassLoader归根结底都被默认设置成webapp ClassLoader。当某些线程无法及时关闭时,webapp classloader就会因为这些线程拥有的强引用,无法正常gc,因此报警。

了解了这个,就有办法了,修改public Integer immolate() method 插入几行

for (final Thread thread : Thread.getAllStackTraces().keySet()) {
                    count += clear(threadLocalsField.get(thread));
                    count += clear(inheritableThreadLocalsField.get(thread));
                    
                    if (thread != null) {
                    	thread.setContextClassLoader(null);
                    }
            }

 

这样这些还没停止的线程的上下文ClassLoader就和webapp ClassLoader无关了,webapp ClassLoader可以正常GC,报错消失。

 

 

问题是解决了,但其中很多细节半猜半试出来的,并没有吃透它们,这些还待自己慢慢学习琢磨。

 

 

 

分享到:
评论
1 楼 wabiaozia 2018-05-08  
    厉害

相关推荐

    java.util.concurrent.ExecutionException 问题解决方法

    3. **Tomcat生命周期异常**:`org.apache.catalina.LifecycleException` 指示Tomcat在启动或停止组件时出现问题。在这个例子中,问题出现在尝试启动标准上下文组件`StandardContext[/WebApp]`时。 4. **具体原因...

    基于Andorid的电子杂志应用系统设计.zip

    基于Andorid的电子杂志应用系统设计实现源码,主要针对计算机相关专业的正在做毕设的学生和需要项目实战练习的学习者,也可作为课程设计、期末大作业。

    《网络传播技术与实务》第10章-握在手中的网络——移动通信与无线网络技术.ppt

    《网络传播技术与实务》第10章-握在手中的网络——移动通信与无线网络技术.ppt

    基于COMSOL的电磁传感器用于螺孔缺陷检测的建模与仿真

    内容概要:本文详细介绍了如何利用COMSOL Multiphysics进行螺孔缺陷检测的电磁传感器建模与仿真。首先,通过参数化建模创建带有螺纹孔的金属块,并在螺纹根部引入微小V型槽作为缺陷。接着,设置了材料属性,特别是针对缺陷区域的非线性磁导率变化进行了细致调整。然后,配置了物理场环境,包括激活AC/DC模块的电流和磁场接口,设定合适的边界条件和激励电流频率范围。网格划分采用了自适应策略,确保缺陷区域的高分辨率。求解器设置为频域稳态求解,并通过后处理展示了缺陷处的电磁场分布特性,如电场强度突变和涡流密度矢量图。此外,还讨论了实际应用中的注意事项和技术细节,如表面粗糙度的影响、频率选择以及结果验证方法。 适合人群:从事无损检测、电磁仿真研究的技术人员,以及有一定COMSOL使用经验的研发人员。 使用场景及目标:适用于工业生产中对螺孔内部微小裂纹的精确检测,旨在提高产品质量和安全性,防止因隐蔽缺陷导致的重大事故发生。 其他说明:文中提供了大量具体的MATLAB和COMSOL命令代码片段,帮助读者快速复现实验步骤并深入理解每个环节的设计意图。同时强调了实际操作中的常见陷阱及其应对措施,使读者能够更好地掌握这一复杂技术的应用要点。

    【ABB机器人】-IRB1600机器人维护信息.pdf

    【ABB机器人】-IRB1600机器人维护信息.pdf

    《计算机网络基础》第2章-数据通信.ppt

    《计算机网络基础》第2章-数据通信.ppt

    rubyinstaller-devkit-3.4.3-1-x64

    ruby-3.4.3-windows-x64安装包

    声子晶体中声表面波的光学特性及其应用研究

    内容概要:本文详细探讨了声子晶体中声表面波的光学特性。声子晶体作为一种人工复合材料,能够对弹性波(即声子)进行独特调控。文中介绍了声子晶体的基础原理,包括其周期性结构产生的带隙效应,以及声表面波与其相互作用时发生的折射、反射等光学类比现象。此外,还讨论了声子晶体在传感器、通信等领域的潜在应用,特别是在构建声表面波滤波器方面的重要意义。文章通过具体的Python和MATLAB代码展示了如何模拟声子晶体的结构和声表面波的传播特性,并解释了带隙形成的物理机制。同时,强调了几何对称性和材料参数对声波调控的影响,提出了优化仿真的方法和技术。 适合人群:从事材料科学、物理学及相关领域的研究人员,尤其是对声子晶体和声表面波感兴趣的学者和技术人员。 使用场景及目标:适用于希望深入了解声子晶体声表面波光学特性的科研工作者,旨在帮助他们掌握相关理论知识和数值模拟技能,从而应用于新型声学器件的设计和开发。 其他说明:文章提供了多个实例和代码片段,便于读者理解和实践。同时,指出了实验中常见的挑战和解决方案,如材料损耗建模、缺陷引入等,有助于提高仿真的准确性。

    机械工程电梯柔性提升系统横向-纵向耦合动力学建模与仿真:基于Galerkin法的振动控制分析及工程应用(含详细代码及解释)

    内容概要:本文详细介绍了电梯柔性提升系统横向-纵向耦合动力学建模与仿真的全过程。首先,基于能量法和Hamilton原理,建立了考虑平衡绳影响的横向-纵向耦合振动控制方程,并使用Galerkin法将其离散化为常微分方程。随后,通过Python代码实现并仿真了高速电梯参数下的振动响应,分析了平衡绳和导轨不平顺对系统振动的具体影响。研究结果显示,平衡绳能有效抑制横向振动(上行降低20%,下行降低5%),但对纵向振动有一定影响;而导轨不平顺会导致横向振动突变,对纵向振动影响较小。最终,通过数值仿真验证了论文中的主要结论,为电梯振动控制提供了理论依据和工程建议。 适合人群:具备一定力学和编程基础,对机械振动、电梯工程感兴趣的科研人员和工程师。 使用场景及目标:①理解电梯柔性提升系统的振动特性及其影响因素;②掌握基于能量法和Hamilton原理建立复杂系统动力学模型的方法;③学习如何使用Galerkin法离散化偏微分方程并进行数值仿真;④为电梯系统的设计优化提供参考,特别是平衡绳和导轨安装精度的控制。 其他说明:本文不仅提供了理论分析,还通过详细的Python代码展示了完整的仿真流程,便于读者动手实践。研究结果强调了平衡绳和导轨不平顺对电梯振动的重要影响,提出了具体的设计建议,如安装平衡绳以抑制横向振动、严格控制导轨安装精度等。此外,文中还验证了钢丝绳的安全系数,确保仿真条件符合工程实际。

    《网络规划与设计教程》第二章:网络互联技术概述.ppt

    《网络规划与设计教程》第二章:网络互联技术概述

    电力电子领域单相Boost PFC电路的双闭环控制仿真模型及其实现方法

    内容概要:本文详细介绍了单相Boost功率因数校正(PFC)电路及其双闭环控制仿真模型的设计与实现。首先阐述了单相PFC电路的基础概念,解释了Boost电路的工作原理,即通过控制开关管的导通与关断来提升输入电压并实现功率因数校正。接着讨论了在网侧220V/50Hz条件下,如何利用电压外环电流内环双闭环控制系统确保输出电压稳定性和高功率因数。文中还提供了基于Python和MATLAB/Simulink的具体代码示例,展示了如何模拟Boost电路的行为以及构建双闭环控制策略。此外,针对可能出现的问题如启动时电压超调、电流波形畸变等提出了相应的解决方案和技术细节。 适合人群:从事电力电子系统设计的研究人员、工程师和技术爱好者,尤其是那些希望深入了解PFC技术和掌握相关仿真技能的人群。 使用场景及目标:适用于需要优化电力电子设备性能的应用场合,例如工业自动化、家用电器等领域。通过学习本文的内容,读者可以更好地理解和应用单相Boost PFC电路及其双闭环控制机制,从而提高产品的效率和可靠性。 其他说明:文中不仅包含了理论性的介绍,还有大量的实战经验和技巧分享,帮助读者更快地掌握这一复杂的技术领域。同时强调了在实际工程实践中应注意的关键点,如参数选择、波形调试等方面的知识。

    黑马程序员ThreeJS 3D车展效果展示(含素材源码)

    源文件

    《计算机程序设计(C语言)》第7章-第6节-变量的存储类别.ppt

    《计算机程序设计(C语言)》第7章-第6节-变量的存储类别.ppt

    《计算机程序设计(C语言)》第4章-第2节-if语句.ppt

    《计算机程序设计(C语言)》第4章-第2节-if语句.ppt

    FPGA领域Verilog实现串口通信:兼容Xilinx与Altera的收发模块设计与应用

    内容概要:本文详细介绍了基于FPGA的串口通信模块的设计与实现,涵盖波特率生成、发送模块的状态机设计以及接收模块的抗干扰措施。特别针对Xilinx和Altera两种主流FPGA平台进行了优化,确保代码可以在不同平台上无缝运行。文中不仅提供了完整的Verilog代码片段,还分享了许多实用的调试技巧,如波特率分频系数的精确计算、采样点的选择、跨平台复位信号的处理等。此外,作者还强调了硬件连接和约束文件配置的重要性,为初学者提供了一套完整的解决方案。 适合人群:对FPGA有一定了解,希望深入掌握串口通信机制的工程师和技术爱好者。 使用场景及目标:适用于需要在FPGA平台上实现可靠串口通信的应用场合,如嵌入式系统开发、工业自动化控制等领域。通过本教程的学习,读者能够独立完成串口通信模块的设计与调试,掌握关键技术和常见问题的解决方法。 其他说明:文章附带了经过验证的实际案例和代码,便于读者进行实践操作。同时提醒开发者注意电压匹配等问题,以防止硬件损坏。

    基于FX3U PLC与RS485通信板的多品牌变频器控制方案详解

    内容概要:本文详细介绍了使用FX3U PLC配合FX3U-485BD通信板对西门子V20、台达VFD-M和三菱E700三种变频器进行通信控制的方法。涵盖了硬件配置、接线方法、参数设置、程序编写等方面的内容。文中不仅提供了具体的接线步骤,还针对不同品牌的变频器给出了详细的参数配置指导,并附有简单的梯形图程序示例,帮助读者理解和实施变频器的精确控制。此外,文章还分享了一些实用的经验技巧,如解决通信不稳定等问题的方法。 适合人群:从事工业自动化领域的工程师和技术人员,特别是那些需要集成多个品牌变频器控制系统的人群。 使用场景及目标:适用于需要通过PLC对多种品牌变频器进行集中控制的应用场合,如工厂生产线、自动化设备等。主要目标是提高系统的灵活性和可靠性,减少维护成本,提升生产效率。 其他说明:文中提供的信息和案例有助于读者快速掌握PLC与变频器之间的通信控制技术,同时也强调了实际操作过程中需要注意的一些细节问题,如接线规范、参数匹配等。

    《组态软件控制技术》第7章--报表系统.ppt

    《组态软件控制技术》第7章--报表系统.ppt

    《网页制作基础教程(Dreamweaver-CS6版)》第6章-CSS与行为.pptx

    《网页制作基础教程(Dreamweaver-CS6版)》第6章-CSS与行为.pptx

    weixin286基于SSM框架的童装购买平台微信小程序+ssm(文档+源码)_kaic

    weixin286基于SSM框架的童装购买平台微信小程序+ssm(文档+源码)_kaic

    《计算机财务管理》01-02-资金时间价值.ppt

    《计算机财务管理》01-02-资金时间价值.ppt

Global site tag (gtag.js) - Google Analytics