Jump to content

How to create a voltage graph denpends on the switches state.


lal

Recommended Posts

Hi,

I am not using the labview for a long time,that's why i have a question.I have already searched at google and at some of my books but i haven't found the solution in my problem.I am trying to create a graph showing the fluctuation of voltage depends on 3 switches.

To be more specific check the signal i want to create...

graphty8.th.jpg

Thank you,

lal

Link to comment

QUOTE (lal @ Dec 7 2008, 10:01 AM)

I am not using the labview for a long time,that's why i have a question.I have already searched at google and at some of my books but i haven't found the solution in my problem.I am trying to create a graph showing the fluctuation of voltage depends on 3 switches.

What have you come up with so far? If you show us what you've got, we can definitely help you figure out what's wrong with it.

Link to comment

QUOTE (Justin Goeres @ Dec 7 2008, 07:42 PM)

What have you come up with so far? If you show us what you've got, we can definitely help you figure out what's wrong with it.

I haven't done anything that works because I don't know which tools are the appropriate for my work.I have tried to use the simulate signal but I can't do anything with that.I suppose that I need some boolean controls (in order to change the switches state) and something that I can save all the states.This must be an array. Then I suppose that i need a delay.Finally i must use a while structure in order to see the alteration of switches state.

I didn't post this topic because I wanted to give me the solution.

I just need some guidance.

Thank you,

lal

Link to comment

Are you doing this with hardware, or is it just a programming exercise? The solution will be very different depending on whether you're operating any "real" hardware or whether you're just doing a demonstration that displays things to a front panel window.

Also, have you looked through the intro materials in the LabVIEW Help? They're probably the best introduction to the basic tools available to you.

Link to comment

QUOTE (Justin Goeres @ Dec 8 2008, 01:39 AM)

Are you doing this with hardware, or is it just a programming exercise? The solution will be very different depending on whether you're operating any "real" hardware or whether you're just doing a demonstration that displays things to a front panel window.

Also, have you looked through the intro materials in the LabVIEW Help? They're probably the best introduction to the basic tools available to you.

I am doing just a demonstration that displays things to the front panel.

Just the graph according to the switches state..

I already have looked in the labview help and at some e-books that i have.But as you know there are so many tools in the labview that i have been lost!

Thank you,

lal

Link to comment

QUOTE (Maca @ Dec 8 2008, 01:01 PM)

Lal it really doesn't seem like your trying, but attached is a VI which should get you started.

Thank you Maca for your help.

This is a very good start for me.This VI will help me to understand how these controls work.

I will play with these controls and I think that I can create the graph I want.

I am looking for a way that states change automatically, not manual like in your VI.But I don't want the solution...I will try to find it on my own!!

Thank you,

lal

Link to comment

Hi again,

As i said on my last post i would like the states changes automatically.I convert the boolean states to integer.

My states are 10000, 1000, 100, 10...So my values are 16, 8, 4, 2.

Then I create a For loop using shft registers.

The problem is that i can't transfer the different values out of the structure.

As i know data pass out of the loop only when the loop terminates.That's why i get the last value on an external indicator.

Can i do something with that or i have to think another way?

post-14123-1229113659.png?width=400

Thank you

Link to comment

QUOTE (lal @ Dec 12 2008, 02:27 PM)

As i said on my last post i would like the states changes automatically.I convert the boolean states to integer.

My states are 10000, 1000, 100, 10...So my values are 16, 8, 4, 2.

None of those are booleans. It's not quite clear what you're doing here.

You can pass out all of the values from inside a loop by right-clicking on the tunnel, and selecting "Enable indexing." Then you'll have all the values and can do whatever you want with them.

Link to comment

I think we've got a pretty significant language barrier here, because I don't think it's clear to any of us what the real meat of your question is.

QUOTE (lal @ Dec 12 2008, 02:20 PM)

I am sorry,My mistake!I meant binary.

What i want to do is to make a loop that gives me one value each time during the loop.

Then I can take each value,compare with another value and make my graph.

It is correct that if you put code outside the loop, you will only get the values from the loop after all iterations of the loop have completed. If you want to use the values in each loop iteration as soon as they're produced, you must put the code inside the loop.

QUOTE

It is something like the VI that user Maca sent me before some days..

The difference with that i am trying to make is that the loop could create the switches state automatically.

Instead of changing the switches one by one i can send a number(like a code).For example i send the number 16 instead of changing the 5 switches with the word '10000'.

There are at least two things you may not be aware of, which may help you:

  • There is a pair of functions called Boolean Array to Number and Number to Boolean Array that will convert an integer to & from an array of boolean values.
  • You can display any integer in boolean or hex by right-clicking on it and selecting Display Format....

I'm sorry we're not able to be more helpful. It's just really, really unclear what you're after.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.