课题 - 教室智能照明系统设计(10)

2019-08-31 15:48

describes how DP-Ethernet may be implemented. Section 5 takes into consideration some typical configurations of DP-Ethernet and evaluates their performances using a suitable software simulation package.

2. Profibus DP

Profibus DP is a protocol designed to perform cyclic high speed data exchange between process controllers and field devices, such as sensors and actuators, in a master-slave configuration.

The first version of the Profibus DP standard was issued in 1994. Subsequently it was included in the European Standard EN50170. In 1997 an extension, named DPV1, added acyclic functionalities to this fieldbus and, finally, at the beginning of 2000, a completely revised version of Profibus DP became part of the IEC 61158 international fieldbus standard. The communication profile of Profibus DP is shown in Fig. 1. As can be seen, some of the ISO/OSI layers are empty, and the Profibus DP protocol is placed on top of the data link layer, named Fieldbus Data Link, FDL. The access to the physical medium realized by FDL is based on a technique very similar to that specified by the IEEE 802.4 standard, token bus. The token is circulated among active stations which form a logical ring, but also passive stations can be connected to the network: as they do not receive the token, they can only answer to specific requests coming from an active station. An important parameter, the target token rotation time, TTR, is set in all the stations during the network configuration phase and represents the maximum time requested by a complete token circulation in the logical ring.

When receiving the token, a station computes the maximum time it can be used (token holding time, TTH) as the difference between TTR and the actual duration of the last token rotation (real token rotation time, TRR). The FDL protocol specifies two possible priorities for the Protocol Data Units (PDUs), transmitted on the network: high and low. The Profibus DP protocol defines three possible types of devices that can be present on the network: Class 1 masters, which are typically control devices, such as for example PLCs, CNCs, PCs. Class 2 masters, used for network configuration and administration tasks. Slaves, which are input–output devices employed to realise the interface with the plant. Because the use of class 2 masters have no relevance for the aim of this paper, in the following the term masters will

46

be used to indicate uniquely class 1 master devices. Although the Profibus DP standard allows for the realisation of network configurations with more than one master device (multimaster), most of the already existing applications are based on monomaster network configurations. As can be seen in Fig. 1, Profibus DP has two major components: the User Interface and the Direct Data Link Mapper which are present, with different functions, both in master and slave stations. The User Interface of a master has basically the task of handling the slaves assigned to it. This is accomplished by using a set of User Interface functions, made available from the DDLM, which are shortly illustrated in the following. After power on, a slave waits for its initialisation from a master: this is realised by means of two functions, named DDLM_set_prm (set parameters) and DDLM_chk_cfg (check configuration). At the end of a successful initialisation, the slave enters the data exchange phase, during which it cyclically exchanges input–output data with the master by means of the DDLM_data_exchange function. In this phase a slave, when polled, may signal the presence of a diagnostic message.

As a consequence, the master, at the end of the current polling cycle, is forced to read the slave diagnostic with the DDLM_slave_diag function. Moreover, during the data exchange phase, a master can send some Fig. 1. Profibus DP communication profile. global control commands to the slaves in order to synchronise the acquisition of the inputs and/or the sending of the outputs: to this purpose the DDLM_global_control function is used. This function can address either a single slave or a group of slaves. The DDLM has also the task of mapping the User Interface functions onto FDL services. For this purpose it uses two different services available from the Profibus data link layer, namely the Send and Request Data with Reply, SRD, and the Send Data with No Acknowledge, SDN. SRD is a connectionless confirmed service by means of which a source station can send up to 246 data octets to a destination station.

This latter is requested to acknowledge the correct reception of the data. In the response frame the destination station can include, if previously prepared, a maximum of 246 data octets to send back to the source. SDN is a connectionless unconfirmed service used to send up to 246 data octets to either a single station or a group of stations. In this case, the destinations do not send back the acknowledgments of the correct reception, but the source station generates a local confirm meaning that the data have been correctly submitted to FDL. The DDLM uses the SDN service to implement the DDLM_global_control function and the SRD service to implement all

47

the other functions. SDN is necessary because it is the only FDL service which can address a group of stations, as necessitated by the global control. In order to specify the different User Interface functions, the DDLM makes use of the Service Access Points, SAPs, which are present in the PDUs of FDL. Thus, for example, a DDLM_slave_diag request is implemented by a SRD request where the source SAP #62 and the destination SAP #60 are specified. Whereas, the DDLM_set_prm function is implemented specifying the source SAP #62 and the destination SAP #61. As an example, Fig. 2 shows the sequence of the primitives necessary to realize the DDLM_chk_cfg function (destination SAP 48 source SAP 48 62).

