Omron FINS
Omron FINS Library¶
Introduction
This module defines the following constants:
UDP= 0; UDP protocol-
TCP= 1; TCP protocol -
RAW= 0; RAW data format for read/write operations BCD16= 1; BCD16 data format for read/write operationsBCD32= 2; BCD32 data format for read/write operationsBIT= 3; Boolean data format for read/write operationsINT16= 4; INT16 data format for read/write operationsINT32= 5; INT32 data format for read/write operations
Exceptions¶
exception FinsError¶
Generic Fins error.
exception FinsLocalError¶
Generic local node error.
exception FinsRemoteError¶
Generic destination node connection error.
exception FinsControllerError¶
Generic network controller error.
exception FinsUnsupportedError¶
Unsupported command error.
exception FinsRoutingError¶
Destination node routing error.
exception FinsCommandFormatError¶
Command malformed error.
exception FinsParamError¶
Command parameter error.
exception FinsRDError¶
Destination node read error.
exception FinsWRError¶
Destination node write error.
exception FinsModeError¶
Destination node is not in the correct mode during command execution.
exception FinsDeviceError¶
Generic device error on destination node.
exception FinsDatalinkError¶
Data link table missing or corrupt.
exception FinsUnitError¶
Generic unit error on destination node.
exception FinsCommandError¶
Command execution error on destination node.
exception FinsAccessError¶
No access right.
exception FinsAbortedError¶
Service aborted.
exception FinsConnectionError¶
Connection error with the destination node.
exception FinsAddressError¶
Memory address is invalid.
exception FinsMiscError¶
Generic miscellaneous error.
exception FinsCanceledError¶
Operation canceled error.
exception FinsUnknownError¶
Unknown error.
Fins class¶
Fins(address, port=9600, local_net=0, local_node=0, local_unit=0, remote_net=0, remote_node=0, remote_unit=0, proto=UDP, retries=3, model="CS")
addressis the remote node IPv4 address (String).portis the remote node TCP/UDP port (Integer). Default: 9600local_netthe local net number (Integer). Default: 0local_nodethe local node number (Integer). Default: 0local_unitthe local unit number (Integer). Default: 0remote_netthe remote net number (Integer). Default: 0remote_nodethe remote node number (Integer). Default: 0remote_unitthe remote unit number (Integer). Default: 0protothe protocol type, can be fins.TCP or fins.UDP. Default: fins.UDPretriesthe number of retries to attempt the connection to remote node (Integer). Default: 3modelthe remote node model (String). Default: "CS"
Method connect¶
connect()
Method clock¶
clock()
Integer: yearInteger: monthInteger: dayInteger: hourInteger: minInteger: secondsInteger: day of the week
Method memory_area_read¶
memory_area_read(area, address, size, format=RAW)
format The parameters are: area: is the memory areaaddress: is the memory addresssize: is the amount of word (16 bits) to read.formatis the format of the data to read. Default isfins.RAW
Method memory_area_write¶
memory_area_write(area, address, size, data, format=RAW)
area: is the memory areaaddress: is the memory addresssize: is the amount of word (16 bits) to read.data: the data to be written. The format depends onformatparameter.formatis the format of the data to read. Default isfins.RAW