This driver serves for communication with PLC devices FATEK FATEK
by the FACON
protocol. See also Communication with FATEK PLCs
Before using this driver in the PROMOTIC application it is highly recommended to read the chapter: Communication using the PROMOTIC drivers
Basic properties of the driver
- Usage of this driver requires purchase of the PmFatek licence
. With the freeware version PmFree
, or when developing the application (with development environment
for testing purposes), this component is always functional.
- The communication is done for Ethernet (PROMOTIC application is client) or for serial link (COM1, COM2 ...).
- The PROMOTIC application is the MASTER (it means that it initiates the data transfer) from this communication point of view.
The data areas in the PLC device that can be read/written::
- This is a network communication, it means that one PmaComm
object can communicate with multiple devices (the protocol supports multiple device addressing).
||indication of discrete inputs
||indication of 16-bit variables
||indication of 32-bit variables|
|X = Input discrete
|Y = Output relay
|M = Internal relay
|S = Step relay
|T = Timer discrete
|C = Counter discrete
|RT = Timer register
|RC = Counter register
|R = Data register
|D = data register
Recommended parameters values of the PmaComm object:
|Baud rate||9600 Bd|
|Number of data bits||7|
|Parity||EVEN or NO|
|Number of stop bits||1|
Description and recommended values for the Protocol parameters:
|Response receipt timeout||Only for serial link. The recommended value is for example 2000 ms. The time (in milliseconds) the driver is waiting for the response on sending the message.
If no response comes during this time, then the transfer of the message is terminated (the onEndOfTransfer event is triggered with error 24 or 66).
The communication description by means of the PmaCommGroup object
objects can be used for this driver.
The variables in the PmaCommGroup
object (or even better the variables in the PmaData
object with ExtComm
data extension) can be of arbitrary number, type and order. The driver uses optimalised internal communication messages for reading the data from the device.
All variables are read (if the "Data refresh enabled
" configurator is checked). When writing into the variable, only the single value is sent (if the "Auto send when writing to item
" configurator is checked).
Description of the "ItemID" configurator
is the text identifier of the item that is used for addressing the value in the device. The "ItemID
" configurator tells the driver how to receive or send the item value.
The text can be written manually, or it can be assembled in the window opened by the button to the right of the configurator.
can be used for input (it is evaluated after starting the application).
The identifier consists of mandatory and optional parts.
- The mandatory part is the "device" name (X,WX,DWX, .., C,WC,DWC, RT,DRT, .., D,DD) and numeric index.
- The optional parts are:
- The PLC address at the beginning.
- The .S text can be entered at the end means that the variable (only for registers RT, RC, R, D) is a signed number.
Slave5.DR100.S = It concerns the register R100 that is treated as 32-bit signed variable. The register is located in the PLC on the address 5.
= Same as the previous example, but the address is detected from the "Default PLC address
DR100 = Same as the previous example, but the value is unsigned.
| Default PLC address||The address defined here can be used for definitions in the "ItemID" configurator for the variables in this object (i.e. the variables on the "Data" tab or in data extension ExtComm). The address can be entered in ItemID: |
- as for example Slave3.D6 - then the value will be read from the PLC device with address 3.
- or not defined, i.e. D6 - and the address is taken from this configurator.
This parameter can be modified and read in the script during runtime by methods: SetSpecParam("SlaveAddr") and GetSpecParam("SlaveAddr").
The communication description by means of the PmaCommMsg object
object can be used for special communications, that cannot be executed by the PmaCommGroup
List and description of the communication messages:
40h - Read the brief system status of PLC: It reads 3 variables (Status0-2) of the Byte type. The values are 0=Enable, 1=Disable.
42h - Write single discrete status: Writes the value into one element in defined data location. The values are 1=Disable, 2=Enable, 3=Set, 4=Reset.
43h - Read multiple ENABLE/DISABLE status of discrete elements: Reads the defined number of elements starting from an address from the specified data area. The values are of the Boolean type, true=1=disable, false=0=enable.
44h - Read multiple status of consecutive discrete elements: Reads the defined number of elements starting from an address from the specified data area. The values are of the Boolean type.
45h - Write multiple status of consecutive discrete elements: Writes the defined number of elements starting from an address from the specified data area. The values are of the Boolean type.
46h - Read multiple consecutive registers data: Reads the defined number of elements starting from an address from the specified data area. The values are of the Long type.
47h - Write multiple consecutive registers data: Writes the defined number of elements starting from an address from the specified data area. The values are of the Long type.