This driver serves for communication with
OMRON PLC devices with protocol for
C-mode. See also
Communication with Omron PLC devices.
Before using this driver in the PROMOTIC application it is highly recommended to watch "
PROMOTIC video tutorial 4 - Communication drivers".
Basic properties of the driver:
- Usage of this driver requires purchase of the
PmOmron licence. When developing the application in the freeware mode
PmFree, or with
development environment and while testing it in runtime, this component is always functional.
- The communication is done 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 driver uses so-called Host Link Commands for the data transfer.
Recommended values of the PmaComm object parameters:
Baud rate | 9600 |
Number data bits | 7 |
Parity | EVEN |
Number of stop bits | 2 |
---|
Description and recommended values for the Protocol parameters:
Response receipt timeout | The time (in milliseconds) the driver is waiting for the response on sending the message.
If no response comes during this time, then the transmission of the message is terminated (the onEndOfTransfer event is triggered with error 24 or 66).
The default value is 1000 ms. |
Destination Node | The PLC device number (identifier).
The default value is 0. |
---|
The communication description by means of the PmaCommGroup object
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 optimized internal communication messages for reading the data from the device.
All variables are read (if the "
Data refresh enabled" configurator is checked). On writing into the variable, only the single variable is sent into the device (if the "
Auto send on writing to item" configurator is checked).
The driver supports the following data types:
-
W: (
Word) In the PLC device stored on 2 bytes (from
0 to
+65 535).
In the PROMOTIC application represented by the
Long data type.
-
I: (
Integer) In the PLC device stored on 2 bytes (from
-32 768 to
+32767).
In the PROMOTIC application represented by the
Integer data type.
-
L: (
Long) In the PLC device stored on 4 bytes (from
-2 147 483 648 to
+2 147 483 647).
In the PROMOTIC application represented by the
Long data type.
-
R: (
Real) In the PLC device stored on 4 bytes.
In the PROMOTIC application represented by the
Single data type.
The driver supports the following data areas:
- CIO = Common Input/Output Register
- LR = Link Relay Register
- HR = Holding Register
- AR = Auxiliary Relay Register
- PV = Present Value Register
- TC = Timer/Counter Status Read
- DM = Data Memory Register
For all areas (except for
TC) the "index" represents an index to array of values of 16-bit registers (
W data type). Even if the 32-bit data types (
L and
R) are used then the "index" specifies the index of lower 16-bit register. The
ItemId identifier can (but also may not) contain the specification of forced data type (
I, L, R).
Description of the "ItemId" configurator:
ItemId is the text identifier of the item that is used for addressing the item in the device. The "
ItemId" configurator tells the driver how to receive or send the item value.
The text can be either 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 after the application is launched).
Examples of the identifier syntax:
- CIO15 = The W type value in CIO data area on the index 15.
- CIO15.L = The L type value in CIO data area on the index 15 and 16.
- HR12.I = The I type value in HR data area on the index 12.
- TC2 = The Bit type value in TC data area on the index 2.
This configurator is not used for given driver.
The communication description by means of the PmaCommMsg object
The driver supports the following data types:
-
word: In the PLC device stored on 2 bytes (from
0 to
+65 535).
In the PROMOTIC application represented by the
Integer data type (from
-32 768 to
+32 767).
-
long: In the PLC device stored on 4 bytes (from
0 to
+4 294 967 295).
In the PROMOTIC application represented by the
Long data type (from
-2 147 483 648 to
+2 147 483 647).
-
float: In the PLC device stored on 4 bytes (from
0.0000001e-7 to
0.9999999e7).
In the PROMOTIC application represented by the
Double data type.
List and description of communication messages:
1) MEMORY AREA READ: This message allows reading from the data fields: IR/SR AREA, LR AREA, HR AREA, DM AREA, AR AREA. It is possible to enter a number of read variables (limited by the size of the memory) and their type (word, long, float).
2) MEMORY AREA WRITE: This message allows writing into the data fields: IR/SR AREA, LR AREA, HR AREA, DM AREA, AR AREA.
3) PV READ: Reading timer/counter present values.
4) PV WRITE: Writing timer/counter present values.
5) TC STATUS READ: Reading flag status.
6) TC STATUS WRITE: Writing flag status.
7) STATUS READ: Detects PLC status. The meaning of the data variable is explained in the Omron - Programming manual on the page 295. The "Auxiliary message" variable is not mandatory and some PLC types don't send it.
8) STATUS WRITE: Changing PLC status. the Data mode variable can hold the following values: 0=Program mode, 2=Monitor mode, 3=Run mode.
9) ERROR READ: Reading and deleting errors in the PLC device. The "Reading type" variable deletes the errors by the value of 1, it doesn't do it by the value of 0.
10) FORCED SET: Sets the bit in the memory. The enabled memory fields are as follows: IR/SR AREA, LR AREA, HR AREA, AR AREA, Completion Flag (timer), Completion Flag (high-speed timer), Completion Flag (counter), Completion Flag (reversible counter).
11) FORCED RESET: Resets the bit in the memory. The enabled memory fields are as follows: IR/SR AREA, LR AREA, HR AREA, AR AREA, Completion Flag (timer), Completion Flag (high-speed timer), Completion Flag (counter), Completion Flag (reversible counter)
12) FORCED SET/RESET CANCEL: Canceling the changes made by the messages 10 and 11.
13) PC MODEL READ: Detects model of used PLC model. For the "Model PLC" variable meaning see the Omron - Programming manual on the page 301.
14) TEST: This message serves for testing the communication. The correct result of the test is qualified by matching the "Test" string on sending and receiving. Into the Test string variable write the string of exactly 10 characters in length.
15) INITIALIZE: Initializes the transmission control procedure of all the PLC's connected to the host computer.