Quantcast
Channel: All LabVIEW posts
Viewing all 204074 articles
Browse latest View live

Re: Labview I/O Server

$
0
0

You could also typecast an array of U16 values into an array of single floating points in the event you have registers in a row you have acquired as an array to convert.

You could also typecast an array of U16 (with only two elements) in to a single floating point.

 

You may have to play around as the word order may matter.

 

Useful functions will be under the Numeric >> Data Manipulation palette.


Re: Using an encoder to read RPM

$
0
0

You said,  "I can't remember though, how do I change the boolean so I can wire to "STOP IF TRUE" and not "CONTINUE IF TRUE"?"

 

It sure sounds like you want to change the mode of the while loop's terminal.  If that isn't what you meant, then that message did not come through the way you wrote it.

 

It is far more likely for a LabVIEW programmer to not know that the terminal's mode can be changed then it is for a programmer of any language to not know about a Boolean "NOT" function.

 

Re: Shortage Of memory

$
0
0

On a 64bit OS, LabVIEW 32bit can use up to 4GB of RAM.

 

What does your program do and what are the main data structures. Is the code inteiigently designed for maximum inplaceness or is it littered with express vis and dynamic data?

Does it run out of memory immediately or after a while of running?

Getting gaussian distributed 1-D array around a desired mean from a uniformly distributed 1-D array

$
0
0

Hi, I am using Labview 2019. I have a "uniformly distributed" 1-D array in Labview. From this 1-D array, I would like to produce a "normally distributed" 1-D array. The only restriction I would like to have is that the normally distributed array should have it's mean as a particular value. 

 

I am struggling to convert my 1-D uniformly distributed array to a gaussian distributed aka normally distributed array. I would appreciate your assistance to help achieve this purpose. Thanks!

 

Re: Eliminate the need to recompile a executable if a vi is changed at source

$
0
0

As a brief side note, for VIs you'd need to call them dynamically (as already described).

 

However, for PPLs (Packed Project Libraries, .lvlibp files) you can directly call them (like normal VIs) statically - but you must stop the executable and restart it to load a new PPL when you replace the lvlibp file.

 

To change/update behaviour whilst an executable is running, you still need dynamic calls, even for PPLs. An article describing this can be found here: Refuelling in flight

 

Note that's quite a bit more tricky than simply restarting the exe with a new lvlibp file if restarting is a possibility. 

Question on a animated control

$
0
0

Hi,

 

I was just back to LabVIEW again.

While I checking a 3rd-party program, I figure out a internal control for animating of progress by using ring control.

The program used many graphical stuffs in front panel.

I am wondering the best way for how to prepare the graphic for the program of LabVIEW by other graphic software.

 

Because of no the external control file in the code, I suspect this control was used in internal control of LabVIEW.

Can you suggest how to find the control in LabVIEW?

 

labmaster.

Labeling Columns

$
0
0

The issue with this is that the column labels dont show up on the file it creates. I’m struggling to figure out part B, how to fix the diagram so that it functions properly by only changing one wire.

Re: Getting gaussian distributed 1-D array around a desired mean from a uniformly distributed 1-D array

$
0
0

There's a very general approach for mapping a uniform probability distribution (where P(x) = k, a horizontal line at constant value k) into any other P(x) shape, including Gaussian.

 

There are a couple key ideas.  First, be prepared to think of the ranges for your distributions in *normalized* terms, i.e., treat them as going from 0 to 100%.  

 

Second, integrate your probability distribution function to get a *cumulative* probability.  Be sure to normalize this cumulative probability so it also goes from 0 to 100%.  You can precalculate this to create a reverse lookup table.  That is, given a particular cumulative probability, what is the value where that cumulative probability occurs?  

 

Now, for each uniformly distributed value, you can map it to an equivalent 0-100% of the range.  Then you can do a lookup for that same cumulative % probability, and discover the corresponding value.  The resulting values will be distributed according to the desired P(x) shape.

 

