how do I send a digtal pulse at a .9ms rate without comprimising myprograms speed?

This is a discussion on how do I send a digtal pulse at a .9ms rate without comprimising myprograms speed? within the labview forums in Programming Languages category; I have a program where I need to send a digital pulse to 6 strobe boards in order to make them flash. However when I use the DAQ assistant along with a data constant to sen dthe signal it clogs up my loop slowing it to a rate that is not efficient. I need the flash triggers to be seperated by 0.9ms and flash in a triplets (flash-.9ms-flash-.9ms-flash-"gap of time specified by frequency&quot . My issue is there isn't an external clock I've found that solves my problem. If someone has a method of making this work or an alternative ...

Go Back   Application Development Forum > Programming Languages > labview

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-13-2008, 04:10 PM
ewong
Guest
 
Default how do I send a digtal pulse at a .9ms rate without comprimising myprograms speed?

I have a program where I need to send a digital pulse to 6 strobe boards in order to make them flash. However when I use the DAQ assistant along with a data constant to sen dthe signal it clogs up my loop slowing it to a rate that is not efficient. I need the flash triggers to be seperated by 0.9ms and flash in a triplets (flash-.9ms-flash-.9ms-flash-"gap of time specified by frequency&quot. My issue is there isn't an external clock I've found that solves my problem. If someone has a method of making this work or an alternative method it would be much appreciated. Thanks! :smileyhappy:
Reply With Quote
  #2  
Old 08-13-2008, 04:10 PM
ewong
Guest
 
Default Re: how do I send a digtal pulse at a .9ms rate withoutcomprimising my programs speed?

here's a pic of my code.


code.JPG:
http://forums.ni.com/ni/attachments/...127/1/code.JPG
Reply With Quote
  #3  
Old 08-14-2008, 03:40 PM
Jaime F
Guest
 
Default Re: how do I send a digtal pulse at a .9ms rate withoutcomprimising my programs speed?

Hi,

The approach you are taking right now although it may work you are depend on your OS also the DAQ assistant is intended for easy, quick code that are by no means optimal depending on your application. Which card do you have?

If you have and M series you can set a correlated Digital output where you use the counters as the sample clock, this will allow you to send the triggers exactly at .9 ms and pause the generation after the triplet. If you have a static digital input output card then you have no options for setting determinism on your generation and will always be depended on your operating system. I will suggest opening and play around with the shipped example: “Correlated Dig Write with Counter.vi” also start digging into the DAQmx low level VIs (right click the DAQ assistant and select generate code).

I hope it helps
Reply With Quote
  #4  
Old 08-14-2008, 03:40 PM
ewong
Guest
 
Default Re: how do I send a digtal pulse at a .9ms rate withoutcomprimising my programs speed?

I did look at those examples and was able to incoporate a pulse train into my code generating the pulse I required. However I now need to have a signal running simultaneously with the other signal at half the speed. I have a PCI6221 board and a SCC-68 board. Thank you so much for your help Jamie.
Reply With Quote
  #5  
Old 08-15-2008, 03:40 PM
Jaime F
Guest
 
Default Re: how do I send a digtal pulse at a .9ms rate withoutcomprimising my programs speed?

Hi ewong,
I'm sorry I forgot to attach the example I built with your first post. Is not a very clean code but it might help you get started. First task: (easy one)
is to generate two pulses at the same rate. Copy the same code you have for one pulse train in parallel with the first one (no wires dependency). Second with
want those to start at the same time, for that you will use the trigger capability of a counter. After you have accomplish this we will change the rate by making the
second counter output a pulse every time it counts 2 high ticks and to low ticks of the first counter.

I hope it helps


40mhz_pulse_train.vi:
http://forums.ni.com/ni/attachments/...pulse_train.vi
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 10:37 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.