Fatek / Facom
This binding integrates Taiwanese brand of PLC called Fatek. Fatek is recognized and known worldwide. One of this brand uniqueness comes from its own engineering software and programming in leather.
Fatek has its own protocol which description is published. This protocol is sometimes (quite rarely) named Facom. Since it is used only by this brand it remains proprietary to this firm. It is possible to interface Fatek with other systems through Modbus (supported by PLCs at no cost). There are several BUS couplers which allow to pair it with other equipment or even modems.
Facom can utilize several transports - most common ones are TCP and serial. Protocol payload remains the same.
Device discovery | Channel discovery | Read | Write | Subscribe |
---|---|---|---|---|
Yes |
No |
Yes |
Yes |
No |
The Facom protocol does not provide a subscription operation. All states have to be polled in cyclic manner.
Device discovery
Binding supports an undocumented discovery feature of the protocol. It is able to detect all compatible devices within IP network through broadcasts. Once devices are found binding attempts to scan available station ids to identify reachable endpoints.
Thing and Channel discovery
Binding is able to discover Thing, with all necessary connection parameters, but it can not discover channels.
Supported hardware
While Facom seem to be a common protocol used across different product lines this binding is confirmed to work with Fatek FBs series. Other product groups have not been tested. Most of Fatek PLCs include serial port which can be used for programming. This port can be also used for serial communication and integration with binding.
In order to start reading data you need to create at least one tcp
or serial
connection (Bridge).
The tcp
connection usually rely on port 500, however it can be amended in PLC configuration.
Because of protocol limitations configuration needs to be prepared manually based on known register addresses. There are several kinds of addresses defined by protocol.
Register | Description | Command/State type |
---|---|---|
|
(DI) Digital input |
|
|
(DO) Digital output |
|
|
Internal relay |
|
|
Step relay |
|
|
Timer contact |
|
|
Counter contact |
|
|
Data register (16 bit) |
|
|
Data register (16 bit) |
|
|
File register (16 bit) |
|
|
Data Register (32 bit) |
|
|
Data Register (32 bit) |
|
|
File register (32 bit) |
|
|
Timer register (16 bit) |
|
|
Counter register (16 bit) |
|
|
Timer register (32 bit) |
|
|
Counter register (32 bit) |
|
|
Input discrete data register (16 bit) |
|
|
Output relay data register (16 bit) |
|
|
Internal relay data register (16 bit) |
|
|
Step relay data register (16 bit) |
|
|
Timer discrete data register (16 bit) |
|
|
Counter discrete data register (16 bit) |
|
|
Input discrete data register (32 bit) |
|
|
Output relay data register (32 bit) |
|
|
Internal relay data register (32 bit) |
|
|
Step relay data register (32 bit) |
|
|
Timer discrete data register (32 bit) |
|
|
Counter discrete data register (32 bit) |
|
The discrete inputs might be commendable (outputs, relays) or read only (input, contact).
Binding does not verify read/write access.
For data registers (R
, D
, F
etc.) encoding of contained data might vary.
In principle - all registers of 16 bit length will be read and written using integer representation.
Larger values might be interpreted as integer or floating point number.
In order to use floating point representation use data32
channel with floating=true
option.
The unsinged representation is always forced for data16
and data32
channels using unsinged=true
option.
Textual configuration
Below is example of a text configuration which you can use as a started. Keeping configuration in a file allows to use a regular version control system to track changes over time. The same can be done via user interface.
Bridge co7io-fatek:tcp:my-connection "My PLC#1" [
host="10.10.10.2",
port=500
] {
Thing plc station1 "Station 1 of PLC" [
stationNumber=1
] {
Channels:
Type discrete : X1 [ register="X", index=1 ]
Type discrete : Y1 [ register="Y", index=1 ]
Type discrete : M1 [ register="M", index=1 ]
Type discrete : S1 [ register="S", index=1 ]
Type discrete : T1 [ register="T", index=1 ]
Type discrete : C1 [ register="C", index=1 ]
Type data16 : R1x16 [ register="R", index=1 ]
Type data32 : R1x32 [ register="DR", index=1 ]
Type rollershutter16 : rollx16 [ register="R", index=1, startRegister="M", startIndex=1, stopRegister="M", stopIndex=2 ]
Type rollershutter32 : rollx32 [ register="DR", index=1, startRegister="M", startIndex=1, stopRegister="M", stopIndex=2 ]
}
}
---
things:
- kind: "Bridge"
UID: "co7io-fatek:tcp:my-connection"
label: "My PLC#1"
configuration:
host: "10.10.10.2"
port: 500
things:
- id: "station1"
type: "co7io-fatek:plc"
label: "Station 1 of PLC"
configuration:
stationNumber: 1
channels:
- id: "X1"
type: "discrete"
configuration:
index: 1
register: "X"
- id: "Y1"
type: "discrete"
configuration:
index: 1
register: "Y"
- id: "M1"
type: "discrete"
configuration:
index: 1
register: "M"
- id: "S1"
type: "discrete"
configuration:
index: 1
register: "S"
- id: "T1"
type: "discrete"
configuration:
index: 1
register: "T"
- id: "C1"
type: "discrete"
configuration:
index: 1
register: "C"
- id: "R1x16"
type: "data16"
configuration:
index: 1
register: "R"
- id: "R1x32"
type: "data32"
configuration:
index: 1
register: "DR"
- id: "rollx16"
type: "rollershutter16"
configuration:
stopIndex: 2
startIndex: 1
stopRegister: "M"
index: 1
startRegister: "M"
register: "R"
- id: "rollx32"
type: "rollershutter32"
configuration:
stopIndex: 2
startIndex: 1
stopRegister: "M"
index: 1
startRegister: "M"
register: "DR"