content.gif menu.gif basics.gif

Access functions and polling

Note the following instructions when configuring the addresses:

note.gifNote

The address space of the interface database is minimized by the highest, spontaneous configured input address! This means that you should assign low addresses for spontaneous data. For more information on the configuration of the addresses see chapter Defining the peripheral addresses of the Applicom driver. The address space for spontaneous data can also be reserved via the config entries "MaxSpontDB..." (for further details on the entries see Possible config entries of the Applicom driver). If no spontaneous input addresses were configured, the address space is 0 after the start of the driver since the default value of the config entry is 0. If you configure a spontaneous address afterwards you have to re-start the driver.

note.gifNote

Besides it is recommended to save the data, which is to be transmitted in an common poll cycle, as consecutively as possible in the PLC. This way an optimum utilization during the transmission can be achieved. The Applicom card can only get ranges, which belong together and are of same type (e.g. bit, float, word, ...), from the PLC.

If the addresses in the PLC are far apart from each other the card has to get the data via several queries. Since the communication with a PLC is always limited to queries per second you can affect the performance essential by using the queries right (e.g. when the PLC manages 50 queries/s and you have 1000 bits in a query, 50000 bits/s are managed. If you have only 1 bit in a query you manage only 50 bits/s).

note.gifNote

The S7 PLC is an exception of the behavior described before: The data in the address storage can be of different type e.g. float, bit, word, ... . The Applicom driver in WinCC OA can get such ranges with different types without problems. I.e. in a S7 the data do not have to combined dependent of the type!

 

Detailed information of the Applicom driver can be found in the following. The information is intended for advanced users. If you do not want to find out the Applicom specific details, see chapter Example for the Applicom driver.

 

There are three different modes in the access functions (Read, Write etc.) of Applicom:

  • Wait mode ( this mode is not used by the driver)

  • Deferred mode

  • Cyclic mode

Deferred mode:

 

The deferred mode is used when the polling is executed via the Applicom driver or when there are upcoming write requests. More information can be found in the Applicom documentation.  

 

Cyclic mode:

 

The cyclic mode is used for the internal card polling and provides the possibility to define up to 255 cyclic functions per channel. If a cyclic read is called the Applicom system reads out the requested data of the target device and writes these into the so called interface database. More information can be found in the Applicom documentation.  

 

Cyclic functions

