Event Management Systems and Methods for Motion Control Systems

- ROY-G-BIV CORPORATION

A motion control system comprising a machine platform, at least one event destination, and an event handler. The machine platform carries out automated tasks and generates events. The event handler is configurable to receive at least one event from the machine platform and send the at least one event to the at least one event destination.

Skip to: Description  ·  Claims  · Patent History  ·  Patent History
Description
RELATED APPLICATIONS

This application (Attorney's Ref. No. P217272) is a continuation of U.S. patent application Ser. No. 12/896,750 filed on Oct. 1, 2010.

U.S. patent application Ser. No. 12/896,750 is a continuation of U.S. patent application Ser. No. 11/728,801 filed on Mar. 26, 2007, now U.S. Pat. No. 7,904,194 which issued on Mar. 8, 2011.

U.S. patent application Ser. No. 11/728,801 is a continuation of U.S. patent application Ser. No. 11/368,231 filed on Mar. 3, 2006, now abandoned, which claims benefit and/or priority of U.S. Provisional Application Ser. No. 60/658,746 filed on Mar. 3, 2005.

U.S. patent application Ser. No. 11/368,231 is a continuation-in-part of U.S. patent application Ser. No. 10/074,577 filed on Feb. 11, 2002, now U.S. Pat. No. 7,031,798, which issued on Apr. 18, 2006, and which claims benefit and/or priority of U.S. Provisional Application Ser. No. 60/267,645 filed on Feb. 9, 2001.

The contents of all related applications listed above are incorporated herein by reference.

TECHNICAL FIELD

The present invention relates to motion control systems and, more specifically, to an event management system optimized for the processing and distribution of events associated with a motion control device.

BACKGROUND

Electromechanical systems are used in numerous environments to translate electrical signals into mechanical movement. As examples, factory automation systems, toys, appliances, and the like all may use one or more electromechanical transducers that move in response to electrical control signals.

Typically, an application programmer familiar with a specific environment creates an application program defining a desired sequence of movements. U.S. Pat. Nos. 5,691,897, 5,867,385, and 6,209,037 to Brown et al. disclose systems and methods for generating, processing, and/or distributing control commands to one or more motion control devices based on such an application program.

The present invention may be embodied as a part of an overall motion control system as described in the Brown et al. patents and will be described herein in that context. However, as described below, the principles of the present invention may have broader application to other motion control systems and methods, and the scope of the present invention should be determined by the claims appended hereto and not the following detailed description.

SUMMARY

The present invention may be embodied as a motion control system comprising a machine platform, at least one event destination, and an event handler. The machine platform carries out automated tasks and generates events. The event handler is configurable to receive at least one event from the machine platform and send the at least one event to the at least one event destination.

DESCRIPTION OF THE DRAWING

FIG. 1 is a module interaction map depicting a motion control system incorporating an event management system of the present invention;

FIG. 2 is a scenario map depicting the startup and initialization of the system of FIG. 1;

FIG. 3 is a scenario map depicting the process of injecting a motion event provider DLL into the address space of a target application;

FIG. 4 is a scenario map depicting the process of configuring motion events provided by each of one or more motion event providers 132;

FIG. 5 is a scenario map depicting the process of handling a motion event;

FIG. 6 is a scenario map depicting how a user may obtain new motion media and motion event providers 132 from the motion web site 136;

FIG. 7 is a scenario map depicting shut down of the system of FIG. 1;

FIG. 8 is a scenario map depicting the mapping of text to motion events;

FIG. 9 is a module interaction map depicting interactions of modules forming another example motion control system of the present invention;

FIG. 10 is a module interaction map depicting an event handling system constructed using a modular output model;

FIG. 11 is a use case depicting the configuration of an event handling component from an application;

FIG. 12 is a use case depicting the configuration of an event handling component from another component;

FIG. 13 is a use case depicting the initialization of an event handling component;

FIG. 14 is a use case depicting the manner in which the event handling component processes events;

FIG. 15 is a use case depicting the manner in which the event handling component processes commands;

FIG. 16 is a use case depicting the manner in which events and commands are processed in a daisy chain of event handling components;

FIG. 17 is a use case depicting the manner in which an event handling component passes configuration data to other event handling components in a daisy chain configuration;

FIG. 18 is a module layout depicting the interfaces exposed by the event handling component;

FIG. 19 depicts an example a user interface screen used to configure connection and start-up settings;

FIG. 20 depicts an example user interface screen used to configure event monitoring settings; and

FIG. 21 depicts an example user interface screen used to configure data collection settings.

DETAILED DESCRIPTION

Referring initially to FIG. 1, depicted therein is a motion control system 120 constructed in accordance with, and embodying, the principles of the present invention. The motion control system 120 is an event-based system used to control, configure, and query one or more motion based devices or machines such as indicated by reference character 122 in the drawing. The motion based devices or machines 122 will be referred to herein as the target device.

In the context of the motion control systems described herein, data is often associated with events. The term “data” (or data items) includes any numeric or string data values collected from a target machine or device in an analog or digital format that is made compatible for computer systems. For example, BIT, BYTE, WORD, DWORD, LONG, REAL, DOUBLE, FLOAT, STRING, ASCII STRING are a few data types that represent data items. Data may be collected from data sources by reading register values on the data source, reading shared memory provided by the data source, sending commands to the data source for which a data response is given containing the data requested, reading variables provided by the data source, reading and writing to variables in a sequence necessary to produce data values, querying data using a proprietary or standard data protocol, calling a function provided by the target data source, etc. The term “variable” as used herein refers to a data item that has both a name and optionally associated data. A data item may be a function call, a named data variable, a tag within a database, or the like. The terms “variable” and “data item” are used interchangeably to refer to a data point that includes one or more atomic data elements.

In the following discussion, the components or objects that form the motion control system 120 and the basic operation of the system 120 will first be described. After that will follow a discussion of the interaction between those objects and several detailed scenarios of typical actions of this system 120.

Referring initially to FIG. 1 of the drawing, it can be seen that the motion control system 120 comprises the motion based machine or device 122, a motion event manager 130, one or more motion event provider objects 132, a motion event interface 134, a motion web site 136, and a media creation tool 138.

The system 120 is adapted to be run on a general purpose computer platform comprising computer hardware and an operating system 140. The exemplary operating system 140 is a Windows variant and comprises a registry 142.

The web site 136 and media creation tool 138 provide access to one or more motion media files 144. The motion media files 144 contain what will be referred to herein as motion media.

The term “motion media” includes motion scripts, motion application programs, and/or individual motion instructions capable of causing the target device 122 to perform a desired motion operation comprising a discrete movement or sequence of movements.

The motion media comprises what will be referred to as motion commands. The term “motion commands” will be used herein to refer to both control commands and media commands associated with a desired motion operation. The term “control commands” as used herein refers to device-specific commands that may be directly run by a target device to obtain a desired motion operation.

The term “media commands” used herein refers to machine independent instructions that generically define a desired motion operation. Normally, media commands are converted into control commands before the target device executes the desired motion operation corresponding to a particular media command or set of media commands.

The term “application program” will be used to refer to a set of control and/or media commands associated with a sequence of discrete movements. In general, the term “application” refers to client software that uses the functionality of the example motion control systems described herein. An application is typically an executable, but may also be a DLL, component, or other module that takes advantage of the functionality of the motion control systems described herein.

The term “module” as used herein refers to a binary block of computer logic that contains functions, objects, components, ActiveX components, .NET source, HTML, XML and/or other computer code that can be executed in real-time or in script form. Several examples of a module include an executable EXE, a dynamic link library DLL, an OLE component or set of components housed within a DLL or EXE, an ActiveX Control, an HTML or XML based Control, a VB script source file, a Java Serverlet, Java Control, Java Object, .NET Package, etc.

The motion event manager 130 comprises a motion control component 150 and an event handling component 152. The motion event interface 134 further comprises a event provider configuration control 154 and a media view control 156. As used herein, the term “component” refers to a logical organization of computer logic designed to perform a set of operations. Several examples of a component are an OLE Component, an ActiveX Control, an HTML or XML based Control, an HTML or XML based object, a .NET object, a Visual Basic based object, etc.

The motion control system 120 operates basically as follows. The motion event providers 132 generate what will be referred to as event tokens based on the occurrence of a predetermined event. The event token is associated with the predetermined event in advance and thus identifies the predetermined event. The event token may also contain additional information such as the source of the predetermined event, parameters associated with the predetermined event, and the like.

The event tokens are sent to the motion event manager 130. The motion event providers 132 and motion event manager 130 run in separate processes and could perhaps run on separate physical machines connected over a network. As used herein, the term “network” refers to a link between two or more computer systems and may be in the form of a packet based network, a streaming based network, broadcast based network, or peer-to-peer based network. Several network examples include a TCP/IP network, the Internet, an Intranet, a wireless network using WiFi, a wireless network using radio waves and/or other light based signals, etc.

The motion event providers 132 and motion event manager 130 thus use the system for the inter-process communication provided by the operating system to transmit the event tokens from the event providers 132 to the motion event manager 130.

The motion event manager 130 notifies the motion control component 150 when the event token is received and the identity of the event token. The action taken by the motion control component 150 upon receipt of an event token depends upon the nature of the event token. The received event token may contain or identify a particular control command, and the motion control component 150 can simply pass that control command to the target device 122. The received event token may contain or identify a particular media command, in which case the motion control component 150 may be required to convert the media command into a control command capable of being run by the target device 122. Another event token may start, stop, or otherwise control a separate application program run by the motion control component 150.

In the exemplary system 120, the association of motion media with event tokens is preferably made by the motion event manager 130. This association is typically represented by a table, spreadsheet, or other data storage means capable of defining relationships between event tokens and motion media. Upon receipt of each event token, the motion event manager 130 will identify the motion media previously associated with the received token and send the identified motion media to the motion control component 150 for control of the target device 122.

With the foregoing understanding of the basic operation of the system 120, the details of this exemplary motion control system 120 will now be described.

The motion event manager 130 handles the creation of each event provider 132 installed on the system by creating in-proc providers or injecting other providers into their target processes. The event manager 130 also catches events fired from each provider 132 and initiates the appropriate motion request for each event. In the exemplary system 120, the event manager 130 is the only object that communicates directly with the motion control component 150, as will be described in further detail below. The exemplary event manager 130 is accessible by double clicking its icon in the Windows System Tray in a conventional manner.

The purpose of the event handling component 152 is to handle the inter-process communications between the motion event manager 130 and the motion event providers 132. The exemplary event handling component 152 is or may be a conventional software object referred to as a message pump.

The motion event provider objects 132 are individually designed to monitor user configurable events from a given source. The exemplary system 120 employs two types of motion event providers 132: simple in-proc servers 132a,b hosted by the motion event manager 130 and specialty DLLs 132c,d that are injected into a target process to monitor event cases. Each motion event provider object 132 also contains an event configuration control 154 that, as will be described below, allows a user to configure all events supported by the motion event provider objects 132. The motion event provider objects 132 notify the motion event manager 130 of each event caught by the objects 132.

The motion event manager 130 and motion control component 150 operate together to allow interaction between the motion event providers 132 and the target device 122.

The motion control component 150 may be or incorporate parts of a software system as disclosed, for example, in U.S. Pat. Nos. 5,691,897 and 5,867,385. The systems disclosed in the '897 and '385 patents are capable of generating device-specific control commands based on hardware independent media commands written to a predetermined application programming interface.

As an alternative, the motion control component 150 may act as a conduit that passes device-specific control commands and query responses between the motion event providers 132 and the target device 122. A motion control component implemented in this manner would not convert between hardware independent media commands and device specific control commands.

A preferred implementation of the motion control component 152 would be to be for the component 152 to function in both a translation mode and in a pass-through mode. In the translation mode, the component 152 converts media commands into control commands. In the pass-through mode, the component 152 simply passes control commands from the motion event providers 132 to the target devices 122. In either mode, query responses are returned from the target devices 122 to the event provider 132 in an appropriate format.

The motion event configuration interface 134 is preferably a visual interface displayed on a screen to allow a user to configure all motion event providers 132 installed on the system 120. The exemplary interface 134 also provides access to the motion web site 136 where new motion media and motion event providers 132 may be downloaded and installed. As will be described in more detail below, the configuration options allowed by the interface 134 include the ability to enable/disable event providers 132 and map motion media to particular events supported by each provider 132. The interface 134 also provides access to the motion web site 136, allowing for new motion media and motion event providers 132 to be downloaded and installed onto the current system.

Each motion event provider 132 contains a visual configuration control 158 that allows the user to configure the events supported by each provider 132. The exemplary configuration controls 158 use the media view control object 156 to gain access to the available motion media in the motion media file 144 that can be mapped to each available event.

These controls may also be configured to allow the user to add new, customized events to the motion event providers 132. The dynamic events can be defined using parameters such as text (usernames, messages, email, etc.), date/time, or any other parameter particular to an event provider's event source.

The media view control object 156 provides access to all installed motion media scripts as represented by the motion media file 144. Preferably, the media view control object 156 displays a conventional browse/select dialog to allow identification and selection of the available motion media. This object 156 is used by the event provider configuration controls 158 and allows the configuration controls 158 to remain independent of the motion media format.

The media creation tool application 138 allows the user to customize and/or create motion media. This application 138 preferably implements a graphical, easier to use, front-end user interface design.

The motion web site 136 provides a location for the user to download new motion media as well as new and/or updated motion event providers 132. The motion media is preferably stored in a single meta file. New motion media downloaded from the motion web site 136 will be added to this meta file.

The present invention is preferably embodied using the Windows registry; typically, a component category is created for each of the motion event providers 132, allowing the motion event manager 130 to enumerate all providers 132 installed on the system. Primary event sources 132 are user actions (in any active application supported via a motion event provider) and operating system tasks.

With the foregoing understanding of the modules that form the exemplary system 120, various scenarios in which these modules typically interact will now be described.

Referring now to FIG. 2, depicted therein is the scenario describing the startup process of the motion event manager 130 of the system 120. Each of the steps of this startup process will now be described with reference to FIG. 2.

The motion event manager 130 process 130 begins on system startup. The motion event manager 130 process 130 next queries the MOTION_EVENT_PROVIDER component category in the Windows Registry to enumerate all motion event providers 132 installed on the system.

Third, the registry entry of each of the event providers 132 contains startup information indicating if the particular event provider is either a standard in-proc provider or a specialty provider that is injected into a target process to monitor event conditions.

Fourth, the motion event manger 130 creates a new instance of each provider 132. If the event provider 132 is a specialty provider that is injected into a target application process, the event manger 130 will read the target-process information from the provider's registry entry, find the target process, and perform the DLL-injection. If the target process is not active, the motion event manager 130 will continually monitor the creation of new applications, and perform the injection when/if the requested application is launched.

Fifth, once the event providers 132 are created, the motion event manager 130 will send the appropriate initialization information to each provider 132, including callback information to allow the event providers 132 to post event messages back to the event manager 130.

Finally, the event provider 132 reads initialize message data and establish the necessary event syncs to monitor the events. The initialize message data includes a registry key identifying the location of the event configurations and preferences as last set by the motion event configuration interface 134 or the default installed set.

Referring now to FIG. 3, depicted therein is the DLL injection scenario map. This scenario describes the process of injecting a motion event provider DLL into the address space of a target application.

As shown in FIG. 3, the first step of this process is for the motion event manager 130 to determine which process into which the motion event provider 132 must be injected based on the registry entry of the provider 132.

Once the target process has been identified, the next step is for the event manager 130 to install a Windows message hook in the target process. This causes the event provider DLL to be loaded into the target address space of the target process. The event provider DLL has now been loaded into the required process, and will now wait for the “initialize” message from the motion event provider 132.

Referring now to FIG. 4, depicted therein is the motion event configuration scenario map. This scenario map describes the process of configuring motion events of each of the motion event providers 132.

First, the user launches the motion event configuration interface 134 from system tray interface of the motion event manager 130.

Each event provider object 132 supports a custom visual control 154 that can be used to edit the object's supported events. The event configuration interface 134 creates and hosts these visual controls 154 for the user.

Next, when the event provider configuration control 154 is created and initialized, it will receive the location in the Windows Registry 142 of its persisted event data, which will be loaded into the control 154.

Next, the user will select an event provider 132 to configure. Individual events may be mapped to motion actions, and particular events (as well as the entire event provider itself) may be deactivated if desired. As noted above, these event configuration controls 154 may also provide the means to add additional, customized events based on input user parameters (custom text strings, buddy chat names, email messages, etc).

When the user selects an event to configure, the event provider configuration control 154 will defer to the media view control object 156. The media view control object 156 displays all available motion media via a dialog box, allowing the user to make a selection.

Finally, once the user makes a motion media selection, the media view control object 156 returns data back to the event provider configuration control object 154 (including human-readable description text of the event for display as well as a data token which can later be used to identify media selection). The configuration control object 154 then persists this information to the Windows Registry 142.

Referring now to FIG. 5, depicted therein is a motion event scenario map. This scenario describes the process of handling a motion event.

The scenario depicted in FIG. 5 begins whenever an event occurs. The occurrence of an event may be caused from a user action, operating system event, or an event situation monitored in a third-party application.

The event provider 132 then fires a event token associated with this event to the event manager 130. The event token has previously been stored in the registry during the event configuration process. If the provider 132 requires queried data to be returned, the provider 132 will also pass the necessary callback data to the event manager 130.

The event manager 130 next receives the event and passes the requested media information to the motion control component 150. The motion control component 150 then executes the specified motion media on the target motion device 122.

Finally, if a query action was requested, the motion control component 150 will return the appropriate data. The motion event manger 130 will send the data through the specified event provider callback mechanism.

Depicted in FIG. 6 is a motion web site scenario map. The scenario of FIG. 6 describes how a user may obtain new motion media and motion event providers 132 from the motion web site 136.

This process may be started when users visit the motion web site 136 to browse currently available motion event providers 132 and new motion media. In FIG. 6, the reference character 144a is used to represent a motion media file stored locally by the system 120, while the reference character 144 represents a motion media file stored at a remote location.

Next, the user selects the desired provider/media download option, and the new software is installed into the motion event manager 130 including the motion control component 150.

The next time the motion event configuration interface 134 is launched, the user will be able to configure the new event provider 132 or motion media in the local motion media file 144a.

Alternatively, users may download new event providers 132 and motion media directly from within the motion event Configuration dialog interface. This configuration dialog will provide the following options to the user: Download new Motion Media and/or Download/install new motion event providers 132. The user or the motion event manager 130 may also check for new versions of currently installed motion media and/or event providers 132.

Next, the user selects the desired provide/media download or update option, and the configuration dialog interface object 134 automatically downloads and installs the new software from the media web site 136.

Finally, once the new software is installed the configuration dialog 134 will automatically update to provide access to the new components and/or media.

Referring now to FIG. 7, depicted therein is the system shutdown scenario map. This scenario describes the process of shutting down the exemplary event manager module 130 associated with the motion control component 150.

Upon operating system shutdown, the motion event manager 130 will prepare to terminate.

The event manager 130 next posts a shutdown message to each event provider 132 currently being managed by the manager 130. Specialty event providers 132 that have been injected into external processes may have already finished if the target process has been shutdown. In this case those event providers 132 would have already notified the event manager 130 that they are no longer available.

Each event provider 132 performs any required shutdown tasks.

Upon finishing any shutdown tasks, each provider 132 will notify the event manager 132 that the provider 132 is now finished.

Once the event manager 130 receives notifications that each of the event providers 132 managed thereby have been shutdown, the event manager 130 itself is now finished.

Referring now to FIG. 8, depicted therein is a scenario map illustrating the mapping of text to motion events. This scenario generally describes the mapping of text based event situations to motion.

The first step of this process is for a text based event situation to occur. This text could be one or more of the following: (a) a particular sub-string in an Instant Message or the entire message string itself; (b) an Instant Message sent from a target screen or ‘buddy’ name; (c) a text string converted from a speech-to-text engine installed on the user's machine; and/or (d) an email message meeting previously configured criteria (Sent From, Subject, message content, etc). In the case of an event created using a peer-to-peer networked application such as Instant Messenger-type process, text is entered at a remote source application and sent as a text message to a receiving application.

The motion event provider 132 monitoring the specific text based event catches the event, and performs any pre-processing of the text required to identify the particular event. In the peer-to-peer application described above, a DLL functioning as the event provider 132 is injected into the receiving application; the DLL event provider 132 intercepts the message received by the receiving application and treats the received message as an event.

Once an event has been identified, the event provider 132 will lookup the corresponding motion event token as previously configured. As generally described above, the motion event tokens are pre-loaded upon initialization. In the peer-to-peer example described above, the DLL functioning as the event provider 132 sends the text message as part of the event token to the event manager 130 using a process-to-process communication system as generally described above.

After the event token containing the text message is sent to the motion event manager 130, the event manager 130 determines the type of event represented by the received token.

If the event manager 130 determines that the received event token corresponds to a text event, the event manager 130 next parses the text parameter from the event token. The motion event manager 130 looks up the motion media associated with the event type and event text parameter. The appropriate motion media is then sent to the motion control component 150 for execution on the target motion device 122 as described above with reference to FIG. 5.

The process described above with reference to FIG. 8 can also occur in the reverse. In particular, the event manager 130 uses the motion control component 150 to continually query the target device 122 for state information. When the state information meets certain parameters, the control component 150 causes the event manager to ‘create’ a new event (such as a text event) and send it to an event provider 132.

The event provider 132 in turn then causes the receiving application to sent a message to a remote peer-to-peer application; again, the receiving and remote peer-to-peer applications may be Instant Messenger compatible applications.

An example of the use of the present system to verify motion status would be for the event manager 130 to continually or periodically query the target device 122 through the motion control component 150 for status parameters that indicate a fault condition. Once a fault condition occurs, the event manager 130 builds a text message that describes the fault and then sends the text message to a remote application, such as an Instant Messenger user, using process-to-process communication system and the peer-to-peer networked application.

The following Table A describes the interface specifications for components of the exemplary motion control system 120 described above using the exemplary motion control component 150.

TABLE A component interface method(s)/description motion event IXMCEventProviderMgt EnumerateProviders used by manager 30 configuration dialog object to get a list of all installed motion event providers 132 EnableProvider( ) used to enable/disable given event providers. will be called from the configuration dialog object IXMCEventScheme GetSchemes( ) used by configuration dialog object to get current list of schemes on the system AddScheme( ) - used by configuration dialog object to add a new scheme RemoveScheme( ) - used by configuration dialog object to remove a given scheme RenameScheme( ) - used by configuration dialog object to rename a given scheme Event IXMCEventConfig Initialize( ) - called by the configuration configuration dialog object controls 158 which hosts this control, used to pass required init data, such as 1) current registry location where event configuration data may be loaded/persisted, 2) interface to the media view control 156, etc.. Media View IXMCMediaViewCtrl method: SelectMedia( ) - called Control 156 by each event configuration control. This method will display a dialog to visualize all motion media available on the system and return a tokenized data param that can later identify the media item selected

