05-03-2009 05:58 AM
Hello for everyone.
I am student and I am trying to do my project in LABVIEW by using MATLAB.
I want to make control system with MATLAB which will include 2 measured voltages in NI ELVIS 2 kit.
I succeed to generate this two voltages, but I can"t make them controled in MATLAB script, it always show "ERROR 1050"
and don"t recognize this function.
Please help me to understand where is my problem.
With best regards.
Dinerman Zori.
05-04-2009 05:40 PM
Hi Dinerman,
The code that you have inside the MATLAB Script Node is not even exectuable inside the command window of MATLAB®, but it is executable when coded into an m-file. You probably want to take a close look at the difference between scripts and functions. If you remove you first line of your code from the MATLAB Script Node you will find that your VI will operate much better.
I also recommend the following links...
How can I Learn LabVIEW (look at the self pace training)
Getting Started with DAQmx (look at the Basic Programming with DAQmx)
MATLAB®
is a registered trademark of The MathWorks, Inc. Other product and
company names listed are trademarks and trade names of their respective
companies.
05-04-2009 06:01 PM
05-04-2009 06:09 PM
05-05-2009 02:38 PM
05-06-2009 07:03 PM
Dinerman,
You are welcome. I don't believe I understand what you are needing. Are you wanting to measure a voltage, use the MATLAB Script node to perform some analysis and then output some value to an analog output? What hardware are you using and what is your application?
It is probably not a good idea to loop inside the MATLAB Script Node unless you need your script to iterate for some reason . Can you not use a while loop around your whole program and execute in a repeated fashion so the program flow is read voltage in, analyze, and output new voltage? Of course, this statement depends on your application...
MATLAB® is a registered trademark of The MathWorks, Inc. Other product and company names listed are trademarks and trade names of their respective companies.
05-07-2009 03:46 AM
Joshua B. hello.
YES, I want to measure a voltage, use the MATLAB Script node to perform some analysis and then output some value to an analog output.
I want build a circuit of BUCK DC-DC converter :
and build this circuit on this kit( NI ELVIS II).
I will measure the output and input voltage by DAQ which shown on this sites:
Building an Analog Input VI in NI-DAQmx- http://zone.ni.com/devzone/cda/tut/p/id/5370
Building an Analog Output VI in NI-DAQmx- http://zone.ni.com/devzone/cda/tut/p/id/5371
when I will get the values of voltages,how can I make the comparation of them ,may I put them on matlab script and use like function?
the function which I want to use need compare these two values ,and
if
Vout<Voltage that I want,TURN ON VIN
if
Vout>Voltage that I want,TURN OFF VIN
I want to do this operation for routin mode (loop).
with regards.
05-08-2009 01:01 PM
Hi Dinerman,
Ah yes, you said the Elvis II in your first post, didn't you . Instead of using the MATLAB Script Node, why not use a Case Structure with Comparison Functions (more here) and Boolean Functions, or the Compairson Express VI to compare the voltage signals?
MATLAB®
is a registered trademark of The MathWorks, Inc. Other product and
company names listed are trademarks and trade names of their respective
companies.
05-11-2009 03:20 AM
Joshua B hello.
I build this scheme on labview.
In this scheme I integrated output DAQ and input DAQ,the result is going to MATLAB script. and it is WORKING
for making the procedure to extended time,I put the while loop function, is it corectly?
I saw on osiloscope that I have the delay time between input and output result,how can I improve my delay time?
p.s: when I am making high friquency in the input, the system recognize and change the output once in a long while,how can I improve it?
with best regards.
05-12-2009 05:52 PM
Hi Dinerman,
You made good progess.