Information
-
Patent Application
-
20030061411
-
Publication Number
20030061411
-
Date Filed
August 30, 200222 years ago
-
Date Published
March 27, 200321 years ago
-
Inventors
-
Original Assignees
-
CPC
-
US Classifications
-
International Classifications
Abstract
The invention relates to a piece of automation equipment executing a real-time program (70) for carrying out the monitoring/control of an automation application. It includes a USB type connector (81) connected via a USB bus driver circuit (8) to an internal bus (9) of the automation equipment and a software task (1,31,32,60,61,62,67) in charge of controlling the flow of communications exchanged via the USB connector (81) with remote equipments, with the characteristics of the application program (70) executed in the automation equipment.
Description
[0001] The present invention relates to an automation equipment equipped with a USB (Universal Serial Bus) type link for connecting one or several remote equipments.
[0002] More and more terminals or PC type equipments are equipped with USB type links which simplify the connection of remote equipments, and provide much higher throughput than the usual series links. Further, with this link, the bandwidth may be distributed according to communications needs. The openness and the flexibility provided by this link should however not disturb the real-time operation of automation equipments which use it.
[0003] An automation equipment refers hereafter to a programmable logic controller, a monitoring/control station, a digital control or any equipment which may contain and execute an application program in order to carry out one or several monitoring and/or control functions of all or part of an automation application for example pertaining to the field of industrial process automation, building automation or the monitoring/controlling of electrical distribution networks.
[0004] The use of such a type of link on an automation equipment would provide improvement in the data transfer rate between this automation equipment and remote equipments, such as peripherals, terminals, programming, diagnostic, supervision systems, other automation equipments or others. With this, the communication problems with the PC type computer world may also be resolved. Indeed, the traditional series links are software-driven and the behavior over time is changed by other software packages, the execution of which has more priority, such as anti-virus software packages, screen savers, etc. . . In the case of a USB network, the link layer corresponding to level 2 of the ISO communications model is managed by a dedicated hardware component, its operation also becomes independent of the other software tasks which are executing on the equipment.
[0005] Advantageously, this use also enables standard connection means from the PC computer world to be adopted on automation equipment, which would simplify the connection and therefore reduce the implementation costs.
[0006] However, the important throughput available with a USB type link should not disturb the operation of the automation equipment's application program. If the small bandwidth of asynchronous series links induces a flow without any consequences on the real-time operation of the automation equipment, this is no longer the case with a very fast link, it therefore becomes imperative to adapt the incoming flow to the real-time needs and constraints of the application under control.
[0007] The problem essentially occurs upon receiving messages. The static allocation of bandwidth would lead to a notable reduction in the performances of the system by reducing its reactivity. Indeed, in order to meet instantaneous needs, for adjustments for example, communication channels which are unused for most of the time, should be reserved. Thus, the admissible throughput on the terminal socket of a piece of automation equipment should be calibrated according to the constraints of the application. The number of admissible messages per cycle—time unit of the application—on the terminal socket of the automation equipment depends on the model of the automation equipment. Indeed, an upper range model which manages high-volume applications should be able to provide a much higher throughput than a low end range model, notably for meeting the needs of supervisors. Further, the throughputs may vary according to the automation applications because the number of executed cycles per second of an application program in an automation equipment is also related to the type of application. For example, for an automation application relating to the monitoring/control of a machine, the cycle time is generally less than 10 ms whereas that of a feedback control application is rather of the order of 100 ms. In the latter case, the number of messages treated per unit time will therefore be smaller.
[0008] The object of the invention is therefore to provide the use of a USB link on an automation equipment while overcoming one or more drawbacks of the prior art.
[0009] This object is achieved by an automation equipment executing a real-time application program in order to carry out one or more monitoring or control functions in an automation application, and having random access memory, which includes a USB type connector connected via a USB bus driver circuit to an internal bus of the automation equipment and a software task executed by the central processing unit of the automation equipment and in charge of controlling the flow of communications exchanged on the USN connector between the automation equipment and the remote equipments, with the characteristics of the executed application program in the automation equipment.
[0010] According to one feature, the software task is periodically activated by a time base of the automation equipment and it processes the transmitting portion by triggering a frame builder module.
[0011] According to another feature, the software task is triggered upon receiving a communications message by an interrupt from the USB bus driver circuit, and it includes a message builder module for the application program, after synchronization with the time base of the automation equipment.
[0012] According to another feature, the message builder converts the USB frames into messages expressed in the format of the operating system of the automation equipment and understandable to the application and vice versa for the frame builder.
[0013] According to another feature, the software task utilizes a first variable memory area of the automation equipment's random access memory, declared as a stack for receiving input frames and as a stack for receiving output messages, the size of the first memory area being defined for the input frame receiving stack by design and for the output message receiving stack by parameterization. The software task utilizes a second variable memory area of the automation equipment's random access memory, declared as a stack for transmitting output frames and as a stack for transmitting input messages, the size of the second variable memory area being allocated for the output frame transmitting stack by design and for the input message transmitting stack by parameterization.
[0014] According to another feature, the software task includes a parameterization module which comprises a software function for parameterizing memory areas used as a stack for transmitting input messages and as a stack for receiving output messages.
[0015] According to another feature, the software task includes a module for managing incoming messages to the application program and a module for managing the outgoing messages from the application program.
[0016] According to another feature, the incoming message manager module limits the number of read messages at the beginning of a cycle of the application program to a determined value (for example, four messages per cycle for a medium range model of automation equipment).
[0017] According to another feature, the automation equipment includes a driver which triggers the reading of incoming messages at the beginning of the cycle of the application program, and triggers the writing of outgoing messages at the end of the cycle of the application program and before the beginning of the next cycle.
[0018] Other features and advantages of the invention will become more clearly apparent upon reading the description hereafter with reference to an illustrative, but non-limiting embodiment of the invention, illustrated in the drawings hereafter wherein:
[0019]
FIG. 1 shows the diagram of a communications architecture of an automation equipment as defined according to the invention,
[0020]
FIG. 2 schematizes an exemplary architecture of such an automation equipment.
[0021] The invention will be described with reference to FIGS. 1 and 2. The invention relates to an automation equipment equipped with a USB type connector (81, FIG. 2), not shown in FIG. 1, which communicates with one or more external remote equipments via a link (95, FIG. 1). This USB type connector (81) is connected to a USB bus driver circuit (8). This USB bus driver circuit (8) communicates with the internal bus (9) of the automation equipment, at the input via the link (91), at the output via the link (92) of the internal bus (9) of the automation equipment. The conventional structure of an automation equipment is illustrated in FIG. 2 and generally consists of a central processing unit (63) consisting of one or more processors, of a fixed memory (65) of the unchangeable ROM type or of the changeable FLASHPROM type which will be referred to as read-only memory, subsequently. This read-only memory (65) contains the manufacturer program called the operating system (OS). This manufacturer program is generally expressed in a language specific to the manufacturer. The automation equipment also includes a random access memory (64) which communicates like the read-only memory (65), with the central processing unit (63) via the internal bus (9). An input/output manager (66) of the automation equipment is also connected to the internal bus (9) and communicates with the central processing unit (63). The random access memory (64) contains in a first area the real-time program of the application (70) as developed by the user, called the application program hereafter, in a second area, the data, in particular the images of the states of the couplers and the constants relative to the application program developed by the user.
[0022] As a reminder, the application program is executed by the central processing unit (63) and is in charge of monitoring and/or controlling an automation application by means of inputs/outputs driven by the input/output manager (66) and the application program. The application program elaborated by the designer/user is usually written is one or more automation graphic languages, notably integrating ladder diagrams, sequential function charts also called Grafcet, function block descriptions and/or instruction lists (IL).
[0023] In addition to the information specific to the automation application which consists of the application program, the data and the input/output stored in the random access memory (64), the invention describes the possibility of allocating variable memory areas (693, 694) of the random access memory (64). With a first variable memory area (693), a FIFO stack (642) for receiving the output messages and a FIFO stack (643) for receiving the input frames may be formed and with a second variable memory area (694), a FIFO stack (641) for transmitting input messages and a FIFO stack (644) for transmitting output frames may be formed. The size of the first memory area (693) is defined for the input frame receiving stack (643) by design and for the output message receiving stack (642) by parameterization. The size of the second memory area (694) is defined for the output frame transmitting stack (644) by design and for the input message transmitting stack (641) by parameterization. The sizes of the frame transmitting and receiving stacks (643, 644) are therefore set by the manufacturer of the automation equipment, for example, according to the model of the automation equipment. On the other hand, with a parameterization by the user, the sizes of the message transmitting and receiving stacks (641, 642) may be defined for example according to the type of controlled automation application.
[0024] In addition to the conventional components of an operating system of a standard automation equipment, the ROM memory or the PROM memory will comprise a certain number of software modules, the function of which will be explained hereafter.
[0025] A first module (60) plays the role of driver or scan manager.
[0026] A second module (62) for managing interrupts (interrupt manager) manages interrupts from the USB bus driver circuit (8).
[0027] A third module (61) manages the system time base and triggers the activation of a software module (1) for processing the USB messaging system, mainly including a message builder module (11) for the incoming communications and a frame builder module (12) for the outgoing communications. These modules (11, 12) are stored in the read-only memory (65) and are part of the operating system (OS). The message builder module (11) and the frame builder module (12) respectively have the incoming frames comply with the message format for the application program and vice versa, the messages from the application program intended to be transformed into frames at the output and then transmitted to the USB bus.
[0028] The driver (60) which converses with the application program (70) generates an end scan signal (51) at the end of each cycle of the application program. This signal (51) provides triggering of a outgoing message manager module (32), which will receive the information for filling the receiving stack (642) for the output messages to be transmitted. Also, in order to guarantee consistence in the messages, the driver (60) also transmits at the beginning of each cycle of the application program, a begin scan signal (41) which triggers a incoming message manager module (31) in order to allow messages from the incoming message transmitting stack (641) to be transmitted to the application program (70). The incoming (31) and outgoing (32) message manager modules are part of the operating system (OS) stored in the read-only memory (65) of the automation equipment.
[0029] Thus, as indicated in FIG. 1, the input frame receiving stack (643) is used as a buffer memory between the USB bus driver (8) and the message builder (11) and the input message transmitting stack (641) is used as a buffer memory between the message builder (11) and the incoming message manager (31). Also, the output message receiving stack (642) is used as a buffer memory between the outgoing message manager (32) and the frame builder (12) and the output frame transmitting stack (644) is used as a buffer memory between the frame builder (12) and the USB bus driver (8).
[0030] A fourth parameterization module (67) includes a parameterization software function enabling a user to configure a predetermined limiting value for the number of messages able to be received at the beginning of a cycle of the application program (70) by the automation equipment memory. This limiting value notably determines the size of the memory area assigned to the input message transmitting stack (641). The parameterization module (67) provides this information to the incoming message manager module (31) in order to allow it to limit the number of messages to be received at the beginning of a cycle. Also, the parameterization module (67) is also capable of enabling a user to configure a predetermined limiting value for the number of messages able to be transmitted at the end of the cycle of the application program (70). This limiting value will notably determine the size of the memory area allocated to the output message receiving stack (642).
[0031] The USB message system processing module (1) is triggered, periodically, for example about every millisecond. This module provides two essential functions: fragmentation/defragmentation of the USB frames and control of the throughput.
[0032] Defragmentation consists in converting 64 byte USB frames into messages understandable to the application program and vice-versa, fragmentation consists in converting messages understandable to the application program into 64 byte USB frames.
[0033] A message generally comprises several frames. When the task for processing the USB message system is enabled, it starts by processing the transmitting portion in order to free internal memory resources. Indeed, the flow generated by the automation equipment is generally considerably less than the receiving capacities of the remote equipments having USB type communication means. The receiving phase starts with a test for the available space in the entry message transmitting stack (641). When there is no room for storing at least one message in the stack (641), the message builder (11) finishes its processing without unstacking the entry frame receiving stack (643). When there is room for storing at least one message in the stack (641), the message builder (11) unstacks the stack (643) and converts the USB frames into an entry message stored in the stack (641).
[0034] The flow control is therefore under the control of the driver software module (60), itself under the control of the internal time base (61) of the automation equipment and triggered by an interrupt manager signal (62). The messages are built by the message builder (11) and defragmented only when the random access memory resources (64) are available and the managing of the FIFO stack areas (641-644) of the random access memory (64) is controlled by the application program (70).
[0035] The USB bus driver (8) operates in stand-alone mode by triggered interrupts, either by the arrival of a frame, or by the end of the transmission of the previous frame. The mechanism for the standard negative acknowledgment to a USB type communication is involved automatically when all the resources are busy upon reception. This negative acknowledgment is transmitted by the USB bus driver (8) when an interrupt triggered by the arrival of a frame was not able to be processed by the USB message system processing module (1) (when the input frame receiving FIFO stack (643) is full) and the driver (60). It is then up to the transmitter not shown to adopt a consistent behavior with the admissible throughputs via the link (95), for example by temporarily reducing the requests.
[0036] It should be obvious for those skilled in the art that the present invention provides embodiments under many other specific forms without departing from the field of application of the invention as claimed. Accordingly, the present embodiments should be considered by way of illustration but may be changed within the field defined by the scope of the appended claims.
Claims
- 1. An automation equipment executing an application program (70) in order to carry out one or more monitoring or control functions in an automation application and including a random access memory (64) characterized in that it includes a USB type connector (81) connected via a USB bus driver circuit (8) to an internal bus (9) of the automation equipment and a software task (1,31,32,60,61,62,67) in charge of controlling the flow of communications exchanged over the USB connector (81) between the automation equipment and remote equipments, with the characteristics of the application program (70) executed in the automation equipment.
- 2. The automation equipment according to claim 1, characterized in that the software task (1,31,32,60,61,62,67) is periodically activated by a time base (61) of the automation equipment and processes the transmitting portion of the communication by triggering a frame builder module (12).
- 3. The automation equipment according to claim 1, characterized in that the software task (1,31,32,60,61,62,67) is triggered upon receiving a communications message via an interrupt from the USB bus driver circuit (8) and includes a message builder module (11) for the application program (70), after synchronization of the automation equipment with the time base (61).
- 4. The automation equipment according to claim 2 or 3, characterized in that the message builder (11) converts USB frames into messages expressed into the format of the operating system of the automation equipment and understandable to the application program (70), and in that the frame builder (12) converts messages expressed in the format of the operating system of the automation equipment and understandable to the equipment program (70), into USB frames.
- 5. The automation equipment according to claim 4, characterized in that the software task (1,31,32,60,61,62,67) utilizes a first variable memory area (693) of the random access memory (64) of the automation equipment, declared as an input frame receiving stack (643) and as an output message receiving stack (642), the size of the first memory area (693) being defined for the input frame receiving stack (643) by design and for the output message receiving stack (642) by parameterization
- 6. The automation equipment according to claim 4, characterized in that the software task (1,31,32,60,61,62,67) utilizes a second variable memory area (694) of the random access memory (64) of the automation equipment declared as an output frame transmitting stack (644) and as an input message transmitting stack (641), the size of the second variable memory area (694) being allocated for the output frame transmitting stack (644) by design and for the input message transmission stack (641) by parameterization.
- 7. The automation equipment according to claim 5 or 6, characterized in that the software task (1,31,32,60,61,62,67) includes a parameterization module (67) which comprises a software function for parameterizing variable memory areas used as a message receiving stack (642) and as a message transmitting stack (641).
- 8. The automation equipment according to claim 7, characterized in that the software task (1,31,32,60,61,62,67) includes a module for managing the incoming messages (31) to the application program (70) and a module for managing the output messages (32) from the application program (70).
- 9. The automation equipment according to claim 8, characterized in that the module for managing the incoming messages (31) limits the number of messages read at the beginning of a cycle of the application program (70), to a determined value.
- 10. The automation equipment according to claim 8, characterized in that it includes a driver (60) which triggers the reading of incoming messages at the beginning of the cycle of the application program (70) and triggers the writing of the output messages at the end of the cycle of the application program (70) and before the beginning of the next cycle.
Priority Claims (1)
Number |
Date |
Country |
Kind |
01 11507 |
Sep 2001 |
FR |
|