In the following discussion, the details of a number of the exemplary components of the system 120 will now be described.

The Windows Registry 142 is used to persist event management with motion control configuration data.

Data associated with the motion event providers 132 is persisted to the Windows Registry 142 primarily to accommodate event provider DLLs that need to be injected into a target process, an environment where those DLLs may not be able to rely on standard COM storage alternatives.

At runtime, when the motion event manager 130 initializes an event provider, the provider will receive a location in the registry where it should read its previously configured event data.

At design time, when hosted within the motion event configuration interface 134, the event configuration controls 156 of the event providers 132 receive the registry location, and will persist configuration changes to that location.

Event providers will persist both standard (hard coded) and custom events to their registry storage location. Associated with each event will be the configured motion event token data, which the provider will use when firing event notifications back to the motion event manager 130.

The motion event manager 130 manages all registry locations for the event provider objects.

The event manager provides a mechanism to support different event schemes. This allows configurations unique for several different users, situations, or motion devices. When a new scheme is selected via the motion event configuration interface 134, the event manager 130 will pass the new scheme registry location to each event provider object 132, allowing access to the new scheme data. Each scheme will be located in a unique sub key under the primary event manager registry location.

The user interface components 154 and 156 of the system 120 may be implemented in many different forms. The motion event configuration control 154 is used to configure all motion event providers 132 installed on the system, as well as to provide access to the motion web site 136 where new motion media and motion providers may be downloaded and installed. The interface of the media creation tool 138 is a preferably graphical representation of the motion device or system, where simple drag-drop, click, and record operations will facilitate the creating and modification of motion media.

