Abstract:
A motion event system for transmitting events between a motion program and a motion device. The motion event system comprises a driver component, a motion component, and a motion event component. The driver component is associated with the motion device. The motion component allows communication between the motion program and the at least one driver component. The motion event component configures at least one of the driver component and the motion component to recognize events to be transmitted between the motion program and the motion device.

Description:
RELATED APPLICATIONS 
     This application claims priority of U.S. Provisional Patent Application Ser. Nos. 60/466,588 filed Apr. 29, 2003, and 60/467,667 filed May 2, 2003, the contents of which are incorporated herein by reference. 
    
    
     TECHNICAL FIELD 
     The present invention relates to motion control systems and, in particular, to systems that allow the automation of motion tasks associated with Industrial and Consumer Automation processes. 
     BACKGROUND OF THE INVENTION 
     A motion control application is software that defines a sequence of motion steps required to perform a motion task. A motion controller is hardware and software that, in combination with a motion control device, is capable of converting motion commands into physical movement of an object. The term motion controller will be used herein to include the motion control device. 
     Typically, the motion commands executed by a motion controller are proprietary. The combination of a motion control software application and one or more motion controllers will be referred to herein as a motion control system. 
     In many cases, motion control software applications are specifically written for one or more proprietary motion controller. Therefore, if one or more new motion controllers are to be used in place of one or more original motion controllers, a motion control software application written for the original motion controller(s) must be rewritten to accommodate the new motion controller(s). A motion control software application written for one or more proprietary controllers is referred to as hardware dependent. 
     In general, hardware dependence is undesirable because the owner of the motion control system must either commit to the vendors of the proprietary controllers or discard the motion control application when a new motion controller is used. 
     The need exists for systems and methods that may be used to facilitate the writing of motion control applications that are hardware independent. 
     SUMMARY OF THE INVENTION 
     The present invention may be embodied as a motion event system for transmitting events between a motion program and a motion device. The motion event system comprises a driver component, a motion component, and a motion event component. The driver component is associated with the motion device. The motion component allows communication between the motion program and the at least one driver component. The motion event component configures at least one of the driver component and the motion component to recognize events to be transmitted between the motion program and the motion device. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is an object interaction map depicting an event monitoring system for use by a motion system; 
         FIG. 2  is a scenario map depicting the making of a normal method call; 
         FIG. 3  is a scenario map depicting the process of driver event subscription; 
         FIG. 4  is a scenario map depicting the making of a driver level event triggering; 
         FIG. 5  is a scenario map depicting the process of event subscription at the motion component level; 
         FIG. 6  is a scenario map depicting the event monitoring at the component level; 
         FIG. 7  is a representation of an object model illustrating relationships among objsects of a variable support system of the present invention; 
         FIG. 8  is a module interaction map depicting a variable support system in the context of a motion system; 
         FIG. 9  depicts code illustrating the use of the variable support objects in the context of Microsoft Visual Basic; 
         FIG. 10  is a scenario map illustrating the configuration of variable mappings using an administrator component; 
         FIG. 11  is a scenario map illustrating the configuration of variable mappings programmatically; 
         FIG. 12  is a scenario map illustrating the use of the variable support system to map variables; 
         FIG. 13  is scenario map illustrating a variable support system in which mapping and logic is performed by the motion component; 
         FIG. 14  is a scenario map of the system of  FIG. 13  being configured programmatically; and 
         FIG. 15  is a scenario map of the system of  FIG. 13  being used to access mapped variables. 
     
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     The present invention relates to systems for handling events generated in the context of a motion system. Such events will be referred to as motion events. In addition, a common source of events in a motion system is a change in data associated with a variable. The present invention also relates to a variable support system for accessing and mapping proprietary variables associated with motion controllers. 
     The following discussion will thus describe both a motion event system for handling motion events and a variable support system for accessing data values associated with motion variables. While a significant benefit can be obtained by combining the motion event system and variable support system as described herein, each of these systems can operate independently, and the Applicant reserves the right to pursue separate claims directed towards each of the motion event system and the variable support system. 
     I. Motion Event Systems 
     Referring initially to  FIG. 1  of the drawing, depicted at  20  therein is an example motion event system  20  comprising a motion event component  22 . The example motion event component  22  routes events among the other components (custom driver, standard driver, or stream) of the system  20  as will be described in further detail below. 
     As shown in  FIG. 1 , the motion event system  20  further comprises an automation layer  30  and a C++ framework layer  32 . The automation layer  30  allows access to the motion component  40  by a client (not shown) written in any automation aware language such as Visual Basic, VBA, VBScript, Java, and NET languages. The client may be a component, application, or other software using the motion services provided by the motion event system  20 . The C++ framework layer  32  implements a very thin wrapper designed to facilitate access to COM interfaces. 
     The example motion event system  20  further comprises a motion component  40  and a driver component  42 . The example motion component  40  implements a set of OLE interfaces designed for use in the context of motion control systems. The example driver component  42  implements the driver logic for a given motion platform and may be either custom or standard. 
     Optionally, the system  20  may further comprise a driver proxy component  44 . The driver proxy component  44  acts as a proxy between a first set of driver original interface requirements and a second set of slim driver interfaces. When the driver component  42  is standard, the standard driver component  42  performs the functions both of the driver proxy component  44  and of a custom driver component  42 . 
     Referring now to  FIG. 2  of the drawing, depicted therein is a scenario map depicting the operation of the system  20  when making a normal method call. When making a normal call to the motion component  40 , the thread of control is routed from the caller to the custom driver component  42  implementing the service requested and the following steps are performed:
         1. First the caller calls the function on the automation layer  30  (or C++ framework layer  32 ).   2. If the automation layer  30  is called, it in turn calls the C++ framework layer  32 .   3. The C++ framework layer  32  calls the appropriate motion service provided by the motion component  40 .   4. Internally the motion component  40  then routes the request to the target motion driver  42 . At this point no events have been triggered.       

     Referring now to  FIG. 3  of the drawing, the process of driver event subscription will now be described. To receive events, a client must first ‘subscribe’ to a set of one or more events. Subscribing is the process of notifying the motion event system  20  of the events in which the client has interest. Once subscribed, the event conditions defined by the subscription dictate what triggers the event that then notifies the client of the event.  FIG. 3  illustrates how event subscription works. 
     As shown in  FIG. 3 , the following steps occur when subscribing to an event:
         1. First the client in communication with either of the automation layer  30  or C++ framework layer  32  calls the ‘Subscribe’ method notifying the system  20  which event or events are to be monitored.   2. If the automation layer  30  is used, it notifies the C++ framework layer  32  of the event subscription.   3. Next, the C++ framework layer  32  notifies the motion component  40  of the event subscription.   4. The motion component  40  then notifies the target driver component  42 , which stores the subscription information and then either begins monitoring the event or waits until told to do so.       

     Optionally, the motion component  40  may implement the event subscription/monitoring functionality, which adds a higher degree of reusability because each of the driver components  42  would not be required to implement any subscription/monitoring logic. Also, because the automation layer  30  and C++ framework layer  32  are provided merely as programming conveniences, the client setting up the subscription may optionally communicate directly to the motion component  40 , bypassing both the automation layer  30  and C++ framework layer  32 . 
     Referring now to  FIG. 4 , the process of driver level event triggering will now be described. An event is generated by either a driver component  42  or stream, which will also be referred to as the event source. When an event occurs, the event source routes the event to subscribed clients the motion event component  22 . As shown in  FIG. 4 , the following steps are performed when an event is generated:
         1. First the event condition occurs in the event source. When the event occurs, the event source sends the event notification to the motion event component  22 .   2. Next, the motion event component  22  sends the event notification to all clients subscribed to that particular event.   3. If the automation layer  30  is used, the C++ framework layer  32  notifies the automation layer  30  of the event.   4. The automation layer  30  next notifies all appropriate subscribed clients of the event, thereby completing the event cycle.       

     As an alternate to the design above, the functionality of the motion event component  22  may be provided by the motion component  40 , in which case a separate motion event component  22  would not be used. However, using a separate motion event component  22  allows a decoupling of the event source and the event receiver, which may be beneficial when the components of the system  20  are distributed across a network. For example with the motion event component  22 , the motion component  40  may actually be located on a different computer connected via a network (Ethernet, wireless, or other network system). 
     Optionally a motion stream (not shown) residing below the driver component  42  may fire events. For example, data transmission events may be fired by the stream when data is received from or sent to the stream target system. In this case, the event source would be the motion stream instead of the motion driver  42 . In addition, as generally discussed above, the motion component  40  may actually implement the event subscription/monitoring/trigger functionality, which would add a higher degree of reusability because each driver would not be required to implement any subscription/monitoring logic. Further, because the automation layer  30  and C++ framework layer  32  are provided merely as programming conveniences, the motion event component  22  may communicate directly with the client application thus bypassing the automation layer  30  and C++ framework layer  32 . 
     Referring now to  FIG. 5  of the drawing, the optional process of event subscription at the motion component level will now be described. To maximize code re-use across driver implementations, event subscription and monitoring may be implemented at the motion component  40  level instead of at the driver component level.  FIG. 5  illustrates the steps that occur when event subscription is handled at the motion component level:
         1. Initially, the client (of either the automation layer  30  or C++ framework layer  32 ) calls the ‘Subscribe’ method notifying the motion event system  20  of which events to monitor.   2. The automation layer  30 , if used, notifies the C++ framework layer  32  of the event subscription.   3. Next, the C++ framework layer  32  notifies the motion component  40  of the event subscription, which in turn stores the subscription information and then either starts monitoring the event immediately or waits until told to do so.       

     Optionally, because the automation layer  30  and C++ framework layer  32  are provided merely as programming conveniences, the client setting up the subscription may also talk directly to the motion component  40 , thus bypassing both the automation layer  30  and C++ framework layer  32 . 
     Referring now to  FIG. 6 , the process of event monitoring at the component level will now be described. If motion component event monitoring is used and an event occurs, the motion component  40  becomes the event source. Upon detecting an event, the motion component  40  routes the event to subscribed clients through the motion event component  22 . The steps that occur when the motion component  40  routes events are as follows:
         1. First the motion component  40  monitors the driver component  42  to determine whether any pre-subscribed event conditions occur.   2. Upon detecting a subscribed event condition, the motion component  40  notifies the motion event component  22  of the event.   3. The motion event component  22  then notifies all clients (components, applications or other software) subscribed to the event, that the event has occurred.   4. If the automation layer  30  is used, the C++ framework layer  32  notifies the automation layer  30  of the event.   5. The automation layer  30  then notifies any of its clients of the event, thus completing the event cycle.       

     Optionally, because the automation layer  30  and C++ framework layer  32  are used as programming conveniences, the motion event component  22  may bypass the automation layer  30  and C++ framework layer  32  and communicate directly with the client application. 
     Any number of conditions may trigger an event. The following section lists several example event triggers. 
     Low Level Data Transmission is one example of an event that may be monitored using the motion event monitoring system  20 . Very low level events may be used in the motion stream to notify other components when raw data is sent or received to and from the target motion device or machine. 
     Another example of an event that may be monitored using the event monitoring system  20  is a Motion Action. Certain motion actions may trigger events. For example the completion of a move, hitting a limit switch, or accelerating up to a given velocity may all trigger events that notify the client of the event condition. 
     The event monitoring system  20  may be used to monitor events triggered by changing data values. More specifically, a controller may define variables that are associated with or contain data values; as the data values associated with these variables change, one or more events may be triggered. For example, the motion driver  42  may poll for variables having data values and, upon seeing a change in value or state of a data value, the driver  42  may fire an event to other components notifying them of the change. This model implemented by the motion event monitoring system  20  follows a publish/subscribe model where the driver  42  “publishes” data changes to “subscribing” components such as the automation layer  30  or any client software using the system  20 . 
     A. Example C++ Functions 
     The following discussion describes C++ functions that may be used by the motion event system  20  to support event notifications on data and API changes. The example system  20  uses an object, referred to as CSystemMonitorObj, to implement an internal thread to monitor variables and other API&#39;s. Using this example object, once each API changes, registered call back functions are called, thereby notifying the target of the data changes. 
     The CSystemMonitorObj object uses the following functions to support event notifications: Subscribe, Unsubscribe, Initialize, and CleanUp. The Subscribe function adds a new function call-back to be called on data changes. The Unsubscribe function removes a function from the call-back set. The Initialize function creates a connection to the motion event component  22 . The CleanUp function shuts-down any connections to the motion event component  22 . Each of these functions will be discussed separately below. 
     1. CSystemMonitorObj::Subscribe Function 
     The “Subscribe” function is used to add a new variable or API to the subscription list and employs the following syntax, parameters, and return value: 
     
       
         
               
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
           
               
                   
               
             
             
               
                 Syntax 
                 HRESULT Subscribe( 
                 DWORD dwType, 
               
               
                   
                   
                 DWORD dwTypeInfo, 
               
               
                   
                   
                 LPFNMotionEVENT pfnCallBack, 
               
               
                   
                   
                 LPVOID pvParam, 
               
               
                   
                   
                 LPDWORD pdwCookie ); 
               
             
          
           
               
                 Parameters 
                 DWORD dwType - this parameter specifies the type of data 
               
               
                   
                 where the following types are currently supported: 
               
               
                   
                 MOTION_CNC_MONITOR_TYPE_VARIABLE - 
               
               
                   
                 variable monitor type, were the dwTypeInfo points to a 
               
               
                   
                 string containing the variable name. Note when monitoring 
               
               
                   
                 this type, only mapped Motion variables are supported. 
               
               
                   
                 DWORD dwTypeInfo - contains extra information 
               
               
                   
                 describing the type of data to be monitored. 
               
               
                   
                 LPFNMOTIONEVENT pfnCallBack - callback function 
               
               
                   
                 called when the data monitored changes. This function has 
               
               
                   
                 the following prototype. 
               
               
                   
                 HRESULT (*LPFNMOTIONEVENT)( DWORD dwType, 
               
             
          
           
               
                   
                 DWORD dwTypeInfo, 
               
               
                   
                 LPVOID pvParam, 
               
               
                   
                 MOTION_PARAM_DATA 
               
             
          
           
               
                   
                 rgData, 
               
             
          
           
               
                   
                 DWORD dwCount ); 
               
             
          
           
               
                   
                 LPVOID pvParam - extra parameter passed to the callback 
               
               
                   
                 upon invocation. 
               
               
                   
                 LPDWORD pdwCookie - pointer to a DWORD where the 
               
               
                   
                 cookie (value associated with the connection) is copied. 
               
               
                 Return 
                 HRESULT - NOERROR on success, or error code on 
               
               
                 Value 
                 failure. 
               
               
                   
               
             
          
         
       
     
     2. CSystemMonitorObj:: Unsubscribe Function 
     The Unsubscribe function Removes a variable or API from the subscription list and employs the following syntax, parameters, and return value: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Syntax 
                 HRESULT Unsubscribe( DWORD dwCookie ); 
               
               
                 Parameters 
                 DWORD dwCookie-value corresponding to the 
               
               
                   
                 connection (previously returned by the Subscribe 
               
               
                   
                 function). 
               
               
                 Return Value 
                 HRESULT-NOERROR on success, or error code on 
               
               
                   
                 failure. 
               
               
                   
               
             
          
         
       
     
     3. CSystemMonitorObj::Initialize Function 
     The “Initialize” function creates a connection to the motion event component  22  and employs the following syntax, parameters, and return value: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Syntax 
                 HRESULT Initialize( DWORD dwFlags ); 
               
               
                 Parameters 
                 DWORD dwFlags-reserved for future use, should be 
               
               
                   
                 set to zero. 
               
               
                 Return Value 
                 HRESULT-NOERROR on success, or error code on 
               
               
                   
                 failure. 
               
               
                   
               
             
          
         
       
     
     4. CSystemMonitorObj::CleanUp Function 
     The “CleanUp” function releases the connection to the motion event component  22  and employs the following syntax and return value: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Syntax 
                 HRESULT CleanUp( void ); 
               
               
                 Return Value 
                 HRESULT-NOERROR on success, or error code on 
               
               
                   
                 failure. 
               
               
                   
               
             
          
         
       
     
     The following C++ functions are examples of functions that may be used by the motion event system  20  to support event notifications that may be implemented in the automation layer  30 . The functions described below apply to direct events supported using standard connection points as well as “lazy events”, which are loosely coupled events implemented using COM+ events. 
     B. Internal SystemAPI Definitions 
     The event functionality described above is implemented internally to the event management system  20  using a set of SystemAPI or SystemSPI functions. The term “SystemAPI” refers to an application programming interface exposed by the system  20 . The term “SystemSPI” refers to a service provider interface defined by the system  20 . 
     When event functionality is implemented at the level of the motion component  40 , the SystemAPI definitions are used. When event functionality is implemented at the level of the driver component  42 , the events are passed down to the driver component  42  and handled by the SystemSPI definitions. 
     All data passed to the SystemAPI is passed in the form of a function index called the SystemAPI index and an array of parameters (RgData) that use a Standard Motion Parameter Data Type that will be described in further detail below. 
     In the following discussion, portions of the SystemAPI and SystemSPI provided to handle event management will be defined. 
     1. MOTION_CNC_EVENT_SUBSCRIBE API 
     The MOTION_CNC_EVENT_SUBSCRIBE API is a SystemAPI that is used to subscribe to a given event condition. In the present example, only variables are supported by the event notification. The present invention may be implemented using events that include motion conditions, raw data transmission conditions, or other state change information occurring either in the motion event system  20  or on the target device or machine. The following Index Value and RgData Values are used to implement this API: 
     
       
         
               
               
             
           
               
                   
               
               
                 Index 
                   
               
               
                 Value 
                 2890 
               
               
                   
               
             
             
               
                 RgData[0] 
                 (in, number) type of event to monitor. Current types supported 
               
               
                   
                 are: 
               
               
                   
                 XMC_CNC_MONITOR_TYPE_VARIABLE-variable 
               
               
                   
                 monitor type, were the RgData[1] points to a string containing 
               
               
                   
                 the variable name. Note when monitoring this type, only 
               
               
                   
                 mapped XMC variables are supported. 
               
               
                 RgData[1] 
                 (in, number or string depending on RgData[0])-actual type 
               
               
                   
                 information describing the event condition to be monitored. 
               
               
                   
                 For example when RgData[0] = 
               
               
                   
                 XMC_CNC_MONITOR_TYPE_VARIABLE, this field 
               
               
                   
                 contains the actual variable name to monitor. 
               
               
                 RgData[2] 
                 (in, number) number of event conditions to monitor. For each 
               
               
                   
                 count of event conditions to monitor, there are two elements 
               
               
                   
                 in the RgData array that follow (one for the event condition 
               
               
                   
                 type and one for the actual event condition value). 
               
               
                 RgData[2 
                 (in, number) event condition type where the following types 
               
               
                 + 
                 are supported: 
               
               
                 (1 * n)] 
                 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 (=, &lt;, &gt;) 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 —   
               
               
                   
                 GREATERTHAN 
               
               
                   
                 rgData[10] = 5.0 
               
               
                   
                 the array would be evaluated using the following logic: 
               
               
                   
                 If (DATA &lt;= 3.0 OR DATA &gt; 5.0) then Trigger Event 
               
               
                 RgData[0] 
                 (out, number) the cookie (unique identifier) associated with 
               
               
                   
                 the subscription is returned to the client. 
               
               
                   
               
             
          
         
       
     
     2. MOTION_CNC_EVENT_UNSUBSCRIBE API 
     The MOTION_CNC_EVENT_UNSUBSCRIBE API is a SystemAPI that is used to unsubscribe to a given event condition, thus removing the condition from the monitoring list for the specific client making the unsubscribe request. The event condition will still be monitored if other clients are currently subscribed to the condition. The following Index Value and RgData Values are used to implement this API: 
     
       
         
               
               
               
             
           
               
                   
                   
               
               
                   
                 Index Value 
                 2891 
               
               
                   
                   
               
             
             
               
                   
                 RgData[0] 
                 (in, number) cookie (unique identifier) associated 
               
               
                   
                   
                 with the subscription. This value is returned to the 
               
               
                   
                   
                 client when calling the subscription SystemAPI 
               
               
                   
                   
                 above. 
               
               
                   
                   
               
             
          
         
       
     
     3. MOTION_CNC_EVENT_PAUSE API 
     The MOTION_CNC_EVENT_PAUSE API allows monitoring of the given event condition to be paused for the given client but does not remove it from the subscription list. The following Index Value and RgData Values are used to implement this API: 
     
       
         
               
               
               
             
           
               
                   
                   
               
               
                   
                 Index Value 
                 2892 
               
               
                   
                   
               
             
             
               
                   
                 RgData[0] 
                 (in, number) cookie value (unique identifier) 
               
               
                   
                   
                 associated with the subscription. 
               
               
                   
                   
               
             
          
         
       
     
     The Standard Motion Parameter Data Type discussed briefly above will now be discussed in further detail. The structure of the Standard Motion Parameter Data Type is referred to as MOTION_PARAM_DATA. Many methods on the Motion C++ classes use the standard Motion parameters set to describe data used to control, query or set each axis. The standard parameters are in the following format:
 
 p Obj-&gt;method( LP MOTION_PARAM_DATA  rg ParamData, D WORD dw Count);
 
     Each element in the rgParamData array corresponds to an axis in the system, with the first element in the array corresponding to the first axis of motion. For example, if the first axis of motion is the ‘X’ axis, then ‘X’ axis would correspond to the first element in the array. 
     The MOTION_PARAM_DATA structure can contain either a numerical or a string value and is defined as follows: 
     
       
         
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 typedef struct tagMOTION_PARAM_DATA 
               
               
                   
                 { 
               
             
          
           
               
                   
                 LNG_PARAM_DATATYPE adt; 
               
               
                   
                 union 
               
               
                   
                 { 
               
             
          
           
               
                   
                 double df; 
               
               
                   
                 LPTSTR psz; 
               
             
          
           
               
                   
                 }; 
               
             
          
           
               
                   
                 }MOTION_PARAM_DATA; 
               
               
                   
                   
               
             
          
         
       
     
     The ‘adt’ member of the MOTION_PARAM_DATA structure describes the data contained within the MOTION_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 MOTION_PARAM_DATA 
               
               
                   
                 structure. 
               
               
                 LNG_ADT_STAT_STRING 
                 Use this value when passing a static 
               
               
                   
                 string value via the ‘psz’ member of 
               
               
                   
                 the MOTION_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 
               
               
                   
                 MOTION_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 MOTION_PARAM_DATA 
               
               
                   
                 array. For example, if you need to 
               
               
                   
                 command move-at-velocity for only 
               
               
                   
                 the third axis of a three axis machine, 
               
               
                   
                 you would send an 
               
               
                   
                 MOTION_PARAM_DATA array to 
               
               
                   
                 CSystemMotionObj::MoveAtVelocity 
               
               
                   
                 where the first 2 elements would be 
               
               
                   
                 of type LNG_ADT_NOP and the third 
               
               
                   
                 element would be of type 
               
               
                   
                 LNG_ADT_NUMBER. The motion 
               
               
                   
                 component 40 would then issue the 
               
               
                   
                 move-at-velocity command only to 
               
               
                   
                 the third axis, ignoring the first two. 
               
               
                   
               
             
          
         
       
     
     The system  20  handles Boolean types in the following manner. When querying and setting boolean TRUE/FALSE values, any non-zero value is considered TRUE and any zero value is considered FALSE. For example, if the df field of an MOTION_PARAM_DATA array element is non zero and it is sent to CSystemMotionObj::LimEnableSW, the software limits for the specified axis will be enabled. 
     II. Variable Support System 
     Typically, the variables associated with a motion system change as the motion system changes state. Events generated by motion systems are often associated with these changing variables. Referring now to  FIGS. 7–16 , depicted therein is a variable support system  120  for facilitating access to and mapping of motion variables. The system  120  is of particular significance when used in conjunction with the motion event handling system  20  described above, but also has application to motion systems that do not incorporate the motion event handling system  20 . 
     Referring now to  FIG. 9 , that figure illustrates that the example variable support system  120  comprises the automation layer  30 , framework layer  32 , motion component  40 , and driver components  42  as generally described above. In addition, as depicted in  FIG. 9 , the variable support system  120  comprises client software  122 , a user  124 , and a driver administrator component  128 . The motion event component  22  is not shown in  FIG. 9  for clarity but may also be used by the system  120 . 
     The objects forming the variable support system  120  will be described in further detail below after a discussion of an object model associated with the variable support system  120 . 
     A. Example Object Model 
     Referring now to  FIG. 7  of the drawing, depicted therein is an object model  130  illustrating the relationships among a plurality of objects associated with the example variable support system  120 . As shown in  FIG. 7 , the object model  130  illustrates that the example object model  122  comprises the following variable support objects:
         A MotionaVariableObj object  132  is the main object used for variable access. Variables are read and written from this object. In addition, a list of text variable names, as well as the general attributes for each variable, can be queried from this object;   A MotionaVariableMappingObj object  134  used to map each variable name to the internal representation of the variable on the controller of a given motion device.   A MotionaVariableMappingEnum object  136  that enumerates all variable mappings configured by the user  124  as well as those provided by the motion component  40 .   A MotionaVariableMappingItem object  138  that represents a single variable mapping where the mapping consists of the following “name”→“mapping”.       

       FIG. 9  of the drawing depicts an example of how the variable support objects described below may be used in the context of Microsoft Visual Basic. 
     The MotionaVariableObj object  132 , MotionaVariableMappingObj object  134 , MotionaVariableMappingEnum object  136 , and MotionaVariableMappingItem object  138  each expose methods, and the methods exposed by each of the objects  132  and  134  will be described separately below. 
     1. MotionaVariableObj Object 
     The MotionaVariableObj  132  supports or exposes the following methods: ReadItem, Read, WriteItem, Write, GetNames, and GetAttributes. The ReadItem method reads a single variable (or array element) and returns the data read. The Read method reads a set of items. The WriteItem methods writes a set of items. The GetNames method returns the list of variable names currently mapped either by the motion component  40  or by the user  124 . The GetAttributes method returns the attributes for a given variable. Each of these methods will be separately described in further detail below. 
     The MotionVariableObj.ReadItem method employs the following syntax, parameters, and return value to read a variable item and return the data read: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Syntax 
                 Function ReadItem( strName As String ) As Variant 
               
               
                 Parameters 
                 strName As String - string containing the name of the 
               
               
                   
                 variable to be read. 
               
               
                 Return Value 
                 Variant - data read from the variable. 
               
               
                   
               
             
          
         
       
     
     The MotionaVariableObj.Read method employs the following syntax and parameters to read a variable item or array and return the data read in the parameter passed: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Syntax 
                 Sub Read( strName as String, ByVal rgData( ) As Variant ) 
               
               
                 Parameters 
                 strName As String - name of variable to read. 
               
               
                   
                 rgData( ) as Variant - array of data items read. 
               
               
                 Return Value 
                 None. 
               
               
                   
               
             
          
         
       
     
     The MotionaVariableObj.WriteItem method employs the following syntax and parameters to write a variable item to the controller of a given motion device: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Syntax 
                 Sub WriteItem( strName As String, varData As Variant ) 
               
               
                 Parameters 
                 strName As String - string containing the name of the 
               
               
                   
                 variable to be read. 
               
               
                   
                 varData As Variant - data to be written. 
               
               
                 Return Value 
                 None. 
               
               
                   
               
             
          
         
       
     
     The MotionaVariableObj.Write method employs the following syntax and parameters to write a variable item or array to the controller of a given motion device: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Syntax 
                 Sub Write( strName as String, rgData( ) As Variant ) 
               
               
                 Parameters 
                 strName As String - name of variable to read. 
               
               
                   
                 rgData( ) as Variant - array of data items to be written. 
               
               
                 Return Value 
                 None. 
               
               
                   
               
             
          
         
       
     
     The MotionaVariableObj.GetNames method employs the following syntax and parameters to get the variable names for a given domain (this method supports both variables mapped in the motion component  40  and variables mapped by the user  124  using a variable mapping API): 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Syntax 
                 Sub GetNames( strDomain As String, 
               
               
                   
                   strName as String, 
               
               
                   
                   rgData( ) As Variant ) 
               
               
                 Parameters 
                 strDomain as String - name of domain (if any) from which 
               
               
                   
                 variables are to be read. 
               
               
                   
                 strName As String - name of first variable to retrieve. 
               
               
                   
                 rgData( ) as Variant - array of data items to be written. 
               
               
                 Return Value 
                 None. 
               
               
                   
               
             
          
         
       
     
     The MotionaVariableObj.GetAttributes method uses the following syntax and parameters to get the attributes for a given variable: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Syntax 
                 Sub GetAttributes( strName as String, 
               
               
                   
                 rgData( ) As Variant ) 
               
               
                 Parameters 
                 strName As String - name of first variable to retrieve. 
               
               
                   
                   strAttrib as String - attributes for the variable. 
               
               
                 Return Value 
                 None. 
               
               
                   
               
             
          
         
       
     
     2. MotionaVariableMappingObj Object 
     The MotionaVariableMappingObj object  134  supports or exposes the following methods: AddMapping, RemoveMapping, RemoveAll, GetMappingList, LoadMappings, and SaveMappings. The AddMapping method adds a new mapping to the list. The RemoveMapping method removes a mapping from the list. The RemoveAll method removes all mappings from the list. The GetMappingList method retrieves the mapping enumerator. The LoadMappings method loads a persisted mapping set. The SaveMappings method saves a mapping set to persisted storage. Each of these methods will be separately described in further detail below. 
     The MotionaVariableMappingObj.AddMapping method employs the following syntax and parameters to add a new mapping to the mapping list: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Syntax 
                 Sub AddMapping( strName As String, strMap As String ) 
               
               
                 Parameters 
                 strName As String - string containing the name of the 
               
               
                   
                 variable to be mapped. 
               
               
                   
                 strMap As String - string containing the mapping 
               
               
                   
                 information for the variable. 
               
               
                 Return Value 
                 None. 
               
               
                   
               
             
          
         
       
     
     The mapping format for a variable is as follows:
 
