LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programming in labview?

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.

0 Kudos
Message 11 of 26
(1,009 Views)

@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.


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 12 of 26
(1,005 Views)

Untitled2.png

 

I am not able to wire it up and use the maths fucntions acording to the diagram. someone help please!!!

0 Kudos
Message 13 of 26
(987 Views)

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.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 14 of 26
(979 Views)

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...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 15 of 26
(972 Views)

@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.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 16 of 26
(967 Views)

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 Smiley Happy ) the discussion was into the second page and I was very late to the party. Oh well, such is life.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 17 of 26
(950 Views)
The user seems to have basic trouble with math as well.
0 Kudos
Message 18 of 26
(936 Views)

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.

 

Inverting Op-Amp.JPG

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 19 of 26
(929 Views)

@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".

FormulaNode.png

0 Kudos
Message 20 of 26
(925 Views)