The system 120 is designed to be easily extendible via new motion event provider and motion media components. The system 120 is also capable of supporting any number of additional event sources with the addition of new motion event providers 132 by registering these new providers with the system 120. These event providers 132 can link to virtually any event source to a target system 122.

The motion media formats can be modified and extended without requiring changes to any event provider objects. For example, a XMCMediaCtrl object proxies the raw motion media format to the event providers. Accordingly, once the XMCMediaCtrl component is updated to handle any new media formats, the event providers 132 may, by design, make use of the changes.

Instead of triggering entire motion programs as described above with reference to FIG. 6, a motion program or media set may be streamed to the device 122 through the system 120. Whether or not and how the media plays may be controlled by captured events. For example, a media player may fire events based on different musical notes or tones. When such events are received, one media stream may be selected over another, thus causing the motion device 122 to perform different actions. This may also occur with the standard motion programs described above.

Very large motion programs may be downloaded in partial form and then either downloaded in full over time or as certain specified events occur in the system.

Similar to streaming media support, single motion operations may also be supported in which a specified event causes a single motion operation to take place immediately. One example of this would be an event that causes movement of one axis in the clockwise direction.

Referring now to FIG. 9, depicted therein is a second example of a motion control system 220 constructed in accordance with, and embodying, the principles of the present invention. The motion control system 220 comprises a machine platform 222 and an event notification system 224.

The machine platform 222 may be implemented using a controller neutral platform technology as described, for example, in U.S. Pat. Nos. 5,691,897, 5,867,385, 6,209,037, 6,480,896, 6,513,058, 6,516,236, 6,542,925 and/or 6,571,141, which are incorporated herein by reference. However, the machine platform 222 is or may be any motion control system, whether controller dependent or controller neutral, that comprises a machine converts motion commands into movement of an object.

In the context of the present application, the term “controller” refers to the hardware or software that contains the logic used to run the machine. Typically the controller one or more of a PLC, CNC Controller, or Motion Controller. The controller contains the main control loop used to position, monitor, or otherwise direct a machine to carry out useful automated tasks.

The term “machine” is used herein to refer to a physical machine or device asset used to perform a specified task. For example, a machine may be a CNC Mill used to shape metal, a pick-n-place machine used to position parts on a circuit board, a robotic machine used to perform surgery, a medical data input device used to collect the vitals from a human being (i.e. blood glucose meter, asthma meter, etc), a gaming device used when playing a game, a robotic toy, an animatronics figure, a robotic machine used to deliver goods to a warehouse or to people, an automobile, truck or farm vehicle, a boat or ship that maneuvers in water, a airplane, jet, helicopter and/or spacecraft. Any self powered machine or device (mobile or not) that is either directly controlled by humans or automatically controlled via a computer based system falls within the definition of “machine” as used herein. The term “device” as used herein is essentially synonymous with the term “machine,” but may be used in reference to a machine with a relatively small footprint.

The example event notification system 224 comprises a main event handler 230, one or more event handler applications 232, and one or more event handler property pages 234. The example main event handler 230 comprises a data queue 236.

The main event handler 230 is a component that is in communication with the machine platform 222 such that the main event handler 230 receives one or more events from the machine platform 222. The example data queue 236 within the main event handler 230 is a standard data queue that employs first-in/last-out technology. Optionally, the data queue 236 may be implemented as a priority queue that allows the items in the queue to be organized based on given priorities associated with the data contents of each item in the queue. The data queue 236 may optionally use a timing scheme that ensures that all items within the queue are processed within a given time frame, such that no items within the queue are ‘starved-out’ when a high frequency of higher priority items are received.

