This driver is used for communication with FATEK
PLCs 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: Communicaton using the PROMOTIC drivers
Basic properties of the driver
- Using this driver is bound to purchase the license: PmFatek
. With the freeware version PmFree
, or when developing the application (with development environment
for tersting purposes), this component is always functional.
- The communication is done via Ethernet or via standard serial link (COM1, COM2 ...).
- The PROMOTIC application is the MASTER (i.e. it initiates the data transfer) from this communication point of view.
- This is a network communication, i.e. one PmComm
object can communicate with multiple devices (the protocol supports multiple device addressing).
The data areas in the PLC that can be read/written::
|data area ||indication of discrete inputs ||indication of 16-bit variables ||indication of 32-bit variables|
|X = Input discrete ||X0〜X9999 ||WX0〜WX9984 ||DWX0〜DWX9968|
|Y = Output relay ||Y0〜Y9999 ||WY0〜WY9984 ||DWY0〜DWY9968|
|M = Internal relay ||M0〜M9999 ||WM0〜WM9984 ||DWM0〜DWM9968|
|S = Step relay ||S0〜S9999 ||WS0〜WS9984 ||DWS0〜DWS9968|
|T = Timer discrete ||T0〜T9999 ||WT0〜WT9984 ||DWT0〜DWT9968|
|C = Counter discrete ||C0〜C9999 ||WC0〜WC9984 ||DWC0〜DWC9968|
|RT = Timer register ||- ||RT0〜RT9999 ||DRT0〜DRT9998|
|RC = Counter register ||- ||RC0〜RC9999 ||DRC0〜DRC9998|
|R = Data register ||- ||R0〜R65535 ||DR0〜DR65534|
|D = data register ||- ||D0〜D65535 ||DD0〜DD65534|
Recommended parameters values:
|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, the transfer of the message is terminated (event onEndOfTransfer fires with error 24 or 66).|
The communication description by the PmCommData objects
objects can be used for this driver.
The variables in the PmCommData object (or even better the variables in the PmData 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 enabled). When writing to the variable, only the single value is sent (if the Auto write when writing to item configurator is enabled).
Description of the ItemID configurator:
ItemId 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. Macro expression can be used for input (it is evaluated while the application is launching).
The identifier consists of compulsory and optional parts. The compulsory 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, in order to indicate 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.
DR100.S = Same as the previous example, but the address is detected from the "Default PLC address" configurator.
DR100 = Same as the previous example, but the value is not signed.
| 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 page or in the ExtComm data extensions). The address can be defined in ItemID: |
- as for example Slave3.D6 - then the value will be read from the PLC 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 runtime by the methods: SetSpecParam("SlaveAddr") and GetSpecParam("SlaveAddr").
The communication description by the PmCommMsg objects
obejcts can be used for special communications, that cannot be executed by the PmCommData
The 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.