where do you have problems? Can you communicate to your DAQ card? Do you use a real time system? How accurate do you need the time period?
Also, what cards are you using? Is the solenoid controlled by an analog voltage? analog current? or digital voltage? It seems to me that you would need something like the NI 9263 AO card to control the solenoid position.
Like Mike said, it is important to know what sort of time period you're trying to use. You can use the operating system time in LabVIEW to determine what value you will output to your solenoid using something like Time Elapsed VI. If the time periods you are looking to control with are too small you won't really be able to achieve that kind of control with a 9172, you may need to look into using a cRIO chassis instead that has hardware timed control.