Using the C3DServer with LabVIEW
Dustin A. Bruening, Ph.D.
Motion Analysis Laboratory Shriners Hospitals for Children – Erie PA (USA)
February 18, 2010
Description and Disclaimer
Included is a short documentation on how to access the C3DServer functions within LabVIEW (National Instruments, Austin TX USA), along with a sample VI that reads the 3D points and associated labels for a .C3D file. This code is offered “as is” to help others in the biomechanics community, and was written solely for the convenience of the author, not being associated with MLS in any way.
Incorporating the C3D server into LabVIEW is simple using the ActiveX VIs. These VIs are found on the Functions Palette under Connectivity –> ActiveX.
- Place the “Automation Open” VI on the block diagram.
- Create a refnum control input. On the front panel, right click the refnum control and choose Select ActiveX Class -> Browse, then browse to the C3DServer.dll (Generally under C:\WINDOWS\system32).
- Get an invoke node from the ActiveX palette and wire the refnum into it. Right click on the Method and you will be able to choose from any of the C3D server functions.
- Wire inputs and outputs as needed.
- Finish with the “close reference” VI.
Note that a lot of the functions can be run in parallel, without passing the refnum sequentially. However, error checking may require sequential code.
The example VI supplied here reads the 3D marker coordinates and associated labels from a .C3D file into LabVIEW. It was written using LabVIEW 8.2.