Home
PECS User Guide
Contents
1. Figure 10 Adding a Standalone Executable Process to the Pipeline Running standalone executables is slightly different than for all other client applications in that they are not activated using ActiveX Select the executable you wish to run by typing its name in the Executable edit box or click browse and locate it In addition any required command lines arguments required should be typed in the Input Arguments edit box as they would be typed at the DOS command line For example it would be possible to run the example MATLAB script using this option by selecting the executable Matlab bin win32 MATLAB exe and entering the input arguments r lt Vicon Path gt Plugins Example m 3 1 5 Debugging The Run PECS in DEBUG Mode switch on the main Plug In options Client Code allows client applications to be run in their native debug mode In this mode of operation the Plug In launches the PECS server and waits for the client process to connect to PECS and then stops processing when the client process releases PECS To debug the example Excel VBA macro for example anh Open a trial or select a single trial in the Eclipse window Open the PECS Plug In options from the pipeline Click Run PECS in DEBUG Mode and then OK Click Process Now on the pipeline pane The PECS server will then be launched and awaits connection from the client application 5 Open Example xls On the Tools menu click Macro and then click Vi
2. Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT DeleteAllUnlabelledTrajectories NONE NONE Deletes all trajectories from the trial that do not have an assigned label HRESULT DeleteTrajectory in long i_Index NONE long i_Index Trajectory index Deletes the trajectory at the given index 0 GetTrajectoryCount 1 Note that this will change the index values of all trajectories with a higher index When deleting multiple trajectories either adjust the indexes as each trajectory is deleted delete them in descending order of index so that they remain valid or re compute the index values each time for example using the FindTrajectorylndex function HRESULT Description out retval BSTR retval BSTR NONE Description Returns the description of the trial in the form of a text string This is the description that is typed into the Directory window HRESULT EclipseNode out retval EclipseNode retval EclipseNode NONE Eclipse node interface Obtains the eclipse node for this trial in the form of an EclipseNode interface Call Release on this object when it is no longer required HRESULT EventStore out retval EventStore retval EventStore Data path NONE Obtains the event store for this trial in the form of an EventStore
3. Empties the trajectory of all points and leaves it in a deselected state 4 11 3 FindGapAt Declaration HRESULT FindGapAt inJlong i_SearchField out retval JRange retval Return type Range Range of the found gap Parameters longi _SearchField Field to effect the search at Description Tests whether there is a gap at a given field in the trajectory without searching elsewhere If the point at the specified field is invalid the start and end of the gap are determined and the returned Range object will have a size of greater than zero Otherwise the returned range will have zero size to signify that there is no gap at that field Call Release on the returned object when it is no longer required Note that the start and end fields represent the bounds of the gap and by definition the points at those fields will both be invalid NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Trajectory VICON MOTION SYSTEMS 4 11 4 FindGap Declaration Backward Return type Parameters Description 4 11 5 FindGap Declaration Forward Return type Parameters Description HRESULT FindGapBackward in long i_SearchFrom inJlong i_lgnoreValidLen out retval Range retval Range Range of the found gap long i_SearchFrom Field number to start search from long i_IgnoreValidLen Valid fields ignored within gap Searches backward through the trajectory starting from
4. Searches for a subject in the trial that matches the given label prefix returning it as a pointer to a subject interface Typically each subject in a multiple subject trial has a unique label prefix based on the subject name In case of conflicts where this is not the case this function returns the first match found If no matching subject can be found the server throws an exception Call Release on the object when it is no longer required HRESULT FindTrajectory inJBSTR i_Label out retval Trajectory retval Trajectory BSTR i Label Trajectory interface Label of trajectory to find Searches for a trajectory in the trial that matches the given label returning it as a pointer to a trajectory interface The full label must be provided including any subject prefix or other modifier In case of conflicts where more than one trajectory matches the label this function returns the first one found If no matching trajectory can be found the server throws an exception Call Release on the object when it is no longer required NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Trial VICON MOTION SYSTEMS 4 12 19 FindTrajectory Index 4 12 20 FirstValid TrajectoryFieldNum 4 12 21 ForcePlate 4 12 22 ForcePlateCount Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type P
5. To select a MATLAB script m file for processing either type the full path and name in the MATLAB Script edit box or click browse and locate it The Launch MATLAB in Single Use Mode check box allows evaluation of the MATLAB script s in an open automation MATLAB application When processing is complete MATLAB will remain open and will require the user to Release Client Applications once all operations in MATLAB have been completed LabVIEW The options for a LabVIEW Virtual Instrument are shown below in Figure 9 xi Virtual Instrument JV Launch LabVIEW in Single Use mode Cancel Figure 9 Adding a LabVIEW Process to the Pipeline To select a Virtual Instrument vi file for processing either type the full path and name in the Virtual Instrument edit box or click browse and locate it The Launch LabVIEW in Single Use Mode allows batch processing to run a Virtual Instrument in LabVIEW whilst leaving it open When batch processing is complete LabVIEW will remain open Operating in single use mode requires the user to Release Client Applications once batch processing is complete NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 USING THE AUTOMATION SERVER VICON MOTION SYSTEMS Standalone Executables The options for a standalone executable client process are shown below in Figure 10 Executable Options x Executable j Input Arguments Cancel
6. MOTION SYSTEMS 4 7 20 SectionName 4 7 21 4 7 22 SetColour SetBoolean Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT SectionName inJlong i_Index out retval BSTR retval BSTR Section name long i_Index Section index Obtains the name of the section in the form of a text string HRESULT Boolean inJBSTR i_Section inJBSTR i_Parameter in long i_Index inJBOOL i_Value NONE BSTR 1 Section BSTR 1_Parameter long i_Index BOOL i Value Section name Parameter name Value index New parameter value Sets the requested parameter value as a boolean The zero based value index must be calculated by transforming the parameter dimensions into a single dimensional array where the first dimension in a multi dimensional array represents the least significant i e the one that changes most often For example in the two dimensional 3 by 4 3 4 array the values are indexed 0 2 0 3 The storage order for terms is 0 0 1 0 2 0 0 1 etc So the index for element 1 2 willbe 2 4 1 9 For single value parameters the index will always be 0 You can determine the dimensionality of a parameter using the GetDimensions method HRESULT Colour inJBSTR i_Section inJBSTR i_Parameter in long i_Index UINT a_Index in Colour i_Colour NONE BSTR 1
7. Obtains the number of force plates defined for the trial NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON Trial MOTION SYSTEMS 4 12 23 IsStatic Declaration HRESULT IsStatic out retvalIBOOL retval Return type BOOL Is static flag Parameters NONE Description Returns S_TRUuE if the trial has been marked as static otherwise S_FALSE Static is used to indicate that the measurement subject remained still for the whole duration of the trial 4 12 24 LastValid Declaration HRESULT LastValidTrajectoryFieldNum out TrajectoryFieldNum retval long retval Return type long Last valid field number Parameters NONE Description Obtains the inclusive field number of the last occurrence in the trial of valid trajectory data Returns 1 if no valid trajectory data exists Note that this latter case may occur if the trajectory count is not zero but the trajectories that do exist contain no valid point data 4 12 25 Notes Declaration HRESULT Notes out retval BSTR retval Return type BSTR Notes Parameters NONE Description Returns the notes for the trial in the form of a text string These are the notes that are typed into the Directory window 4 12 26 Parameter Declaration HRESULT ParameterStrore out Store retval ParameterStore retval Return type ParameterStore Data path Parameters NONE Description Obtains the event store for this trial in the form
8. retval Return type Trial Trial interface Parameters Trial i_pTrial New trial interface Description Sets and Gets the currently attached Trial interface Call Release on the object when it is no longer required NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON Processor MOTION SYSTEMS 4 9 Processor Base Dispatch interface Include file ServerPl h Typelib file PECS tlb Availability PECS 1 0 Workstation 4 5 with SDK 2 0 Description An interface to the object representing the processor in pipeline processing This simple interface is provided to allow feedback to users during processing Methods 1 Log 2 SetStatusMessage Properties 4 9 1 Log Declaration HRESULT Log inJBSTR i_Text inJBOOL i_OnNewLine Return type NONE Parameters BSTRi_ Text Text to log BOOL 1_OnNewLine Force new line or not Description Logs an event and associates the given text with it The results in an entry being made to the log file and also to the processing log window If i_OnNewLine is TRUE non zero then the text is forced onto a new line in the log with a time stamp automatically added to the start of the text Typically this is used by processes such that a Working message is logged on a new line and when processing is complete a further Results string is logged but not on a new line producing 09 37 05 Working Results in the log 4 9 2 ree Declaratio
9. The storage order for terms is 0 0 1 0 2 0 0 1 o So the index for element 1 2 will be 2 4 1 For single value i the index will always be 0 You can determine the dimensionality of a parameter using the GetDimensions method HRESULT Colour inJBSTR i_Section inJBSTR i_Parameter in long i_Index UINT a_Index out retval Colour retval Return type Colour Parameter value Parameters BSTR i Section Section name BSTR i_Parameter Parameter name long i_Index Value index Description Obtains the requested colour parameter as a Colour interface object Call Release on the returned object when it is no longer required See Boolean for a description of how to calculate the value index HHH At the time of writing this function is not implemented in Workstation software HHH NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 ParameterStore VICON MOTION SYSTEMS 4 7 13 GetDateTime 4 7 14 GetDimension Count 4 7 15 GetDimension Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT DateTime inJBSTR i_Section inJBSTR i_Parameter in long i_Index out retval DATE retval DATE Parameter value BSTR 1 Section BSTR 1 Parameter long i_Index DATE i Value Section name Parameter name Value index New parameter val
10. V1 0 Revision 008 ALPHABETIC INTERFACE REFERENCE VICON MOTION SYSTEMS 4 ALPHABETIC INTERFACE REFERENCE All of the interface declarations in this section are for the Dual Interfaces and the Interface Description Language is used Although the return value of all of the functions is technically a standard COM return value HRESULT the return values in the method and property descriptions are those specified as out retval output returned value The exact syntax for calling methods and properties will differ between client applications and is covered in the Sample Code section 4 1 Base interface Include file Typelib file Availability Description Methods Properties 4 1 1 AnalogTo VideoRatio Declaration AnalogChannel IDispatch ServerPI h PECS tlb PECS 1 0 Workstation 4 5 with SDK 2 0 Represents the stream of data from a single analog channel This interface is rarely implemented by plug ins but instead plug ins typically obtain a pointer to an analog channel object through other means such as from a trial object see ITrial interface 1 oo aoe a 11 12 AnalogToVideoRatio BaseRateDivider FirstSampleNum GetSample GetSamples LastSampleNum SampleRate SetSample SetSamples Units MatchesLabel Label HRESULT AnalogToVideoRatio out retval Ratio retval NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 AnalogC
11. gt PECS USER GUIDE V1 0 Revision 008 VICON CONTENTS MOTION SYSTEMS 4 1 11 MatchesLabel 30 4 1 12 Label 31 4 2 EclipseNode 32 4 2 1 DataPath 32 4 2 2 NodelD 32 4 2 3 Title 33 4 2 4 GetBoolean Attribute 33 4 2 5 GetDateAnd TimeAttribute 33 4 2 6 Getinteger Attribute 33 4 2 7 GetRealAttribute 34 4 2 8 GetTextAttribute 34 4 2 9 SetBoolean Attribute 34 4 2 10 SetDateAnd TimeAttribute 34 4 2 11 Setinteger Attribute 35 4 2 12 SetRealAttribute 35 4 2 13 SetTextAttribute 35 4 3 Event 36 4 3 1 Clone 36 4 3 2 IsGeneric 36 4 3 3 Context 37 4 3 4 Description 37 4 3 5 IconID 37 4 3 6 Label 37 4 3 7 SubjectName 38 4 3 8 Time 38 4 4 EventContext 39 4 4 1 Colour 39 4 4 2 Description 39 4 4 3 Icon ID 40 4 4 4 Label 40 4 5 EventStore 41 4 5 1 AddEvent 41 45 2 Event 41 4 5 3 EventContext 42 4 5 4 EventContext Count 42 4 5 5 EventCount 42 4 5 6 RemoveE vent 42 4 5 7 RemoveEventAt 42 4 6 ForcePlate 43 4 6 1 AnalogToVideo Ratio 43 4 6 2 CenterOfPressure 43 4 6 3 Corners 44 4 6 4 FirstSampleNum 44 4 6 5 ForceUnits 44 4 6 6 GetCentreOf Pressures 44 NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 CONTENTS VICON MOTION SYSTEMS 4 6 7 4 6 8 4 6 9 4 6 10 4 6 11 4 6 12 4 6 13 4 7 4 7 1 4 7 2 4 7 3 4 7 4 4 7 5 4 7 6 4 7 7 4 7 8 4 7 9 4 7 10 4 7 11 4 7 12 4 7 13 4 7 14 4 7 15 4 7 16 4 7 17 4 7 18 4 7 19 4 7 20 4 7 21 4 7 22 4 7 23 4 7 24 4 7 25 4 7 2
12. 0 Workstation 4 5 with SDK 2 0 Description Event objects represent single time events within a trial An example of an event is a foot strike against the floor during a walking trial Every event must belong to an associated context which might relate to a particular side left or right of the body for example Methods 1 Clone 2 IsGeneric Properties 3 Context 4 Description 5 Icon 6 IconID 7 Label 8 SubjectName 9 Time 4 3 1 Clone Declaration HRESULT Clone in EventContext i_pContext out retval Event retval Return type Event Created event Parameters EventContext i_Context Pointer to context to create event in Description Creates a new event as an exact copy of the event to which this is applied but places it in the given context which may differ from the original event Call Release on the returned object when it is no longer required This method is mostly used by applications with an interactive user interface for manually creating events from a palette or from existing events It may also be used by autocorrelation software for creating new events based on existing events 4 3 2 IsGeneric Declaration HRESULT IsGeneric out retvalJBOOL retval Return type BOOL Flag for generic event Parameters NONE Description Returns TRUE if the event is a generic one or FALSE if it corresponds to a specific and well defined event Generic events are like user defined events with editable labels and description
13. Class Wizard 1 Open the class wizard by right clicking in the workspace and selecting Class Wizard 2 Click Add Class and Select From Type Library 3 Browse for PECS TLB which should be in your Vicon Workstation folder 4 Select the interface classes you wish to use from the class list enter the name of the cpp and h file you wish to use and click OK Note The list of interface classes shown on the type library import dialog reflects both parts of the dual interface provided by PECS Depending on user requirements it is likely that only one of the interface definitions will be needed For example IPECSDoc and IDualPECSDoc will be listed but it will most likely only be necessary to select ITPECSDoc for wrapping This interface structure is introduced in Section 3 3 The PECS server can be incorporated into your Microsoft Visual J project using automatically created class wrappers that provide the interface for accessing the ActiveX interfaces These class wrappers will be added to packages in your project directory To insert the PECS object in the development environment 1 On the Project menu click Add COM Wrapper to display the COM Wrappers dialog box 2 If the server has been registered PECS should appear in the list of COM objects 3 If the server has not been registered click Browse and search for PECS TLB which should be in your Vicon Workstation folder 4 Check the PECS entry in the COM objects
14. Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT CreateTrajectory out retval Trajectory retval Trajectory NONE Trajectory interface Creates an empty new trajectory in the trial returning it as a Trajectory interface Call Release on the object when it is no longer required HRESULT DataPath out retval BSTR retval BSTR NONE Data path Returns the trial data path in the form of a text string HRESULT DateAndTime out retval JDATE retval DATE NONE Date and time Obtains the date and approximate time that the trial was captured as a standard COM DATE type This is a floating point number which represents days as whole number increments starting from midnight 30 December 1899 HRESULT DefaultMarkerSize out retval double retval double NONE Default marker size Returns the default size for markers in millimetres mm This is the size assigned to new trajectories HRESULT DeleteAllTrajectories NONE NONE Deletes all trajectories from the trial NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Trial VICON MOTION SYSTEMS 4 12 9 DeleteAll Unlabelled Trajectories 4 12 10 DeleteTrajectory 4 12 11 Description 4 12 12 EclipseNode 4 12 13 EventStore Declaration Return type Parameters Description
15. Force units Parameters NONE Description Returns the force units for the force plate in the form of a text string 4 6 6 GetCentreOf Declaration HRESULT GetCenterOfPressures in long Pressures i_FirstSample in long i_LastSample out retval JVARIANT retval Return type VARIANT 3 x N array of co ordinates Parameters long i _FirstSample Range begin field number long i_LastSample Range end field number Description Obtains the center of pressure for the force plate over the specified one based sample range inclusive of last sample as a 3 x N array NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON ForcePlate MOTION SYSTEMS 4 6 7 GetForces Declaration HRESULT GetForces in long i_FirstSample in long i_LastSample out retval VARIANT retval Return type VARIANT 3 x N array of co ordinates Parameters long i _FirstSample Range begin field number long i_LastSample Range end field number Description Obtains the force for the force plate over the specified one based sample range inclusive of last sample as a 3 x N array 4 6 8 GetMoments Declaration HRESULT GetMoments in long i_FirstSample in long i_LastSample out retval VARIANT retval Return type VARIANT 3 x N array of co ordinates Parameters long i FirstSample Range begin field number long i_LastSample Range end field number Description Obtains the moment for the force plate over the specified one based s
16. Subject 35 SubjectCount 36 Trajectory 37 TrajectoryCount 38 TrajectoryT ypeGroupCount 39 TrajectoryT ypeGroupName 40 TrajectoryTypeGroupUnits 41 Type 42 UsesLabelPrefixes 43 VideoFieldCount 44 VideoRate HRESULT AnalogBaseRate out retval double retval double NONE Analog base rate Returns the base sample rate of the trial analog data in Hz Individual analog channels may be sampled at a sub multiple of this rate according to the base rate divider for that channel HRESULT AnalogChannel in long i_Index ot retval AnalogChannel retval AnalogChannel Analog channel interface long i_Index Zero based channel index Obtains the specified analog channel as a pointer to an interface Call Release on the object when it is no longer required If the requested analog channel index is out of range the server throws an exception Use AnalogChannelCount to get the number of analog channels present HRESULT AnalogChannelCount out retval long retval long Channel count NONE Obtains the number of analog channels in the trial NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Trial VICON MOTION SYSTEMS 4 12 4 CreateTrajectory 4 12 5 DataPath 4 12 6 DateAndTime 4 12 7 DefaultMarker Size 4 12 8 DeleteAll Trajectories Declaration Return type Parameters Description Declaration Return type Parameters Description
17. an associated title This is typically the base name for associated files Use this method to retrieve the title of the node in the form of a text string 4 2 4 GetBoolean Declaration HRESULT BooleanAttribute inJ BSTR i_Name out Attribute retval BOOL retval Return type BOOL Attribute boolean value Parameters BSTRi Name Attribute name Description Obtains the value of the specified attribute as a boolean If the attribute has not been set or is not a Boolean then the server will throw an exception 4 2 5 _GetDateAnd Declaration HRESULT DateAndTimedAttribute inJBSTR i_Name TimeAttribute out retval JDATE retval Return type DATE Attribute date structure Parameters BSTRi Name Attribute name Description Obtains the value of the specified attribute as a set of date and time values If the attribute has not been set or does not contain date and time information then the server will throw an exception The date is a standard COM DATE type This is a floating point number which represents days as whole number increments starting from midnight 30 December 1899 4 2 6 GetInteger Declaration HRESULT IntegerAttribute inJBSTR i_Name Attribute out retval long retval Return type long Attribute integer value Parameters BSTRi Name Attribute name Description Obtains the value of the specified attribute as a long integer If the attribute has not been set or cannot be converted to an integer then the server will throw an ex
18. calculated rather than measured from a marker then the count will be zero NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Reconstruction VICON MOTION SYSTEMS 5 6 3 5 6 4 IsValid Residual 565 X 566 Y 56 7 2 Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT IsValid out retval BOOL retval BOOL NONE Valid flag for this point Indicates if there is valid data for this reconstruction HRESULT Residual out retval double retval double NONE Reconstruction residual Returns the residual for reconstruction propput HRESULT X in double i_Value propget HRESULT X out retval double retval double double i_Value X value New X value Returns the X component of the reconstruction propput HRESULT Y in double i_Value propget HRESULT Y out retval double retval double double i_ Value Y value New Y value Returns the Y component of the reconstruction propput HRESULT Z in double i_Value propget HRESULT Z out retval double retval double double i_ Value Z value New Z value Returns the Z component of the reconstruction NAVIGATION lt gt PECS USER GUI
19. i_Index out retval Trajectory retval Trajector Trajectory interface J y J y long i_Index Zero based trajectory index Obtains the specified trajectory as a pointer to a trajectory interface Call Release on the object when it is no longer required If the trajectory index is out of range the server throws an exception Use TrajectoryCount to get the number of trajectories present HRESULT TrajectoryCount out retval long retval long Trajectory count NONE Obtains the number of 3 dimensional point trajectories in the trial HRESULT TrajectoryTypeGroupCount out retval long retval long Type group count NONE Obtains the number of defined type groups for trajectories See RegisterTrajectoryT ypeGroup for more details HRESULT TrajectoryTypeGroupName in long i_Index out retval BSTR retval BSTR Group name long i_Index Type group index Obtains the name of the trajectory type group given by index See RegisterTrajectoryTypeGroup for more details NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Trial VICON MOTION SYSTEMS 4 12 40 TrajectoryType GroupUnits 4 12 41 Type 4 12 42 UsesLabel Prefixes 4 12 43 VideoFieldCount 4 12 44 VideoRate Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return
20. interface Call Release on this object when it is no longer required NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Trial VICON MOTION SYSTEMS 4 12 14 Execute Declaration Return type Parameters Description 4 12 15 FindAnalog Declaration Channel Return type Parameters Description HRESULT Execute inJBSTR i_Instruction inJBSTR i_Parameters out retval BOOL retval BOOL Success flag BSTR i Instruction Instruction to execute BSTR i_Parameters Parameters to instruction Executes the given instruction on the trial and or application The parameters must be supplied in textual form as a semicolon separated list Leading and trailing white space space or tab characters will be ignored for each parameter Textual string parameters may optionally be enclosed in quotes to allow the inclusion of semicolon characters or leading and trailing white space in the string The return value will depend on the particular instruction but typically TRUE will be returned for success or FALSE will be returned if the instruction could not be executed The following instructions are supported in Vicon Workstation Version Instruction Parameters 3 0 CheckLicence ProgramID Version D FamilyID 3 0 ResetForcePlateOffsets none 3 0 Defragment none HRESULT FindAnalogChannel inJBSTR a_pLabel out retval JAnalogChannel retval AnalogChannel A
21. main Plug In Options dialog This will open the information dialog shown in Figure 13 PECS Plug In x PECS Plug In Vicon Plug In DLL Server Version 1 0 Build 06 Copyright C 2003 OMG Pic All rights reserved Figure 13 Plug In Version Dialog Clicking the Server button will show the PECS server information dialog shown in Figure 15 When processes are run in Single Use mode after processing the Release Client Applications button will become enabled This is because the Plug in still owns an ActiveX interface for the client process s Clicking the Release Client Applications button causes these interfaces to be released In the case of MATLAB this will close the open MATLAB workspace but all other applications will remain open NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 USING THE AUTOMATION SERVER V CON MOTION SYSTEMS 3 2 Server Options When the PECS server is in operation it will be displayed on top of all other open windows on your desktop as shown in Figure 14 io x File Help Processor Interface Trial Interface Not Connected Connections fo Figure 14 Server Dialog The majority of information displayed on the PECS server is for information only Processor Interface This indicates whether there is a connection between the PECS server and the Workstation processor The Processor interface is the interface that writes m
22. prefix in the form of a text string This prefix is used on trajectories to associate the trajectory wit the subject NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Subject VICON MOTION SYSTEMS 4 10 3 MarkerSetName 4 10 4 ModelName 4 10 5 ModelParams Name 4 10 6 Name 4 10 7 SetLabel PrefixUsage Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT MarkerSetName out retval BSTR retval BSTR NONE Marker set name Returns the name of the marker set file in the form of a text string The name may or may not include a full path and file extension HRESULT ModelName out retval BSTR retval BSTR NONE Model name Returns the name of the model file in the form of a text string The name may or may not include a full path and file extension HRESULT ModelParamsName out retval BSTR retval BSTR NONE Model params name Returns the name of the model parameters file in the form of a text string The name may or may not include a full path and file extension HRESULT Name out retval BSTR retval BSTR NONE Subject name Returns the subject name in the form of a text string HRESULT SetLabelPrefixUsage in
23. process These interfaces are set internally by Workstation or a Workstation Plug In VPI by instantiating concrete objects and passing their IDispatch interfaces Methods 1 CapabilityFlags 2 ConnectionCount 3 Execute 4 Modeller 5 Refresh 6 SupportsCapabilityAll 7 SupportsCapabilitySome Properties 8 Trial 9 Processor 10 RefCounter 4 8 1 CapabilityFlags Declaration HRESULT CapabilityFlags in Jlong i_FlagSet out retval DWORD retval Return type DWORD Capability mask Parameters longi FlagSet Flag to check for capability Description Obtains the bit mask for Workstation capabilities based on the index flag 4 8 2 ConnectionCount Declaration HRESULT ConnectionCount out retval long Return type long Connection count Parameters NONE Description Gets the number of processes currently holding a PECS interface Calling Release on any PECS interface will cause this to reduce by 1 The server should automatically close down when this count reaches 0 NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION PECS VICON MOTION SYSTEMS 4 8 3 4 8 4 4 8 5 Execute Refresh Supports CapabilityAll Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description STDMETHOD Execute THIS_ LPCSTR a_plnstruction LPCSTR a_pParameters NONE in Instruct
24. section with the given name to store an array of colour values Colours are stored as RGB triplets so the created array will actually have an extra dimension of size 3 but this should not be accounted for in the dimension parameters passed NAVIGATION lt gt E PUBLICATION PECS USER GUIDE V1 0 Revision 008 VICON ParameterStore MOTION SYSTEMS 4 7 5 CreateDate Declaration HRESULT CreateDateTimeArray in BSTR i_Section TimeArray inJBSTR i_Parameter in short i_Dimensions in short i_pDimensionArray Return type NONE Parameters BSTR i Section Section name BSTR 1_Parameter Parameter name short i_ Dimensions Number of array dimensions short i pDimensionArray Array of dimension values Description Creates a parameter in the given section with the given name to store an array of date and time values Date and time values are stored as Year Month Day Hour Minute and Second sets so the created array will actually have an extra dimension of size 6 but this should not be accounted for in the dimension parameters passed 4 7 6 Createlnteger Declaration HRESULT CreatelntegerArray inJBSTR i_Section Array inJBSTR i_Parameter in short i_Dimensions in short i_pDimensionArray Return type NONE Parameters BSTR i Section Section name BSTR i_Parameter Parameter name short i_ Dimensions Number of array dimensions short i pDimensionArray Array of dimension values Description Creates a parameter in
25. the specified field looking for gaps consisting of invalid points Groups of consecutive valid points shorter or equal to IgnoreValidLen will be treated as part of the gap Set this parameter to zero to find true gaps where all points within are invalid If a gap is found the returned Range object will have a size of greater than zero Otherwise the returned range will have zero size Call Release on the returned object when it is no longer required Note that the start and end fields represent the bounds of the gap and by definition the points at those fields will both be invalid To find the previous gap start the search from the start field of the found gap minus one HRESULT FindGapForward in long i_SearchFrom inJlong i_lgnoreValidLen out retval Range retval Range Range of the found gap long i_SearchFrom Field number to start search from long i_IgnoreValidLen Valid fields ignored within gap Searches forward through the trajectory starting from the specified field looking for gaps consisting of invalid points Groups of consecutive valid points shorter or equal to IgnoreValidLen will be treated as part of the gap Set this parameter to zero to find true gaps where all points within are invalid If a gap is found the returned Range object will have a size of greater than zero Otherwise the returned range will have zero size Call Release on the returned object when it is no longer required Note that the s
26. type Parameters Description Declaration Return type Parameters Description HRESULT TrajectoryTypeGroupUnits inJBSTR i_Name out retval BSTR retval BSTR BSTR1i_Name Type group units Type group name Obtains the units of the trajectory type group given by name Units are normally the abbreviated SI form See RegisterTrajectoryTypeGroup for more details HRESULT Type out retval BSTR retval BSTR Type NONE Returns the trial type in the form of a text string HRESULT UsesLabelPrefixes out retval BOOL retval BOOL NONE Uses label prefix flag Returns TRUE if label prefixes are in use in the trial else FALSE HRESULT VideoFieldCount out retval long a_pCount long Field count NONE Obtains the number of fields allocated for the trial This is normally the extent of the captured data but may be truncated Processed 3D data may not necessarily exist for the full duration of the trial HRESULT VideoRate out retval double rate double NONE Video rate Returns the sample rate of the trial video data in Hz NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON Colour MOTION SYSTEMS 5 ADDITIONAL UTILITY INTERFACES 5 1 Colour Base Dispatch interface Include file ServerPI h Typelib file PECS tlb Availability PECS 1 0 Workstation 4 5 with SDK 2 0 Description This interface provides a simple RGB colour implementation for setting an
27. 3 799 8686 Tel 44 0 1865 261800 Fax 1 949 472 9136 Fax 1 303 799 8690 Fax 44 0 1865 240527 Vicon Motion Systems is an OMG Plc company Email support vicon com Web _ http Awww vicon com NAVIGATION PUBLICATION gt PECS USER GUIDE V1 0 Revision 008 CONTENTS VICON MOTION SYSTEMS 1 INTRODUCTION AND REQUIREMENTS eee 2 INSTALLING THE PECS SERVER eeen 2 1 Installation and Registration 2 2 Installing the Server in Client Applications 2 2 1 Microsoft Office Products 2 2 2 Visual Basic 2 2 3 Microsoft Visual C 2 2 4 Microsoft Visual J 2 2 5 MATLAB 2 2 6 LabVIEW 3 USING THE AUTOMATION SERVER Plug In Options Using Options Files Managing the Pipeline Adding Processes to the Pipeline Process Options Debugging Client Code Settings Product Version Information Releasing Client Applications 3 2 Server Options k a a ee a ae ee a CNMAORWDH a 3 3 Writing Client Processes using the ActiveX Interface 3 3 1 The DUAL ActiveX Interface 3 3 2 Features not for External Use 3 4 Sample Code 3 4 1 Visual Basic and VBA 3 4 2 MATLAB 3 4 3 LabView 4 ALPHABETIC INTERFACE REFERENCE 4 1 AnalogChannel 4 1 1 AnalogTo VideoRatio 4 1 2 BaseRateDivider 4 1 3 FirstSampleNum 4 1 4 GetSample 4 1 5 GetSamples 4 1 6 LastSampleNum 4 1 7 SampleRate 4 1 8 SetSample 4 1 9 SetSamples 4 1 10 Units NAVIGATION PUBLICATION lt
28. 3 Insert an Automation Open block and connect the PECS automation refnum to its input N Call Method Insert an Invoke Node Connect the PECS automation refnum to its input Select the appropriate method from the drop down list N gt Get Property Insert a Property Node Connect the PECS automation refnum to its input Select the appropriate property from the drop down list ON Set Property Insert a Property Node Connect the PECS automation refnum to its input Select the appropriate property from the drop down list 4 Right click on the property block and select Change All To Write 5 Connect the required value automation refnum to the property box a N gt Release 1 Insert a Close Reference block Connect the PECS automation refnum to its input Array 1 Insert an Array Constant block of the appropriate Argument dimension 2 Add a number of Constant Elements and set them to the required value 3 Insert a To Variant block 4 Connect the Array Constant output to the To Variant input 5 Use the To Variant output as the array argument Further example code is provided with the installation in the files Vicon PlugIns Example xls VBA Vicon PlugIns Example doc VBA Vicon PlugIns Example m MATLAB Vicon PlugIns Example vi LabVIEW Please refer to your client application documentation for further assistance NAVIGATION PUBLICATION lt gt PECS USER GUIDE
29. 6 4 7 27 4 8 4 8 1 4 8 2 4 8 3 4 8 4 4 8 5 4 8 6 4 8 7 4 8 8 4 8 9 GetForces GetMoments LastSampleNum MomentUnits PointUnits Reaction SampleRate ParameterStore Contains Parameter ContainsSection CreateBoolean Array CreateColour Array CreateDate TimeArray Createlnteger Array CreateRealArray CreateTextArray Delete Parameter DeleteSection GetBoolean GetColour GetDateTime GetDimension Count GetDimension Getlnteger GetReal GetText SectionCount SectionName SetBoolean SetColour SetDateTime SetDefault TextLength Setlnteger SetReal SetText PECS CapabilityFlags ConnectionCount Execute Refresh Supports CapabilityAll Supports CapabilitySome Processor RefCounter Trial 45 45 45 45 45 46 46 47 48 48 48 48 49 49 49 50 50 50 51 51 52 52 52 53 53 53 53 54 54 54 55 55 55 55 56 57 57 57 58 58 58 59 59 59 59 NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 VICON CONTENTS MOTION SYSTEMS 4 9 Processor 60 4 9 1 Log 60 4 9 2 SetStatus Message 60 4 10 Subject 61 4 10 1 DisplaySetName 61 4 10 2 LabelPrefix 61 4 10 3 MarkerSetName 62 4 10 4 ModelName 62 4 10 5 ModelParams Name 62 4 10 6 Name 62 4 10 7 SetLabel PrefixUsage 62 4 10 8 SetMarkerSet 63 4 11 Trajectory 64 4 11 1 ClearSelected Points 65 4 11 2 ClearTrajectory 65 4 11 3 FindGapAt 65 4 11 4 FindGap Backward 66 4 11 5 FindGap Forward 66 4 11 6 FirstValidField Num
30. 67 4 11 7 GetPoint 67 4 11 8 GetPoints 67 4 11 9 GetPointCameras 67 4 11 10 HasEmptyLabel 68 4 11 11 Hide 68 4 11 12 InvalidatePoint 68 4 11 13 IsVisible 68 4 11 14 LastValidField Num 68 4 11 15 MatchesLabel 69 4 11 16 MatchesLabel Prefix 69 4 11 17 PointCamera 69 4 11 18 PointCamera Count 69 4 11 19 SampleRate 70 4 11 20 SelectedPoint Count 70 4 11 21 SelectedPoint Field 70 4 11 22 Units 70 4 11 23 SelectPoint 70 4 11 24 SetPoint 71 4 11 25 SetPoints 71 4 11 26 Show 71 4 11 27 Colour 71 4 11 28 Label 72 4 11 29 MarkerSize 72 4 11 30 TypeGroup 72 NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 VICON CONTENTS MOTION SYSTEMS 4 12 Trial 73 4 12 1 AnalogBaseRate 74 4 12 2 AnalogChannel 74 4 12 3 AnalogChannel Count 74 4 12 4 CreateTrajectory 75 4 12 5 DataPath 75 4 12 6 DateAndTime 75 4 12 7 DefaultMarker Size 75 4 12 8 DeleteAll Trajectories 75 4 12 9 DeleteAll Unlabelled Trajectories 76 4 12 10 DeleteTrajectory 76 4 12 11 Description 76 4 12 12 EclipseNode 76 4 12 13 EventStore 76 4 12 14 Execute 77 4 12 15 FindAnalog Channel 77 4 12 16 FindSubject 78 4 12 17 FindSubjectBy Prefix 78 4 12 18 FindTrajectory 78 4 12 19 FindTrajectory Index 79 4 12 20 FirstValid TrajectoryFieldNum 79 4 12 21 ForcePlate 79 4 12 22 ForcePlateCount 79 4 12 23 sStatic 80 4 12 24 LastValid TrajectoryFieldNum 80 4 12 25 Notes 80 4 12 26 Parameter Store 80 4 12 27 ReferenceName 80 4 12 28 Re
31. CON PECS MOTION SYSTEMS 4 8 6 Supports Declaration HRESULT SupportsCapabilityAll in long i_FlagSet CapabilitySome inJDOWORD i_FlagMask out retval BOOL retval Return type BOOL Supports some flag Parameters long i_FlagSet Flag to check for capability DWORD i _FlagMask Capability mask Description Checks the given bit mask against the Workstation capability bit mask based on the index flag The return value will by TRUE if any of the bits set in the mask match those in the Workstation capability mask The function returns FALSE only if none of the set bits are matched 4 8 7 Processor Declaration propput HRESULT Processor in Processor i_pProcessor propget HRESULT Processor out retval Processor retval Return type Processor Processor interface Parameters Processor i_pProcessor New processor interface Description Sets and Gets the currently attached Processor interface Call Release on the object when it is no longer required 4 8 8 RefCounter Declaration propput HRESULT RefCounter in RefCounter i_pRefCounter propget HRESULT RefCounter out retval RefCounter retval Return type RefCounter Trial interface Parameters RefCounter i_pTrial New trial interface Description Sets and Gets the currently attached RefCounter interface Call Release on the object when it is no longer required 4 8 9 Trial Declaration propput HRESULT Trial in Trial i_pTrial propget HRESULT Trial out retval Trial
32. DE V1 0 Revision 008 PUBLICATION VICON RefCounter MOTION SYSTEMS 5 7 RefCounter Base Dispatch interface Include file ServerPl h Typelib file PECS tlb Availability PECS 1 0 Workstation 4 5 with SDK 2 0 Description This interface is used internally by the PECS and the Plug In to expose the server reference count the number of attached client processes Calling Decrement and Increment externally is not recommended and if the user wishes to know the application reference count then PECS ConnectionCount is much more suitable See the notes under PECS for a more detailed description of its use in Workstation Plug Ins Methods 1 Count 2 Decrement 3 Increment Properties 5 7 1 Count Declaration HRESULT Count out retval long retval Return type long The application RefCount Parameters NONE Description Returns the reference count of this object ordinarily the number of client processes attached to the server 5 7 2 Decrement Declaration HRESULT Decrement out retval long retval Return type long The new application RefCount Parameters NONE Description This function increments the reference count of this object only and returns the new reference count 5 7 3 Increment Declaration HRESULT Increment out retval long retval Return type long The new application RefCount Parameters NONE Description This function decrements the reference count of this object only and returns the ne
33. EventStore m EventContext te EclipseNode 1 Mgal e ForcePlate e ParameterStore a ea aa ee PECS 4 pe Colour e Trajectory Point Range le Processor Ratio Reaction e Reconstruction Utility Interfaces Figure 16 Interface Hierarchy The pattern for any client process whether a script Virtual instrument or a standalone executable written in some other programming language is as follows 1 Obtain a PECS interface 2 Perform necessary processing using other interfaces as required 3 After processing has been finished Release the PECS interface When interfaces other than PECS are used during processing they must each be Released when they are no longer required Releasing the PECS interface last is vital as any subsequently opened PECS interfaces will NOT be attached to Workstation The syntax for obtaining the PECS interface is different for each client application and is summarised in the Sample code section NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 USING THE AUTOMATION SERVER V CON MOTION SYSTEMS 3 3 1 The DUAL 3 3 2 ActiveX Interface Features not for External Use Each of the interfaces in Figure 16 are all provided as Dual interfaces This ensures that all client applications are capable of obtaining and operating these interfaces Because of this in many applications such as Visual Basic and LabVIEW there w
34. ION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 VICON EventContext MOTION SYSTEMS 4 4 EventContext Base Dispatch interface Include file ServerPl h Typelib file PECS tlb Availability PECS 1 0 Workstation 4 5 with SDK 2 0 Description Each event must belong to an event context The context allows certain attributes of groups of events to be shared This can be important for maintaining consistency and association of objects in a graphical user interface Example contexts include different sides of the body i e left and right or front and rear Methods Properties 1 Colour 2 Description 3 Icon 4 IconID 5 Label 4 4 1 Colour Declaration propput HRESULT Colour in Colour i_Colour propget HRESULT Colour out retval Colour retval Return type Colour Event context colour Parameters Colour i Colour New event context colour Description Sets and gets the colour associated with the event context Call Release on the returned object when it is no longer required 4 4 2 Description Declaration propput HRESULT Description inJBSTR i_Description propget HRESULT Description out retval BSTR retval Return type BSTR Event context description Parameters BSTR i Description New event context description Description Sets and gets the event context description in the form of a text string NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICA
35. JBOOL i_UsesPrefix NONE BOOL i _UsesPrefix Whether prefix is active or not Sets whether a trajectory label prefix is active for the subject or not If the value is TRUE non zero then prefixes are activated and the prefix is formed from the subject name followed by a colon character If the value is FALSE zero then the prefix is set to nothing for the subject Note that this function does not affect the labels on any trajectories whether associated with the subject or not NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Subject VICON MOTION SYSTEMS 4 10 8 SetMarkerSet Declaration HRESULT SetMarkerSet inJBSTR i_MKRFilename Return type NONE Parameters BSTR i MKRFilename New marker set filename Description Sets the marker set file for the subject The display set is reset to the first one available in the new file Note that this function does not affect the labels on any trajectories whether associated with the subject or not NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 Trajectory VICON MOTION SYSTEMS 4 11 Trajectory Base interface Include file Typelib file Availability Description Methods IDispatch ServerPI h PECS tlb PECS 1 0 Workstation 4 5 with SDK 2 0 Represents the 3 dimensional trajectory of a point through space measured or virtual May also be used to rep
36. JBSTR i_Section Parameter inJBSTR i_Parameter out retval BOOL retval Return type BOOL Boolean for parameter existing Parameters BSTR i Section Section name BSTR i_Parameter Parameter name Description Returns TRUE if the parameter store contains the given parameter in the given section else FALSE 4 7 2 ContainsSection Declaration HRESULT ContainsSection in BSTR i_ Section out retval BOOL retval Return type BOOL Boolean for section existing Parameters BSTR i Section Section name Description Returns S_TRUE if the parameter store contains the given section else S_FALSE 4 7 3 CreateBoolean Declaration HRESULT CreateBooleanArray in BSTR i_Section Array in BSTR i_Parameter in short i_Dimensions in VARIANT i_pDimensionArray Return type NONE Parameters BSTR i Section Section name BSTR i_Parameter Parameter name short i_ Dimensions Number of array dimensions VARIANT i pDimensionArray Array of dimension values Description Creates a parameter in the given section with the given name to store an array of boolean BOOL values 4 7 4 CreateColour Declaration HRESULT CreateColourArray inJBSTR i_Section Array inJBSTR i_Parameter in short i_Dimensions in short i_pDimensionArray Return type NONE Parameters BSTR i Section Section name BSTR i_Parameter Parameter name short i_ Dimensions Number of array dimensions short i pDimensionArray Array of dimension values Description Creates a parameter in the given
37. Section BSTR 1 Parameter long i_Index Colour i_Value HHH At the time of writing this function is not implemented in Workstation software HHH Section name Parameter name Value index New parameter value NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION ParameterStore VICON MOTION SYSTEMS 4 7 23 SetDateTime 4 7 24 SetDefault 4 7 25 Setinteger TextLength 4 7 26 SetReal Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT DateTime inJBSTR i_Section inJBSTR i_Parameter in long i_Index inJDATE i_Date NONE BSTR 1 Section BSTR 1 Parameter long i_Index DATE i Value HHH At the time of writing this function is not implemented in Workstation software HHH Section name Parameter name Value index New parameter value HRESULT SetDefaultTextLength in Jlong retval NONE long i Length Default length Sets the default length of the text strings stored in the parameter store HRESULT Integer inJBSTR i_Section inJBSTR i_Parameter in long i_Index in long i_Value NONE BSTR 1 Section BSTR 1_Parameter long i_Index long i_Value Section name Parameter name Value index New parameter value Sets the requested integer parameter as a long S
38. TION EventContext VICON MOTION SYSTEMS 4 4 3 IconID Declaration Return type Parameters Description 444 Label Declaration propput HRESULT IconID in long i_IconID propget HRESULT IconID out retval long retval long Event icon identifier long i IconID New event icon identifier Sets and gets an identifier for the event context icon This Icon ID is also used to represent the type of the event context in a language independent way Event context types and therefore icon IDs should have carefully chosen values to ensure that they are unique among applications They can be used to supply an alternative representation than the icon provided by Getlcon propput HRESULT Label inJBSTR i_Label propget HRESULT Label out retval BSTR retval Return type BSTR Event label Parameters BSTR i Label New event label Description Sets and gets the event context label in the form of a text string NAVIGATION PUBLICATION gt PECS USER GUIDE V1 0 Revision 008 VICON EventStore MOTION SYSTEMS 4 5 EventStore Base Dispatch interface Include file ServerPl h Typelib file PECS tlb Availability PECS 1 0 Workstation 4 5 with SDK 2 0 Description Typically owned by a trial an event store object holds all event contexts and events associated with that trial 2 Event 3 EventContext 4 EventContextCount 5 EventCount 6 RemoveEvent 7 RemoveEventAt Properties 4 5 1 Ad
39. The range start sample number NONE Gets the starting field number for the sample range HRESULT End out retval long retval long The range end sample number NONE Gets the ending field number for the sample range which will be one less than Begin Size HRESULT Size out retval long retval long The range length in samples NONE Returns the size of this range A size of zero indicates that the range is invalid or does not exist NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON Ratio MOTION SYSTEMS 5 4 Ratio Base Dispatch interface Include file ServerPI h Typelib file PECS tlb Availability PECS 1 0 Workstation 4 5 with SDK 2 0 Description This is a simple helper class for wrapping up a fraction Methods 1 Denominator 2 Numerator Properties 5 4 1 Denominator Declaration HRESULT Denominator out retval long retval Return type long Denominator value Parameters NONE Description Gets and sets the denominator of the ratio 5 4 2 Numerator Declaration HRESULT Numerator out retval long retval Return type long Numerator value Parameters NONE Description Gets and sets the numerator of the ratio NAVIGATION gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON Reaction MOTION SYSTEMS 5 5 Reaction Base Dispatch interface Include file ServerPl h Typelib file PECS tlb Availability PECS 1 0 Wo
40. USER GUIDE V1 0 Revision 008 VICON EclipseNode MOTION SYSTEMS 4 2 EclipseNode Base Dispatch interface Include file ServerPl h Typelib file PECS tlb Availability PECS 1 0 Workstation 4 5 with SDK 2 0 Description An Eclipse Node is normally a component associated with another object such as a Trial The interface provides access to the node attributes 2 NodelD 3 Title 4 GetBooleanAttribute 5 GetDateAndTimeAttribute 6 GetIntegerAttribute 7 GetRealAttribute 8 GetTextAttribute 9 SetBooleanAttribute 10 SetDateAndTimeAttribute 11 SetintegerAttribute 12 SetRealAttribute 13 SetTextAttribute Properties 4 2 1 DataPath Declaration HRESULT DataPath out retval BSTR retval Return type BSTR Data path Parameters NONE Description All Eclipse nodes have an associated file system data path Use this method to retrieve it in the form of a text string 4 2 2 NodelD Declaration HRESULT NodelD out retval long retval Return type long Node ID Parameters NONE Description Obtains the unique ID associated with the node Note that this ID is only valid during execution of the application and should not be persisted anywhere NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON EclipseNode MOTION SYSTEMS 4 2 3 Title Declaration HRESULT Title out retval BSTR retval Return type BSTR Node title Parameters NONE Description All Eclipse nodes have
41. VICON MOTION SYSTEMS NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 CONTENTS V CO N MOTION SYSTEMS 2004 2005 Vicon Motion Systems Limited All rights reserved Vicon Motion Systems Limited reserves the right to make changes to information in this document without notice Companies names and data used in examples are fictitious unless otherwise noted No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or by any means electronic or mechanical by photocopying or recording or otherwise without the prior written permission of Vicon Motion Systems Limited Information furnished by Vicon Motion Systems Limited is believed to be accurate and reliable however no responsibility is assumed by Vicon Motion Systems Limited for its use nor for any infringements of patents or other rights of third parties which may result from its use No license is granted by implication or otherwise under any patent rights of Vicon Motion Systems Limited Vicon is a registered trademark of OMG Pic PECS and Workstation are trademarks of OMG Plc Other product and company names herein may be the trademarks of their respective owners California Colorado UK 9 Spectrum Pointe 7388 S Revere Parkway Suite 901 14 Minns Business Park Lake Forest Centennial West Way CA 92630 CO 80112 Oxford OX2 0JB USA USA UK Tel 1 949 472 9140 Tel 1 30
42. Word in Single Use mode Figure 6 Adding a Microsoft Word Process to the Pipeline In both cases the document to be used must be located by clicking browse button next to or typing the full path of the document in the top edit box Once the document has been located clicking the browse button next to the Sub Routine edit box will show a list of the VBA sub routines available in that document as shown below in Figure 7 Select Script Sub Routine X Sub Routine ReadTrialD ata Cancel Figure 7 Select a Sub Routine Defined in a Document NAVIGATION ee E PUBLICATION PECS USER GUIDE V1 0 Revision 008 USING THE AUTOMATION SERVER V CON MOTION SYSTEMS Either select a sub routine from this list and click OK or double click the required sub routine Alternatively type the name of the sub routine you wish to run in the Sub Routine The Launch in Single Use Mode check box for Microsoft Office client processes allows batch processing to run a macro in the same document whilst leaving it open When batch processing is complete the Office application and document will remain open Operating in single use mode requires the user to Release Client Applications once batch processing is complete MATLAB The options for a MATLAB process are shown below in Figure 8 x MATLAB Script El JV Launch MATLAB in Single Use mode Cancel Figure 8 Adding a MATLAB Process to the Pipeline
43. ample range inclusive of last sample as a 3 x N array 4 6 9 LastSampleNum Declaration HRESULT LastSampleNum out retval long retval Return type long Sample number Parameters NONE Description Returns the last inclusive sample index for which data is available on this force plate 4 6 10 MomentUnits Declaration HRESULT MomentUnits out retval JBSTR retval Return type BSTR Moment units Parameters NONE Description Returns the moment units for the force plate in the form of a text string 4 6 11 PointUnits Declaration HRESULT ForceUnits out retval JBSTR retval Return type BSTR Point units Parameters NONE Description Returns the 3 dimensional co ordinate units for the force plate in the form of a text string NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION ForcePlate V CO N MOTION SYSTEMS 4 6 12 Reaction Declaration HRESULT Reaction inJlong i_Samplelndex out retval Reaction retval Return type Reaction Force plate reaction Parameters long a_SampleIndex Sample index to obtain data for Description Obtains the force moment and moment reference point of the force plate in laboratory co ordinate space Call Release on the returned object when it is no longer required 4 6 13 SampleRate Declaration HRESULT SampleRate out retval float retval Return type float Sample rate for this force plate Parameters NONE Description Returns the sampl
44. arameters Description Declaration Return type Parameters Description HRESULT FindTrajectorylndex inJBSTR a_pLabel inJlong i_FromIndex out retval long retval long Found index BSTR i Label Label to find long i FromIndex Index to start search at Searches from the given index for a trajectory in the trial that matches the given label returning its index The full label must be provided including any subject prefix or other modifier In case of conflicts where more than one trajectory matches the label this function returns the first one found Returns 1 if no matching trajectory can be found Note that index values may change as a result of creating or deleting other trajectories HRESULT FirstValidTrajectoryFieldNum out retval long retval long First valid field number NONE Obtains the inclusive field number of the first occurrence in the trial of valid trajectory data Returns 1 if no valid trajectory data exists Note that this latter case may occur if the trajectory count is not zero but the trajectories that do exist contain no valid point data HRESULT ForcePlate in long i_Index out retval ForcePlate retval ForcePlate Force plate interface long i_Index Zero based force plate index Obtains the specified force plate as a pointer to an interface Call Release on the object when it is no longer required HRESULT ForcePlateCount out retval long retval long Force plate count NONE
45. ation HRESULT MomentZ out retval double retval Return type double Moment Z value Parameters NONE Description Returns the Z component of the moment reaction NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Reconstruction VICON MOTION SYSTEMS 5 6 2 5 6 1 Camera CameraCount Include file Typelib file Availability Description Methods Properties Declaration Return type Parameters Description Declaration Return type Parameters Description 5 6 Reconstruction Base interface IDispatch ServerPI h PECS tlb PECS 1 0 Workstation 4 5 with SDK 2 0 This interface provides the user with detailed information on the properties of this reconstructed 3D point Much of the functionality of this interface is also present in Trajectory Camera CameraCount IsValid Residual Xx Y Z eee SS HRESULT Camera inJlong i_Camera out retval long retval long The index of the camera NONE Obtains the one based camera number of the Nth camera used to reconstruct the measured point where N is given by the camera index The total number of cameras contributing to the point can be obtained by calling CameraCount HRESULT CameraCount out retval long retval long NONE Number of cameras contributing Obtains the number of cameras that contributed to the reconstruction of the point If the trajectory represents a point that was
46. be automatically run and operated from the system registry Furthermore the PECS is a single use server meaning that many different processes can connect to the same server and hence the same Workstation To use PECS you will require Workstation version 4 5 the Workstation SDK version 2 0 and a valid hardware lock The server is provided with the PECS Workstation Plug In for operation NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 o INSTALLING THE PECS SERVER V CON MOTION SYSTEMS 221 Microsoft Office Products 2 INSTALLING THE PECS SERVER 2 1 Installation and Registration The PECS installer copies the following files on to your computer in your Vicon installation directory Vicon Workstation PECS exe Vicon Workstation PECS tlb Vicon Workstation PECS txt Wicon PlugIns PECSPlugIn ini Wicon Plugins PECSPlugIn txt Wicon PlugIns PECSPlugIn vpi Vicon PlugIns PECS Plug In Options Example car2 Vicon PlugIns Example xls Vicon Plugins Example doc Vicon PlugIns Example m Vicon PlugIns Example vi Vicon Manuals PECS_v1_0 pdf this document Shortcuts to this manual and an uninstall program will also be placed in your start menu The installer also performs all of the necessary registration of the PECS server with your computer s registry If you need to remove PECS from your computer run the Uninstall PECS program
47. ception NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON EclipseNode MOTION SYSTEMS 4 2 7 GetRealAttribute Declaration HRESULT RealAttribute inJ BSTR i_Name out retval double retval Return type double Attribute double value Parameters BSTR i Name Attribute name Description Obtains the value of the specified attribute as a double precision real If the attribute has not been set or cannot be converted to a real then the server will throw an exception 4 2 8 GetTextAttribute Declaration HRESULT TextAttribute inJ BSTR i_Name out retval BSTR retval Return type BSTR Attribute text value Parameters BSTR i Name Attribute name Description Obtains the value of the specified attribute as text into a text buffer object If the attribute has not been set then the server will throw an exception 4 2 9 SetBoolean Declaration HRESULT BooleanAttribute in BSTR i_Name Attribute in BOOL i_ Value Return type NONE Parameters BSTRi Name Attribute name BOOL i_Value New attribute boolean value Description Sets the value of the specified attribute as a boolean 4 2 10 SetDateAnd Declaration HRESULT DateAndTimeAttribute inJBSTR i_Name TimeAttribute inJDATE i_Date Return type NONE Parameters BSTR i Name Attribute name DATE i Date New attribute date structure Description Obtains the value of the specified attribute as a set of date and time values Th
48. ctory over the specified one based field range inclusive of end frame as a 3 x N array HRESULT GetPointCameras in long i_Begin in long i_End out retval VARIANT retval VARIANT 32 x N array of contributions long i_ Begin Range begin field number long i_End Range end field number Obtains the camera contributions over the specified one based field range inclusive of end frame as a 32 x N array A 1 in the cell i j indicates that the i camera contributed to the j frame NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Trajectory VICON MOTION SYSTEMS 4 11 10 HasEmptyLabel 4 11 11 Hide 4 11 12 InvalidatePoint 4 11 13 IsVisible 4 11 14 LastValidField Num Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT HasEmptyLabel out retval BOOL retval BOOL Empty label flag NONE Returns TRUE if the trajectory has a blank label and is therefore unlabelled otherwise FALSE HRESULT Hide NONE NONE Causes the trajectory to be made invisible in the user interface Workspace HRESULT InvalidatePoint inJlong i_Field NONE long i_Field Field to invalidate Invalidates the point in the trajectory at the specified field T
49. d before storage HRESULT SetSamples inJlong i_Begin in long i_End inJVARIANT i_ Points NONE long i_ Begin Range begin field number long i_End VARIANT i_ Points Range end field number 3 x N array of co ordinates Sets the values of the analog channel over the specified one based sample range inclusive of end sample as an N vector of values If the vector passed in does not have the same number of elements as there are samples in the specified range the server throws an exception HRESULT Units out retval BSTR retval BSTR NONE String containing units Returns the analog channel units in the form of a text string HRESULT MatchesLabel inJBSTR i_Label out NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION AnalogChannel V CON MOTION SYSTEMS retval BOOL retval Return type BOOL Boolean for match Parameters BSTR i Label Label to match Description Convenient way of directly checking for a match against a given label rather than using GetLabel and checking that manually Returns TRUE if the label matches otherwise FALSE 4 1 12 Label Declaration propput HRESULT Label inJBSTR i_Label propget HRESULT Label out retval BSTR retval Return type BSTR Channel label Parameters BSTR i pLabel New channel label Description Sets and gets the analog channel label in the form of a text string NAVIGATION PUBLICATION gt PECS
50. d getting colours in other interfaces Methods Properties 1 Red 2 Green 3 Blue 5 1 1 Red Declaration propput HRESULT Red in short i_Value propget HRESULT Red out retval short retval Return type short Red value Parameters short 1_ Value New red value Description Gets and sets the red component 5 1 2 Green Declaration propput HRESULT Green in short i_Value propget HRESULT Green out retval short retval Return type short Green value Parameters shorti Value New green value Description Gets and sets the green component 5 1 3 Blue Declaration propput HRESULT Blue in short i_Value propget HRESULT Blue out retval short retval Return type short Blue value Parameters shorti Value New blue value Description Gets and sets the blue component NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Point VICON MOTION SYSTEMS 2 2 1 IsValid B22 X 523 Y 524 Z 5 2 Point Base interface Include file Typelib file Availability Description Methods Properties Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description IDispatch ServerPI h PECS tlb PECS 1 0 Workstation 4 5 with SDK 2 0 This interface provides a simple 3D point implementation for setting and ge
51. d instructs it to evaluate the required program script specified in the Plug In options The client process then takes over with the various calls to the PECS in the client program script being routed through the server to Workstation NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 USING THE AUTOMATION SERVER VICON MOTION SYSTEMS 3 1 Plug In Options The options for the PECS Plug In are shown below in Figure 2 PECS x m PECS Pipeline Options File Example z New J Run PECS in DEBUG Mode Cancel Move Up Client Process Salers C Program Files Vicon Pluglns E xample m Seinos Move Down MSExcel C Program Files Vicon Pluglns E xample xls Read rialD ata Version MSWord C Program Files Vicon Plugins Example doc ReadTrialD ata Add M Labview C Program Files Vicon Pluglns E xample vi Remove Clear Release Options Client Applications Figure 2 Main Plug In Options The Plug In interface allows the creation of a number of pipelines that incorporate ActiveX clients In addition the settings for client applications can be changed 3 1 1 Using Options Files located in the folder The options for each defined pipeline are contained within options files Vicon PlugIns PECS Plug In Option These files have the extension car2 and should not be manually edited The Plug In installation is provided with an exa
52. dEvent Declaration HRESULT AddEvent inJBSTR i_Label inJBSTR i_ContextLabel out retval Event retval Return type Event Newly created event Parameters NONE Description Creates a new event with the given label and in the context identified by its given label and returns a pointer to the newly created object Use this to set further attributes on the event Call Release on the returned event when it is no longer required It will remain in the stored list until explicitly removed 4 5 2 Event Declaration HRESULT Event in long i_Index out retval Event retval Return type Event Event retrieved Parameters long i Index Index of event to get Description Obtains the requested event from the stored list Call Release on the returned event when it is no longer required NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON EventStore MOTION SYSTEMS 4 5 3 EventContext Declaration HRESULT EventContext in long i_Index out retval EventContext retval Return type EventContext Event context retrieved Parameters long i Index Index of event to get Description Obtains the requested event context from the stored list Call Release on the returned event context when it is no longer required 4 5 4 d Declaration HRESULT EventContextCount out retval long retval Return type long Number of event contexts Parameters NONE Description Obtains the number of event cont
53. e date is a standard COM DATE type This is a floating point number which represents days as whole number increments starting from midnight 30 December 1899 If an invalid DATE is passed into this function the server will throw an exception NAVIGATION lt gt E PUBLICATION PECS USER GUIDE V1 0 Revision 008 VICON EclipseNode MOTION SYSTEMS 4 2 11 Setinteger Declaration HRESULT IntegerAttribute inJ BSTR i_Name Attribute inJlong i_Value Return type NONE Parameters BSTRi Name Attribute name longi Value New attribute integer Description Obtains the value of the specified attribute as a long integer 4 2 12 SetRealAttribute Declaration HRESULT RealAttribute in BSTR i_Name in double i_Value Return type NONE Parameters BSTRi Name Attribute name double i_ Value New attribute double value Description Obtains the value of the specified attribute as a double precision real 4 2 13 SetTextAttribute Declaration HRESULT TextAttribute inJ BSTR i_Name in BSTR i_Value Return type NONE Parameters BSTRi Name Attribute name BSTR i Value New attribute text value Description Obtains the value of the specified attribute as text into a text buffer object NAVIGATION gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON Event MOTION SYSTEMS 4 3 Event Base Dispatch interface Include file ServerPl h Typelib file PECS tlb Availability PECS 1
54. e rate of the data for this force plate in Hz NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 ParameterStore VICON MOTION SYSTEMS 4 7 ParameterStore Base interface Include file Typelib file Availability Description Methods Properties IDispatch ServerPI h PECS tlb PECS 1 0 Workstation 4 5 with SDK 2 0 Used for storing groups of named parameters of different types including arrays of those types Groups are also known as sections which is how they are referred to in this interface Trials may contain a parameter store component which gives direct access to data contained in a C3D file This interface may also be used to map to data stored in an INI file 1 ContainsParameter 2 ContainsSection 3 CreateBooleanArray 4 CreateColourArray 5 CreateDateTimeArray 6 CreatelntegerArray 7 CreateRealArray 8 9 CreateTextArray DeleteParameter 10 DeleteSection 11 GetBoolean 12 GetColour 13 GetDateTime 14 GetDimensionCount 15 GetDimension 16 Getlnteger 17 GetReal 18 GetText 19 GetTime 20 SectionCount 21 SectionName 22 SetBoolean 23 SetColour 24 SetDateTime 25 SetDefaultTextLength 26 Setlnteger 27 SetReal 28 SetText 29 SetTime NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 VICON ParameterStore MOTION SYSTEMS 4 7 1 Contains Declaration HRESULT ContainsParameter in
55. easurement subject remained still for the whole duration of the trial HRESULT SetTrajectoryTypeGroupUnits inJBSTR i_Name inJBSTR i_Units NONE BSTR i Name Type group name BSTR i_Units Units Sets the units of the trajectory type group given by name Units are normally the abbreviated SI form See RegisterTrajectoryTypeGroup for more details HRESULT Subject in long i_Index out retval Subject retval Subject Subject interface long i_Index Zero based subject index Obtains the specified subject as a pointer to a subject interface Call Release on the object when it is no longer required If the subject index is out of range the server throws an exception Use SubjectCount to get the number of subjects present NAVIGATION e E PUBLICATION PECS USER GUIDE V1 0 Revision 008 Trial VICON MOTION SYSTEMS 4 12 35 SubjectCount 4 12 36 Trajectory 4 12 37 TrajectoryCount 4 12 38 TrajectoryType GroupCount 4 12 39 TrajectoryType GroupName Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT SubjectCount out retval long retval long Subject count NONE Obtains the number of subjects associated with the trial HRESULT Trajectory inJlong
56. ee Boolean for a description of how to calculate the value index HRESULT Real inJBSTR i_Section inJBSTR i_Parameter in long i_Index in double i_Value NONE BSTR 1 Section BSTR 1 Parameter long i_Index double i_ Value Section name Parameter name Value index New parameter value Sets the requested real parameter as a double See Boolean for a description of how to calculate the value index NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION ParameterStore V CO N MOTION SYSTEMS 4 7 27 Setlext Declaration HRESULT Text inJ BSTR i_ Section inJBSTR i_Parameter in long i_Index inJBSTR i_Value Return type NONE Parameters BSTRi Section Section name BSTR 1_Parameter Parameter name long i_Index Value index BSTR i Value New parameter value Description Sets the requested text parameter as a text string See Boolean for a description of how to calculate the value index NAVIGATION PUBLICATION gt PECS USER GUIDE V1 0 Revision 008 VICON PECS MOTION SYSTEMS 4 8 PECS Base Dispatch interface Include file ServerPl h Typelib file PECS tlb Availability PECS 1 0 Workstation 4 5 with SDK 2 0 Description Represents the base level document from which all other interfaces can be obtained hierarchically Although the Trial Processor and RefCounter interfaces are exposed as properties these should never be set by a client
57. essages in the processing log and can update the Workstation status bar message Trial Interface This indicates whether there is a connection between the PECS server and the Workstation trial The Trial interface is the main interface through which the majority of the PECS interface functionality can be called See the description of the Interface Hierarchy Connections This indicates how many external processes are connected to the PECS interface During processing and debugging this will invariably be 1 The PECS server can be closed down by selecting Exit from the File menu or using the top right icon although this is not recommended if a client process may still be accessing the server interface Selecting About PECS from the Help menu will show the version information for the server shown below in Figure 15 NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 USING THE AUTOMATION SERVER V CON MOTION SYSTEMS Figure 15 Server Version Dialog NAVIGATION PUBLICATION PECS USER GUIDE V1 0 Revision 008 USING THE AUTOMATION SERVER V CO N MOTION SYSTEMS 3 3 Writing Client Processes using the ActiveX Interface When a client application creates an instance of an ActiveX PECS interface all of the interface classes required to operate Workstation can be obtained through the hierarchy shown below in Figure 16 re AnalogChannel me Event te
58. exts in the store 4 5 5 EventCount Declaration HRESULT EventCount out retval long retval Return type long Number of events Parameters NONE Description Obtains the number of events in the store 4 5 6 RemoveEvent Declaration HRESULT RemoveEvent in Event i_Event Return type NONE Parameters Eventi Event Event to remove Description Removes the given event from the store 4 5 7 RemoveEventAt Declaration HRESULT RemoveEventAt in long i_Index Return type NONE Parameters longi Index Index of event to remove Description Removes the event at the specified index in the list from the store NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION ForcePlate VICON MOTION SYSTEMS 4 6 ForcePlate Base Dispatch interface Include file ServerPI h Typelib file PECS tlb Availability PECS 1 0 Workstation 4 5 with SDK 2 0 Description Represents the stream of data from a single force plate This interface is rarely implemented by plug ins but instead plug ins typically obtain a pointer to a force plate object through other means such as from a trial object see Trial interface Methods 1 AnalogToVideoRatio 2 CenterOfPressure 3 Corner 4 FirstSampleNum 8 ForceUnits 5 LastSampleNum 8 MomentUnits 8 PointUnits 6 Reaction 7 SampleRate Properties 4 6 1 AnalogToVideo Declaration HRESULT AnalogToVideoRatio out retval Ratio Ratio retval Return type Ratio Ratio in
59. f the parameter or section does not exist 4 7 10 DeleteSection Declaration HRESULT DeleteSection inJBSTR i_Section Return type NONE Parameters BSTR i Section Section name Description Deletes the given section from the parameter store There is no error if the section does not exist NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION ParameterStore VICON MOTION SYSTEMS 4 7 11 GetBoolean Declaration Return type Parameters Description 4 7 12 GetColour Declaration HRESULT Boolean inJBSTR i_Section inJBSTR i_Parameter in long i_Index out retval BOOL retval BOOL Parameter value BSTR i Section Section name BSTR i_Parameter Parameter name long i_Index Value index Obtains the requested parameter value as a boolean performing a type conversion if necessary For integer and real parameters a non zero value indicates TRUE and a zero value indicates FALSE For text parameters any of True On 1 or Yes case in sensitive are considered as TRUE Any other value is considered to represent FALSE The zero based value index must be calculated by transforming the parameter dimensions into a single dimensional array where the first dimension in a multi dimensional array represents the least significant i e the one that changes most often For example in the two dimensional 3 by 4 3 4 array the values are indexed 0 2 0 3
60. freshChanges 81 4 12 29 Register TrajectoryTypeGroup 81 4 12 30 SetDefault MarkerSize 81 4 12 31 SetLabelPrefix Usage 82 4 12 32 SetStaticStatus 82 4 12 33 SetTrajectory TypeGroupUnits 82 4 12 34 Subject 82 4 12 35 SubjectCount 83 4 12 36 Trajectory 83 4 12 37 TrajectoryCount 83 4 12 38 TrajectoryType GroupCount 83 4 12 39 TrajectoryType GroupName 83 4 12 40 TrajectoryType GroupUnits 84 4 12 41 Type 84 4 12 42 UsesLabel Prefixes 84 4 12 43 VideoFieldCount 84 4 12 44 VideoRate 84 NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 CONTENTS VICON MOTION SYSTEMS ADDITIONAL UTILITY INTERFACES Colour Red Green Blue Point IsValid X Y Z Range Begin End Size Ratio Denominator Numerator Reaction ForceX ForceY ForceZ IsValid MomentX MomentY MomentZ Reconstruction Camera CameraCount IsValid Residual x Y Z RefCounter Count Decrement Increment 85 85 85 85 86 86 86 86 86 87 87 87 87 88 88 88 89 89 89 89 89 90 90 90 91 91 91 92 92 92 92 92 93 93 93 93 NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 INTRODUCTION AND REQUIREMENTS V CON MOTION SYSTEMS 1 INTRODUCTION AND REQUIREMENTS The Pipeline External Communication Server or PECS is an extension to Workstation that provides an ActiveX interface for other programs The application is an automation server which means that it can
61. from your Start Menu Programs Vicon PECS folder Alternatively PECS can be removed using the Windows control panel Add Remove Programs utility 2 2 Installing the Server in Client Applications In addition to system installation several client applications and development environments will require specific steps to be taken to give the application access to PECS Microsoft Office applications have access to ActiveX objects via VBA Visual Basic for Applications Section 2 2 2 covers installation of the PECS server in Visual Basic and VBA Support is provided for running VBA scripts within Word and Excel and your security settings may need to be adjusted NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 INSTALLING THE PECS SERVER V CON MOTION SYSTEMS Office 98 2000 1 Open the Office application in question On the Tools menu click Macro and then click Security to open the Macro Security dialog box 2 On the Security Level tab make sure that macro security is either Medium or Low 3 Click OK to apply the setting and close the Office Application Office XP If the default security settings are not correct the following error message will be seen when attempting to run a VBA script in a Word or Excel document Programmatic Access to Visual Basic Project is not trusted To change the security setting follow these steps 1 2 3 4 Open the Office ap
62. hannel VICON MOTION SYSTEMS 4 1 2 4 1 3 4 1 4 4 1 5 4 1 6 BaseRateDivider FirstsampleNum GetSample GetSamples LastSampleNum Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Ratio NONE Ratio of analog to video rates Obtains the ratio of the analog to video capture rates for this channel Call Release on the returned object context when it is no longer required HRESULT BaseRateDivider out retval long retval long Base rate divider NONE Obtains the analog base sample frequency divider for this channel All analog channels in Vicon are captured at the same base frequency but if the functionality is available each channel may reduce its sampling rate by a fixed integer ratio represented by this divider Typically the value will be one for all channels HRESULT FirstSampleNum out retval long retval long last valid sample number NONE Returns the first sample index for which data is available on this channel HRESULT GetSample inJlong i_Index out retval double retval double Value at this sample long i_Index Sample index of data to get Gets the analog channel data value at the specified index Because of storage constraints the data may be quan
63. his effectively means that the point is missing HRESULT IsVisible out retval BOOL retval BOOL Is visible flag NONE Returns TRUE if the trajectory is visible in the user interface Workspace else FALSE LastValidFieldNum out retval long retval long last valid field number NONE Returns the one based field number of the last valid point in the trajectory This will be zero if there are no valid points in the trajectory NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Trajectory VICON MOTION SYSTEMS 4 11 15 MatchesLabel 4 11 16 MatchesLabel Prefix 4 11 17 PointCamera 4 11 18 PointCamera Count Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT MatchesLabel inJBSTR i_Label out retval BOOL retval BOOL BSTR i_Label Label matches flag Label to compare Convenient way of directly checking for a match against a given label rather than using GetLabel and checking that manually Note that subject prefixes and other modifiers must be included in the label given Returns TRUE if the label matches otherwise FALSE HRESULT MatchesLabelPrefix inJBSTR i_Label out retval BOOL retval BOOL BSTR i Label Label prefix matches flag Label prefix to compare Chec
64. ich 3D information other than point trajectories can be stored Examples include angles forces and moments Once a type group has been registered individual trajectories may be assigned to the group using the SetTypeGroup function This information can then be used by any process that needs to recognise the different data stored as trajectories HRESULT SetDefaultMarkerSize in double _MarkerSize NONE double 1_MarkerSize HHH At the time of writing this function is not implemented in Workstation software HHH Marker size NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Trial VICON MOTION SYSTEMS 4 12 31 SetLabelPrefix Usage 4 12 32 SetStaticStatus 4 12 33 SetTrajectory TypeGroupUnits 4 12 34 Subject Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT SetLabelPrefixUsage inJBOOL i_UsesPrefix NONE BOOL i_UsesPrefix New prefix usage flag Sets whether subject identifiers are used to prefix the labels of each trajectory Usage is mandatory for multiple subject trials and optional for single subject trials HRESULT SetStaticStatus in BOOL i_IsStatic NONE BOOL i IsStatic New static status flag Marks the trial as static or not Static is used to indicate that the m
65. ill be two interface versions available for each For example PECS IPECSDoc IDualPECSDoc Trial ITrial IDualTrial It is recommended that the Dual implementation of these interfaces be used at all times The following interface methods are not intended for use in client code Set PECS Processor Set PECS Trial Set PECS RefCounter Method RefCounter Increment Method RefCounter Decrement NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 USING THE AUTOMATION SERVER VICON MOTION SYSTEMS 3 4 Sample Code The following code snippets and instructions summarise how to obtain the PECS server call methods get and set properties on a generic interface In addition arguments to be passed as arrays are introduced 3 4 1 Visual Basic Create Server and VBA Call Method with return Call Method as interface Call Method no return Get Property Get Property as interface Set Property Set Property as interface Release Array Argument 3 4 2 MATLAB Create Server Call Method Get Property Set Property Release Array Argument NAVIGATION PUBLICATION PECS USER GUIDE V1 0 Revision 008 USING THE AUTOMATION SERVER V CON MOTION SYSTEMS 3 4 3 LabView Create Server Insert an Automation Refnum object Right click the control click Select ActiveX class and select or browse for PECS IDualPECSDoc
66. ing an entry in the pipeline will open that client processes options dialog When Add is clicked on the main Plug In options dialog the dialog shown below in Figure 4 will be shown Add Client Process x Client Process Run a MATLAB script m Cancel Figure 4 Adding a Process to the Pipeline The list of client processes available for evaluation in the pipeline on your computer will depend on what client applications you have installed For instance if you have Microsoft Office but neither MATLAB nor LabVIEW this list will only contain MSExcel MSWord Executable and Debugging To add a process select the appropriate process from the list and click OK or double click the process This will then open the process options NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION USING THE AUTOMATION SERVER V CON MOTION SYSTEMS 3 1 4 Process Options Microsoft Office Products dialog Click Cancel if you don t wish to add a new process to your pipeline Each client process has a specific set of options and these are summarised in the following sections Figure 5 and Figure 6 below show the options dialog boxes for adding these two Office products x Excel Workbook K Sub Routine E Cancel JV Launch Excel in Single Use mode Figure 5 Adding a Microsoft Excel Process to the Pipeline x Word Document a Sub Routine E Cancel IV Launch
67. ion Refnum from the All Controls Refnum controls palette 2 Right click on the control and click Select ActiveX Class Browse to open the ActiveX control selection dialog box 3 Select PECS from the drop down list of ActiveX objects and click Show Creatable Objects Only 4 Expand the PECS PECS Document in the objects window select IDualPECSDoc and click OK All interface methods and properties should now be easily accessible using the LabVIEW user interface NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 USING THE AUTOMATION SERVER V CON MOTION SYSTEMS 3 USING THE AUTOMATION SERVER The figure below illustrates the operation of the PECS in conjunction with Workstation the Plug In and an example client process IVProcess lt PECS PlugIn Vpi 4 Instantiates and Called by the Plug In to i Initialises IV execute the relevant i interfaces program script i v IPECS M Workstation exe PECS exe e lt Client Processor IVProcessor IProcessor etc etc lUnknown IDispatch interfaces interfaces initialised by the Workstation SDK system and registry Figure 1 Server Operation First of all when the Plug In is executed in the Workstation pipeline it requests an instance of PECS from the registry and connects the Workstation SDK interface to it Finally the Plug In starts the client process an
68. ion to execute in Parameters to instruction LPCSTR a_plInstruction LPCSTR a_pParameters Executes the given instruction on the application The parameters must be supplied in textual form as a semicolon separated list Leading and trailing white space space or tab characters will be ignored for each parameter Textual string parameters may optionally be enclosed in quotes to allow for the inclusion of semicolon characters or leading and trailing white space in the string The return value will depend on the particular instruction but typically NOERROR will be returned for success or E FAIL will be returned if the instruction could not be executed The following instructions are supported in Vicon Workstation Version Instruction 3 0 CheckLicence Parameters ProgramID VersionID FamilyID HRESULT Refresh NONE NONE Causes the PECS to refresh its view HRESULT SupportsCapabilityAll in long i_FlagSet inJDOWORD i_FlagMask out retval BOOL retval BOOL Supports all flag long i_FlagSet DWORD 1_FlagMask Flag to check for capability Capability mask Checks the given bit mask against the Workstation capability bit mask based on the index flag The return value will by TRUE only if all of the bits set in the mask match those in the Workstation capability mask Otherwise the function returns FALSE NAVIGATION lt gt E PUBLICATION PECS USER GUIDE V1 0 Revision 008 VI
69. iption Declaration Return type Parameters Description HRESULT Integer inJBSTR i_Section inJBSTR i_Parameter in long i_Index out retval long retval long Parameter value BSTR 1 Section BSTR 1 Parameter long i_Index Section name Parameter name Value index Obtains the requested integer parameter as a long See Boolean for a description of how to calculate the value index HRESULT Real inJBSTR i_Section inJBSTR i_Parameter in long i_Index out retval double retval double BSTR 1 Section BSTR 1_Parameter long i_Index Parameter value Section name Parameter name Value index Obtains the requested real parameter as a double See Boolean for a description of how to calculate the value index propput HRESULT Text inJBSTR i_Section inJBSTR i_Parameter in long i_Index inJBSTR i_Value propget HRESULT Text inJBSTR i_Section inJBSTR i_Parameter in long i_Index out reval BSTR retval BSTR BSTR 1 Section BSTR 1_Parameter long i_Index Parameter value Section name Parameter name Value index Obtains the requested text parameter as a text string See Boolean for a description of how to calculate the value index HRESULT SectionCount out retval long retval long Section count NONE Obtains the number of sections in the parameter store NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION ParameterStore VICON
70. ks whether the trajectory matches the given subject prefix Note that the prefix separator must be included in the prefix given Returns TRUE if the prefix matches otherwise FALSE HRESULT PointCamera in long i_Field in long i_ Index out retval long retval long Camera number Field number Camera index long i_Field long i_Index HHH At the time of writing this function is not implemented in Workstation software HH HRESULT PointCameraCount in long i_Field out retval long retval long Camera count long i_Field Field number HHH At the time of writing this function is not implemented in Workstation software HHH NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Trajectory VICON MOTION SYSTEMS 4 11 19 SampleRate 4 11 20 SelectedPoint Count 4 11 21 SelectedPoint Field 4 11 22 Units 4 11 23 SelectPoint Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT SampleRate out retval double retval double NONE Sample rate Returns the sample rate of the trajectory data in Hz HRESULT SelectedPointCount out retval long retval long Count NONE Obtains the number of selected points in the trajec
71. list 5 Click OK Note You can avoid wrapping the object for each project you create by creating the wrapper classes in a single project and placing referencing these classes using the project Classpath NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 INSTALLING THE PECS SERVER V CON MOTION SYSTEMS 2 2 5 MATLAB MATLAB prior to release 12 0 and release 14 onwards Once the PECS server has been registered on your PC MATLAB will be able to access the server and its interfaces using ActiveX MATLAB release 12 1 to release 13 Because of a change made to MATLAB in the way the ActiveX objects are created in release 12 1 the PECS server cannot be accessed using the same ActiveX methods A fix is provided for this problem with the PECS installation and is contained within MATLABFix exe This self extracting executable will update the following files in your existing MATLAB installation allowing it to access ActiveX objects in the same way as release 12 0 and before MMATLAB bin win32 comcii dll MATLAB toolbox matlab winfun comcli private newprogid m More information on this change to MATLAB release 12 1 is available at http www mathworks com support solutions data 32562 shtml 2 2 6 LabVIEW When designing a Virtual Instrument that requires access to the PECS server an automation object of the PECS Document type needs to be created To do this 1 Insert an Automat
72. mong applications They can be used to supply an alternative representation than the icon provided by Icon 4 3 6 Label Declaration propput HRESULT Label inJBSTR i_Label propget HRESULT Label out retval BSTR retval Return type BSTR Event label Parameters BSTR i Label New event label Description Sets and gets the event label in the form of a text string NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Event VICON MOTION SYSTEMS 4 3 7 SubjectName Declaration Return type Parameters Description 4 3 8 Time Declaration propput HRESULT SubjectName inJBSTR i_Name propget HRESULT SubjectName out retval BSTR retval BSTR Subject name BSTR i Name New subject name Sets and gets the subject name in the form of a text string In multiple subject trials events may be assigned to specific subjects In single subject trials or if the event applies globally then the subject name may be unspecified blank propput HRESULT Time in double i_Time propget HRESULT Time out retval double retval Return type double Event time in seconds Parameters double i_ Time New event time in seconds Description Sets and gets the time of the event This is specified in seconds from the start of the trial capture Field or frame 1 corresponds to time 0 0s To convert between time and frame representations the data frame rate is required NAVIGAT
73. mple setup called Default which should be loaded by default whenever the Plug In used for the first time on a trial To create a new pipeline options file click New on the options dialog which will open the dialog box shown below in Figure 3 Options File i Enter name for new options Figure 3 Creating a New Options File Type the name of the pipeline you wish to create in this box and click OK Click Cancel if you don t wish to create a new options file To select from the available pipeline options files available click the drop Options File drop down list NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 USING THE AUTOMATION SERVER V CON MOTION SYSTEMS Side Managing the Pipeline 3 1 3 Adding Processes to the Pipeline The PECS pipeline window indicates the processes defined in the pipeline whether they can be run and whether they are enabled Processes that are unable to run for some reason for example not having MATLAB installed on your machine will appear in red Checking the box to the left of a process enables this process for running in the same way as the normal Workstation pipeline Processes can be added to and removed from the pipeline using the Add and Remove buttons and their order can be changed using the Move Up and Move Down buttons To empty a pipeline of processes click the Clear button Clicking the Options button or double click
74. n HRESULT SetStatusMessage inJBSTR i_ Text essage Return type NONE Parameters BSTR i Text in Status text Description Outputs the given text in the status bar of the applications main window This is useful during length pipeline processing to give feedback of progress to users NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON Subject MOTION SYSTEMS 4 10 Subject Base Dispatch interface Include file ServerPI h Typelib file PECS tlb Availability PECS 1 0 Workstation 4 5 with SDK 2 0 Description Represents a measured subject usually human This provides information necessary to distinguish the data between subjects in a multiple subject trial This interface is rarely implemented by plug ins but instead plug ins typically obtain a pointer to an analog channel object through other means such as from a trial object see IVTrial interface 2 LabelPrefix 3 MarkerSetName 4 ModelName 5 ModelParamsName 6 Name 7 LabelPrefixUsage 8 MarkerSet Properties 4 10 1 DisplaySetName Declaration HRESULT DisplaySetName out retval BSTR retval Return type BSTR Display name Parameters NONE Description Returns the name of the active display set within the marker set in the form of a text string 4 10 2 LabelPrefix Declaration HRESULT LabelPrefix out retvalIBSTR retval Return type BSTR Label prefix Parameters NONE Description Returns the subject label
75. nalog channel interface BSTR i_Label Label of channel to find Searches for an analog channel in the trial that matches the given label returning it as a pointer to an interface In case of conflicts where more than one channel matches the label this function returns the first one found If no matching analog channel can be found the server throws an exception Call Release on the object when it is no longer required NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 Trial VICON MOTION SYSTEMS 4 12 16 FindSubject 4 12 17 FindSubjectBy Prefix 4 12 18 FindTrajectory Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT FindSubject inJBSTR i_Name out retval Subject retval Subject BSTR 1_Name Subject interface Name of subject to find Searches for a subject in the trial that matches the given name returning it as a pointer to a subject interface Each subject must have a unique name in the trial In case of conflicts this function returns the first match found If no matching subject can be found the server throws an exception Call Release on the object when it is no longer required HRESULT FindSubjectByPrefix inJBSTR i_Prefix out retval Subject retval Subject BSTR 1 Prefix Subject interface Prefix of subject to find
76. of a ParameterStore interface Call Release on this object when it is no longer required 4 12 27 ReferenceName Declaration HRESULT ReferenceName out retvalJBSTR retval Return type BSTR Reference name Parameters NONE Description Returns the trial reference name in the form of a text string NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Trial VICON MOTION SYSTEMS 4 12 28 RefreshChanges 4 12 29 Register TrajectoryTypeGroup 4 12 30 SetDefault MarkerSize Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT RefreshChanges NONE NONE Refreshes the user interface associated with the trial Call this function after making changes to trial data that affect the user interface for example modifying or creating new trajectories If possible call this function once after many changes rather than for each individual change HRESULT RegisterTrajectoryTypeGroup inJBSTR i_Name inJBSTR i_SingularName NONE BSTR i_Name BSTR i_SingularName Plural name Singular name Registers the plural and singular names of a trajectory type group If a group matching the plural name already exists then this registration will be ignored and the existing original singular name will be maintained Trajectory type groups are a mechanism by wh
77. pe BSTR Trajectory label Parameters BSTRi Label New trajectory label Description Sets and gets the trajectory label in the form of a text string Any subject prefix or other modifier must be provided as part of the label 4 11 29 MarkerSize Declaration propput HRESULT MarkerSize in Jdouble i_MarkerSize propget HRESULT MarkerSize out retval double retval Return type double Marker size Parameters double i_MarkerSize New marker size Description At the time of writing this function is not implemented in Workstation software HHH 4 11 30 TypeGroup Declaration propput HRESULT TypeGroup inJ BSTR i_TypeGroup propget HRESULT TypeGroup out BSTR i_TypeGroup Return type BSTR Trajectory type name Parameters BSTR i_TypeGroup New trajectory type name Description Sets and gets the type of the trajectory in the form of a text string Different types may be used to store vector information in a trajectory other than measured point data For example the following types are often used FORCE MOMENT and POWER NAVIGATION PUBLICATION E 4 PECS USER GUIDE V1 0 Revision 008 Trial VICON MOTION SYSTEMS 4 12 Trial Base interface Include file Typelib file Availability Description Methods IDispatch ServerPI h PECS tlb PECS 1 0 Workstation 4 5 with SDK 2 0 Represents a trial containing subjects reconstructed trajectories analog data force
78. plate data and other items This interface contains functions for getting at these items represented as separate objects with their own interfaces so that they may be manipulated This interface is rarely implemented by plug ins but instead a pointer to a trial object is typically passed to plug in functions for example see the IVProcess interface 1 AnalogBaseRate AnalogChannel 3 AnalogChannelCount 4 CreateTrajectory 5 DataPath 6 DateAndTime 7 DefaultMarkerSize 8 DeleteAllTrajectories 9 DeleteAllUnlabelledTrajectories DeleteTrajectory 11 Description 12 EclipseNode 13 EventStore 14 Execute 15 FindAnalogChannel 16 FindSubject 17 FindSubjectByPrefix 18 FindTrajectory 19 FindTrajectorylndex 20 FirstValidTrajectoryFieldNum 21 ForcePlate 22 ForcePlateCount 23 IsStatic 24 LastValidTrajectoryFieldNum 25 Notes 26 ParameterStore 27 ReferenceName 28 RefreshChanges 29 RegisterTrajectoryTypeGroup 30 SetDefaultMarkerSize NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 Trial VICON MOTION SYSTEMS 4 12 1 AnalogBaseRate 4 12 2 AnalogChannel 4 12 3 AnalogChannel Count Properties Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description 31 SetLabelPrefixUsage 32 SetStaticStatus 33 SetTrajectoryTypeGroupUnits 34
79. plication in question On the Tools menu click Macro and then click Security to open the Macro Security dialog box On the Security Level tab make sure that macro security is either Medium or Low On the Trusted Sources tab click to select the Trust access to Visual Basic Project check box to turn on access Click OK to apply the setting and close the Office Application 2 2 2 Visual Basic The PECS server must be selected as a reference in the Visual Basic development environment before it can be accessed within Visual Basic or VBA code To do this 1 Open the Visual Basic or VBA Project needing PECS On the Project menu Tools menu in VBA click References to open the references dialog box 3 Ifthe server has been registered PECS should appear in the list 4 Ifthe server has not been registered click Browse and search for PECS TLB which should be in your Vicon Workstation folder 5 Check the PECS entry in the reference list 6 Click OK to apply the settings NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 INSTALLING THE PECS SERVER V CON MOTION SYSTEMS 223 2 2 4 Microsoft Visual C Microsoft Visual J Microsoft Visual C does not require any explicit installation of the PECS server Once it has been registered on your system it will be available using the appropriate C calls However C wrapper classes can be generated by Visual Studio using the
80. resent other 3 dimensional quantities This interface is rarely implemented by plug ins but instead plug ins typically obtain a pointer to a trajectory object through other means such as from a trial object see IVTrial interface Note that unless stated otherwise changes to trajectories are not reflected in the user interface until a call is made to RefreshChanges on the Trial object This is to allow multiple changes to occur with only a single refresh for maximum performance ClearSelectedPoints ClearTrajectory FindGapAt FindGapBackward FindGapForward FirstValidFieldNum GetPoint GetPoints GetPointCameras 10 HasEmptyLabel 11 Hide 12 InvalidatePoint 13 IsVisible 14 LastValidFieldNum 15 MatchesLabel 16 MatchesLabelPrefix 17 PointCamera 18 PointCameraCount 19 SampleRate 1O00 NI OOT el 20 SelectedPointCount 21 SelectedPointField 22 SelectPoint 23 SetPoint 24 SetPoints 25 Show 26 Units NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 VICON Trajectory MOTION SYSTEMS Properties 27 Colour 28 Label 29 MarkerSize 30 TypeGroup 4 11 1 ais Declaration HRESULT ClearSelectedPoints oints Return type NONE Parameters NONE Description Removes all point selections from the trajectory and leaves it in a deselected state 4 11 2 ClearTrajectory Declaration HRESULT ClearTrajectory Return type NONE Parameters NONE Description
81. ription HRESULT GetPoint inJlong i_Field inJReconstruction i_Point NONE long i_Field Field number Reconstruction i_Point New reconstructed point Sets the co ordinates of the trajectory at the specified one based field number as a Reconstruction interface Call Release on the returned object when it is no longer required HRESULT SetPoints inJlong i_Begin in long i_End inJVARIANT i_ Points NONE long i_ Begin Range begin field number long i_End Range end field number VARIANT i_ Points 3 x N array of co ordinates Sets the co ordinates of the trajectory over the specified one based field range inclusive of end frame as 3 x N matrix of co ordinates If the matrix passed in does not have the same number of columns as there are fields in the specified range the server throws an exception HRESULT Show NONE NONE Makes the trajectory visible in the user interface Workspace propput HRESULT Colour inJ Colour i_Colour propget HRESULT Colour out retval Colour retval Colour Trajectory colour Colour i_Colour HHH At the time of writing this function is not implemented in Workstation software HHH New trajectory colour NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 VICON Trajectory MOTION SYSTEMS 4 11 28 Label Declaration propput HRESULT Label in BSTR i_Label propget HRESULT Label out retval BSTR retval Return ty
82. rkstation 4 5 with SDK 2 0 Description This interface provides the user with information about force plate data 2 ForceY 3 ForceZ 4 IsValid 5 MomentX 6 MomentY 7 MomentZ Properties 5 5 1 ForceX Declaration HRESULT ForceX out retval double retval Return type double Force X value Parameters NONE Description Returns the X component of the force reaction 5 5 2 ForceY Declaration HRESULT ForceY out retval double retval Return type double Force Y value Parameters NONE Description Returns the Y component of the force reaction 5 5 3 ForceZ Declaration HRESULT ForceZ out retval double retval Return type double Force Z value Parameters NONE Description Returns the Z component of the force reaction 5 5 4 IsValid Declaration HRESULT IsValid out retval BOOL retval Return type BOOL Valid flag for this point Parameters NONE Description Indicates if there is valid force and moment data NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON Reaction MOTION SYSTEMS 5 5 5 MomentX Declaration HRESULT MomentX out retval short retval Return type double Moment X value Parameters NONE Description Returns the X component of the moment reaction 5 5 6 MomentY Declaration HRESULT MomentY out retval double retval Return type double Moment Y value Parameters NONE Description Returns the Y component of the moment reaction 5 5 7 MomentZ Declar
83. s Non generic events NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON Event MOTION SYSTEMS tend to be defined by the system procedure or application and have fixed labels and descriptions that should not be modified 4 3 3 Context Declaration propput HRESULT Context in JEventContext j_EventContext propget HRESULT Context out retval JEventContext retval Return type EventContext Event context Parameters EventContext i EventContext New event context Description Sets and gets the event context to which this event belongs Call Release on the returned object when it is no longer required 4 3 4 Description Declaration propput HRESULT Description inJBSTR i_Description propget HRESULT Description out retval BSTR retval Return type BSTR Event description Parameters BSTR i Description New event description Description Sets and gets the event description in the form of a text string 4 3 5 IconID Declaration propput HRESULT IconID in long i_IconID propget HRESULT IconID out retval long retval Return type long Event icon identifier Parameters longi _IconID New event icon identifier Description Sets and gets an identifier for the event icon This Icon ID is also used to represent the type of the eventina language independent way Event types and therefore icon IDs should have carefully chosen values to ensure that they are unique a
84. sual Basic Editor to open the VBA project 6 Seta breakpoint near the beginning of the program then select Run Sub UserForm from the Run menu 7 Step through the code as desired NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 USING THE AUTOMATION SERVER V CON MOTION SYSTEMS 3 1 6 Settings Clicking Settings on the main Plug In options dialog will open the dialog shown in Figure 11 below preferences i x Client Applications Options Application Reaistry ProglD Cancel Matlab Application Excel Application Word Application LabVIEW Application Figure 11 Settings The list of Client Applications in Figure 11 indicates the unique Registry ProgID program identifier that will be used to activate the various client processes by ActiveX and it is unlikely that these will need changing By selecting a client application in the list and clicking Options or double clicking the application the registry ProgID can be edited in the dialog shown in Figure 12 below x Enter New Registry ProglD Cancel Figure 12 Changing an ActiveX Program ID NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 USING THE AUTOMATION SERVER V CON MOTION SYSTEMS 3 1 7 Product Version Information 3 1 8 Releasing Client Applications To check the version of the PECS Plug In and sever you have installed click Version on the
85. tart and end fields represent the bounds of the gap and by definition the points at those fields will both be invalid To find the next gap start the search from the end field of the found gap plus one NAVIGATION PUBLICATION lt gt PECS USER GUIDE V1 0 Revision 008 66 Trajectory VICON MOTION SYSTEMS 4 11 6 FirstValidField 4 11 7 GetPoint 4 11 8 GetPoints Num 4 11 9 GetPointCameras Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description HRESULT FirstValidFieldNum out retval long retval long First valid field number NONE Returns the one based field number of the first valid point in the trajectory This will be zero if there are no valid points in the trajectory HRESULT GetPoint inJlong i_Field out retval Reconstruction retval Reconstruction Reconstructed long i_Field Field number Obtains the co ordinates of the trajectory at the specified one based field number as a Reconstruction interface Call Release on the returned object when it is no longer required HRESULT GetPoints in long i_Begin in long i_End out retval VARIANT retval VARIANT 3 x N array of co ordinates long i_ Begin Range begin field number long i_End Range end field number Obtains the co ordinates of the traje
86. terface Parameters NONE Description Obtains the ratio of the analog to video capture rates for this force plate Call Release on the returned object when it is no longer required 4 6 2 CenterOfPressure Declaration HRESULT CenterOfPressure inJlong i_Samplelndex out retval Point Return type Point Centre of pressure position Parameters long a_SampleIndex Sample index to obtain data for Description Obtains the centre of pressure position of the force on the plate in laboratory co ordinates Call Release on the returned object when it is no longer required NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON ForcePlate MOTION SYSTEMS 4 6 3 Corners Declaration HRESULT Corner in short i_Corner out retval Point retval Return type Point Position of this corner Parameters shorti Corner Corner to get the position for Description Returns the 3 dimensional co ordinates of the corners of the force plate There are four corners ordered in a clockwise fashion and the corner index is 0 based Call Release on the returned object when it is no longer required 4 6 4 FirstSampleNum Declaration HRESULT FirstSampleNum out retval long retval Return type long Sample number Parameters NONE Description Returns the first sample index for which data is available on this force plate 4 6 5 ForceUnits Declaration HRESULT ForceUnits out retvalJBSTR retval Return type BSTR
87. the given section with the given name to store an array of integer values 4 7 7 CreateRealArray Declaration HRESULT CreateRealArray inJBSTR i_Section inJBSTR i_Parameter in short i_Dimensions in short i_pDimensionArray Return type NONE Parameters BSTR i Section Section name BSTR i_Parameter Parameter name short i_ Dimensions Number of array dimensions short i pDimensionArray Array of dimension values Description Creates a parameter in the given section with the given name to store an array of single precision real FLOAT values NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION VICON ParameterStore MOTION SYSTEMS 4 7 8 CreateTextArray Declaration HRESULT CreateTextArray inJBSTR i_ Section inJBSTR i_Parameter in short i_Dimensions in short i_pDimensionArray Return type NONE Parameters BSTR i Section Section name BSTR i_Parameter Parameter name short i Dimensions Number of array dimensions short i pDimensionArray Array of dimension values Description Creates a parameter in the given section with the given name to store an array of text characters 4 7 9 Delete Declaration HRESULT DeleteParameter inJ BSTR i_pSection Parameter inJ BSTR i_Parameter Return type NONE Parameters BSTR i Section Section name BSTR 1 Parameter Parameter name Description Deletes the given parameter from the given section in the parameter store There is no error i
88. tised before storage HRESULT GetSamples in long i_Begin in long i_End out retval VARIANT retval VARIANT N vector of sample values long i_ Begin Range begin sample long i_End Range end sample Obtains the values of the analog channel over the specified one based sample range inclusive of end sample as an N vector HRESULT LastSampleNum out retval long retval NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION AnalogChannel VICON MOTION SYSTEMS 4 1 7 4 1 8 4 1 9 4 1 11 SampleRate SetSample SetSamples 4 1 10 Units MatchesLabel Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration long Last valid sample number NONE Returns the last inclusive sample index for which data is available on this channel HRESULT SampleRate out retval double retval double NONE Sample rate Returns the sample rate of the data for this analog channel in Hz HRESULT SetSample in long i_Index in double i_Value NONE long i_Index double i_ Value Sample index of data to set New value for this sample Sets the analog channel data value at the specified index Because of storage constraints the data may be quantise
89. tory This will typically be 0 if the trajectory is not selected 1 if the trajectory is selected at a single point or 2 if a range of points has been selected on the trajectory Higher numbers could indicate multiple selection of individual points but the meaning is open to interpretation depending on desired functionality HRESULT SelectedPointField in long i_Index out retval long retval long Field number long i_Index Selection index Obtains the one based field number of the Nth selected point on the trajectory where N is given by the selection index and must lie within the bounds determined by a call to SelectedPointCount HRESULT Units out retval BSTR retval BSTR Units NONE Returns the trajectory point units in the form of a text string HRESULT SelectPoint in long i_Field NONE long i Field Field number to select Selects the trajectory point at the given one based field number The call may fail if the maximum number of points typically two are already selected in the trajectory NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Trajectory VICON MOTION SYSTEMS 4 11 24 SetPoint 4 11 25 SetPoints 4 11 26 Show 4 11 27 Colour Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Desc
90. tting 3D co ordinates in other interfaces 1 IsValid 1 Xx 2 Y 3 Z HRESULT IsValid out retval BOOL retval BOOL NONE Valid flag for this point Indicates if there is valid data for this point propput HRESULT X in double i_Value propget HRESULT X out retval double retval double double i_ Value X value New X value Sets and gets the X component propput HRESULT Y in double i_Value propget HRESULT Y out retval double retval double double i_ Value Y value New Y value Sets and gets the Y component propput HRESULT Z in double i_Value propget HRESULT Z out retval double retval double double i_Value Z value New Z value Sets and gets the Z component NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION Range VICON MOTION SYSTEMS 5 3 1 5 3 2 5 3 3 Begin End Size 5 3 Range Base interface Include file Typelib file Availability Description Methods Properties Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Description IDispatch ServerPI h PECS tlb PECS 1 0 Workstation 4 5 with SDK 2 0 This interface encapsulates a sample range If the Size of the range is zero then the range is not valid 1 Begin 2 End 3 Size HRESULT Begin out retval long retval long
91. ue Obtains the requested date and time parameter as a standard COM DATE type This is a floating point number which represents days as whole number increments starting from midnight 30 December 1899 See Boolean for a description of how to calculate the value index Note also that the dimensionality will be one higher than expected since the date values are stored as an array of three integers HHH At the time of writing this function is not implemented in Workstation software HHH HRESULT GetDimensionCount inJBSTR i_Section inJBSTR i_Parameter out retval short retval short Number of array dimension BSTR 1 Section BSTR 1 Parameter Section name Parameter name Gets the number of dimensions of the specified parameter HRESULT Dimension inJBSTR i_Section inJBSTR i_Parameter in long i_Index out retval short retval short Size of array dimension BSTR 1 Section BSTR 1_Parameter short i_Index Section name Parameter name Dimension to obtain size for Gets the size of the indexed dimension of the specified parameter NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION ParameterStore VICON MOTION SYSTEMS 4 7 16 Getlnteger 4 7 17 GetReal 4 7 18 GetText 4 7 19 SectionCount Declaration Return type Parameters Description Declaration Return type Parameters Description Declaration Return type Parameters Descr
92. w reference count NAVIGATION lt gt PECS USER GUIDE V1 0 Revision 008 PUBLICATION
Download Pdf Manuals
Related Search
Related Contents
Borrador del informe INSTALLATION SMARTTOP Samsung TBI-42 دليل المستخدم 取扱説明書 Mitsumi electronic FX1S User's Manual Ton patro Pioneer DVRX162 SmartGen 6.0 User Manual Copyright © All rights reserved.
Failed to retrieve file