VWED_server/docs/sc/Fins相关.md

115 lines
3.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Fins 模块文档Python 版本)
## Fins
#### Fins 读取 string
* 方法说明
Fins 读取 string。
```python
def read_fins_string(ip: str, port: int, area: int, fins_io_addr: int, bit_offset: int, word_length: int) -> str | None
```
* 输入参数
* `ip`str 类型,从机 IP
* `port`int 类型,从机端口
* `area`int 类型读取的存储区域代码16进制值如0x82
* `fins_io_addr`int 类型,读取的地址位
* `bit_offset`int 类型,读取的偏移量
* `word_length`int 类型,读取的长度
* 输出参数
* `None`:读取失败
* `str`:读取成功的返回值
* 异常
本方法不抛出异常,异常捕获后只作日志记录
#### Fins 读取 word
* 方法说明
Fins 读取 word。
```python
def read_fins_word(ip: str, port: int, area: int, fins_io_addr: int, bit_offset: int) -> int | None
```
* 输入参数
* `ip`str 类型,从机 IP
* `port`int 类型,从机端口
* `area`int 类型读取的存储区域代码16进制值如0x82
* `fins_io_addr`int 类型,读取的地址位
* `bit_offset`int 类型,读取的偏移量
* 输出参数
* `None`:读取失败
* `int`:读取成功的返回值
* 异常
本方法不抛出异常,异常捕获后只作日志记录
#### Fins 读取 bit
* 方法说明
Fins 读取 bit。
```python
def read_fins_bit(ip: str, port: int, area: int, fins_io_addr: int, bit_offset: int) -> int | None
```
* 输入参数
* `ip`str 类型,从机 IP
* `port`int 类型,从机端口
* `area`int 类型读取的存储区域代码16进制值如0x82
* `fins_io_addr`int 类型,读取的地址位
* `bit_offset`int 类型,读取的偏移量
* 输出参数
* `None`:读取失败
* `int`:读取成功的返回值
* 异常
本方法不抛出异常,异常捕获后只作日志记录
#### Fins 写入 word
* 方法说明
Fins 写入 word。
```python
def write_fins_word(ip: str, port: int, area: int, fins_io_addr: int, bit_offset: int, value: int) -> None
```
* 输入参数
* `ip`str 类型,从机 IP
* `port`int 类型,从机端口
* `area`int 类型写入的存储区域代码16进制值如0x82
* `fins_io_addr`int 类型,写入的地址位
* `bit_offset`int 类型,写入的偏移量
* `value`int 类型,写入的值
* 输出参数
* 该方法无输出参数
* 异常
本方法不抛出异常,异常捕获后只作日志记录
#### Fins 写入 bit
* 方法说明
Fins 写入 bit。
```python
def write_fins_bit(ip: str, port: int, area: int, fins_io_addr: int, bit_offset: int, value: bool) -> None
```
* 输入参数
* `ip`str 类型,从机 IP
* `port`int 类型,从机端口
* `area`int 类型写入的存储区域代码16进制值如0x82
* `fins_io_addr`int 类型,写入的地址位
* `bit_offset`int 类型,写入的偏移量
* `value`bool 类型,写入的值
* 输出参数
* 该方法无输出参数
* 异常
本方法不抛出异常,异常捕获后只作日志记录