The event handler application 232 is used to configure and run the main event handler 230. The example event handler application 232 is a Windows System Tray application. The event handler application 232 is optional, and the main event handler 230 may be run and configured using other systems and methods. The event handler property page 234 is used to configure the settings of the main event handler 230 by presenting a user interface that allows the user to see the settings of the main event handler 230 and/or to change these settings.

The main event handler 230 is also in communication with one or more possible event destinations such as an upstream event handler 240 and/or a downstream event handler 242.

The example upstream event handler 240 is a module similar to the main event handler 230 that serves data to the main event handler 230. The example downstream event handler 242 is also a module similar to the main event handler 230, but one that receives data from the main event handler 230. From the perspective of the upstream event handler 240, the main event handler 230 is a downstream event client. From the perspective of the downstream event handler 242, the main event handler 230 is an upstream event client.

The main event handler 230 may also be in communication with one or more event destinations through an intermediate destination such as a shared memory system 250, a memory queue 252, and/or a network protocol 254. The shared memory system 250 is a block of memory that is accessible to different modules and/or applications. The example memory queue 252 uses Microsoft Message Queue (MSMQ) technology or a similar technology. MSMQ allows for communication with other modules and/or applications using a delayed messaging technology called Message Queuing. The example network protocol 254 is formed using TCP/IP or UDP broadcast protocols as a mechanism of sending output data to another target. The TCP/IP protocol specifies specific data target(s), and the UDP protocol broadcasts data to all nodes on a given network.

The main event handler 230 delegates one or more events received from the machine platform 222 to one or more event destinations such as the upstream event handler 240 and/or the downstream event handler 242. In addition or instead, the main event handler 230 may delegate one or more events received from the machine platform 222 to additional event destinations using one or more of the intermediate destinations such as the shared memory system 250, the memory queue 252, and/or the network protocol 254.

The main event handler 230 may further be in communication with an alternate event source such as a data transport system 260. The data transport system may be implemented using the data router technology described in co-pending U.S. patent application Ser. No. 10/844,025, which is incorporated herein by reference. The data transport system 260 routes data outputs to various output sources, one of which may be the main event handler 230.

If the motion control system 220 employs the data transport system 260, the main event handler 230 may also be configured to delegate events from the data transport system 260 to the event destinations such as the upstream client 240 and/or the downstream event handler 242 and/or to intermediate destinations such as the shared memory system 250, the memory queue 252, and/or the network protocol 254.

The event notification system 224 may use an event handler, such as the main event handler 230, which is internally configured to handle communications with the event destinations and/or intermediate destinations as shown in FIG. 9. Alternatively, the motion control system 320 may use an event notification system 224a having a modular main event handler 230a as depicted in FIG. 10. The modular event handler 230a is a more modular design where each output is modularized, thus giving the event handler 230a the capability to select from a list of destination modules either programmatically or through a user interface.

In particular, the example modular main event handler 230a further comprises at least one event communication component 270 configured to handle the details of communicating with one or more of the event destinations and intermediate destinations. FIG. 10 shows that the modular main event handler 230a is in communication with the following event communication components: a component 270a configured to communicate using e-mail or SMTP protocols; a component 270b configured to access shared memory such as the shared memory system 250; a component 270c configured to communicate with a network protocol such as the network protocol 254; a component 270d configured to communicate with a memory queue such as the memory queue 252; a component 270e configured to communicate with a peer-to-peer communication system such as Instant Messenger; a component 270f configured to communicate using XML messaging; a component 270g configured to communicate using envelope based communication services such as SOAP; and/or other communications components 270h.

More than one event communication component 270 of the same type may be used simultaneously. For example, the event handler 230a may use two event client components configured to communicate with a network protocol where each component is capable of sending data to a different destination network address.

FIG. 11 depicts the steps that take place when configuring the system 220 using an application such as the event handler application 301 described above. Initially, in a first step the event handler application 232 queries the event handler 230 for its event handler property page or pages 234. Once received, the event handler property page or pages 234 are displayed to the user. In a second step, configuration changes are saved to the main event handler 230 by changing the properties and/or calling methods of the event handler 230.

FIG. 12 depicts the steps that occur when configuring the event handler 230 from another component. In a first step, the other component, such as the data transport 260, queries the event handler 230 for its event handler property page(s) 234, which, once received, are displayed to the user. For example, this may occur via a property page of the calling component. In a second step, configuration changes are saved to the event handler 230 by changing the properties of the event handler 230 and/or calling methods on the event handler 230. When configuring the event handler 230, each output may be enabled or disabled. Later, when processing data, data is only sent to each enabled output.

Once configured, the event handler 230 must be initialized to prepare it for use. FIG. 13 depicts the steps that take place when initializing the event handler 230. First, a component, such as the data transport 260 and/or the event handler application 232, directs the event handler 230 to initialize itself. Next, the event handler 230 uses its internal properties, which were previously configured during the configuration stage, to connect to a machine platform 222 or an upstream event client 240, and subscribe to the data items specified in the configuration data.

In practice, the data items specified in the configuration data must be data that are published by the machine platform 222, or failures may occur. As used herein, the term “publish” (or publish/subscribe) refers to a method of receiving data updates where the client subscribes to data published by the server. For example, a server may have three data items available for subscriptions: A, B, C. The client may then subscribe to any of these data items upon which the client may receive data updates based upon certain criteria such as the data value of the subscribed data item changing, a time period passing, or some other event occurring in the system such as a trigger variable firing, etc. The term “trigger variable” refers to variable or data item that causes the registered actions to be carried out when the variable or data item's event conditions are met.

Once configured and initialized the event handler 230 is ready to receive events for each of the subscribed data items. FIG. 14 depicts the steps that take place when processing events. First, the event is received from an upstream component such as the machine platform 222 and/or an upstream event handler 240 that is daisy chained to the main event handler 230.

Upon receiving the event, the data is optionally placed at the back of the internal data queue 236. If a queue is not used, the data is immediately sent to all event destinations, such as shared memory system 250 or the network protocol 254, that are in an enabled state for that event. If the internal data queue 236 is used, data items are pulled off the data queue according to the rules for that queue and sent to all outputs that are in an enabled state for that event. As described above, the data queue 236 may be a first-in/last-out queue, a priority queue, and/or a queue implementing a timing scheme.

In addition to processing events, the event handler 230 may also process commands via API calls to one of its interfaces. For example, the data transport 260 may direct the event handler 230 to send data to an event destination by calling an API of the event handler 230. FIG. 15 depicts the steps that occur when processing a command using API calls. First, the remote component such as the data transport 260 may call an event handler API through which the data is passed. When called, the API may optionally place the data into an internal data queue 236. If a data queue is not used, the data is passed directly to all outputs, such as the shared memory system 250 or the network protocol 254, that are in an enabled state for a given event.

Optionally, the main event handler 230 may be daisy chained with one or more upstream event handlers 240 and/or one or more downstream event handlers 242. In this case, data is received from upstream event handlers 240 and/or sent to downstream event handlers 242. FIG. 16 depicts the steps that occur when processing events or commands in a daisy chained configuration.

First, if an event handler is connected upstream to the main event handler 230, the data is received from that upstream event handler 240 as an event and/or as an API call. If an upstream event handler 240 is not used, data may be received in the normal manner either via an event or API call. Next, upon receiving the data as an event and/or as an API call, the data may be placed at the back of an internal data queue 236 if used. If a data queue is not used, the data is sent directly to all outputs (such as shared memory system 250 or network protocol 254) that are in an enabled state.

Third, when using the internal data queue 236, the data is pulled from the data queue and sent to all enabled outputs. Again, the data queue may be a first-in/last-out queue, a priority queue, and/or a queue implementing a timing scheme.

Fourth, if a shared memory 306 output is used and is enabled, the data is sent to a shared memory block.

Fifth, if a network protocol 254 is used and is enabled, the data is sent to zero, one, or more event destinations previously configured for this output in the case of a TCP/IP network. As described above, the data may be sent as a UDP broadcast to all nodes on a network or group of networks. TCP/IP may also be used to send the data via a tunneling mechanism, such as is used within a Virtual Private Network (like those implemented with Microsoft RRAS), from the current event handler 230 to another event handler 230 (or even to a group of event handlers 230), where the receiving component receives the TCP/IP or UDP data and then translates it into an event or API input.

Sixth, if a message queue 252, such as a MSMQ, event destination is used and enabled, the data is sent via the message queue 252 to another application or component, or even to another event handler 230 (or group of components).

Seventh, if one or more upstream event handlers 240 and/or one or more downstream event handlers 242 are used and enabled, the main event handler 230 sends data directly to any such event handlers 24- and/or 242.

As an optional eighth step, a downstream event handler 242 may be configured to communicate with the upstream event handler 230 via the shared memory 306 and/or other standard synchronization events such as the event object supported within Win32.

When daisy chaining event handlers, it may also be important to pass configuration data (and other data) between the event handler components. When configuring any such event handler components as depicted in FIG. 15, the downstream event handler 242 may pass configuration information on to the main event handler 230. For example, when subscribing to data, any downstream event handler will notify any upstream event handler of all data items that are to be subscribed. The subscribing data may be continually passed along the daisy chain to modify any upstream event handlers and/or directly notify the machine platform 222, if it is connected directly to the machine platform 222.

