I would suggest you look at two examples and one tutorial. The Compressor With Cylinder example uses a limit switch. The front panel of this example shows how to wire a limit switch, and the diagram code shows how to read it using WPI_DigitalInputGetValue.vi. Notice how the limit switch is used to change the solenoid direction, but you will want to use it to decide what speed value to pass to your motor. The Motor Control example will show you how to wire and run a motor. It defaults to a Talon motor controller, but can be easily changed to a Jaguar. Tutorial 7 - Integrating Examples into Robot Code will teach you how to take example code and merge it into your existing robot code.
You can launch the NI Example Finder by clicking Find FRC Examples on the Support tab of the LabVIEW Getting Started Window. And you will find the tutorial on the Tutorials tab of the Getting Started Window. If you already have LabVIEW running with VIs open, you can choose View>>Getting Started Window...