1. 程式人生 > 其它 >C# 使用modbus 讀取PLC 暫存器地址

C# 使用modbus 讀取PLC 暫存器地址

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
https://www.springframework.org/schema/mvc/spring-mvc.xsd">

<!-- 配置SpringMVC -->
<!-- 1.開啟SpringMVC註解驅動 -->
<mvc:annotation-driven />
<!-- 2.靜態資源預設servlet配置-->
<mvc:default-servlet-handler/>

<!-- 3.配置jsp 顯示ViewResolver檢視解析器 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>



<!-- 4.掃描web相關的bean -->
<context:component-scan base-package="com.hzh.controller" />

</beans>