LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

interleaving arrays

It's spitting out 9.  Because once the first for loop is done, there is one pair of pulses going into the 2nd loops shift register.  It uses the # of pulses in the last element of the array (8) and uses that in the N terminal of the 2nd loop.  So it takes 1 pair of pulses and builds on 8 pairs of pulses yielding 9 pairs.

 

You figure out how many you want and run the For loop that many times.  You can initialize the 2nd array's shift register with an empty array.  (That or take what I have and do a -1 on your desired pulse number).

0 Kudos
Message 11 of 16
(710 Views)

oh...damn man scared the hell out me I have been doing calculations based on this XD.

 

so to rephrase your saying in the first loop add a "-1" to the shift register which will take away that extra pluse which it spits out.  Would be wise to add this "-1"at the beginning of the loop or end?

0 Kudos
Message 12 of 16
(699 Views)
I am a bit confused now. I ran the vi under highlight execution option and I saw that it sent out 10 pluses and 10 pluses. I have tried various combinations and I am seeing that it is sending out as many pluses as I put in. Maybe I am looking at it from the wrong angle?
0 Kudos
Message 13 of 16
(698 Views)

What is an "XD"?

 

How many pulses do you want it to put out?  When I ran the diagram I posted, it put out 9 pulses.  I intended 8, but a minor flaw made it 9.  I really didn't care about the number of pulses, and the number was rather undefined in the way you posed the question.  All I worried about was showing how to modify your code so that it puts out pulse A, then pulse B, then pulse A, then pulse B, .....

 

It shouldn't be hard to take what I posted and modify it as you need.  I would never take someone else's code and just run with it as is, until I thoroughly understood how it worked and was sure it was doing exactly what I wanted.

 

If you are still having problems and have questions, post your latest version of your VI and let us know exactly what it is you want to do from there.

0 Kudos
Message 14 of 16
(688 Views)

XD: Experimental Data?

       Extraneous Dust?

       Elastic Dentures?  (Well, that would really need an X... but it sounds too good to leave off)

 

I was wondering that myself but figured it must be so obvious.  Didn't want to embarass myself by asking a stupid question.  Thanks for asking.

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 15 of 16
(686 Views)

Ravens Fan wrote:

What is an "XD"?

 

How many pulses do you want it to put out?  When I ran the diagram I posted, it put out 9 pulses.  I intended 8, but a minor flaw made it 9.  I really didn't care about the number of pulses, and the number was rather undefined in the way you posed the question.  All I worried about was showing how to modify your code so that it puts out pulse A, then pulse B, then pulse A, then pulse B, .....

 

It shouldn't be hard to take what I posted and modify it as you need.  I would never take someone else's code and just run with it as is, until I thoroughly understood how it worked and was sure it was doing exactly what I wanted.

 

If you are still having problems and have questions, post your latest version of your VI and let us know exactly what it is you want to do from there.


XD= Experimental Data my apologies.

 

Well i thought you meant that the code I orignally posted had an error in it. Basically I was using that vi to generate some data I am still unsure of the vi because my analyzer only supports a maxium of 5MHz video resolution bandwidth . However, I sample these pluses at 10 MHz which until I can get my hands on a analzyer that can do 10MHz RBW and VBW I can never trust anything with the VI I use. But I put in 10 pluses in the first array and 10 in the second and I used the probe and the analzyer and I see 20 pluses in total. I will try this out with the modifcation that you mentioned perhaps that is where it is occuring?

 

 

I will post an update of the vi tomorrow and you can take a look because when I added your suggestions I did not use a shift register.

0 Kudos
Message 16 of 16
(672 Views)