XY graph using formula node
In a formula node there is one input(x) and two outputs(y1,y2).
Plot y1,y2 on a single XY graph for different x1 values(from 100-200). please reply...
regards,
jathin
Solved!
Go to Solution.
Hi Jathin,
this sounds like a school assignment. This forum isn't intended to do other peoples homework.
This assignment also is very basic stuff, which should be easily to solve after going through basics course offered by NI...
And, as said before, we will help to develop code as soon as you attach your work here. We will not write stuff from scratch...
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome
Similar Messages
-
How to simulate waveform using formula node
is it posible to get waveform using formula node.for example,i want to calculate Vo=Vs sin wt,in formula node,i use
V*sin*2*pi,how to use the answer to plot waveformor if you REALLY want to continue it the way you had (not sure why you would)...
Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
Attachments:
build[1].vi 16 KB -
Graph equation formula node problems
I am using LV6.0. I am having some problems regarding the formula in the formula node. I hope someone can help. The vi is attached
Attachments:
graph equation.vi 15 KBYes, that's right. Waveform graphs and charts always show data in this way. If you want to use your x-values as x-axis and the y-values as y-axis, you have to use the xy-graph.
Attached is a screenshot of the vi.
Hope this helps.
Thomas
Message Edited by becktho on 10-04-2005 12:32 PM
Using LV8.0
Don't be afraid to rate a good answer...
Attachments:
xygraph.JPG 175 KB -
Align graphs using property nodes
Hi,
I am displaying data from 8 channels each on a seperate chart. I am using plot area and position property nodes to fix the size of each of these charts.
I need auto-scaling but because of this, the charts are not aligned properly.
Is there a way to fix the plot area and boundaries such that all the charts are aligned properly ?
ShivIn LV6.1: Try to disable the chart property "Auto Adjust Scales" (located
in front panel menu).
In LV6.0.x: There is no possibility turn it off. :-(
Robert
"ponnaboy" schrieb im Newsbeitrag
news:[email protected]..
> Hi,
> I am displaying data from 8 channels each on a seperate chart. I am
> using plot area and position property nodes to fix the size of each of
> these charts.
> I need auto-scaling but because of this, the charts are not aligned
> properly.
> Is there a way to fix the plot area and boundaries such that all the
> charts are aligned properly ?
>
> Shiv
> -
Formula node forbid to run VI when undefined variable is used
On all LabVIEW version, we can use Formula node to evaluate mathematical formulas.
We can define input and output variable freely and calculate using some variety of formula.
But when we use undefined variable as output, can execute VIs with no errors.
We think it is a problem because when programmer makes a typo, they cannot notice the mistake.
When undefined variable is used as output variable, LabVIEW should forbid to run VI.I think you are going to get the same (or similar) answers than to my suggestion(s) to make VI outputs potentially "required" and the same for some functions (built-in VIs):
http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Allow-required-outputs-in-VIs/idc-p/3157058
http://forums.ni.com/t5/LabVIEW-Idea-Exchange/quot-Function-terminal-not-connected-quot-detection-plus/idi-p/1858573
In general, I agree with you, there is a potential for problems. Not really for the reason you are mentioning, because a typo will break the VI (unless you have two output variables with very similar names - unlike in your example - such as y and y0). But it could make for some frustrating debugging session. -
I'm having a weird behaviour in formula node. The overflow of unsigned integer operations simply doesn't match the results of standard LabVIEW blocks as shown in the attached picture.
How can I deal with this problem? I need the behaviour of the block diagram. I could not do a right logical shift in unsigned integers in block diagram, so I'm using formula node (I could not figure out how to do it because I can't negate a unsigned value).
I'm using LV2012SP1. Were there any changes in this behaviour in newer versions?
Thank you.I found a problem in hexadecimal and octal numeric representations of the formula node. The picture illustrates the issue. Three variables are assigned with the same value but outputs different results.
The hex and octal representations only work for half range of the 32 bits unsigned integer. When the value assigned gets beyond this limit the variable receives zero. This doesn't happen with a decimal value neither with 8 bits variables. Seems the problem doesn't only happen with overflow operations. -
Hi,
I wanna do some signal processing after I got the magnitude and phase infos from FFT. But the errors say that there is undefined variables. I am just wondering that here absP and angleP are both vectors. Can I express them like what I did in the attached vi? 3x.
Huihui
Attachments:
Untitled 12.vi 9 KBHi huihui,
do you just want to know the real and imaginary values of your signal?
Why use formula node at all?
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome
Attachments:
Untitled 12.vi 13 KB -
Periodic PCR profile in Formula Node
I use Formula Node to build a three-stage temperature profile in LabVIEW v7.
if (x>=0&&x<5)
y=94;
if (x>=5&&x<10)
y=56;
if (x>=10&&x<15)
y=72;
How to make this signal become periodic?
You can find my VI in the attachment.
Attachments:
test.vi 21 KBIf you mean periodic on x, then adding before your calculations expression
x=mod(x,15);
can work (as this will make argument always wrap in [0,15) ). -
Array index problem in formula node
dear friend
I'm trying to use formula node to solve a problem because I make this program using c at the begining.
It runs perfectly in turbo c, but somehow it doesn't work in the formula node.
I try to debug my source code, and I find that the formula node seems can't read the true value in
the array.
Here is the code in the formula node.
int32 i,j,k;
for ( i = 0 ; i < sopa; i++ )
j = 1;
ep[i][0] = pa[i];
ep[i][1] = np[ep[i][0]][0];
while ( ep[i][j-1] != exit )
for ( k = 0 ; k < sonp ; k++ )
if ( np[ep[i][j-1]][k] != -1 && (pc[ep[i][j-1]][ep[i][j]] + pc[ep[i][j]][exit] >= pc[ep[i][j-1]][np[ep[i][j-1]][k]] + pc[np[ep[i][j-1]][k]][exit] ) && (pc[ep[i][j-1]][np[ep[i][j-1]][k]] == org[ep[i][j-1]][np[ep[i][j-1]][k]] ))
ep[i][j] = np[ep[i][j-1]][k];
j++;
This is the part that I think the problem might be.
if ( np[ep[i][j-1]][k] != -1 && (pc[ep[i][j-1]][ep[i][j]] + pc[ep[i][j]][exit] >= pc[ep[i][j-1]][np[ep[i][j-1]][k]] + pc[np[ep[i][j-1]][k]][exit] ) && (pc[ep[i][j-1]][np[ep[i][j-1]][k]] == org[ep[i][j-1]][np[ep[i][j-1]][k]] ))
ep[i][j] = np[ep[i][j-1]][k];
I state that "np[ep[i][j-1]][k] != -1" but I do get the value -1 in the array "ep".
Could someone tell me why I get -1 in the array?
I hope I can finally do it all by labview not using formula node,but array like "pc[ep[i][j-1]][np[ep[i][j-1]][k]] "
seems very hard to wire in labview. Could someone give me some good advices of doing this?
Thanks for your helpaltenbach 已寫:
normanshi wrote:
ep[i][0] = pa[i]; (A)
ep[i][1] = np[ep[i][0]][0]; (B)
... if ( np[ep[i][j-1]][k] != -1 && ... ) (C)
ep[i][j] = np[ep[i][j-1]][k]; (D)
I state that "np[ep[i][j-1]][k] != -1" but I do get the value -1 in the array "ep".
Could someone tell me why I get -1 in the array?
I hope I can finally do it all by labview not using formula node,but array like "pc[ep[i][j-1]][np[ep[i][j-1]][k]] "
seems very hard to wire in labview. Could someone give me some good advices of doing this?
There are many possible scenarios to get a -1 in the ep output. For example if the -1 gets already written in step (A) or (B) at a certain index, and that index does not get overwritten in step (D). You are indexing all over the place! Is there some bounds checking on the array contents? What are typical inputs and array sizes?
I'm sure about that the -1 doesn't get already written in step (A) or (B) because ep[i][0] and ep[i][1] is fine. What really makes me confuse is that sometimes ep array has the value like this.
That means it does overwritten some value in step (D). The -1 should never be written into it because I have already state that np[ep[i][j-1]][k] != -1. Somehow I still get -1,and this is really strange! I'm indexing all over the place becuase I can't figure out a better way to achieve my requirement.
I think I should briefly tell you what I'm trying to do. In this program,I input some values which means the distance from one point to another. Then I use floyd's all pairs shortest-path algorithm to find all the shortest distance. Finally I want to find out the "shortest path". I mean like from point 4 to point 0,the shortest path might be like 4 -> 2 -> 1 -> 0, and what the formula node part do is trying to find out this "shortest path". Maybe you can give me some better advice of doing this, I have been thinking a better way to do it for about two months. I think I'm really not good at this.
I try to do it all by labview ,but again I get a strange problem. This time the ep[i][j-1] doesn't get the correct value. In the first time i=0 j-1=0 ep[i][j-1] = 1,but the second time i = 0 j-1 = 1 ep[i][j-1] = 0. This makes the "ep[i][j-1]!=exit" get the incorrect boolean value. The ep[i][j-1] should be 2,not 0. I try to use highlight to find if I make any mistake, but I can't one.This is the input and I put the labview program in attached file (temp4.vi).
Could you help me find out why this happened?
Thanks for your help altenbach!
由 normanshi 在 08-19-2006 10:06 PM 上編輯的訊息
Attachments:
temp4.vi 191 KB
ep.jpg 10 KB
input.jpg 9 KB -
Hello everyone,
I am new in labview. I would like to display the coherence function with the correct frequency scale. For instance, I want it to be as follow: FreqAxis = 0:Fs/2/(N+1):Fs/2. where Fs is the sampling frequency and N the number of sample. I am trying to write using Formula node, but it is not working.
Thanks for your time and your help.
AxelThanks again for your comments and your time .
I have attached the .vi file and a screen-shot of the expected result (cohere2.png).
Cheers
Axel
Attachments:
Code_frequency.vi 531 KB
cohere2.PNG 17 KB -
Formula node with global variable
Hi,
I am tring to use formula node with global variables as an input and output,
but this is where I see the SW hangs forever.
By the way I am a novice to the labview.
Can some give me hint why this is happening?
Thank you in advance,
Do
Solved!
Go to Solution.
Attachments:
formula_node_wGlobalInputOutput.JPG 281 KBWell, the first case of the two loops has a direct LabVIEW translation like this:
However, just because that's the direct translation doesn't mean that's what you should be doing. In the formula node it seems as if you were copying elements from one array to another. Element-wise operation on arrays via loops can be quite inefficient in LabVIEW. Often one can operate in place with arrays, and an operation that would require two loops in a language like C would actually require no loops in LabVIEW. In fact, with the above example, even if you were to use loops, arrays can auto-index for-loops so you don't even need to wire the constants to the N terminals to tell the loop(s) how many times to run.
Can you describe what you're trying to accomplish? There's likely to be a more natural way to do it in LabVIEW that would require no loops. Have you gone through the tutorials? You can also look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free. -
Error using formula node with non-linear fitting VI.
I am using LV 2011 on windows XP.
Using Nonllinear Curve Fit.vi. I have used this before successfully.I am using the "formula string" instance of this polymorphic VI. When I run my program using the formula string "b0+b1*x", it runs fine and give sensible results. When I use the formula string "b0+b1*x+A1*x^2" I get the error message "Error -23083 has occurred at an unknown location. Analysis: Bracket problem at the end."
Attached screenshots show part of the block diagram that wrorks (lv0.bmp) and ppart of the block diagram that does not work (lv1.bmp).
Thank you.
Attachments:
lv0.jpg 23 KB
lv1.jpg 39 KBThank you Dennis. It turns out the "caret" ("^") operator is OK here, and is raising a number to a power, as desired. The problem was that I used an uppercase letter in a variable name. Not allowed! Nor can variable names have have two letters, although that wasn't the problem in my example. (It was a problem in some of my other attempts.)
-
good afternoon,
i need a help from anyone regarding writing a function .i need to integrate a function but i cannot find the right syntax to do so. CAN i do integration using formula node or need to use math script? wat is the syntax for integartion? hope can get a simple example thanks?What is your function or formula? You can calculate almost any formula using LabVIEW functions, but some people prefer the formula nodes.
-
Formula node(RIPEMD-160)
Hi:
I have project for RIPEMD-160 password control program,I need call standard RIPEMD-160 C language,
I am understand Labview,but I am not understand C language,
How can I use Formula node or Call Library function node?
Can you help me,
below is my program
unsigned int K;
unsigned char B[ ]={0xB3,0xE6,0x1F,0xCA,0x7A,0xA6,0xE3,0xF5,0xF7,0x58,0x59,0xF3,0xE0,0x35,0x85,0x59,0x1C,0x0A,0x08,0xA7,0xF3,0x59,0x0F,0xE5,0x3D,0x53,0x71,0xFA,0x7B,0xAC,0x4C,0x19,0x0F,0xE5,0x3D,0x53,0xF1,0xFA,0x7B,0xAC,0xB3,0xE6,0xBC,0x06,0x30,0xAB,0x43,0x81,0xE1,0x14,0x1A,0xCF,0x50,0xFE,0x33,0xD5,0xAF,0x1F,0xC7,0xBA,0x9F,0x35,0x2C,0xF9};
D=RIPEMD-160 [B];
K0=D13
K1=D7
K2=D63
K3=D53
K4=D1
K5=D47
K6=D0
K7=D17
K8=D51
K9=D66
K10=D41
K11=D35
K12=D25
K13=D60
K14=D11
K15=D27
RIPEMD-160 sample code see attach files.
autocar
附件:
rmd160.c 11 KB
rmd160.h 6 KBHello autocar.
有關如何將C語言轉成DLL,您可能需要找C語言的高手,建議您到雅虎或到其他BBS站求救。
Thanks
NI Taiwan AEs -
hi
i want to convert the values of an array using a different formula for each value in the array. Can i use formula node for this? if yes how
if no then is there any other method except for extracting each one individually and converting?kunal227 wrote:
there are 16 elements in the array and the number remains constant (actually they are temp values acquired by a fieldpoint hardware).
the formula is a linear conversion (for example y = m*x + C) corresponding to the calibration curve of individual thermocouple connected to the fieldpoint hardware. every thermocouple has a different calibration curve and hence every element in the array is converted using a different linear formula.
All you need is an array of [m] and an array of [C], all the same size as your data arrray. No formula node needed.
(I think that's what mikeporter had in mind above)
Message Edited by altenbach on 07-24-2007 03:38 PM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
CorrectedArray.png 4 KB
Maybe you are looking for
-
Persistant troubles, before and after reinstall and formatting
Hi, I have a 2ghz Macbook Pro with 1gb of Ram. Up until recently it was running the most recent version of 10.4, but one day recently a number of files were corrupted (not sure how many or how) leading to frequent startup troubles. I would start up a
-
I only want Readers of the table to look, and not download other Readers attachments that are in different rows. I only want the author and the original reader to have access to that.
-
Pages 5.1-- is it as bad as I think?
OK, I updated ("updated," not "upgraded") to Pages 5.1 (making sure to keep 4.3): - is it possible to set the default zoom? If not, EVERY time I edit/create a file, I will need to rest the zoom, then reset the window size (taking care to get rid of t
-
How can I download ios7 in my ipad
I would like to download ios7 in my ipad so please u help me to download ios7 I am really thankfull to u
-
How to enter text & numbers into text field?
I am designing a form for our Labor cases, and in the Case# field, which I have established as a (text field), I wish for the user to input the following as example: 2014-DAA-000012 I would like for the dashes to show automatically as does the social