Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

can I calculate the i_th iteration of a variable with Math Script Node?

I am trying to program a numerically solution to solve the van der Pauw equation.
For that reason I need to use the iteration of a variable - Is that possible with the Math Script Node and if so how?

Here is link to the problem I am trying to program:
http://www.eeel.nist.gov/812/samp.htm

Thank you for help


Message Edited by hanna80 on 07-14-2008 12:11 PM
0 Kudos
Message 1 of 9
(4,885 Views)
Hi Hanna80,

There are a number of ways you could solve this problem. You could certainly use a math script node, but I would suggest using the standard LabVIEW Mathematics functions like this:



I simply implemented the equation to find the ith value of Y. The two inputs coming in from the left are Ra and Rb, and the input from the bottom is Zi.

Once you have your equations implemented, you can control the iteration of variables via a simple while loop (once  you have initialized Z) checking the error of your result every iteration and stopping when the error is below the required threshold.

Or you could implement a simple state machine since the algorithm for solving this equation is well defined into isolated steps. You can open a new VI with the basic state machine structure in LabVIEW by selecting File » New... and choosing "Standard State Machines" from the Design Patterns. There are numerous discussions of State Machines and their virtues on this forum, as well as many articles on our web site to help you develop using them.


Message Edited by Captain Kirby on 07-15-2008 05:02 PM
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
0 Kudos
Message 2 of 9
(4,859 Views)

I created a quick solution to the Van der Pauw equation and posted it to the NI Community. Feel free to download it and use it as you wish. It should provide a good example of how to iteratively solve an equation.

 

Iterative Numeric Solution to Van Der Pauw Equation

 

Feel free to modify the code however you would like.

Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
0 Kudos
Message 3 of 9
(4,671 Views)

hello

thanks for sharing this. I would like to understand the input : the Z and Y  are actually related to Ra and Rb ?! do we need to input this ? 

thanks again

N

0 Kudos
Message 4 of 9
(4,458 Views)

Hi N,

 

The Z and Y represent physical locations.  They are not linked to Ra and Rb, which are just coefficients, but they are necessary for calculating the sheet resistance.  You need to know how big your sheet is to calculate its actual resistance.  Without Y and Z you would just have incremental resistance.  The addition of Y and Z gives you real world values that you can use.

 

 

Nick Keel 

Applications Engineering 

National Instruments

Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
0 Kudos
Message 5 of 9
(4,437 Views)

hi,

thanks for the answer (I thougth that the Z and Y are the first values for the iterations of z0 and so on..; so they would be redundant..). so please clarify (or point me to a reference) what are the physical locations (how do you define). suppose I have a thin plate with a clover leaf geometry, what the y and z would be in this case ?

sorry for trouble

thanks again

N

0 Kudos
Message 6 of 9
(4,435 Views)

Hello,

 

In the implementation given, the Z and Y values are simply the inital conditions as described in the original link. They are starting points in which the iterative solution begins so they are required in order to start that process.

 

-Zach

0 Kudos
Message 7 of 9
(4,384 Views)

Can you write the van der pauw using LABVIEW 6...

0 Kudos
Message 8 of 9
(3,721 Views)

If you ever need a VI Downconverted, we have a forum specifically for that. If you post your request here, someone should be able to downconvert it in no time.

Stephanie A.
Americas Marketing Manager
National Instruments
0 Kudos
Message 9 of 9
(3,657 Views)