LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sort measurement data from Random Number generator input.

Hi,

 

I am a Labview novice attempting a DSC project for an end-of-semester Manufacturing Control assignment.

 

Basically building a conveyor belt that transports moulded parts by a Vision System and sorts measurements into pass or fail categories. Later to include an IO Server, variable library and VIs for Operator, Engineering and Quality departments.

 

*** I will not include any part of a Vision System in the project, just reference it in report.

 

I managed to build the conveyor belt, Stop button, ON/OFF breaker and reset but that really adds little to the project. 

 

Through my own confusion I am stuck at the stage of gathering data. I need to use a random number generator to simulate continuous output from the Vision System. What I would like advice on is how to connect the RNG to a case structure/enum/state machine to input random measurements, sort into pass or fail and output the data to fill pass or fail bins. I have some small experience of filling and emptying tank and using arrays so hopefully can get that far myself. My plan is to have as basic a system as I can as more variables could lead to issues later. I have left it way too late to post here as I need to submit this by Wednesday but any advice would be more than appreciated.

 

I have attached my attempted VI and a snip of it. Please ignore Flash Boolean. Was planned to have a third case for a rework bin, will now just go for Pass and Fail case.

 

Regards,

Tony

Download All
0 Kudos
Message 1 of 10
(2,784 Views)

Your random number is between 0 and 1, so you want to multiply it with a reasonable number to even get to 9. (Never do "equal" comparisons on floating point numbers).

All you need is wire the scaled random number to the comparison and add a 1 to an integer held in a shift register whenever the comparison is true. From the total number of iterations you can calculate the number of failed comparisons.

0 Kudos
Message 2 of 10
(2,779 Views)

Here is one possible solution.

 

Countem.png

Message 3 of 10
(2,770 Views)

@GreennRed wrote:

Hi,

 

I am a Labview novice attempting a DSC project for an end-of-semester Manufacturing Control assignment.

 

Basically building a conveyor belt that transports moulded parts by a Vision System and sorts measurements into pass or fail categories. Later to include an IO Server, variable library and VIs for Operator, Engineering and Quality departments.

 

*** I will not include any part of a Vision System in the project, just reference it in report.

 

I managed to build the conveyor belt, Stop button, ON/OFF breaker and reset but that really adds little to the project. 

 

Through my own confusion I am stuck at the stage of gathering data. I need to use a random number generator to simulate continuous output from the Vision System. What I would like advice on is how to connect the RNG to a case structure/enum/state machine to input random measurements, sort into pass or fail and output the data to fill pass or fail bins. I have some small experience of filling and emptying tank and using arrays so hopefully can get that far myself. My plan is to have as basic a system as I can as more variables could lead to issues later. I have left it way too late to post here as I need to submit this by Wednesday but any advice would be more than appreciated.

 

I have attached my attempted VI and a snip of it. Please ignore Flash Boolean. Was planned to have a third case for a rework bin, will now just go for Pass and Fail case.

 

Regards,

Tony


Tony,

you really need a way to stop your while loop (Other than using the abort button or Ctrl+Period "." ) Do you really need to update the indicators 1.21 jiggtimes per second?  Can the user actually see that fast? 

Spoiler
I bet not! but, I'm old and my vision is getting faulty.  I'll defer to a research opthamologist  about that.

Throttle that while loop with a wait function rather that the UI thread switches. Windows will thank you.


"Should be" isn't "Is" -Jay
Message 4 of 10
(2,768 Views)

Thanks Christian for your swift reply. 

 

As I am a novice is there any video or document that could illustrate your suggestion better? Apologies, had exams on Saturday, was looking at various RNG, Case Structure, Enum, State Machine videos and comicated-looking Labview VI examples since yesterday and am developing melted head syndrome! 

0 Kudos
Message 5 of 10
(2,767 Views)

@altenbach wrote:

Here is one possible solution.

 

 


 

He did mention it was homework CA.  self report and do some magic


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 10
(2,766 Views)

Thanks Christian. Have to run to collect daughter from school. Will look at this later. Are you at about 9:30 in the morning in California. I lived in Abq before but forget the three US time differences.

0 Kudos
Message 7 of 10
(2,764 Views)

@GreennRed wrote:

... was looking at various RNG, Case Structure, Enum, State Machine videos and comicated-looking Labview VI examples since yesterday and am developing melted head syndrome! 


There is not need to drop fancy words.

 

Well, start with your course notes. I am sure you learned all that at one point, else you would not have this assignment. From the code you have attached, it almost looks like you have never worked with LabVIEW, so maybe you should go back to the instructor and tell him that. It makes no sense for you to get such an assignment.

 

If you are still interested in doing this, start with all the basic LabVIEW tutorials.

0 Kudos
Message 8 of 10
(2,762 Views)

Cheers Jeff. I wasn't joking when I said I am a novice! First time seeing Labview was last September. Studying online so just had 4 face-to-face Labview labs since then covering Arrrays, Shift Registers, DSC Module, State Machines and Intro to Modbus. A self-learning experience. For now just want random data in,sort Pass or Fail. Most of the forum jargon I don't understand because of inexperience. 

0 Kudos
Message 9 of 10
(2,741 Views)

I pretty much haven't worked with Labview and definitely not compared to most posters here. I'll check that solution you posted and see where I get with it.

0 Kudos
Message 10 of 10
(2,737 Views)