LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Create Digital Array?


theodyssey12 wrote:

Yes, what I have been was working in the attachment you gave me, but when I tried to run it in my program (to test whether it would work in my case structure) the edited array indicator didn't seem to light up.  Is there a reason why this happened?



I would focus first on a simpler program to create the array. Currently, your code is all over the place with dangling code fragments and case structures. For example if the boolean to the big case structure is FALSE, you would not even create the array.

 

At this point, leave out all that other stuff and try to simply create the boolean array. Once this is working, you can make it into a subVI to be used in the main code.

Message 21 of 23
(558 Views)

@theodyssey12 wrote:

I am trying to use T_n = T_0 (sqrt(n+1) - sqrt(n)) where:

T_n = time between pulses, which I can convert to distance between samples

T_0 = sqrt (pi/(250n))

n = pulse number (0,1,2, ...)



This does not look right. Do you have a link to a web site that describes the theory?

 

Why is T_0 dependent on n? For n=0, T_0 would be infinite.

Message 22 of 23
(552 Views)

Hi, sorry about that:

 

T_0 = sqrt (pi/(250acceleration)) where acceleration is the acceleration of the stepper motor in radians/sec^2.  T_0 will basically be a constant that I multiply to (sqrt(n+1) - sqrt(n)) - this is the part I am having trouble with.  Right now, I have modified what you sent me and hooked up the dimensions of the array to the final sample rate for the acceleration profile.  I have also changed the old true boolean element with a subarray of 0110 which wil represent my pulses I will be outputting.

 

Here is the website that shows the formula I will be using: http://www.silabs.com/Support%20Documents/TechnicalDocs/an155.pdf (look at page 7)

 

Also, I have increased the rotation angle so that it will always route to my true statement for now, which means that everything else should be routed into the array you sent me. 

 

However, I am having some trouble routing my pulses into the proper indices.  Is there an easy way I can incorporate the formula so that between pulses I have a sample number that the program can skip in order to have a smooth acceleration?  Also, I tried to hook up the 1-D boolean array to a digital waveform but it doesn't accept it, even though I am using DWDT Boolean Array to Digital.  Could you explain to me what is incompatible with the wiring and how I can fix it?

 

Thanks a lot,

Mitchell 

0 Kudos
Message 23 of 23
(547 Views)