LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using LabVIEW for basic program control

Hello All,

 

I'd like to use labVIEW for some process control and I have limited knowledge of the software. What I'd like to do in process steps are

 

Process Set Up (all data needs to be recorded to an excel file)

1. Scan Operator (from barcode, refering to a excel sheet to give me a pass or fail criteria. If the number is not on the excel sheet, the process stops)

2. Date (write automatically to excel file).

3. Time (write automatically to excel file).

 

Process

1. Scan 1 part (write automatically to excel file).

2. Measure voltage - Pass or Fail between a tolerance (automatically write result to excel file).

3. Proximity sensor - Pass or Fail.

4. Repeat step 1 to 3. 4 times.

5. Print all recorded data as a barcode or QR code.

 

Would really appreciate the help, just as a starting point!! I've sat here for a few hours and not got anywhere.

 

0 Kudos
Message 1 of 10
(3,225 Views)

Hi JLSN,

 

What I'd like to do in process steps are

Whenever you can define certain "steps" (aka states) in your "process" (aka program) you should think of a state machine!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(3,213 Views)

A State Machine would be one place to start for the process.

 

Barcodes Scanners typically have a keyboard interface, so that part should be a simple GUI screen with a string input.  The Event Structure will help here.

 

Talking to Excel can be weird.  It takes a lot of ActiveX interfacing.  There are many examples floating around if you look.

 

The measuring of the voltage depends on what you are using to perform the measurement (DMM?  DAQ?)

 

I know there is an example for printing a QR code.  I just don't have time to look.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 10
(3,207 Views)

thanks for your response.

 

I will be using DAQ for the measurement.

 

The excel is not critical, I just need to get all that into a file that can be refered back to using the QR further in the process. 

0 Kudos
Message 4 of 10
(3,202 Views)

@JLSN wrote:

 

I'd like to use labVIEW for some process control and I have limited knowledge of the software.  


Keep in mind LabVIEW is a programming language.  Do you have other programming experience?  JAVA, C++, VisualBasic, Python, etc.  LabVIEW is gearted twards beginners but having any experience in another language can be useful in understanding concepts.

 

That being said here is the basic free training link that are sent around.  I'd highly suggest taking the 6 hour course, or if you recently purchased LabVIEW it came with a year of SSP support and has some good free self paced online training. 

 

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide 

Learn NI Training Resource Videos

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required

 

A famous quote by Abraham Lincoln goes something like "Give me six hours to chop down a tree and I will spend the first four sharpening the axe." Diving head first into LabVIEW to accomplish your goal will likely have you going around in circles for days or weeks.  Take some of the training and you'll have a better result.

Message 5 of 10
(3,141 Views)

All of the above and one more:

Start LabVIEW, select File->Create Project from the menu.

There are a number of example projects you can then create and look at.

CLA
0 Kudos
Message 6 of 10
(3,121 Views)

Two minor comments.

  • Hooovahh -- I love your Lincoln Quote.  Very appropriate.
  • If you have a modern (meaning Version 2xxx) version of LabVIEW and have the Report Generation Toolkit, writing data to Excel is not at all difficult and doesn't require ActiveX knowledge.  There are even some decent Examples out there.

Bob Schor

0 Kudos
Message 7 of 10
(3,104 Views)

Instead of Excel as .xls files, you can use a tab separated text file, .csv, it opens in Excel and it's only the data that's interesting (no picture linking or such) it's most often sufficient.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 10
(3,092 Views)

thank you all,

 

I'm mananging to get somewhere now using that advice. I'm still not sure how to get a pass or fail from known tolerances or values. Are there any examples of this anywhere?

0 Kudos
Message 9 of 10
(3,070 Views)

What you'll want is probably under the Comparision palette.  This palette compares numbers to other numbers and generally returns booleans.  The In Range and Coerce is a common one that can tell if a number is in a range of other numbers.  This and much more is covered in the self-paced online training.

0 Kudos
Message 10 of 10
(3,067 Views)