3. The data link layer

The data link layer of Ethernet The IEEE 802 committee, which issued the LAN standards, has split the data link layer of a LAN into two sublayers: the LLC and the Medium Access Control (MAC).

The LLC represents the common interface for all the LANs towards the upper layers, while the MAC specifies the protocols to access the physical medium. In practice, the IEEE 802 committee defines different LANs types characterised by differentMAC protocols, all of them using LLC on top. For Ethernet, the MAC has been standardised by the IEEE 802.3 subcommittee and uses a technique to access the physical medium known as Carrier Sense, Multiple Access with Collision Detection (CSMA/CD).3.1. Logical Link ControlLLC provides three types of service: unacknowledged connectionless service, connection-mode service and acknowledged connectionless service. As DP-Ethernet makes use of both types of the connectionless service they will be shortly illustrated in the following. The unacknowledged connectionless service, named DLUNITDATA allows for the transmission of a set of data octets from one LLC user to either a single or a group of remote LLC users.

With this service, every transmission is independent of others, and the sending user does not receive the confirm of the reception of the data from the destination.With the acknowledged connectionless service one LLC user can send a set of data octets to another and obtain the confirm of the correct reception of the data. Actually, two different services are available: that used by DP-Ethernet is called DL-REPLY and foresees a mechanism of bilateral data exchange. In practice, the destination user which receives the data with the DL-REPLY service may send

48

back to the source, together with the confirm of the reception, a set of data octets, if these latter were previously prepared with the DL-REPLAY-UPDATE service. The PDU of LLC is shown in Fig. 3. The field Control, when the PDU is used for connectionless services, is limited to one octet. In detail, for the DLUNITDATA service, the PDU carrying the data transmitted after the issuing of a request primitive is called Unnumbered Information, UI. For the DL-REPLY service, the PDUs involved are AC0 or AC1. After a request primitive either AC0 or AC1 is transmitted. The remote user will respond with a PDU of the same type and with the complementary number (i.e. when AC0 is transmitted, AC1 must be received and vice versa). 3.2. The IEEE 802.3 CSMA/CD

The CSMA/CD technique specifies that every station continuously senses the network and acquires the frames directed to itself. A station wishing to transmit simply verifies if the network is idle and then sends the message. Obviously, there is the possibility of having a collision between two or more frames transmitted contemporaneously. In this case the stations involved have to retransmit their frames after a random time calculated according to a rule known as the truncated binary back off exponential algorithm.

This time is expressed as a multiple, R, of a network parameter called slot time, tSL. R is randomly chosen in the interval 0–2k, where k is the minimum between 10 and the number of attempts to retransmit the frame. After a user-defined number of attempts without success, the MAC reports an error to the LLC. The occurrence of collisions makes the behaviour of Ethernet networks non deterministic. This is the principal reason for what Ethernet, in the past, was not considered suitable for real time applications, such those requested at the device level of factory automation systems.

However, the situation is significantly changing because, with the introduction of switches, collisions can be practically eliminated. An Ethernet switch is an ‘intelligent’ device equipped with a number of ports to which either the network segments or the single stations can be connected. The peculiarity of a switch is the ability of addressing frames only towards their destinations. As a consequence, with these devices, many transmissions can take place simultaneously without colliding, contrarily to what happens in the ‘traditional’ networks called shared Ethernet implementations. If a switch is used, the only possibility of having a collision is verified when two or more stations transmit contemporaneously towards the same station. Also in

49

this case, however, the collision can be avoided by means of a buffering functionality, which is implemented in many switches. Another important advantage of Ethernet is the high transmission speeds: from the initial speed of 10 Mbit/s it is now possible to 、 implement networks operating at 100 Mbit/s and 1 Gbit/s. The PDU of the IEEE 802.3

MAC is shown in Fig. 4. The PDU has a minimum length of 512 bits, necessary to ensure the correct operation of the collision detection technique. For this reason the field ‘Pad’ might be filled with the necessary number of octets. The minimum length is computed starting from the ‘Destination address’ field, hence the size of the shortest frame is 576 bits.

50


课题 - 教室智能照明系统设计(10).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:测量培训试题及答案

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: