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.

Table 1. Fatek binding capability table
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.

Table 2. Register kinds supported by Fatek binding:
Register Description Command/State type

X

(DI) Digital input

ON and OFF (OnOffType)

Y

(DO) Digital output

ON and OFF (OnOffType)

M

Internal relay

ON and OFF (OnOffType)

S

Step relay

ON and OFF (OnOffType)

T

Timer contact

ON and OFF (OnOffType)

C

Counter contact

ON and OFF (OnOffType)

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.

dsl
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 ]
  }

}
yaml
---
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"