The event handler 230 is preferably a modular system made up of a set of components (i.e. each component is based on a component technology such as OLE/COM from Microsoft Corporation). Optionally, each component may use a separate ‘parallel’ ActiveX component and/or a property page component to implement all user interface aspects of the main component. Each ActiveX and/or property page component may be implemented either within the main component module or separately in its own module. Bundling each object within one module is not required as they may be located at any location (i.e. across a network, and so forth), but doing so may optimize all communication between modules. How and where components are implemented is a logistical decision. Once components are built and deployed to the field, it is difficult to update a single component if all components are implemented within a single DLL or EXE module.

FIG. 18 depicts an example of the interfaces exposed by the example event handler components. In the example motion control system 220, all components making up the system 220 at a minimum implement a single interface—the IXMCDirect interface. Optionally, if they are to receive events from other components, the event handler components 230, 240, and 242 implement the IXMCDirectSink interface as well. And finally, the event handler components 230, 240, and 242 may optionally implement the IXMCaCNCEventDataSink interface if they are to receive events directly from the machine platform 222. The IXMCDirect, IXMCDirectSink, and IXMCaCNCEventDataSink interfaces will be described in further detail below.

OLE Categories are used to determine how many components fall into a certain group of components. Currently, components used to form the event handler components use what will be referred to herein as the XMC Data Router components. The XMC Data Router components are general data router components support the general read, write, and configure API.

The IXMCDirect interface is used for most communications between all components making up the event handler 230. The following methods make up this interface (as specified in the standard OLE/COM IDL format).

The IXMCDirect interface is made up of the following functions.

    • GetProperty—This method is used to query a specific property from the component implementing the interface.
    • SetProperty—This method is used to set a specific property from the component implementing the interface.
    • InvokeMethod—This method is used to invoke a specific action on the component implementing the interface. It should be noted that an action can cause an event to occur, carry out a certain operation, query a value and/or set a value within the component implementing the method.

A more detailed description of each method implemented by the object is described below.

    • IXMCDirect::GetProperty
  • Syntax HRESULT GetProperty(LPCTSTR pszPropName, LPXMC_PARAM_DATA rgData, DWORD dwCount);
  • Parameters LPCTSTR pszPropName—string name of the property to query.
    • LPXMC_PARAM_DATA rgData—array of XMC_PARAM_DATA types that specify each parameter corresponding to the property. For example, a certain property may be made up of a number of elements—in this case an array of XMC_PARAM_DATA items is returned, one for each element making up the property. In most cases, a property is made up of a single element, thus a single element array is passed to this method. For more information on the XMC_PARAM_DATA type, see below.
    • DWORD dwCount—number of XMC_PARAM_DATA elements in the rgData array.
      Return HRESULT—NOERROR on success, or error code on Value failure.

The IXMCDirect::GetProperty method is used to query the property corresponding to the property name ‘pszPropName’. Each component defines the properties that it supports.

    • IXMCDirect::SetProperty
  • Syntax HRESULT SetProperty(LPCTSTR pszPropName, LPXMC_PARAM_DATA rgData, DWORD dwCount);
  • Parameters LPCTSTR pszPropName—string name of the property to set.
    • LPXMC_PARAM_DATA rgData—array of XMC_PARAM_DATA types that specify each parameter corresponding to the property. For example, a certain property may be made up of a number of elements—in this case an array of XMC_PARAM_DATA items is returned, one for each element making up the property. In most cases, a property is made up of a single element, thus a single element array is passed to this method. For more information on the XMC_PARAM_DATA type, see below.
    • DWORD dwCount—number of XMC_PARAM_DATA elements in the rgData array.
  • Return HRESULT—NOERROR on success, or error code on Value failure.

This IXMCDirect::SetProperty method is used to set a property in the component corresponding to the ‘pszPropName’ property. For the set of properties supported by the component, see the specific component description.

    • IXMCDirect::InvokeMethod
  • Syntax HRESULT InvokeMethod(DWORD dwMethodIdx, LPXMC_PARAM_DATA rgData, DWORD dwCount);
  • Parameters DWORD dwMethodIdx—number corresponding to the specific method to invoke. For more information on the method indexes available, see the set of namespaces defined for the component.
    • LPXMC_PARAM_DATA rgData [optional] —array of XMC_PARAM_DATA types that specify each parameter for the method called. For more information on the XMC_PARAM_DATA type, see below.
    • NOTE: if no parameters exist for the method called, a value of NULL must be passed in.
    • DWORD dwCount [optional]—number of XMC_PARAM_DATA elements in the rgData array.
    • NOTE: if no parameters exist for the method called, a value of 0 (zero) must be passed in for this parameter.
    • LPXMC_PARAM_DATA rgData [optional]—namespace associated with the instance of the custom extension module added.
  • Return HRESULT—NOERROR on success, or error code on Value failure.

The IXMCDirect::InvokeMethod method is used to call a specific method implemented by the component. For more information on the methods supported, see the description of the specific component.

The IXMCDirectSink interface is an event reception point on which one component can send event data to another. The component implementing this interface is the event receiver, and the event source calls the interface passing to it event data.

The IXMCDirectSink interface is made up of the following functions:

    • OnEvent—This method is called by the event source when an event occurs (i.e. the conditions defining the event are met).
    • OnError—This method is called by the event source when an error occurs.

A more detailed description of each method implemented by the object is described below.

    • IXMCDirectSink::OnEvent
  • Syntax HRESULT OnEvent(long IApiIdx, SAFEARRAY** ppSA);
  • Parameters long IApiIdx—index associated with the event type . . .
    • SAFEARRAY** ppSA—pointer to a pointer to a SAFEARRAY containing an array of XMC_PARAM_DATA structures. For more information on the XMC_PARAM_DATA type, see below.
  • Return HRESULT—NOERROR on success, or error code on Value failure.
  • Notes The SAFEARRAY passed to this method contains an array of XMC_PARAM_DATA structures. This array has the following entries:
    • rgData[0] LONG IConnectionCookie—unique cookie associated with this connection to the XMC Motion Server (returned when calling the InitializeHardware method on the XMC Motion Server).
    • rgData[1] DWORD dwSubscriptionCookie—unique cookie associated with the subscription for which this event has fired. This cookie is returned when making the subscription.
    • rgData[2] DWORD dwDataCookie—unique cookie associated with the specific data change that triggered the event. This cookie is generated within the XMC Motion Server.
    • rgData[3] LPCTSTR pszItemName—name of the item or variable for which the subscription is associated.
    • rgData[4] double dfTimeStamp—number of milliseconds passed from the time that the event pump, implemented by the XMC Motion Server, was first started.
    • rgData[5] DWORD dwDataCount—number of data values associated with the event (i.e. the number of structure elements that follow).
    • rgData[6 Number or String—actual data values associated with the +n] event.

The IXMCDirectSink::OnEvent method is called by the event source and passed the event data in a SAFEARRAY form for easy marshalling across process boundaries.

    • IXMCDirectSink::OnError
  • Syntax HRESULT OnError(long IApiIdx, SAFEARRAY** ppSA); Parameters long IApiIdx—index associated with the event type . . .
    • SAFEARRAY** ppSA—pointer to a pointer to a SAFEARRAY containing an array of XMC_PARAM_DATA structures. For more information on the XMC_PARAM_DATA type, see below.
  • Return HRESULT—NOERROR on success, or error code on Value failure.
  • Notes The SAFEARRAY passed to this method contains an array of XMC_PARAM_DATA structures. This array has the following entries:
    • rgData[0] LONG IConnectionCookie—unique cookie associated with this connection to the XMC Motion Server (returned when calling the InitializeHardware method on the XMC Motion Server).
    • rgData[1] DWORD dwSubscriptionCookie—unique cookie associated with the subscription for which this event has fired. This cookie is returned when making the subscription.
    • rgData[2] DWORD dwDataCookie—unique cookie associated with the specific data change that triggered the event. This cookie is generated within the XMC Motion Server.
    • rgData[3] LPCTSTR pszItemName—name of the item or variable for which the subscription is associated.
    • rgData[4] double dfTimeStamp—number of milliseconds passed from the time that the event pump, implemented by the XMC Motion Server, was first started.
    • rgData[5] HRESULT hrResult—result code of the error for which the event is associated.
    • rgData[6] LPCTSTR pszError—string description of the error.
    • rgData[7] LONG ISrcError—error code describing the source of the error. For example, this may be an error code returned by a computer controlled piece of hardware.
    • rgData[8] LPCTSTR pszSrcError—string describing the source error.

The IXMCDirectSink::OnError method is called by the event source when an error occurs and passed the event error data in a SAFEARRAY form for easy marshalling across process boundaries.

In order to receive events directly from the machine platform 222, the event handler 230 also supports the IXMCaCNCEventDataSink interface as specified in the machine platform 222 product sold by ROY-G-BIV Corporation.

[   object,   uuid(15D1A3C6-9948-47c7-AFC1-3932AF4518D7),   dual,   helpstring(“IXMCaCNCEventDataSink Interface”),   pointer_default(unique),   oleautomation ] interface IXMCaCNCEventDataSink : IDispatch {  [id(1), helpstring(“method OnData”)]  HRESULT OnData( [in] long IConnectionCookie,     [in] long ISubscriptionCookie,     [in] long IDataCookie,     [in] BSTR bstrName,     [in,out] SAFEARRAY(VARIANT)* pvData,     [in] double dfTimeStamp );  [id(2), helpstring(“method OnError”)]  HRESULT OnError( [in] long IConnectionCookie,     [in] long ISubscriptionCookie,     [in] long IDataCookie,     [in] BSTR bstrName,     [in] long hrErr,     [in] BSTR bstrErr,     [in] long ISrcErr,     [in] BSTR bstrSrcErr ); };

