Promotic
WikipediaLinkedInYoutubeTwitterFacebook

PmABradleyDF1 - Driver for communication with Allen Bradley PLC devices with DF1 protocol

This driver is used for communication with Allen Bradley PLCs manufactured by Rockwell Automation company using the DF1 protocol. See also Communication with Allen Bradley PLC devices from the Rockwell Automation company.
 
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: PmABradley. With the freeware version PmFree, or when developing the application (with development environment for tersting purposes), this component is always functional.
- The protocol offers 3 types of communication:
- Via a standard serial link (COM1, COM2..): The communication over the DF1 protocol can proceed in the Full-duplex mode (default, RS232) or the Half-duplex mode (RS422/RS485). The mode can be set in the PROMOTIC system in the protocol parameters in the "Link Protocol" configurator. The Full-duplex mode is used for the connection of the point-to-point type (i.e. one PC-Master and one device-Slave). The Half-duplex mode is used for the special connection of more Slave device stations to one PC.
- Via Ethernet emulated serial link: This option can be selected, for example, if the device is equipped with the serial link and it is connected to the Ethernet through the RS232/Ethernet converter. If the converter does no modifications to the transmitted data, then it is a very easy way how to communicate via Ethernet with devices not equipped with Ethernet interface.
- Via Ethernet with DF1 protocol encapsulated into EtherNet/IP protocol: this option is suitable for example for PLC MicroLogix with Ethernet connection.
- The PROMOTIC application is the MASTER (i.e. it initiates the data transfer) from this communication point of view.
- The driver is incorporated into the PROMOTIC system by means of the PmComm object.

Driver supports the usage of both PmCommMsg and PmCommData objects. For common data transfers, it is easier to use the PmCommData object.

For easy integration of this driver into the application it is handy to use: Preconfigurations in group "Allen Bradley PLC"

 
Data types:

The driver supports the following data types:

- Int = Integer signed: 2-byte integer (from -32 768 to +32 767). In the PROMOTIC application represented by the data type: Integer.
- Word = Integer unsigned: 2-byte integer (from 0 to 65 535). In the PROMOTIC application represented by the data type: Long.
- Float: 4-byte real number. In the PROMOTIC application represented by the data type: Single.
- bit: One bit. Only for PmCommData. In the PROMOTIC application represented by the data type: Boolean.
- Byte: 1-byte integer (from 0 to 255). Only for PmCommMsg. In the PROMOTIC application represented by the data type: Byte.
 
Types of data areas (DataFile):

The driver supports the following DataFile types. DataFile with number higher than 8 must be "programme allocated" before use.

- O - Output: Output file. There is only one such area in the PLC and is always numbered 0.
- I - Input: Input file. There is only one such area in the PLC and is always numbered 1.
- S - Status: Status values file. There is only one such area in the PLC and is always numbered 2.
- B - Binary: Binary values file. There can be multiple areas of this type in the PLC and the first is always numbered 3.
- T - Timer: Timers file. There can be multiple areas of this type in the PLC and the first is always numbered 4. This type is currently not functional for PmCommData object.
- C - Counter: Counters file. There can be multiple areas of this type in the PLC and the first is always numbered 5. This type is currently not functional for PmCommData object.
- R - Control: Control values file. There can be multiple areas of this type in the PLC and the first is always numbered 6. This type is currently not functional for PmCommData object.
- N - Integer: Integers file. There can be multiple areas of this type in the PLC and the first is always numbered 7.
- F - Float: Real number values file. There can be multiple areas of this type in the PLC and the first is always numbered 8. The PLCs of the lower series (Micrologix1000) do not support real numbers, but for example the Micrologix1100 can use the real numbers.
 

Recommended parameters values:

