Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

09-05-2014 03:12 PM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi all.

I would like some help on how to create a program. Im still very new to the Labview program so any help would be greatful.

Now granted that, heres my issue, ive got an assignment for a class that i have no idea where to start.

Heres the assignment:

You have a discount coupon that gives you a ten cent per gallon discount up to 15 gallons.

You purchase regular gas which is priced at $3.56 a gallon, you give the clerk $30.00 to purchase that much in gas. After applying the discount, how much would you actually have to pay?

For the controls and indicators, i need to show the Amount Tendered, the Discount, Gallons purchased, the Final Price and Discount Amount.

As ive said above, i have no idea where to start with this.

THanks all.

09-05-2014 03:16 PM - edited 09-05-2014 03:16 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@lorddd337 wrote:

As ive said above, i have no idea where to start with this.

I asusme you have the math worked out, so all you need to to is create a VI.

I recommend to start with the tutorials?

(I doubt that you are required to apply any knowledge that was not mentioned in class, so go through your class notes too.)

09-05-2014 03:18 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Actually i dont have the math worked out as of yet since i have no idea how to do the math that will apply to the program.

Also i dont know which tutorial would work for this.

nyc_(is_out_of_here)

Trusted Enthusiast

09-05-2014 03:28 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@lorddd337 wrote:

Actually i dont have the math worked out as of yet since i have no idea how to do the math that will apply to the program.

That is math I could have done in high school.

@lorddd337 wrote:

Also i dont know which tutorial would work for this.

You have learnt nothing in class? Skipping class?

09-05-2014 03:31 PM - edited 09-05-2014 03:32 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@lorddd337 wrote:

Actually i dont have the math worked out as of yet since i have no idea how to do the math that will apply to the program.

Then you need to work out the math first. This has nothing to do with LabVIEW or programming.

For each terminal, decide if it is an input (something the user controls) or an output (something the program will calculate based on the values of the other controls). Have you done that?

@lorddd337 wrote:

Also i dont know which tutorial would work for this.

Whatever you just learned in class is probably sufficient. Else start the tutorials in order to learn the basics.

09-05-2014 03:38 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Step 1: Identify the controls and indicators you need (place them on the front panel). These will be connected to the math operations you create on the block diagram.

Step 2: Do the problem on paper (basic mutliplication and addition), then you can think about how to make labview do it.

Step 3: Wire the controls to the math function inputs and wire the outputs to the indicators.

For this type of program you could get away with pretty basic stuff.

09-05-2014 04:40 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Thanks all.

Ill look into it and see if i can get this thing to work.

09-05-2014 04:53 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

09-05-2014 05:17 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

This sounds like a fun first project! Just tough enough to be a worthy introduction to LV. I'll be monitoring this thread in the hopes that I (along with everyone else) can help you along when you need it.

Bill

(Mid-Level minion.)

My support system ensures that I don't look totally incompetent.

Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

Humble author of the CLAD Nugget.

(Mid-Level minion.)

My support system ensures that I don't look totally incompetent.

Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

Humble author of the CLAD Nugget.

09-06-2014 05:33 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi all.

Im back again this time with how i think i can do this.

Now the math came out like this:

Final Price = Amount Tendered - ( Amount per Gallon x No. Gallons)

What im having trouble with, is how to include the Discounted price when it goes above the limit to be included into this program.

Ive got the math figured out, now i need to figure out how to include all this together.