Referring now to FIG. 19 of the drawing, depicted there in is an example of the IXMCaCNCEventDataSink OLE Interface.

The following methods make up the IXMCaCNCEventDataSink interface.

Event Name Description OnData This event is called on the client application each time the event conditions are met for a given enabled subscription. OnError This event is called on the client application each time an error occurs while processing a subscription.
    • OnData Event
  • Syntax //C++
    • HRESULT OnData([in] long IConnectionCookie,
      • [in] long ISubscriptionCookie,
      • [in] long IDataCookie,
      • [in] BSTR bstrName,
      • [in,out] SAFEARRAY(VARIANT)* pvData,
    • [in] double dfTimeStamp)
    • ‘OLE Automation
    • Event OnData(IConnectionCookie As Long,
      • ISubscriptionCookie As Long,
      • IDataCookie As Long,
      • bstrName As String,
      • pvData( )As Variant,
      • dfTimeStamp As Double)
  • Parameters IConnectionCookie As Long—this is the connection cookie returned by the call to InitializeHardware. Each connection cookie is unique to each application.
    • ISubscriptionCookie As Long—this is the subscription cookie returned by the call to SubscribeVariable.
    • IDataCookie As Long—this is the data cookie that is unique to each operation made by the internal data processing performed by XMC. For example each unsolicited read made by XMC is associated a unique data cookie.
    • bstrName As String—this is the name of the subscribed variable for which the event data is associated.
    • pvData( )As Variant—this is the actual data for the event and is in the following form:
      • pvData(0)=number of elements.
      • pvData(1+n)=data values.
    • dfTimeStamp As Double—this is the timestamp of the data specified in milliseconds from the start of the XMC Motion Server.

The OnData event is called each time the event condition for an enabled subscription is met for a subscription configured by a client application. Deadlock can occur when running in multi-application mode and calls to other XMC API are made from within this event hander or another event raised by this event handler. To avoid this situation, applications that implement this method should copy all data from this method into a temporary buffer and immediately return without calling other XMC API.

    • OnError Event
  • Syntax //C++
    • HRESULT OnError([in] long IConnectionCookie,
      • [in] long ISubscriptionCookie,
      • [in] long IDataCookie,
      • [in] BSTR bstrName,
      • [in] HRESULT hrErr,
      • [in] BSTR bstErr,
      • [in] long ISrcErr,
      • [in] BSTR bstrSrcErr,
      • [in] double dfTimeStamp)
    • ‘OLE Automation
    • Event OnError(IConnectionCookie As Long,
      • ISubscriptionCookie As Long,
      • IDataCookie As Long,
      • bstrName As String,
      • hrErr As Long,
      • bstrErr As String,
      • ISrcErr As Long,
      • bstrSrcErr As String,
      • dfTimeStamp As Double)
  • Parameters IConnectionCookie As Long—this is the connection cookie returned by the call to InitializeHardware. Each connection cookie is unique to each application.
    • ISubscriptionCookie As Long—this is the subscription cookie returned by the call to SubscribeVariable.
    • IDataCookie As Long—this is the data cookie that is unique to each operation made by the internal data processing performed by XMC. For example each unsolicited read made by XMC is associated a unique data cookie.
    • bstrName As String—this is the name of the subscribed variable for which the event data is associated.
    • hrErr As Long—this is the operating system error received.
    • bstrErr As String—this is a string describing the operating system error received.
    • ISrcErr As Long—this is the source error received that describes the error information in the context of the target control system. This error value is only provided when available.
    • bstrSrcErr As String—this is a string description of the source error received (when available).
    • dfTimeStamp As Double—this is the timestamp of the data specified in milliseconds from the start of the XMC Motion Server.

The OnError event is called each time an error occurs for a subscription configured by a client application. Applications that implement this method should immediately copy the data received in a temporary buffer and or array and immediately return so as to not cause deadlock within their application. Deadlock can occur when running in multi-application mode and calls to other XMC API are made from within this event handler or another event raised by this event handler.

The Methods and properties exposed by the XMC Event Client component will now be described in further detail.

This section describes the general component properties of each property supported by the event handler 230 component.

TARGETMACHINE rgData[0] - (string); name of the target machine for which the XMC Event Client component is to connect up to and receive data from. OPTIONS rgData[0] - (DWORD); options describing how the XMC Event Client is to operate. The following options are supported. OF_AUTOLOAD_ENABLED - when specified, the component automatically loads the configuration settings specified in the configuration file specified in the CONFIGFILE property. OF_AUTOSTART_ENABLED - when specified, the component automatically connects and starts monitoring data items that are specified. OF_MAPVARIABLES_ENABLED - when specified, the variables listed in the variable mapping file specified in VARMAPFILE property are loaded. OF_QUEUE_EVENT_ENABLED - when specified, all data received through an event are placed at the back of the data queue. OF_QUEUE_API_CALLS_ENABLED - when specified, all data received on the Write API are placed at the back of the data queue. OF_WAIT_FOR_DATA_RECEIVED - when specified, the component waits until an external application signals the data ready event before placing more data in the output(s). OF_DELETE_OLD_QUEUE_ITEMS - when specified, data items within the data queue that have been in the data queue for a time period longer than the amount specified in the DATAOLDTIMEOUT property are purged from the data queue. OF_COLLECT_DATA_ALWAYS - when specified, data items are subscribed in such a way that updates are always sent, even when the data items does not change. QUEUEMAXSIZE rgData[0] - (DWORD); specifies the maximum number of items allowed in the data queue. Items received after this maximum value is reached are ignored. DATARECEIVEDTIMEOUT rgData[0] - (DWORD); specifies the amount of time to wait for an application to signal the data ready event. If this value is surpassed, the data in the front of the data queue is sent to the outputs. DATAOLDTIMEOUT rgData[0] - (DWORD); specifies how long data items are allowed to remain in the data queue before being purged. CONFIGFILE rgData[0] - (string); specifies the name of the file from which all auto-load configuration settings are read. VARMAPFILE rgData[0] - (string); specifies the name of the file from which all variable mappings are loaded. VAR_MONITOR_COUNT rgData[0] - (DWORD); specifies the total number of variables to monitor. VAR_MONITOR rgData[0] - (string); specifies the name of the ‘n'th variable to monitor. VAR_READ_COUNT rgData[0] - (DWORD); specifies the total number of variables to read. VAR_READ rgData[0] - (string); specifies the name of the ‘n'th variable to read. rgData[1] - (string); specifies the name of the ‘m'th variable to monitor for which this variable is associated.

This section describes the general component methods supported by the majority of the components. For the specific list of methods supported by any given component, see the section describing that given component.

    • XMC_DE_BROWSE_GET_COUNT

Index 8020 Data In None Data Out rgData[0] - (number) DWORD, number of browse elements.

The XMC_DE_BROWSE_GET_COUNT method returns the number of data items in the browse set supported by the component.

    • XMC_DE_BROWSE_GET_ITEMS

Index 8021 Data In rgData[0] - (number) DWORD, maximum number of elements to collect. Data Out rgData[0] - (number) number of elements collected, total number of elements will equal (rgData[0] * 2 + 1). rgData[1] - (string) name of the first browse element. rgData[2] - (number) adt of the first browse element. rgData[1 + n * 2] - (string) name of the n'th browse element. rgData[2 + n * 2] - (number) adt of the n'th browse element.

The XMC_DE_BROWSE_GET_ITEMS method returns the number of data items in the browse set supported by the component.

    • XMC_DE_SYSTEM_CONNECT_CMPNT

Index 8000 Data In rgData[0] - (number) DWORD, type of component. The type of component is a value that is server specific. For component type information, see the description for this method under each server's description. rgData[1] - (string) LPTSTR, component class id as an ASCII string. Data Out None.

The XMC_DE_SYSTEM_CONNECT_CMPNT method is used to connect one server to another so that they may interact with one another.

    • XMC_DE_SYSTEM_DISCONNECT_CMPNT

Index 8001 Data In rgData[0] - (number) DWORD, type of component. The type of component is a value that is server specific. For component type information, see the description for this method under each server's description. rgData[1] - (string) LPTSTR, component class id as an ASCII string. Data Out None.

The XMC_DE_SYSTEM_DISCONNECT_CMPNT method is used to disconnect one server to another so that they stop interacting with one another.

    • XMC_DE_DATA_PROCESS

Index 8063 Data In rgData[0] - (number) DWORD, number of data items input. rgData[1 + n * 2] - (string) LPCTSTR, name of the data item input. rgData[2 + n * 2] - (number or string), value of the data item. Data Out rgData[0] - (number) DWORD, number of data items output. rgData[1 + n * 2] - (string) LPCTSTR, name of the data item output. rgData[2 + n * 2] - (number) value of the data item.

The XMC_DE_DATA_PROCESS method is called by a client to process data where a data set is input, processed in some way by the server, and then the resulting data is returned as output.

    • XMC_DE_DATA_PROCESS_CONFIGURE

