LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pulse to Stepper Motor with Thermocouple

Hi. I hope somebody can help me! I am very much a novice when it comes to traverses and labview (I am a mathematician!) so any help would be apprectiated. 

 

Basically I have a simple stepper motor with external power supply for a linear (up/down) traverse. I have a thermocouple attached to the end of the traverse and which to move this up and down through a body of water. Anyway, I did code up something in Labview - however it seems like a really scrappy solution to the problem and appears to give spurious results. Ideally I want to just be able to set a frequency of pulses to the stepper motor, and give a frequency for recording temperature readings and output/log the temperatures against time (or equivilantly position).

 

My first question is how do I drive the stepper motor via a pulse at a certain frequency? I tried creating a squarewave signal but couldn't find a way to link this to the DAQ process. Basically I really want to get away from this setting of Line-0 to true and then false to create a pulse - the traverse seems slow this way and I am sure it is capable of going faster. 

 

I should point out that my stepper motor is being pulsed by the USB-6008 and my thermocouples controlled via USB-9213.

 

Many thanks for any help. 

0 Kudos
Message 1 of 3
(2,118 Views)

Update: I can now get the stepper motor to work using a digital waveform but for some reason the speed seems unaffected by the samples per second setting of the waveform itself. This puzzles me so any help on the matter would be appreciated. I have attached the basic workings. 

 

Many thanks. 

0 Kudos
Message 2 of 3
(2,099 Views)

Hey

 

In terms of frequency for your stepper motor. The thing to bare in mind is that the 6008 has no onboard clock. Therefore, any frequencey output will be as a result of software timing of your VI write loop. The caveat with this is that windows can not iterate faster than a 1KHz as that is the base clock that windows runs on. This means that your stepper motor will only work reliably up to this frequency. 

 

Have you looked at the example finder in LabVIEW. There are a number of bits of code showing how to code for DAQmx. If you search for 6008 a software timing example should show up. If not there will be one in the dev zone of the website for this. 

Matthew Trott
Applications Engineer
National Instruments UK
www.ni.com/ask
0 Kudos
Message 3 of 3
(2,088 Views)