Pages

click here

Tuesday, December 28, 2010

LabVIEW Interface VIs for SolidWorks and COSMOSMotion

With mechanical design software such as SolidWorks, mechanical engineers can design machine parts and assemblies using a point-and-click interface with 3D visualization. COSMOSMotion, a SolidWorks add-on, helps simulate mechanism motion by taking into account mechanism dynamics, such as forces and friction, and generates information, such as position and kinetic energy.

While COSMOSMotion is well-suited for open-loop motion simulations, a typical electromechanical system involves closed-loop control. For a true closed-loop simulation, engineers need to simulate not only the dynamics of the mechanism but also the control algorithms that act on the mechanism. The mechanical simulation involves parameters such as friction, forces, and gravity, while the control simulation involves algorithms such as PID. NI LabVIEW is a graphical development environment with more than 650 analysis and control algorithms as well as functions like trajectory planning and spline interpolation. Engineers commonly use LabVIEW to design controls for complex machines that involve motion control, vision, and analog and digital I/O. After the simulation validates the control algorithm design, engineers can deploy the same LabVIEW programs to any programmable automation controller (ni.com/pac) in their machines.

[+] Enlarge Image
Figure 3. The mechanical simulation involves parameters such as friction, forces, and gravity, while the control simulation involves algorithms such as PID.

Consider a simple example of a block moving on a surface. Applying a force to the block in the horizontal direction moves the block for a certain distance, depending on the friction between the block and the surface. Repeatedly applying a force to the block continues to move the block along the direction of the force. Consider this a simplified view of a linear motor stage. Applying a force to the block (analogous to the magnetic force) and simulating the dynamics of the system in COSMOSMotion generates the output of the position to which the block moves. This position acts as a process variable for the PID algorithm, and, given a setpoint, the PID algorithm calculates the next force to be applied. Engineers can apply this force in given steps of time, depending on the servo update rate at which engineers run the algorithm in the final system. Engineers now need an interface between LabVIEW and SolidWorks/COSMOSMotion to be able to run hundreds of iterations of this closed-loop control simulation.

[+] Enlarge Image
Figure 4. The LabVIEW interface VIs for SolidWorks/COSMOSMotion provide a seamless interface between the two environments so engineers can simulate closed-loop control for complex electromechanical systems.

The LabVIEW interface VIs (functions) for SolidWorks/COSMOSMotion provide a seamless interface between the two environments so engineers can simulate closed-loop control for complex electromechanical systems. The interface VIs invoke the COSMOSMotion API via ActiveX to communicate between LabVIEW and SolidWorks/COSMOSMotion. Learn how to download these interface VIs below.

The LabVIEW interface VIs for SolidWorks/COSMOSMotion include basic functions to initialize, run simulation, and close the communication with SolidWorks/COSMOSMotion. It also includes advanced functions to set parameters such as forces and gravity in SolidWorks/COSMOSMotion and to get values in LabVIEW from SolidWorks/COSMOSMotion for parameters such as position, velocity, acceleration, and kinetic energy.

[+] Enlarge Image
Figure 5. The LabVIEW interface VIs for SolidWorks/COSMOSMotion include basic functions to initialize, run simulation, and close the communication with SolidWorks/COSMOSMotion. It also includes advanced functions to set parameters such as forces and gravity in SolidWorks/COSMOSMotion and to get values in LabVIEW from SolidWorks/COSMOSMotion for parameters such as position, velocity, acceleration, and kinetic energy.

The interface VIs also includes advanced functions to set parameters such as forces and gravity in SolidWorks/COSMOSMotion and to get values in LabVIEW from SolidWorks/COSMOSMotion for parameters such as position, velocity, acceleration, and kinetic energy.

No comments:

Post a Comment