Index 8062 Data In rgData[0] - (number) DWORD, flag describing the type of data to be returned when processing data. The following flags are supported: XMC_DE_READ_DATA_FLAG_TIMESTAMP - requests that the time stamp recorded when processing the data is returned. NOTE: by default, the data item value is always returned. Data None. Out

The XMC_DE_DATA_PROCESS_CONFIGURE method is used to configure what type of data is returned when processing a given data item. For example in the server may be configured to return the minimal amount of data on each read (i.e. just the data item value), or the server may be requested to return more substantial data.

    • XMC_DE_DATA_READ

Index 8061 Data In rgData[0] - (string) LPCTSTR, name of the data item to read. Data Out rgData[0] - (number or string), data item value. rgData[1] - (OPTIONAL number) DWORD, data item time- stamp as a system time value. NOTE: Since the last items are optional, only those items specified when configuring the data to receive are actually sent.

The XMC_DE_DATA_READ method is called by a client application to poll for data from the server. As used herein, the term “poll” refers to the process of continually reading a data item so that the most recent value of the data is always on hand.

    • XMC_DE_DATA_READ_CONFIGURE

Index 8060 Data In rgData[0] - (number) DWORD, flag describing the type of data to be returned on each read. The following flags are supported: XMC_DE_READ_DATA_FLAG_TIMESTAMP - requests that the time stamp recorded when reading the data is returned. NOTE: by default, the data item value is always returned. Data None. Out

The XMC_DE_DATA_READ_CONFIGURE method is used to configure what type of data is returned when reading a given data item. For example in the server may be configured to return the minimal amount of data on each read (i.e. just the data item value), or the server may be requested to return more substantial data.

    • XMC_DE_DATA WRITE

Index 8064 Data In rgData[0] - (number) DWORD, number of data items. rgData[1 + n * 2] - (string) LPCTSTR, name of the data item. rgData[2 + n * 2] - (number or string), value of the data item. Data Out None.

The XMC_DE_DATA WRITE method is used to write data to a server.

    • XMC_DE_EVENT ENABLE

Index 2892 Data In rgData[0] - (number) DWORD, cookie (unique identifier) associated with the subscription. This value is returned to the client when calling the subscription XMCAPI above. NOTE: using a cookie value of zero (0) will enable/disable ALL items subscribed to the server. rgData[1] - (number) BOOL, TRUE to enable the subscription(s), FALSE to disable the subscription(s). Only enabled subscriptions actually fire events. Data Out None.

The XMC_DE_EVENT ENABLE method enables/disables a previously subscribed data item in the subscription list maintained by the server. Only enabled subscriptions actually fire.

    • XMC_DE EVENT_RECEIVE_DATA

Index 8045 Data In rgData[0] - (number) DWORD, subscription cookie corresponding to the subscribed data item. rgData[1] - (number or string), data item value. rgData[2] - (OPTIONAL number) DWORD, data item time- stamp as a system time value. rgData[3] - (OPTIONAL string) LPSTR, data item ASCII text name. rgData[4] - (OPTIONAL number) DWORD, data item unique cookie. NOTE: Since the last three items are optional, only those items specified when configuring the data to receive are actually sent. If, for example, one or more data items are NOT requested, then the items are returned in slots shifted up toward rgData[1]. For example if only the data item name is requested in addition to the default data items, the data returned would look like the following: rgData[0] - (number) DWORD, subscription cookie. rgData[1] - (number or string), data item value. rgData[2] - (string) LPSTR, data item name. Data Out None.

The XMC_DE_EVENT_RECEIVE_DATA method is called by the server (and implemented by the client) when each subscribed event fires.

    • XMC_DE_EVENT_RECEIVE_DATA_CONFIGURE

Index 8044 Data In rgData[0] - (number) DWORD, flag describing the type of data to be returned on each event. The following flags are supported: XMC_DE_EVENT_DATA_FLAG_TIMESTAMP - requests that the time stamp recorded when reading the data is returned. XMC_DE_EVENT_DATA_FLAG_NAME - requests that the data items ASCII text name be returned. XMC_DE_EVENT_DATA_FLAG_DATA_COOKIE - requests that the unique data item cookie corresponding to the read made for the data item be returned. NOTE: by default, the subscription cookie and data item value are always returned. Data Out None.

The XMC_DE_EVENT_RECEIVE_DATA_CONFIGURE method is used to configure what type of data is returned on each event that is fired. For example in the server may be configured to send the minimal amount of data on each event (i.e. subscription cookie and data item value), or the server may be requested to return more substantial data.

    • XMC_DE_EVENT_SUBSCRIBE

Index 2890 Data rgData[0] - (number) DWORD, flags describing the initial In state of the subscription. The following flags are supported: XMC_DE_EVENT_FLAG_ENABLED - subscription is immediately enabled upon subscription. XMC_DE_EVENT_FLAG_DISABLED - subscription is disabled upon making the subscription. The Enable function must be called to enable the subscription. rgData[1] - (number) DWORD, number of subscription criteria rules. rgData[2 + (2 * n)] - (number) DWORD, event condition type where the following types are supported: XMC_CNC_EVENTCONDITION_DATA_CHANGE - any data changes in the data type above will trigger the event. XMC_CNC_EVENTCONDITION_DATA_EQUAL XMC_CNC_EVENTCONDITION_DATA_LESSTHAN XMC_CNC_EVENTCONDITION_DATA_GREATERTHAN XMC_CNC_EVENTCONDITION_DATA_AND XMC_CNC_EVENTCONDITION_DATA_OR Each of the conditions above are used in a combined manner. Where the logical condition (=, <, >) are applied for each type respectively. For example, in an array that contains the following items: rgData[2] = 4 (4 condition values) rgData[3] = XMC_CNC_EVENTCONDITION_EQUAL rgData[4] = 3.0 rgData[5] = XMC_CNC_EVENTCONDITION_LESSTHAN rgData[6] = 3.0 rgData[7] = XMC_CNC_EVENTCONDITION_OR rgData[8] = 1.0 rgData[9] = XMC_CNC_EVENTCONDITION_GREATHERTHAN rgData[10] = 5.0 the array would be evaluated using the following logic: If (DATA <= 3.0 OR DATA > 5.0) then Trigger Event rgData[3 + (2 * n)] - (number) double, the value for the condition. See above. Data rgData[0] - (number) DWORD, cookie (unique identifier) Out representing the subscription.

The XMC_DE_EVENT_SUBSCRIBE method subscribes to a given data item activating the event interface when the subscription criteria are met for the data item. All subscribing components must use the IXMCDirect interface to receive events received from the server for which they are subscribed.

    • XMC_DE_EVENT_UNSUBSCRIBE

Index 2891 Data In rgData[0] - (number) DWORD, cookie (unique identifier) associated with the subscription. This value is returned to the client when calling the subscription XMCAPI above. NOTE: using a cookie value of zero (0) will unsubscribe ALL items subscribed to the server. Data Out None.

The XMC_DE_EVENT_UNSUBSCRIBE method removes a previously subscribed data item from the subscription list maintained by the server.

    • XMC_DE_SYSTEM_INITIALIZEHW

Index 500 Data In None. Data Out None.

The XMC_DE_SYSTEM_INITIALIZEHW method is used to initialize any hardware systems associated with the component.

    • XMC_DE_SYSTEM_SHUTDOWNHW

Index 501 Data In None. Data Out None.

The XMC_DE_SYSTEM_SHUTDOWNHW method is used to shutdown any hardware systems associated with the component.

The event handler 230 component implements the following general methods listed in the General Component Methods section above.

Not Method Implemented Implemented XMC_DE_BROWSE_GET_COUNT x XMC_DE_BROWSE_GET_ITEMS x XMC_DE_DATA_PROCESS x XMC_DE_DATA_PROCESS_CONFIGURE x XMC_DE_DATA_READ x XMC_DE_DATA_READ_CONFIGURE x XMC_DE_DATA_WRITE x XMC_DE_EVENT_ENABLE x XMC_DE_EVENT_RECEIVE_DATA x XMC_DE_EVENT_RECEIVE_DATA_CONFIGURE x XMC_DE_EVENT_SUBSCRIBE* x XMC_DE_EVENT_UNSUBSCRIBE* x XMC_DE_SYSTEM_CONNECT_CMPNT x XMC_DE_SYSTEM_DISCONNECT_CMPNT x XMC_DE_SYSTEM_INITIALIZEHW x XMC_DE_SYSTEM_SHUTDOWNHW x

The following methods have special notes for this component. The XMC_DE_EVENT_SUBSCRIBE method is only needed when daisy chaining components together. The XMC_DE_EVENT_UNSUBSCRIBE method is only needed when daisy chaining components together.

The visual elements presented by the event handler 230 component, namely the event handler property pages 234, will now be described in further detail.

The example property page depicted in FIG. 19 allows the user to set-up the connection settings used to connect to the target machine from which data will be received. In addition, this property page allows the user to configure how the component is connected and starts-up when it is first run.

As shown in FIG. 19, the following user interface elements form the connection and start-up property page 320. A “target machine” field 322 identifies the target machine 222 from which data is to be received using the TARGETMACHINE method. A “connect” button 324 tests the connection with the target machine using a CONNECT method. A “disconnect” button 326 disconnects the system 224 from the target machine 222 using the DISCONNECT method.

A “map variables” check box 328 specifies whether or not to load mapped variables from a file when connecting using OPTIONS, (OF_MAPVARIABLES_ENABLED), and VARMAPFILE properties. When checked, a dialog appears allowing the user to select the file to load mapped variables from.