A cyclic function is a read request or the data is read out on the peripheral device of the Applicom. Cyclic functions have an effect only when using an Applicom poll list. In a cyclic function configured addresses are combined in polling blocks since there are only 255 cyclic functions per channel. There are certain rules of how to combine the addresses. Consider the rules for an effective configuration.

 

  • Defined MAX_ entries in the apc_config  file. In the file where the rules of address transformation are defined the maximum number of elements for different data types (bit, int, float..) in a cyclic function are defined. If this number is exceeded the rest of the elements belong to a new cyclic function. As an example the maximum of 62 floating-point numbers that can be transmitted in a modbus frame (MODBUS_TSX_PREMIUM protocol), so 256*62=15872 can be transmitted via card polling. If you have more floating-point numbers that should be queried via polling the additional data are passed over to the polling function of the driver automatically. If you transmit only bits the maximum number for the MODBUS_TSX_PREMIUM protocol is 1016*256=260096. This is only a theoretical value since the limitation of the interface database has an effect before (see the description of the interface database below).

  • Addresses near combined in the storage of the PLC with different poll times are combined in one cyclic function, which shows the fastest poll rate. For example the following elements with these poll times were configured: E0.0 with 100ms, E0.1 with 2000ms, E0.2 with 1000ms, E0.3 with 1000ms and E0.4 with 2000ms --> from this it follows 1 cyclic function, which polls every 100ms values.

  • Furthermore, addresses which are saved consecutively, are combined in a cyclic function. The maximum difference between two addresses until which data in poll requirements is grouped, can be defined with the MaxGap config entry. If the address space between 2 addresses, which are saved next to each other, is > MaxGap a new group is built. (if you would e.g. configure the addresses 1.100, 1.101, 1.102, 1.103, 1.115, 1.116 for the Modbus protocol the addresses would be grouped into two cyclic functions.

When defining the peripheral addresses of the Applicom driver you should generally consider that the cyclic functions will be used as optimized as possible when using the card polling.

 

Interface database

There is an interface database on the Applicom card. The results of cycle processing are written in the interface database as well as data that is sent by external devices (active slaves). The Applicom driver communicates with this interface database. A value change is stored additionally in the so called event queue (see description below).

 

If the Applicom card is run in server mode (which means that the client equipments send data to the card

spontaneously) you have to consider the following:

 

To be able to configure client equipments you have to set "Client Equipment Access Indicator Storage" and "Client Equipment Access Status Storage" to "Active" in the Applicom console in the properties of the channel. Thus, the status data are written into the database. This can overwrite the reference data and lead to errors. The addresses of the status data are defined via "Access Indicator Address" and "Access Status Address".

caution.gifCaution

"Access Indicator Address" and "Access Status Address" have to be set to the following values so that the address ranges are not overlapped:

"Access Indicator Address"
to 31744 and
"Access Status Address"
to 31872

 

The size of the database for spontaneous and cyclic data is 32 KWords (16Bit) and 32 KBits. This memory is used common for all devices that are configured on one card. The memory has also be split between spontaneous data and card polling. A part is allocated for byte addressing in the word range and Applicom internal data is additionally saved in these ranges. The available address range for a card is so 31997 bits, 13999 bytes and 24997 word (16Bit). There is no own range for floating-point numbers or for 32bit words. The data is saved in 16 bit range. The maximum number of boolean DPEs 31997 results from the restriction of the bits. The DPEs can be configured with an Applicom card to spontaneous or card polling. The connection between the interface DB and a configured peripheral address is as follows:

  • Driver polling and write requests does not need the interface DB

  • Spontaneous data are mapped into the interface DB via the formula in the apc_config file (See chapter Rules of the address transformation for more information).

  • Those addresses above the highest spontaneous configured peripheral address in the interface DB are used automatically for the internal card polling. This means that if the highest spontaneous configured address is 20234 the address (conversion is executed via apc_config) in the address range for e.g. word in the interface DB, 4763 addresses remain (based on maximum of 24997 in Word range) available for the card polling in the interface DB.

Event queue

The event queue defines another memory range on the Applicom card. Value changes (events) are stored automatically in this range and the driver reads this range out. A low level comparison is executed automatically via the internal card polling. Values that have not changed are written into the interface database but no events are stored in the event queue.

 

The memory range of the event queue provides space for 4096 events. If the whole space for the values is filled overflow of the event queue occurs (a status bit in a specific range in the interface DB is set to 1) and the connection in the configuration panel is presented as "Not Connected" ("FIFO Full" is displayed). In this case a message is shown in the log viewer (see chapter Details on the Applicom driver - Error messages) and the queue is emptied by the driver. Thereafter, a general query is executed and the event queue is described newly. An event queue overflow may occur at overload. This means that the driver is not able to "collect" the value changes anymore.

 

Polling via the Applicom driver

As mentioned earlier there can be 255 cyclic functions per channel on one Applicom card. The address range of the interface database is however always the same. This means that although each of several channels is allocated with 255 cyclic functions only as much data as space is available in the interface database can be queried. If the cyclic functions exceed the address range of the interface DB or more than 255 are created the Applicom driver takes over the polling function for the remaining data (the internal classes of the general driver (ComDrv) are used for the polling function (see General driver). Furthermore, the limit of 255 cyclic functions is not valid only for a data type in the DB but for the whole address range. This means that if only bytes are read with 255 cyclic functions no bits or words can be polled anymore. When using the driver for poll and write requests consider that the write requests are classified before the poll requests. Although there would be several poll requests the commands are sent to the periphery immediately because of this classification.

 

The Applicom driver takes over the polling functions also:

  • Via re-configuring or creating new addresses without restarting the driver (if the driver is not restarted the Applicom poll list cannot be rebuilt).

  • If the card polling is generally not used for a device, the driver always polls (deactivate the check box when configuring an Applicom device).

  • If the config entry MaxInternPollTime <= than the poll time of a data point element that was configured in the address panel the driver polls for this element. (see Possible config entries of the Applicom driver).

  • Addresses which do not have enough space in the address range of the interface database are configured automatically to driver polling.  

note.gifNote

The direct access to a timer/counter in the PLC via the Applicom driver is not supported. If you have to access to timer/counter values from the WinCC OA the PLC programmer has to represent the values in the normal memory range.

 

page_top.gif

V 3.11 SP1

Copyright ETM professional control GmbH 2013 All Rights Reserved