Recommended values for the Serial link parameters:
Number of data bits8
ParityNO
Number of stop bits1
Recommended values for the Ethernet parameters:
TCP/UDP port number44818 (for "Encapsulating into EtherNet/IP")
Ethernet transfer typeTCP (for "Encapsulating into EtherNet/IP")
Description and recommended values for the Protocol parameters:
Response receipt timeoutOnly for serial link. Set to 1000 ms by default. 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).
Protocol data typeOnly for Ethernet. Specifies the protocol data form. It is possible to set:
The same data as for serial link - This option can be selected, for example, if the device is equipped with the serial link and it is connected to the Ethernet through the RS232/Ethernet converter. If the converter does no modifications to the transmitted data, then it is a very easy way how to communicate via Ethernet with devices not equipped with Ethernet interface.
Encapsulating into EtherNet/IP - this option is suitable for example for PLC MicroLogix with Ethernet connection.
Master address (SRC)Number of the PROMOTIC stations (for example 0).
Check sum type
BCC
CRC
Link ProtocolDetermines the transfer mode
Full-duplex - (default)
Half-duplex
port number in PLCOnly for "Encapsulating into EtherNet/IP". The preset value is 1.
slot number in PLCOnly for "Encapsulating into EtherNet/IP". The preset value is 0.
priority/time tick (PLC)Only for "Encapsulating into EtherNet/IP". The preset value is 5.
time-out ticks (PLC)Only for "Encapsulating into EtherNet/IP". The preset value is 247.

The communication description by the PmCommData objects

The PmCommData objects can be used for this driver. For usual data transmissions it is more favourable than using the PmCommMsg object.

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).

Examples of identifier syntax:

ItemId Description
"O:4:Word" O=DataFile type=Output, 4=Physical word address in DataFile, DataFile number is not entered because it is always 0., The word value is of the following type: Word = Integer unsigned
"I:1/2" I=DataFile type=Input, 1=Physical word address in DataFile, DataFile number is not entered because it is always 1., The second bit is read from this value. Cannot write.
"I:1/2w" The same as previous, but the bit can also be written.
"S:1/2" S=DataFile type=Status, 1=Physical word address in DataFile, DataFile number is not entered because it is always 2., The second bit is read from this value. Cannot write.
"S:1/2w" The same as previous, but the bit can also be written.
"B3:2:Word" B=DataFile type=Binary, 3=DataFile number, 2=Physical word address in DataFile, The word value is of the following type: Word = Integer unsigned
"N7:0" N=DataFile type=Integer, 7=DataFile number, 0=Physical word address in DataFile. The word value is of the following type: Int = Integer signed
"N7:0:Word" The same as previous, but the value is of the Word = Integer unsigned data type.
"N7:0/1" The same as previous, but only the first bit is read from the word value. Cannot write.
"N7:0/1w" The same as previous, but the bit can also be written.
"F8:5" F=DataFile type=Float, 8=DataFile number, 5=Physical word address in DataFile. The word value is of the following type: Float
Description of the PmCommData > Parameters > Special Parameters configurator:
PLC address The PLC address for communication. The PLC is often preset to address 0.
Max.data size (in bytes) in one messageThe maximum lenght limitation of a communication message is entered here.
- 82 Bytes (default) for SLC 5/01 or SLC 5/02.
- 234 Bytes for SLC 5/03 or SLC 5/04.

The communication description by the PmCommMsg objects

The list and description of the communication messages:
- Protected Typed Logical Read: Data reading by the logical address. The size of the data shouldn't exceed 230 bytes.
There are following variables on the Data-sent page:
- "PlcAddr": The PLC address for communication. The PLC is often preset to address 0.
- "FN" (DataFile number): Defines the area to read from. It can be a value from 0 to 254. The first nine values are always a preset(see Types of data areas (DataFile)).
- "EN" (Element number): Read item index in the DataFile. It can be a value from 0 to 254.
- "SEN" (Subelement number): Must be defined only if the item was not defined by the "Element number" (e.g. the are of binary file). In other cases we recommend not to enter any "Sub-Element number" value, or enter 0. It can be a value from 0 to 254.
- Protected Typed Logical Write: Data writing by the logical address. The size of the written data shouldn't exceed 230 bytes. The meaning of the "FN", "EN", "SEN" is explained in the description of the message "Protected Typed Logical Read".
 
- Diagnostic Counters Reset: Setting all counters and timers to 0.
- Diagnostic Loop: It serves for testing the communication. The match of the Test string qualifies the right result in sending and receiving. It writes the string of exactly 10 chars into the Test string variable.
- Set ENQs: It sets the maximum number of ENQ. It is not supported by devices of the SLC 500 series.
- Set NAKs: It sets the maximum number of NAK. It is not supported by devices of the SLC 500 series.
- Set Timeout: It sets the timeout. It is not supported by devices of the SLC 500 series.
- Set Variables: It sets the maximum number of ENQ, the maximum number of NAK and the timeout. It is not supported by devices of the SLC 500 series.
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice