07-15-2014 10:36 AM - edited 07-15-2014 10:37 AM
The values for resistors are fixed and they can not be changed once the program is running. But users can change the value for the input v1 which may lead to change the output as well.
07-15-2014 10:37 AM
@Vick472 wrote:
The values for resistors are fixed and they can not be changed once the program is running. But users can change the value of the input v1 which may lead to change the output as well.
In that case, you just need a numeric control to allow the user to change the Vin and an indicator to show the Vout.
On your block diagram, you use numeric constants for your resistor values.
07-15-2014 10:56 AM
I am not able to wire it up and use the maths fucntions acording to the diagram. someone help please!!!
07-15-2014 11:00 AM - edited 07-15-2014 11:08 AM
Vick472 wrote:
I am not able to wire it up and use the maths fucntions acording to the diagram. someone help please!!!
You should really look at some tutorials for LabVIEW. 😛 You are not even using the output from the math functions...
First, change the R1 and Rf variables from Indicators to Constants. (Right click them on the block diagram and click "Change to constant")
Second, you need to re-wire. Each function takes inputs and produces an output. You should not need to directly connect R1, Rf, or Vin to one another... They are all going to be "inputs" to the functions.
For example, if you wanted to Add R1 and Rf:
R1 -------->
[Add Function] -----> Sum
R2 -------->
Then if you wanted to divide that sum by Vin, you could wire that up to:
R1 --------> [ ]
[Add Function] ------> [ ]
R2 --------> [ ] [Divide Function] ---> NewSum
Vin ------------------------------> [ ]
NOTE: This is a made up example. But it helps demonstate dataflow. You will need to wire them to the correct math functions to create the formula shown in your original picture.
07-15-2014 11:03 AM
Well, one thing you could do is copy the drawing (as a png) onto your front panel and overlay the two "resistors" with either a popup of allowed values, or a digital control where the user can type in a value. Likewise you can provide a numeric input for specifying a Vin value. In the block diagram, do the calculations and update the output based on the most current inputs.
I was thinking maybe a knob or slider for Vin and a meter for Vout.
Mike...
07-15-2014 11:05 AM
@mikeporter wrote:
Well, one thing you could do is copy the drawing (as a png) onto your front panel and overlay the two "resistors" with either a popup of allowed values, or a digital control where the user can type in a value. Likewise you can provide a numeric input for specifying a Vin value. In the block diagram, do the calculations and update the output based on the most current inputs.
I was thinking maybe a knob or slider for Vin and a meter for Vout.
Mike...
The OP has trouble wiring up basic math functions using Dataflow... I wouldn't worry about some of the formatting until after. 😛 But that's just my approach with him/her so far. I figure we should take baby steps.
07-15-2014 11:12 AM - edited 07-15-2014 11:18 AM
I see what you mean but when I started on my reply, there had only been one other response. By the time I finished it (with interruptions and all ) the discussion was into the second page and I was very late to the party. Oh well, such is life.
Mike...
07-15-2014 11:19 AM
07-15-2014 11:32 AM - edited 07-15-2014 11:32 AM
This will work, all values can be changed while running and Vout will instantly reflect changes
BUT this is where this type of simulation ends, because you can not limit the mathematical Vout like an Op-Amp's rail voltage will limit actual Vout in a circuit or a proper circuit simulation program would.
07-15-2014 11:34 AM
@Vick472 wrote:
@nyc_(is_out_of_here) wrote:
You'd have to represent the resistors by numeric controls and then either use formula or simple multiplication/addition/etc.
I'd suggest LabVIEW tutorial.
By the way, to do what you want with any other programming language would be the same.
That is assuming you know how to program in another language.
Yes, I have manged to get it done in c programming. If you can please give me an helping hand that would be great.
The Formula Node has a context very similar to C, so this might be a good first step if all you want is something that works.
Open the Context Help (shortcut is Ctrl+H) and read the Detailed Help to better understand its use. Inputs and Outputs can be defined by right clicking on the border and selecting "Add Input" or "Add Output".