Promotic
WikipediaLinkedInYoutubeTwitterFacebook

PmOmronC - Driver for communication with OMRON PLC devices with protocol for C-mode

This driver is used 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 read the chapter: Communicaton using the PROMOTIC drivers.
 
Basic properties of the driver:
- Using this driver is bound to purchase the license: PmOmron. 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 standard serial link (COM1, COM2 ...).
- 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 "Omron PLC"

- The driver uses so called Host Link Commands for the data transfer.
 

Recommended parameters values:

Recommended values for the Serial link parameters:
Baud rate9600
Number of data bits7
ParityEVEN
Number of stop bits2
Description and recommended values for the Protocol parameters:
Response receipt timeoutThe 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 preset value is 1000 ms.

Destination NodePLC number (identifier).

The preset value is 0.

The communication description by the PmCommData objects

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

 
The driver supports the following data types:
- W: (Word) stored in the PLC on 2 bytes (from 0 to +65 535). In the PROMOTIC application represented by the data type: Long.
- I: (Integer) stored in the PLC on 2 bytes (from -32 768 to +32767). In the PROMOTIC application represented by the data type: Integer.
- L: (Long) stored in the PLC on 4 bytes (from -2 147 483 648 to +2 147 483 647). In the PROMOTIC application represented by the data type: Long.
- R: (Real) stored in the PLC on 4 bytes. In the PROMOTIC application represented by the data type: Single.
 
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 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" defines the index of lower 16-bit registry. 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 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:
- CIO15 = The W type value in CIO data area on the index of 15.
- CIO15.L = The L type value in CIO data area on the index of 15 and 16.
- HR12.I = The I type value in HR data area on the index of 12.
- TC2 = The Bit type value in TC data area on the index of 2.
Description of the PmCommData > Parameters > Special Parameters configurator:
This configurator is not used for given driver.

The communication description by the PmCommMsg objects

The driver supports the following data types:
- word: stored in the PLC on 2 bytes (from 0 to +65 535). In the PROMOTIC application represented by the data type: Integer (from -32 768 to +32 767).
- long: stored in the PLC on 4 bytes (from 0 to +4 294 967 295). In the PROMOTIC application represented by the data type: Long (from -2 147 483 648 to +2 147 483 647).
- float: stored in the PLC on 4 bytes (from 0.0000001e-7 to 0.9999999e7). In the PROMOTIC application represented by the data type: Double.
 
The list and description of the 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 a AR AREA.
3) PV READ: Reading timer/counter present values.
4) PV WRITE: Writing timer/counter present values.
5) TC STATUS READ: Getting flag status.
6) TC STATUS WRITE: Setting flag status.
7) STATUS READ: Getting PLC status. The variable meaning "data" 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. 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: Setting 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: Resetting 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: Getting used PLC model. For the PLC model 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. In the "Test" string use the string of exactly 10 chars in length.
15) INITIALIZE: Initializes the transmission control procedure of all the PLC's connected to the host computer.
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice