LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Assistant: How Can I Control this at the lowest Level?

Solved!
Go to solution

I have updated the VI. Just need a confirmation from you. I am getting a 0.5 microsecond pulse although its actually 0.487us (at zero span with 1us sweep XD).

0 Kudos
Message 71 of 77
(1,987 Views)

MrSafe,

 

This VI looks correct to me.  The one thing I would watch out for is the fact that you have Sample Clock Rate set via a control on the front panel.  Your data generation depends on it being set to a particular value (in your case 10 MHz).  I would consider making this a constant on the block diagram.  Leaving it as a control would invite a user to set it.  If they set it to a value that is not 10 MHz, then the generated pulses will not match the pattern they specified.

 

My two cents,
Dan

Message 72 of 77
(1,973 Views)


Mcdan wrote:

MrSafe,

 

This VI looks correct to me.  The one thing I would watch out for is the fact that you have Sample Clock Rate set via a control on the front panel.  Your data generation depends on it being set to a particular value (in your case 10 MHz).  I would consider making this a constant on the block diagram.  Leaving it as a control would invite a user to set it.  If they set it to a value that is not 10 MHz, then the generated pulses will not match the pattern they specified.

 

My two cents,
Dan


 

I agree =).

 

 

Is there any method you would suggest if I wanted the pulses to be shuffled after the user specifies how many pulses he/she wants? For example the user wants a total of 10 pulses where 5 pulses have a high time of .5 microseconds and a low time of 10 microseconds, and the other 5 pulses have a high time of 5 microseconds and a low time of 20 microseconds. Is there anyway to shuffle these pulses? I think I would have to store them then shuffle them then feed them into the loop.

 

0 Kudos
Message 73 of 77
(1,960 Views)

MrSafe,

 

I gave the pulse shuffle problem a try.  For this, I assumed when you said shuffle, you mean a random shuffle so that's what I've done.  There may be more efficient ways to do this (I'm more of a DAQmx expert than I am a LabVIEW expert).  Basically I generated an array of size(totalNumberOfPulses).  Each element of this array corresponded to the index into the 'Pulse Array' which defines the high and low time for that pulse.  I then shuffled this array.  This should give me an array of pulse specs indexes in random order.  I then loop through the shuffled array, and create a pulse according to 'Pulse Array' indexed at the value read from the shuffled array.  Hopefully that description made at least bit of sense... I've attached my attempt.  I haven't had much of a chance to test this, but it seemed to be working OK.

 

Hope this helps,

Dan

0 Kudos
Message 74 of 77
(1,947 Views)
Shoot I run labview 8.2 I believe you are running 8.5. Is there anyway I can open this vi without upgrading?
0 Kudos
Message 75 of 77
(1,945 Views)
Solution
Accepted by MrSafe

MrSafe,

 

Sure no problem... I usually try to save back to an earlier version, but I forgot.  I fixed one issue I found with my shuffling loop (accidently indexing past the end of the array).

 

Here's the VI saved for LV 8.2.

 

Dan

Message 76 of 77
(1,940 Views)

Thank You. It will take awhile for me to fully grasp what you did there but I can fallow it sort of =).

 

 

I don't have other questions that I can think of I will give you a kudos and check the solution box under it. I want to thank everyone again for helping me I will post any other questions here when I think of them.

0 Kudos
Message 77 of 77
(1,934 Views)