LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using time as an input to loop for calculation a rate using Matlab code

I have just started using LabVIEW and I have been asked to calculate the flux through a column and compare it to an absorption rate so that I can work out the area using real-time input from instruments connected to labview. The code I have written is based on matlab and  I very simply assigned a time vector together with a for loop to calculate the flux at different time intervals. I am now struggling to emulate this on LabVIEW - I want to as soon as I start the project for a timer to start and give values to the matlab code so that the flux can be computed at iterations carried at the same time interval. However, I have found no help online. I have attached both my matlab code and my attempt.

 

Any help is appreciated,

 

thanks. 

Download All
0 Kudos
Message 1 of 2
(2,202 Views)

Ouch!  Why are you using LabVIEW?  If Matlab will do the calculations, and you don't mind all that cryptic syntax, then why not use Matlab?

 

It is not clear to me what you want to do with time (I noticed the Timed Loop).  Are you trying to simulate (in Real Time) the behavior of a model system?  Are you generating charts or graphs?  [Do you know the difference as far as LabVIEW is concerned?]

 

This would be an excellent opportunity to take a step back, think carefully about what you want to do, "look at the math" and see if there are ways to "organize" it that will make it more intuitive to understand what you are doing (maybe by being a bit verbose and using full names for things, possibly "hiding some details" inside sub-VIs if they are not relevant to the higher-level questions you are asking).

 

Bob Schor

 

 

Message 2 of 2
(2,177 Views)