LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to enter the phase of a signal and get in return its corresponding voltage?

Solved!
Go to solution

Where is that "error" generated?

 

Also, you cannot drive a for-loop using both the "N" terminal and auto-indexing. Worse, you've wired a 4 to N, and are auto-indexing 2 loops, one which is 4 elements, and one which is 5 elements. The loop will run for the lowest number, which is 4. Why are you inserting a zero element into your "Phase Distribution" array?

Message 21 of 38
(1,494 Views)

''Labview found an unexpected token while parsing. error 9001, line 25'' is the message i get when i run the VI.

I have to put my first value for the Phase_distribution at zero, there a equation in the matlab code explaning why.  i still have the same error

0 Kudos
Message 22 of 38
(1,479 Views)

I don't get that error when I run your code. Keep in mind that you're using the Mathscript node, not the Matlab node.

 

Also, you've set up the code so it's impossible to stop it without doing a force-quit on LabVIEW. There is no way to click the "Stop" button in time since the dialog box from the Mathscript node always takes over.

 

Your explanation of the adding of the array element makes no sense. You're still trying to drive the for-loop using three different methods.

Message 23 of 38
(1,467 Views)

ok, ok, must say that at first i did not understand what you meant, now yes. About my for loop, if i tried one method, i could not have the result i wanted. Secondly, should i use the matlab node instead of the mathscrip i used cause i still have this error. Also i am want to drive out my voltages via parallel port to op amps working at 15nA. i simply don`t know where to start.

Please help...

0 Kudos
Message 24 of 38
(1,422 Views)

It will make little difference whether you're using the MathScript of Matlab node unless you're trying to use Matlab-specific functions. MathScript is simply NI's implementation of a Matlab-like language in LabVIEW. In most cases it substitutes just fine. As I indicated before, I don't get the error that you're referring to, so I can't say as to what's going on there. Perhaps it's a LabVIEW version problem.

 

As for generating the voltages: the parallel port cannot be programmed in terms of voltage levels. You can either set a line high or low. That's it. You need a data acquisition card or module to generate varying voltage levels. NI sells several inexpensive USB-based devices. There are also other manufacturers, but you should make sure that they will work with LabVIEW if you intend to do the programming in LabVIEW.  

Message 25 of 38
(1,408 Views)

Hello everyone!!

I have a question. i plot the pattern of the antenna i want to control in matlab. Now i need to show the user where the beam will be directed after entering an angle  ( i explain this previously). But the plot i obtain does not look like the one in matlab.

Can it be done?

0 Kudos
Message 26 of 38
(1,359 Views)
Simply showing us the front panel doesn't really tell us much. You will need to show us the code you're using to generate the plot in LabVIEW.
Message 27 of 38
(1,352 Views)
0 Kudos
Message 28 of 38
(1,337 Views)
What value of theta were you using? When I tried to run your code for a theta of 80 I got an empty array for "Phase_distribution". Are you sure that MathScript code is correct?
0 Kudos
Message 29 of 38
(1,328 Views)
I also forgot to expalin how to run the code. The acceptable values are between 71 and 110. Outside them, get an empty array. Also, you have to enter a value outside the range firslty and then after, enter a value inside the range specify.( This is smthing i still have to fix in my matlab code). Let say for example:  67 degrees, the window will stay and then 71. It will give tha answer...
0 Kudos
Message 30 of 38
(1,320 Views)