LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array from MAtlab

Solved!
Go to solution

Hi Everyone,

 

I scripted some code in Matlab and used it with LABVIEW using the M-script support. But, I want to perform the same task using labview.

 

The code has been attached. Please help me out with the array part. I can't figure out how to modify the elements of the array. Easily and hence use it for switching diodes on and off as it switches between "1" and "0".

 

 thank u!!

0 Kudos
Message 1 of 17
(3,966 Views)
Instead of attaching your code. You can just let us know your input and expected output. I can try wiring it for you.
0 Kudos
Message 2 of 17
(3,953 Views)

I want to maintain the value of a variable at a certain arbitrary value that can be modified. (which i am setting using knob control).

If the value falls below the required value, Diodes light up in proportion to the  difference in the values vice vera if the value exceeds the required level.

 

Every diode is assesed as an additional 50 input to the value of variable.

 

I am also attaching a snap of the VI, I prepared. Please have a look.

 

I hope the problem is now clear to you.

 

 

0 Kudos
Message 3 of 17
(3,935 Views)
Is this the MatLab-free version of your problem?
Message Edited by Alain S on 08-14-2009 03:29 PM
Message 4 of 17
(3,925 Views)

Thank you Alain,

 

 

And the pic that I have attached is the MATLAB version of the application.

 

Your application is a very close solution. My aim is to activate all LEDs upto the nth level rather than activating only the nth LED. But your application shall be a great help. I have also attached a pic of the same for demonstration.

 

I think a loop from '0' to the required index value shall be able to do it. What do u say??

 

 

 

0 Kudos
Message 5 of 17
(3,912 Views)

hi Muks,

 

The pic has been attached with the exact prob statement. Please have a review. 

0 Kudos
Message 6 of 17
(3,910 Views)
Solution
Accepted by topic author Rishabh
I would say this Smiley Very Happy
Message 7 of 17
(3,902 Views)

Hi Alain,

 

Thanks a LOT!!

 

Your Solution was really smart. Loop as i trying might have got clumsier!

 

I need to know something from the solution u sent. What exactly did u do with the LEDs. Made an array or something? I am a newbie. 

 

0 Kudos
Message 8 of 17
(3,885 Views)

Yes, it's an array of led's but I hide the "Index Display" so it doesn't look like an array at first sight 🙂

If you need to spread the led's across the font panel like in your example, I have to think of something else Smiley Mad

0 Kudos
Message 9 of 17
(3,883 Views)

Yep, U guessed it right friend :smileyvery-happy:

 

I need to demonstrate the application using spread LEDs. Can we separately connect 10 LEDs to the respective indexes of the array formed??

 

Also, how did u manage to hide the index of the array  :smileysurprised: ???? 

 

0 Kudos
Message 10 of 17
(3,880 Views)