LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Comparing Values

Hi, Everyone

 

I have a rather simple problem but i can't wrap my head around it. I would suggest that you downlod the image and vi before you read rest of the post. The image will help you understand my goal with a visual representation while the vi will TRY to show how I am trying to do it.

 

 

The Goal:

 

Read power level from Marker #2 take value subtract 6 from it which will give me my display line(D2) at Y power level At this Point Read value from marker T1 which has Y level at X frequency the goal is to get this Y power level and X freuency to where my Frequency Line (F1) intersects Display Line (D2) at which point it will feed the intersection frequency and powerlevel to Marker #1.

 

 

The Problem:

 

I can't get labview to compare the way I need it to for example:

 

 

If variable T1 Less than D2Power Level

then T1Frequency + 1

 

else T1  equal to D2Powerlevel

 

By increasing the frequency I will also increase the power level because it will ride up towards that power level based on my waveform.

 

I have attached an image which visually displays what I am trying to achive by using LABVIEW to do all the work 😛

as well as a VI which some numbers where it achieves the same goal despite the numbers being differant.

I know I am approaching it incorrectly but I feel like I am on the right track.

Download All
0 Kudos
Message 1 of 5
(2,983 Views)
I don't really quite understand what your VI is doing. As it is, nothing seems to stop the VI. What are all those constants supposed to represent?
0 Kudos
Message 2 of 5
(2,973 Views)

By your description, I have a feeling you would much rather program this in a text-based language :smileywink:.

I will take a look at your VI and get back to you.

Cory K
0 Kudos
Message 3 of 5
(2,971 Views)

Outside While Loop:

 

20: This would represent T1 (check image to see what I mean)

 

30: Marker#2 (Check Image)

 

6: this represents the 6 I must subtract from marker#2 to get to my Display Line #2 (see image for D2 Line)

 

Inside the while loop:

 

20: When T1 isn't equal to power level of D2 it will add  1 to T1(20)

 

1: Simple value which is added to 20(T1) when T1 is not equal to D2

 

5495: Random number for True Case where 1 is added to it

 

 

Once a True or False situation is started it will store the value and repeat until T1=D2  thats why you see the loopback method Im assuming thats what it does based on what the tooltip said.

 

0 Kudos
Message 4 of 5
(2,967 Views)

Hi MrSafe,

 

I advice you to look at your code with execution highlighting to see what happens in your code.

 

About the feedback you used, you only write to it and never read. The terminal on the border of the while loop is to initialize the 'variable' the arrow node should be read and written every loop. 

The following code should do what you want. (I added a wait to see the T1 incrementing).

 

 

Ton

 

PS You can also try searching this site and google for LabVIEW tutorials. Here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).

 

 

Message Edited by TonP on 10-02-2008 09:25 AM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 5
(2,932 Views)