Understanding this idea will let you generate distributions of any shape you want, you won't be limited to the most common ones.

 

 

-Kevin P


Re: Image capture with LabVIEW

$
0
0

If I change the capture time to 2 ms or 3 ms per image.

Is it possible to use this camera?

I wonder that how long the delay time with that camera during the capture?

Will it bring about any loss with the image?

Causing the time can’t control accurately in 2 ms or 3 ms .

forループでのループ最中の途中経過をブロック外での参照方法

Re: Labeling Columns

$
0
0

A picture of a page in your book.

But no picture, or actually no VI attached to your message so we can see what you actually did.

 

What help do you expect to receive?

 

Are you sure you programmed your VI EXACTLY how it looks in that picture?

 

If you are sure, then attach your VI so we can see what you did that doesn't match what that picture of a page shows.

Re: Labeling Columns

$
0
0

That’s not what the question is asking. It says “run this program and demonstrate that it does not work as hoped”, the vi from the picture in the book is purposely built wrong and you’re supposed to recognize what’s wrong with it and fix it. Obviously my vi isn’t going to work if it’s the exact same as that picture, it’s not supposed to. My question was what’s wrong with the vi in the picture that’s preventing the column titles from showing on the file it produces... 

Re: Question on a animated control

$
0
0

It's a picture ring.  Various PNG images created elsewhere imported into the different items through Advanced, Customize...

Re: Question on a animated control

$
0
0

Thank you.

I cannot find the custom file in the code.

My question was not how to realize the customed control but where to find the control in LabVIEW.

 

Is it possible to add a customed control into the code without saving a control (external) file?

Or how to check if the control is included in the code?

 

labmaster.

Re: Question on a animated control

$
0
0

It doesn't exist in LabVIEW.  Someone create that control file themselves based on a picture ring and importing their own pictures into it.

 

Yes, you can create a custom control and not save it as a .ctl file.  You just need to make the control exists in a VI and that you save that VI.  If you delete it from the VI, then it will no longer exist.

 

I don't understand why you are asking these questions considering you have a ctl file attached to your first message.  Where did you get that .ctl file from?


Re: Labeling Columns

$
0
0

It seemed like you were trying to replicate the VI and didn't know why it didn't work.

It wasn't clear that you were trying to do the homework problems listed on that page.

 

I'm not going to give you the answer.  But I'll give you some tips.

 

Which functions in that picture relate to writing data to a file?

If you turn on context help and hover over those functions read the descriptions of all the terminals on those functions and see if any of them apply to the problem that is being asked of you.  It is possible that certain inputs may be wired or unwired, and if they are unwired, what is the default value that the input connection uses?

Re: Getting gaussian distributed 1-D array around a desired mean from a uniformly distributed 1-D array

$
0
0

Look into the box-muller transformation, which gives you two values of gaussian distributed numbers given two uniform distributed values (0...1).

Apply scale and offset for desired mean and sigma.

Re: Labeling Columns

$
0
0

Also think about data flow and execution order. I am sure that was covered in class. 🙂

Re: Labeling Columns

$
0
0

I'm not certain that can be fixed with just one change - I'm pretty sure based on the filename that one of my previous colleagues had this book, I'll see if he left it here and check the diagram but I suspect you have two problems, both of which are easily fixed, but fixing only one will I suspect leave you with a race condition.

 

The book wasn't really to my taste if it's the one I'm thinking of, but I doubt you have much choice in the matter...

Re: Shortage Of memory

$
0
0

The program acquires a continuous signal (trigger) through the analog input pins. Once the trigger is on, it saves a signal acquired from the oscilloscope into an array. The expected outcome is an array of size 9,000 * 17,000 (double). 

It doesn't run out of memory immediately but rather at the 24th trigger. First, it slows down and skips few triggers, and then it crashes with a memory error.

Viewing all 204074 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>