DOMAIN:VARNAME:VARPATH:VARWRITEFMT
 
where “DOMAIN” refers to the domain name on the controller, “VARNAME” the variable name on the controller to be read, “VARPATH” is the variable path (for arrays and structures) of the variable, and “VARWRITEFMT” is the variable write format used when writing data to the variable. A semicolon ‘:’ separates each of the items in the mapping. If the item is empty, the semicolons must still appear. Several example mappings are as follows:
 
“ FOO”→“APC 1 MULTI_SETUP:(0):(0){14}”
 
“ BOO”→“:PI _TOOL_DATA_TABLE:(0)(1).tool_length:(1)(1)[{14}]”
 
     The MotionaVariableMappingObj.RemoveMapping method employs the following syntax and parameters to remove a mapping from the mapping list: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Syntax 
                 Sub RemoveMapping( strName As String ) 
               
               
                 Parameters 
                 strName As String - string containing the name of the 
               
               
                   
                 variable to be removed from the mapping list. 
               
               
                 Return Value 
                 None. 
               
               
                   
               
             
          
         
       
     
     The MotionaVariableMappingObj.RemoveAll method employs the following syntax to remove all mappings from the mapping list: 
     
       
         
               
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 Syntax 
                 Sub RemoveAll( ) 
               
               
                   
                 Parameters 
                 None. 
               
               
                   
                 Return Value 
                 None. 
               
               
                   
                   
               
             
          
         
       
     
     The MotionaVariableMappingObj.LoadMappings method employs the following syntax and parameters to load a set of mappings from a file:
     Syntax Sub LoadMappings(strFile As String)   Parameters strFile as String—name of file from which the mappings are to be loaded.   Return Value None.   

     When using the MotionaVariableMappingObj.LoadMappings method to load mappings from a file, all existing mappings are deleted. 
     The MotionaVariableMappingObj.SaveMappings method employs the following syntax and parameters to save a set of mappings to file. 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Syntax 
                 Sub SaveMappings( strFile As String ) 
               
               
                 Parameters 
                 strFile as String - name of file from which the mappings are 
               
               
                   
                 to be saved. 
               
               
                 Return Value 
                 None. 
               
               
                   
               
             
          
         
       
     
     The MotionVariableMappingObj.GetMappingList method employs the following syntax, parameters, and return value to Retrieve a variable mapping enumerator. 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Syntax 
                 Function GetMappingList( strDomain as String ) As Object 
               
               
                 Parameters 
                 strDomain as String - name of the domain for which the 
               
               
                   
                 enumerator is to enumerate. When empty all variables are 
               
               
                   
                 enumerated. Currently the following domains are supported: 
               
               
                   
                 XMC - all variables mapped in the XMC Motion 
               
               
                   
                 Administrator. 
               
               
                   
                 user 124 - all user 124 mapped variables using the 
               
               
                   
                 Mapping API. 
               
               
                 Return Value 
                 Variable Enumerator. 
               
               
                   
               
             
          
         
       
     
     3. Driver Component Implementation 
     The function index and parameter signature for each function used by the variable support objects  130  will now be described in further detail. In particular, the parameter signature and function indices used by the various driver component  42  functions to implement the new variable support will now be discussed. 
     The MOTION_CNC_VARIABLE_READ function employs the following Index value and RgData values to read a mapped variable: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Index Value 
                 2870 
               
               
                 RgData[0] 
                 (in, string) mapped variable name. 
               
               
                 RgData[1] 
                 (in, out, number) max elements to read in, number read 
               
               
                   
                 out. 
               
               
                 RgData[2 . . . ] 
                 (out) data read 
               
               
                   
               
             
          
         
       
     
     The MOTION_CNC_VARIABLE_READ function employs the following Index value and RgData values to write a mapped variable: 
     
       
         
               
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 Index Value 
                 2871 
               
               
                   
                 RgData[0] 
                 (in, string) mapped variable name. 
               
               
                   
                 RgData[1 . . . ] 
                 (in) data to write. 
               
               
                   
                   
               
             
          
         
       
     
     The MOTION_CNC_VARIABLE_LIST_GET function employs the following Index value and RgData values to get the list of mapped values: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Index Value 
                 2872 
               
               
                 RgData[0] 
                 (in, string) domain (XMC, USER, empty) 
               
               
                   
                 XMC - all XMC variables mapped in Motion Admin. 
               
               
                   
                 USER - all user 124 variables mapped with Mapping 
               
               
                   
                 API. 
               
               
                   
                 empty - all variables (XMC + USER). 
               
               
                 RgData[1] 
                 NOT USED - (in, string) first variable to start the list. 
               
               
                 RgData[2] 
                 (in, out, number) max variables to query in, actual 
               
               
                   
                 number queried out. 
               
               
                 RgData[3 . . . ] 
                 (out, string) list of variable names. 
               
               
                   
               
             
          
         
       
     
     The MOTION_CNC_VARIABLE_ATTRIB_GET function employs the following Index value and RgData values to get the attributes describing a given mapped variable: 
     
       
         
               
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 Index Value 
                 2873 
               
               
                   
                 RgData[0] 
                 (in, string) mapped variable name. 
               
               
                   
                 RgData[1] 
                 (out, string) attributes of the variable. 
               
               
                   
                   
               
             
          
         
       
     
     The MOTION_CNC_VARIABLE_ADDMAPPING function employs the following Index value and RgData values to add a user  124  defined variable mapping. 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Index Value 
                 2850 
               
               
                 RgData[0] 
                 (in, string) variable name to be mapped. 
               
               
                 RgData[1] 
                 (in, string) variable mapping using the following format: 
               
               
                   
                 DOMAIN:VARNAME:VARPATH:VARWRITEFMT 
               
               
                   
                 DOMAIN - controller domain. 
               
               
                   
                 VARNAME - variable name on controller. 
               
               
                   
                 VARPATH - variable path (used for arrays and structures). 
               
               
                   
                 VARWRITEFMT - format of the variable data written to 
               
               
                   
                 HW. 
               
               
                   
               
             
          
         
       
     
     The MOTION_CNC_VARIABLE_REMOVEMAPPING function employs the following Index value and RgData values to remove a specific variable mapping: 
     
       
         
               
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 Index Value 
                 2851 
               
               
                   
                 RgData[0] 
                 (in, string) mapped variable name. 
               
               
                   
                   
               
             
          
         
       
     
     The MOTION_CNC_VARIABLE_REMOVEALLMAPPINGS function employs the following Index value and RgData values to remove all variable mappings: 
     
       
         
               
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 Index Value 
                 2852 
               
               
                   
                 No params 
               
               
                   
                   
               
             
          
         
       
     
     The MOTION_CNC_VARIABLE_MAPPINGCOUNT_GET function employs the following Index value and RgData values to get the number of variable mappings: 
     
       
         
               
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 Index Value 
                 2853 
               
               
                   
                 RgData[0] 
                 (out, number) number of variable mappings. 
               
               
                   
                   
               
             
          
         
       
     
     The MOTION_CNC_VARIABLE_MAPPING_GETAT function employs the following Index value and RgData values to get the variable mapping settings: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Index Value 
                 2854 
               
               
                 RgData[0] 
                 (in, number) variable mapping index to query. 
               
               
                 RgData[1] 
                 (out, string) variable name at the index specified. 
               
               
                 RgData[2] 
                 (out, string) variable mapping at the index specified. 
               
               
                   
               
             
          
         
       
     
     The MOTION_CNC_VARIABLE_MAPPING_SETAT function employs the following Index value and RgData values to change the settings of a variable mapping: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Index Value 
                 2855 
               
               
                 RgData[0] 
                 (in, number) variable mapping index. 
               
               
                 RgData[1] 
                 (in, string) variable name for the mapping at the index 
               
               
                   
                 (Cannot change from the original name, only used for 
               
               
                   
                 verification.) 
               
               
                 RgData[2] 
                 (in, string) new variable mapping for the variable. 
               
               
                   
               
             
          
         
       
     
     The MOTION_CNC_VARIABLE_LOAD_MAPPINGS function employs the following Index value and RgData values to load a set of variable mappings: 
     
       
         
               
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 Index Value 
                 2857 
               
               
                   
                 RgData[0] 
                 (in, string) name of the file to load. 
               
               
                   
                 RgData[1] 
                 (in, number, optional) flags for the load operation. 
               
               
                   
                   
               
             
          
         
       
     
     The MOTION_CNC_VARIABLE_SAVE_MAPPINGS function employs the following Index value and RgData values to save all variable mappings: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Index Value 
                 2856 
               
               
                 RgData[0] 
                 (in, string) name of the file where the mapping info is 
               
               
                   
                 saved. 
               
               
                 RgData[1] 
                 (in, number, optional) flags for the load operation. 
               
               
                   
               
             
          
         
       
     
     The MOTION_CNC_VARIABLE_VALIDATE_MAPPINGS function employs the following Index value to validate all variable mappings: 
     
       
         
               
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 Index Value 
                 2858 
               
               
                   
                 No params 
               
               
                   
                   
               
             
          
         
       
     
     The MOTION_CNC_SYSTEM_CONNECT function employs the following Index value and RgData values to connect to the controller: 
     
       
         
               
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 Index Value 
                 502 
               
               
                   
                 RgData[0] 
                 (in, number) channel (1.0, 2.0 or 3.0) 
               
               
                   
                   
               
             
          
         
       
     
     The MOTION_CNC_SYSTEM_DISCONNECT function employs the following Index value and RgData values to disconnect from the controller: 
     
       
         
               
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 Index Value 
                 503 
               
               
                   
                 RgData[0] 
                 (in, number) channel (1.0, 2.0 or 3.0) 
               
               
                   
                   
               
             
          
         
       
     
     The MOTION_CNC_DIRECT_VARIABLE_READ function employs the following Index value and RgData values to directly read from a variable on the controller: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Index Value 
                 2803 
               
               
                 RgData[0] 
                 (in, number) channel (1.0, 2.0 or 3.0) 
               
               
                 RgData[1] 
                 (in, string) domain name 
               
               
                 RgData[2] 
                 (in, string) variable name 
               
               
                 RgData[3] 
                 (in, string) variable path 
               
               
                 RgData[4] 
                 (in, number) data format 
               
               
                   
                 MOTION_VARFMT_STRING_DATA_AND_TYPE 
               
               
                   
                 (0x00000003) 
               
               
                   
                 MOTION_VARFMT_STRING_DATA (0x00000001) 
               
               
                   
                 MOTION_VARFMT_VARIANT (0x00000004) 
               
               
                 RgData[5 . . . ] 
                 (out) Data read from controller. 
               
               
                   
               
             
          
         
       
     
     The MOTION_CNC_DIRECT_VARIABLE_WRITE function employs the following Index value and RgData values to directly write to a variable on the controller: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Index Value 
                 2823 
               
               
                 RgData[0] 
                 (in, number) channel (1.0, 2.0 or 3.0) 
               
               
                 RgData[1] 
                 (in, string) domain name 
               
               
                 RgData[2] 
                 (in, string) variable name 
               
               
                 RgData[3] 
                 (in, string) variable path 
               
               
                 RgData[4] 
                 (in, number) data format 
               
               
                   
                 MOTION_VARFMT_STRING_DATA_AND_TYPE 
               
               
                   
                 (0x00000003) 
               
               
                   
                 MOTION_VARFMT_STRING_DATA (0x00000001) 
               
               
                   
                 MOTION_VARFMT_VARIANT (0x00000004) 
               
               
                 RgData[5] 
                 Number of items to write. 
               
               
                 RgData[6] 
                 Data write format for VARIANT type, otherwise the full 
               
               
                   
                 string containing data write format and comma delimited 
               
               
                   
                 data. 
               
               
                   
               
             
          
         
       
     
     The MOTION_CNC_DIRECT_VARIABLE_LIST_GET function employs the following Index value and RgData values to get the list of all variables directly from the controller: 
     
       
         
               
               
             
           
               
                   
               
             
             
               
                 Index Value 
                 2798 
               
               
                 RgData[0] 
                 (in, number) channel (1.0, 2.0 or 3.0) 
               
               
                 RgData[1] 
                 (in, string) domain name 
               
               
                 RgData[2] 
                 (in, string) variable name 
               
               
                 RgData[3] 
                 (in, number) data format 
               
               
                   
                 MOTION_VARFMT_STRING_DATA_AND_TYPE 
               
               
                   
                 (0x00000003) 
               
               
                   
                 MOTION_VARFMT_STRING_DATA (0x00000001) 
               
               
                   
                 MOTION_VARFMT_VARIANT (0x00000004) 
               
               
                 RgData[4] 
                 (in, number) Number of items to query. 
               
               
                 RgData[5 . . . ] 
                 (out, string) List of variable names. 
               
               
                   
               
             
          
         
       
     
     The MOTION_CNC_DIRECT_VARIABLE_ATTRIB_GET function employs the following Index value and RgData values to get the attributes of a variable directly from the controller: 
                                     Index Value   2799       RgData[0]   (in, number) channel (1.0, 2.0 or 3.0)       RgData[1]   (in, string) domain name       RgData[2]   (in, string) variable name       RgData[3]   NOT USED - (in, string) variable name       RgData[4]   NOT USED - (in, number) data format           MOTION_VARFMT_STRING_DATA_AND_TYPE           (0x00000003)           MOTION_VARFMT_STRING_DATA (0x00000001)           MOTION_VARFMT_VARIANT (0x00000004)       RgData[5]   (out, string) String containing the attributes.                    
