LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Logarithmic Time Points for Collection

Solved!
Go to solution

I am trying to create a subvi that will send a 1D array of time points evenly spaced on a logarithmic scale to a higher vi to use for data collection times. Hence by collecting at those time points the VI will effectively capture the data as a semilog plot. 

 

However, all I am trying to do at this point is create the subvi to generate the 1d array of time points to incorporate into my current program. I would like to be able to impose the number of points, the start point, and the end point. These constraints demand that the base of the log varies with the initial parameters. 

 

If you use the equation 

 

# points = x*Logx[End time] which I know to be true you end up needing a productlog in order to use that directly as a mathematical recipe for generating the base to use to get the right number of points logarithmically spaced between two imposed endpoints. Is there a way to do productlogs in labview or a vi already in existence for this problem?

0 Kudos
Message 1 of 6
(3,752 Views)

I may not be a proper person to respond, but long story short, you want to calculate Product Log, which is a solution for w for the equation z=w*e^w given z. Is it true?

 

Let's say the function is productlog(z), what your array should include?

 

productlog(1), productlog(2), productlog(3)... ?

 

I just wanted to clarify this. thx

TailOfGon
Certified LabVIEW Architect 2013
0 Kudos
Message 2 of 6
(3,733 Views)

Just a rough idea:

check.png

You need to incorporate error checks and other minor enhancements...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 6
(3,724 Views)
Solution
Accepted by topic author SarcasticElephant

Thanks for your help. I ended up doing it in a roundabout way but this basically has a variable base for the log which allows you to set the start and end points and the number of points between. I split the positive and negative times to avoid difficulties with negative logarithms. It isn't super elegant but I think it works.

 

 

I was talking about using the product log in order to work from that formula I stated earlier. However, I think that this is a roundabout way to do that. 

0 Kudos
Message 4 of 6
(3,702 Views)

I think all you probably need is ramp pattern. Set the "type" input to logarithmic. 😄

Message 5 of 6
(3,690 Views)

Yah this could probably work as well. Haven't played around with it yet but it looks like what I wanted in the first place.

0 Kudos
Message 6 of 6
(3,669 Views)