Starter远程连接变频器

1. 新建项目

1.1 新建项目“agct1#20220620”,双击“Insert single drive unit”

 

1.2 选择变频器“Version”,输入变频器IP“Address”,单击“OK”

 

1.3 项目树更新

 

1.4 双击“Commiss,interface”

 

1.5 单击“Change...”

 

1.6 选择“Module Addresses”标签

 

1.7 选择“Accessible bia network tran”,输入“Connection to target station”、“1st gateway”相应字段内容,单击“OK”

 

1.8 在准备连接传动上右击,在快捷菜单上单击“Connect target device”

 

1.9 单击“Load to PG”

 

1.10 单击“Yes”

 

 

1.11 单击“Close”

 

1.12 显示连接状态,与变频器建立连接,

 

 

2. Module Addresses标签内容解析

 

 

Module Addresses

You can specifically define the connection of the drive unit to the application in the Module addresses tab.   

Module addresses tab

Field/button Meaning/information

Rack Select the rack here. Select Rack 0 for drive units.

Slot Select the slot here. Select Slot  2 for drive units.

Target station Select the type of connection from the drive unit to the application here. Activate Local if the drive unit is to be connected to the application via a direct connection (PROFIBUS DP or USS). Activate Accessible via network transition if the drive unit is connected to the application via a gateway. The network configuration must then be performed with NetPro and loaded to the CPU.

Connection to target station

Type Select PROFIBUS here, even if the drive unit is to be accessed via USS.

Address Enter the PROFIBUS address or USS address depending on which local interface is used to access the drive unit.

S7 subnet ID Enter the S7 subnet ID here. This is the ID of the subnet to which the target station is connected. The subnet is uniquely described in the project with the S7 subnet ID. In this network configuration, the subnet ID is determined via the Properties dialog box of the subnet. The S7 subnet ID is printed with the network configuration.

1st gateway

Is only displayed if Accessible via network transition is activated at the target station.

Type The network type via which the application is connected is displayed here.

Address Enter the address of the station via which the application accesses the drive unit.

S7 subnet ID:填变频器所在S7子网标识,可在博途 -> 设备和网络 -> 子网属性,本例变频器连接在PN/IE_3子网,ID为:“E35C-0004

 

 

 

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
自定义 Spring Boot Starter 连接数据库的步骤如下: 1. 添加数据库依赖:在你的自定义 Starter 的 `pom.xml` 文件中,添加适当的数据库依赖,例如 MySQL、PostgreSQL 或者 H2 数据库依赖。可以使用 Spring Boot 提供的自动配置模块,如 `spring-boot-starter-data-jpa` 或 `spring-boot-starter-jdbc`,或者根据需要选择其他数据库驱动依赖。 2. 创建数据库配置类:在你的自定义 Starter 中创建一个数据库配置类,用于配置数据库连接信息。可以使用 Spring Boot 提供的 `application.properties` 或 `application.yml` 文件进行配置,或者创建一个自定义的配置类。 3. 配置数据库连接信息:在数据库配置类中,通过使用 Spring Boot 提供的 `@ConfigurationProperties` 注解,将数据库连接信息映射到对应的属性上。例如,你可以创建一个 `DatabaseProperties` 类,并使用 `@ConfigurationProperties(prefix = "database")` 注解将配置属性映射到该类上。 4. 创建数据源:在数据库配置类中,使用配置信息创建数据源。可以使用 Spring Boot 提供的 `DataSourceBuilder` 类来创建数据源对象,并将其注入到 Spring 容器中。例如,可以使用以下代码创建一个基于 HikariCP 的数据源: ```java @Configuration public class DatabaseConfiguration { @Bean @ConfigurationProperties(prefix = "database") public DataSource dataSource() { return DataSourceBuilder.create().build(); } } ``` 5. 配置 JdbcTemplate 或者 JPA:根据你的需求,可以选择使用 Spring Boot 提供的 JdbcTemplate 或者 JPA 进行数据库操作。如果你选择使用 JdbcTemplate,可以在数据库配置类中创建一个 `JdbcTemplate` Bean,并将数据源注入到该 Bean 中。如果你选择使用 JPA,可以在数据库配置类中创建一个 `EntityManagerFactory` Bean,并将数据源和其他适当的 JPA 配置注入到该 Bean 中。 6. 在自定义 Starter 中使用数据库:通过将数据库相关的依赖添加到你的自定义 Starter 中,其他开发人员在使用该 Starter 时可以直接使用数据库相关的功能。 以上是连接数据库的一般步骤,具体实现可能会根据你的需求和选择的数据库框架有所不同。请根据你的具体情况进行相应的配置和实现。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值