B. Controller Independent Variables
 
     Currently, various methods of implementing variables are used within control technologies. Typically each vendor has a proprietary manner of specifying each variable and how it is accessed. The variable support system  120  may use what will be referred to herein as Independent Variables to facilitate access to any variable no matter how the variable is actually implemented by the control vendor. The Independent Variables may be independent of the particular hardware or software system used. The following discussion will describe an example design for controller neutral variables, including a description of all software modules involved. 
     Referring for a moment back to  FIG. 8 , the objects depicted therein are used (some optionally) when setting up and using controller independent variable mappings. Each of the objects depicted in  FIG. 8  will now be described in further detail. 
     The client software  122  is any software that uses the services of the motion component  40  to setup or use controller independent variable mappings. The client may access the motion component  40  via the automation layer  30 , the framework layer  32 , or directly where the client software  122  communicated directly with the motion component  40 . 
     The example automation layer  30  is provided for programming environments that support Microsoft OLE Automation. Several examples of such programming environments are Microsoft Visual Basic, applications that are VBA (Visual Basic for Applications) aware, the Visual Basic Scripting environment typically used in Internet/Web based HTML pages, and the new Microsoft .NET environment. 
     The framework layer  32  is provided for programming environments that use the C++ programming language. Microsoft&#39;s Visual Studio 6.0 is an example of such an environment. 
     The motion component  40  services all client requests for mapped variable configuration and usage. The motion component  40  may be accessed directly, such as by the framework layer  32 , or indirectly, such as through the automation layer  30 . When requested, the motion component  40  routes the request to the active driver component  42  and may be used with a plurality of driver components  42  in a multi control environment. 
     The driver component  42  implements the specific variable mapping for a specific controller technology. Each variable mapping is setup either programmatically or via the driver administrator component  128 . 
     The driver administrator component  128  is a user  124  application that allows the user  124  to visually configure each variable mapping for each controller dependent driver component  42 . All configurations made in the driver administrator component  128  can be done without any new software programming. 
     The user  124  is the a person who configured the variable mappings and/or a person who runs or otherwise uses client software that internally uses mapped variables. 
     Several examples of use cases will now be described to illustrate how the variable mapping model implemented by the system  120  may be used. In the examples discussed below, each driver component  42  is responsible for storing and performing any variable transformations between controller neutral and controller specific data. 
     Each variable mapping for each controller dependent driver component  42  may be mapped and/or otherwise configured in any one of several ways. The examples depicted in  FIGS. 10 and 11  describe how an end-user  124  would configure the variable mappings without any additional software programming. Such mappings are configured via a driver administrator  128  that allows the driver component(s)  42  to be configured. 
     Referring initially to  FIG. 10 , depicted therein is an example of a situation in which the user  124  configures variable mappings with an administrator component the driver administrator component  128 . When the user  124  configures variable mappings with the driver administrator  128 , the following steps take place:
         1. First the user  124  runs the driver administrator component  128  and selects the target driver component  42  for which variable mappings are to be configured.   2. For each target driver component  42 , the user  124  enters in the controller dependent information for each controller neutral variable name (or tag). To make the variable controller independent, the same variable name is used and configured within each driver component  42  associated with a controller so that when the variable is later used, the client software  122  using the variable has no need to know any controller dependent information about the mapping. Instead, the variable mapping takes place of the transformation from the controller independent variable name, type, and structure into the controller dependent variable name, type, and structure.   3. The mapping information specific to each driver component  42  is sent to the driver component  42 , which in-turn stores the information in a persistent form for later use.       

     Referring now to  FIG. 11 , depicted therein is an example of configuring variable mappings programmatically using either the motion component  40  or the driver administrator component  128 .  FIG. 11  illustrates that the following steps are performed when configuring the motion component  40  programmatically:
         1. First the client software  122  programmatically sends the variable mapping information to the motion component  40  either directly or via the framework layer  32  software layers. The motion component  40  is directed to configure the variable mapping for a specific driver component  42 .   2. If a framework layer  32  is used, the framework layer  32  relays the information for the variable mapping directly to the motion component  40 .   3. Upon receiving the request, the motion component  40  sends the variable mapping information to the target driver component  42 , which in turn saves the information for later use when the mapped variable is requested.       

     As an alternative, the motion component  40  may store the mapping information for each driver component  42  in a mapping database, thus relieving each driver component  42  from having to perform any mapping logic. When a variable is then requested, the motion component  40  would look-up the variable mapping and send the mapped controller dependent information associated with the variable to the target driver component  42 . The driver component  42  would then operate on the controller dependent information in a conventional manner. 
     Referring now to  FIG. 13 , depicted therein is an example of the system  120  using variable mappings. When using variable mappings, the controller independent variable name, type and structure are always used by the client software  122 , thus allowing for controller independent use. When the same variable name, type, and structure are configured across several controller dependent technologies, the variable mapping taking place between the controller independent variable information and the controller dependent variable creates the controller independent variable environment. 
       FIG. 12  illustrates that the following steps occur when using the system  120  to map variables:
         1. First the client software  122  programmatically requests an operation to occur on the variable (i.e. read, write, query attributes, etc).   2. The client software may communicate with the motion component  40  direct or via the framework layer  32  layers (which in-turn then communicates with the motion component  40 ).   3. Upon receiving the variable request, the motion component  40  routes the information directly to the driver component  42  (or driver components  42  in a multi controller environment).   4. Upon receiving the variable request each driver component  42  transforms the controller independent variable information into the controller specific variable information and then performs the variable operation(s) using the controller specific information. Upon receiving any controller specific data from the request (i.e. a read operation), the controller specific data received is then retransformed back into the controller neutral format and returned to the motion component  40 .   5. The driver component  42  communicates the request to the target controller, for which it is designed, using the controller specific variable name, format and structure.       
     Referring now to  FIGS. 13–15 , described therein is a variable support system  220  that is constructed and operates in a manner that is generally similar system  120  described above. However, in the system  220 , all mapping logic and storage is performed by the motion component  40 , making each driver component  42  easier and simpler to implement. The system  220  may be referred to as a ‘shared’ model for the mapping because the variable mapping services are implemented by the motion component  40  and shared among all driver components  42 . 
     Like the system  120 , the variable mapping/configuration model implemented by the system  220  may be implemented in several ways.  FIG. 13  and the following discussion describes how a user  124  can configure the variable mappings without any additional software programming. Such mappings are configured via the driver administrator component  128 . When the user  124  configures variable mappings using the driver administrator component  128 , the following steps are performed:
         1. First the user  124  runs the driver administrator component  128  and selects the target driver component  42  for which variable mappings are to be configured.   2. For each target driver component  42 , the user  124  enters in the controller dependent information for each controller neutral variable name (or tag). To make the variable controller independent, the same variable name is used and configured within each driver component  42  associated with a controller so that when the variable is later used, the client software  122  using the variable has no need to know any controller dependent information about the mapping. Instead, the variable mapping takes place of the transformation from the controller independent variable name, type, and structure into the controller dependent variable name, type, and structure.   3. The mapping information specific to each driver component  42  is sent to the motion component  40  which in turn stores the information in a persistent form for later use.       

       FIG. 14  illustrates how variable mappings may also be configured programmatically using the motion component  40 . When configuring each variable mapping programmatically, the following steps are performed:
         1. First the client software  122  programmatically sends the variable mapping information directly to the motion component  40  through the framework layer  32 . The motion component  40  is directed to configure the variable mapping for a specific driver component  42 .   2. If the framework layer or layers  32  are used, the framework layer(s) relay the information for the variable mapping directly to the motion component  40 .   3. Upon receiving the request, the motion component  40  saves the information for later use when the mapped variable is requested.       
     When using the variable mappings, the client software  122  may use the controller independent variable name, type, and structure to allow for controller independent use. As will be described below with reference to  FIG. 16 , when the same variable name, type and structure are configured across several controller dependent technologies, the variable mapping taking place between the controller independent variable information and the controller dependent variable creates the controller independent variable environment.  FIG. 16  shows that the following steps are performed when using mapped variables:
         1. First the client software  122  programmatically requests an operation to occur on the variable (i.e. read, write, query attributes, etc).   2. The client software may communicate with the motion component  40  direct or via the framework layer  32  layers, which in turn communicate with the motion component  40 .   3. Upon receiving the variable request, the motion component  40  looks up the controller neutral name in a variable mapping database, making sure to collect the controller specific information for the given mapping and target driver component(s)  42 . Once collected, the controller specific variable information is routed directly to the driver component  42  (or driver components  42  in a multi controller environment).   4. Upon receiving the variable request each driver component  42  may optionally verify the controller specific information.   5. Next the driver component  42  communicates the request to the target controller, for which it is designed, using the controller specific variable name, format and structure.       

     The controller neutral model of supporting variables may be applied to a number of different technologies in a number of different environments. Several example environments will be described below. 
     Industrial Automation, which refers to the automation of factory or workplace processes, uses variable based information extensively. In the following discussion, the application of the variable support systems will be briefly described in the context of the following Industrial Automation technologies: General Motion Control, CNC Motion Control, Robotic Control, Cell Control, and PLC Control. 
     General Motion Controllers (both software and hardware) are used for various motion based applications in a wide range of industries. For example, in the semiconductor industries, General Motion Controllers drive many of the pick-n-place and vision inspection machines. Each of the General Motion Control technologies is implemented with proprietary vendor specific technologies and most expose variables in some proprietary format. The control neutral model would allow for variables from any General Motion Control technology, regardless of vendor or implementation. The client software  122  thus is provided with a consistent system for accessing variable information from each target controller platform. 
     Computer Numeric Controls (CNC) are used by a wide range of machines in the metal fabrication industries. Each CNC controller supports a variant of the RS274 (G&amp;M Code) language that usually makes the language supported a proprietary version of the original standard. Because the RS274 standard does not address variables, variables are typically handled as a proprietary extension to the RS274 standard, which the extension only works on the control technology for which it is implemented. The control neutral variable model of the present invention greatly improves upon the proprietary technologies by normalizing all variables across the various proprietary control technologies. A variable support system constructed in accordance with the present invention allow improved integration and information flow in enterprise wide systems such as data collection, analysis, and resource planning systems. 
     Robotic Controllers are similar to general motion controllers in that each Robotic Controller typically employs a proprietary technologies defined by the vendor of the particular Controller. A controller neutral variable support system implemented using the principles of the present invention improves upon proprietary systems by defining a generic system for accessing, manipulating, and configuring variable based information on Robotic Controllers. 
     A Cell Controller is a system (typically a Personal Computer) that directs the functionality of several controlled machines. The controlled machines, whether from the same vendor or from various vendors, each can implement a different manner of accessing, configuring, and using variables. A controller neutral variable support system of the present invention can simplify the process of implementing a Cell Controller that encompasses a variety of controlled machines using different control technologies. 
     PLC Controllers typically use variables (or tags) to access virtually all portions of their address space. A controller neutral variable support system of the present invention yields an advantage when applied to PLC Controllers because each PLC vendor typically implements their tags and variables in different proprietary ways. 
     In addition to Industrial Automation, the principles of the present invention may be used in what is referred to as Consumer Automation. Although the Consumer Automation industry is not yet mature, it is anticipated that the Consumer Automation industry will, like the Industrial Automation industry, face problems with proprietary controllers. A controller neutral variable support system of the present invention will in the future provide many of the same benefits in the Consumer Automation industry as are currently provided in the Industrial Automation industry.