lal Posted December 8, 2008 Report Share Posted December 8, 2008 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... Thank you, lal Quote Link to comment
Justin Goeres Posted December 8, 2008 Report Share Posted December 8, 2008 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. Quote Link to comment
lal Posted December 8, 2008 Author Report Share Posted December 8, 2008 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 Quote Link to comment
Justin Goeres Posted December 8, 2008 Report Share Posted December 8, 2008 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. Quote Link to comment
lal Posted December 9, 2008 Author Report Share Posted December 9, 2008 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 Quote Link to comment
Maca Posted December 9, 2008 Report Share Posted December 9, 2008 Lal it really doesn't seem like your trying, but attached is a VI which should get you started. Quote Link to comment
lal Posted December 9, 2008 Author Report Share Posted December 9, 2008 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 Quote Link to comment
lal Posted December 13, 2008 Author Report Share Posted December 13, 2008 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? Thank you Quote Link to comment
eaolson Posted December 13, 2008 Report Share Posted December 13, 2008 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. Quote Link to comment
lal Posted December 13, 2008 Author Report Share Posted December 13, 2008 QUOTE (eaolson @ Dec 12 2008, 10:29 PM) 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. 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 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'. You can check what i have done in the following image.But the problem is that this loop gives me 4 values when loop terminates. I want to take one after another during the loop is running. http://lavag.org/old_files/monthly_12_2008/post-14123-1229120375.png' target="_blank"> Thank you, lal Quote Link to comment
Justin Goeres Posted December 15, 2008 Report Share Posted December 15, 2008 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.