LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Understanding counters/pulses/timing

Hello everyone, I have slowly but surely been working on a closed looped forced controlled bioreactor for some research and have gotten stuck trying to understand how to utilize a output pulse/clock to control my stepper motor. Basically iam going to go around the timer built into my stepper motor driver (555 timer) and use an output from our SCB-68 connector block so i can control the step frequency.I have done some reading but i need some answers to a few questions since I am not an electrical engineer by any means. The heart of my question is should i be using a digital (pulse) output or analogue wave from 0-5+VThe stepper driver manual states "external clock or pulse source. Signal must remain between0-5+V" 

as for programming after looking through all the options "pulse train" looks to be the function i need so i can control the frequency of the pulses. (it will basically be pulsing the whole time the VI runs and the motor will only turn on/change speed for specific conditions)

 Do i need to look up specs on the specific 555 timer so i know the appropriate duty cycle or other parameters?what type output do i need to use.....just specify the channel and connect it directly to the 'counter' terminal on the pulse train vi? Should i use one of the timing outputs that is specified for the card: There are two channels that are an option when I setup generate pulses using Digital out with DAQmxthe SCB-68 manual states there are several timing channels on the block (aka PFI), but states that two of them are not programmable as outputs...and that the remaining timing signals use five different dedicated outputs...there are 9 different PFIs on the  SCB-68 diagram with different names next to them ie. TRIG 1, STARTSCAN....etc. Thanks in advance for any help or further explaining you can do on any of these topics….i am really close to getting this all done since I have all of the other basic programming done...but I need to be able to control step frequency through lab view.

 

0 Kudos
Message 1 of 5
(3,431 Views)

bfleish wrote:
Hello everyone, I have slowly but surely been working on a closed looped forced controlled bioreactor for some research and have gotten stuck trying to understand how to utilize a output pulse/clock to control my stepper motor. Basically iam going to go around the timer built into my stepper motor driver (555 timer) and use an output from our SCB-68 connector block so i can control the step frequency.I have done some reading but i need some answers to a few questions since I am not an electrical engineer by any means. The heart of my question is should i be using a digital (pulse) output or analogue wave from 0-5+VThe stepper driver manual states "external clock or pulse source. Signal must remain between0-5+V" 
This is going to be your standard digital out voltage.  I'm assuming this is going into a high-impedance input on your driver board/box and not straight to the motor itself since any DAQ card that I can think of isn't going to have the power to drive a stepper motor directly.
 Do i need to look up specs on the specific 555 timer so i know the appropriate duty cycle or other parameters?

 Most likely not, just shoot for a 50% duty cycle.

 

As to the rest of your questions, I'm afraid that I'm still a bit in the dark myself on a lot of those issues.  I've gotten pulse-train stuff to work before, but not often enough to know it by rote.  One thing I am aware of though is there are some pretty significant differences between different DAQ cards and the way they handle counters and pulse trains.  The easiest way to do what you're looking to do is to use a continuous pulse train.  But your hardware has to support 'hardware timed single point' to do this.  Long story short, follow up with the model of your DAQ card.

Message 2 of 5
(3,392 Views)

Hi bfleish,

 

Most of our boards use TTL Compatible signals for Digital I/O (including counters), which will be between 0-5V, and is likely what the stepper motor driver would require for its input.  A good place to help you start programming would be one of our LabVIEW examples (I saw you are using LabVIEW from a previous post).  You can find pulse generation examlpes at the following location:

From LabVIEW, go to Help>>Find Examples... then navigate to Hardware Input and Output >> DAQmx >> Generating Digital Pulses.  Each of the examples should have a description as well as instructions for connecting the hardware and running the code.  You will have to decide which example fits your needs best based on your specific application.

 

If you need anything else, don't hesitate to ask--you should let us know the following information if you would like more specific help:

  1. What DAQ device are you using?
  2. What motor driver are you using?  A link to a manual would be the most helpful.
  3. What is your specific application?  (i.e. what do you require from the motor?)


Thanks for posting, and Happy Holidays!

 

-John 

John Passiak
0 Kudos
Message 3 of 5
(3,371 Views)

I am not sure exactly what card we have. I have been trying to look it up but it seems we don't have the documentation any more and in M&A explorer it has 'pci-6221' and 'PXI system (Unidentified)'under the devices tab

 

I am using a haydon 40105 chopper drive, here is the manual.

 http://www.hsi-inc.com/drives/chopper/40105/Chopper%20Drive%2040105.pdf

 

the motor will be cyclically loading a synthetic tissue sample with cells embedded in it. I have the program already set up to follow a waveform but right now the step frequency is not in the LV program. Basically the motor turns on when the desired value is above/below the current value,depending on if it is loading/compressing. There is some inconsistency in the motion due to mechanical friction forces in the equipment and the physical properties of the material change slightly during the tests, so a small amount of error control is needed to make the motion as accurate as possible......i was going to do this through stepper frequency by controlling the pulses......thanks for the help so far....

 

 

0 Kudos
Message 4 of 5
(3,321 Views)

Hi bfleish,

It sounds like you are on the right track, but please let us know if any issues come up.  If you need the documentation for your PCI-6221, the M Series User Manual and the 622x Specifications have a lot of good information.  Also, you can find the NI-DAQmx Help installed at Start >> All Programs >> National Instruments >> NI-DAQ.

 

Again, don't hesitate to ask if you have any questions -- we are always glad to help.

 

-John

John Passiak
0 Kudos
Message 5 of 5
(3,271 Views)