An “enable auto load” check box 330 specifies whether or not the auto load feature should be enabled and, when enabled, from which file to load the settings from as identified in a “file” field 332 using OPTIONS, (OF_AUTOLOAD_ENABLED), CONFIGFILE properties.

An “enable auto start” check box 334 specifies whether or not to enable auto start using OPTIONS (OF_AUTOSTART_ENABLED) properties.

An event monitoring property page 340 depicted in FIG. 20 allows the user to configure which variables are to be monitored. The event monitoring property page 340 comprises the following interface elements.

A “variables” box 342 contains a list of all variables that are available for monitoring. A “test” button 344 directs the application to test a selected (highlighted) variable by reading it using a READ method. An “attributes” 346 button retrieves the attributes of the selected (highlighted) variable using the READ(‘attrib’) method.

A “variables” (to monitor) box 350 contains a list of all variables that have been selected for monitoring using VAR_MONITOR_COUNT and VAR_MONITOR_properties.

A first “add . . . ” button 352 directs the event handler 330 to add a variable from the “variable” list in the box 342 to the “variables (to monitor)” list in the box 350. A first “remove” button 354 directs the event handler 330 to remove the selected variable from the “variables (to monitor)” list in the box 350. When a first “all” check box 356 is checked, pressing the first “remove” button 354 directs the event handler 330 to remove all variables from the “variables (to monitor)” list box 350.

A “variables (to read)” box 360 contains a list of all variables that have been selected for reading using VAR_READ_COUNT and VAR_READ_properties. A second “add . . . ” button 362 directs the event handler 330 to add a variable from the “variable” list in the box 342 to the “variables (to read)” list in the box 360. A second “remove” button 354 directs the event handler 330 to remove the selected variable from the “variables (to read)” list in the box 360. When a second “all” check box 366 is checked, pressing the second “remove” button 364 directs the event handler 330 to remove all variables from the “variables (to read)” list box 360.

Referring now to FIG. 21, depicted therein is an example of a data collection property page 370 that allows the user to specify how the variable data is collected. The data collection property page 370 comprises the following user interface elements.

A “queue event results up to:” check box 372 and associated edit field 374 specify the maximum number of items to be placed in the optional data queue 236 using the following properties: OPTIONS (OF_QUEUE_API_CALLS_ENABLED), OPTIONS (OF_QUEUE_EVENTS_ENABLED), and QUEUEMAXSIZE.

A “wait for data received event:” check box 374 and associated edit field 374 specify the amount of time to wait for the recipient of the data to respond by signaling the data ready event using the following properties: OPTIONS (OF_WAIT_FOR_DATA_RECEIVED) and DATARECEIVEDTIMEOUT method.

A “delete old items after:” check box 380 and associated edit field 372 specify the amount of time that data items may remain in the queue after which they are purged, using the following properties: OPTIONS (OF_DELETE_OLD_QUEUE_ITEMS) and DATAOLDTIMEOUT method.

The “collect data always” check box 384 specifies whether or not data should always be collected, even when the data does not change, using the following properties: OPTIONS (OP_COLELCT_DATA_ALWAYS).

The present invention may be embodied in forms other than those described above. The scope of the present invention should thus be determined with reference to the following claims and not the foregoing exemplary detailed description.

APPENDIX A Data Types

This Appendix A contains the definitions of all special types used by the methods and properties of each component making up the example XMC Program Engine system that may form a part of the present invention.

XMC_PARAM_DATA Structure

All methods exposed by each component in the XMC Program Engine system use the standard XMC parameters set to describe data used to set and query properties as well as invoke methods. The standard parameters are in the following format:

pObj->InvokeMethod(LPXMC_PARAM_DATA rgData, DWORD dwCount);

Each element in the rgData array corresponds to a parameter, with the first element in the array corresponding to the first parameter. The XMC_PARAM_DATA structure can contain either a numerical or a string value and is defined as follows:

typedef struct tagXMC_PARAM_DATA {  LNG_PARAM_DATATYPE adt;  union  {   double df;   LPTSTR psz;  }; }XMC_PARAM_DATA;

The ‘adt’ member of the XMC_PARAM_DATA structure describes the data contained within the XMC_PARAM_DATA structure. The values are described below:

LNG_PARAM_DATATYPE Description LNG_ADT_NUMBER Use this value when passing a numerical value via the ‘adt’ member of the XMC_PARAM_DATA structure. LNG_ADT_STAT_STRING Use this value when passing a static string value via the ‘psz’ member of the XMC_PARAM_DATA structure. Static strings do not need to be freed from memory. LNG_ADT_MEM_STRING Use this value when passing a string value via the ‘psz’ member of the XMC_PARAM_DATA structure. LNG_ADT_MEM_STRING denotes that the string must be freed from memory during cleanup. LNG_ADT_NOP This value is used to ignore items within the XMC_PARAM_DATA array. When specifies, this parameter is not used.

Boolean Types

When querying and setting boolean TRUE/FALSE values, any non-zero value is considered TRUE, whereas a zero value is considered FALSE.

Claims

1. A motion system comprising:

a network;
a set of controller independent media commands;
a set of event tokens;
a set of motion events each associated with at least one event token;
a set of motion media each comprising at least one media command;
a motion control device;
a motion control component capable of executing motion media to command at least one motion control device;
a motion event manager that associates at least one event token with at least one motion media; whereby
the motion event manager instructs the motion control component to command at least one motion control device after receiving across the network at least one event token associated with at least one motion event.

2. A system as recited in claim 1, where in at least one motion event is a text event.

3. A system as recited in claim 2, where in at least one text event is communicated from an instant messaging service.

4. A system as recited in claim 3, where in at least one text event is communicated by E-mail.

5. A system as recited in claim 1, where in at least one motion event is associated with a person speaking.

6. A system as recited in claim 1, where in at least one motion event is associated with a user action.

7. A system as recited in claim 1, where in at least one motion event is associated with an operating system event.

8. A system as recited in claim 1, where in at least one motion event is associated with an event from a third-party software application.

9. A system as recited in claim 1, where in at least one motion media is comprised of scripts.

10. A system as recited in claim 1, where in at least one motion media contains at least one controller dependent command.

11. A system as recited in claim 1, where in the motion event manager associates at least one motion media with at least one event token.

12. A system as recited in claim 1, further comprising at least one event provider that generates at least one event token.

13. A system as recited in claim 1, where in the network is a wireless network.

14. A system as recited in claim 1, where in the network is a packet-based network.

15. A system as recited in claim 1, where in the network is associated with the Internet.

16. A system as recited in claim 13, where in the wireless network uses WiFi.

17. A system as recited in claim 1, where in the network is configured as a peer-to-peer network.

18. A system as recited in claim 1, further comprising a media creation tool configured to create motion media.

19. A system as recited in claim 18, where in the media creation tool is capable of creating motion media with recorded operations.

20. A system as recited in claim 18, where in the media creation tool is capable of creating motion media with drag-drop operations.

21. A motion system comprising:

a set of controller independent media commands;
a set of event tokens;
a set of motion events each associated with at least one event token;
a set of motion media each comprising at least one media command;
a motion control device;
a motion control component capable of executing motion media to command at least one motion control device;
a motion event manager that associates at least one event token with at least one motion media; whereby
the motion event manager instructs the motion control component to command at least one motion control device after receiving at least one event token associated with at least one motion event.

22. A system as recited in claim 21, where in at least one motion event is a text event.

23. A system as recited in claim 22, where in at least one text event is communicated from an instant messaging service.

24. A system as recited in claim 23, where in at least one text event is communicated by E-mail.

25. A system as recited in claim 21, where in at least one motion event is associated with a person speaking.

26. A system as recited in claim 21, where in at least one motion event is associated with a user action.

27. A system as recited in claim 21, where in at least one motion event is associated with an operating system event.

28. A system as recited in claim 21, where in at least one motion event is associated with an event from a third-party software application.

29. A system as recited in claim 21, where in at least one motion media is comprised of scripts.

30. A system as recited in claim 21, where in at least one motion media contains at least one controller dependent command.

31. A system as recited in claim 21, where in the Event Manager associates at least one motion media with at least one event token.

32. A system as recited in claim 21, further comprising at least one event provider that generates at least one event token.

33. A system as recited in claim 21, where in at least one event token is transferred across a network to the Event Manager.

34. A system as recited in claim 33, where in the network is a wireless network.

35. A system as recited in claim 33, where in the network is a packet-based network.

36. A system as recited in claim 33, where in the network is associated with the Internet.

37. A system as recited in claim 34, where in the wireless network uses WiFi.

38. A system as recited in claim 33, where in the network is configured as a peer-to-peer network.

39. A system as recited in claim 21, further comprising a media creation tool configured to create motion media.

40. A system as recited in claim 39, where in the media creation tool is capable of creating motion media with recorded operations.

41. A system as recited in claim 39, where in the media creation tool is capable of creating motion media with drag-drop operations.

Patent History
Publication number: 20130110259
Type: Application
Filed: Dec 18, 2012
Publication Date: May 2, 2013
Applicant: ROY-G-BIV CORPORATION (Bingen, WA)
Inventor: ROY-G-BIV CORPORATION (Bingen, WA)
Application Number: 13/719,112
Classifications
Current U.S. Class: Sequential Or Selective (700/11)
International Classification: G05B 15/02 (20060101);