Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in LEDs to keep it on

Solved!
Go to solution

Hi,

 

I am on this, i am like 2 months when i started learning from my own account, by now i am creating a software in Labview to move 3 motors, only that i got a problem, i tried to use 2 Round LEDs for every axe (one when the motor is moving in the positive sense and one on the negative).

 

So i have like 6 LEDs, now the real problem started when i need to keep the LEDs on, i mean for example i push on the positive X and the LED turns on, and in some milliseconds it turns off. But what i need is that if i push some button the respective LED should keep on until i push another.

 

I am adding part of the part when i am trying to add this function, hope someone can explain me a little or even help me what can I do.

 

Thank for any help

0 Kudos
Message 1 of 3
(4,636 Views)
Solution
Accepted by topic author Vlasr

Your query is really a LabVIEW question and would get more response if posted to the LabVIEW Board. It is not a circuit design question and this Board gets far less activity than the LV Board.

 

The key is the shift register to retain values from one iteration to the next.

 

You will need a shift register for each LED. If you do not want 6 shift registers, you could combine the data into an array or cluster so that one shift register would be enough. Since you are a beginner with LabVIEW, I suggest the separate shift registers until you are more comfortable with LV.

 

Since both the inputs (buttons) and outputs (LEDs) are boolean, it makes sense to keep the data as boolean throughout. 

 

Showing labels on the block diagram makes it much easier to keep track of which terminal is connected to which button or LED.

 

When connecting to the case structure selector you should use integer data types rather than floats. In your VI it does not matter but if you were calculating the result with division or other functions the forced rounding to integers internally in the case structure might cause problems.

 

Consider the use of the Event Structure to respond to changes in the buttons. I think that was introduced to LV before your 7.1 version.

 

Here is one way to do what I think you want. I am posting an image because I cannot save back to version 7.1. Note that I suggest making a subVI from the repeated code. By making it a subVI, you only need to change it one place if you find a bug or change the requirements. The code shown has 6 copies, all of which would need to be changed.  I did not remove your code so that I could compare results.

 

Lynn

 

LED Controls.png

0 Kudos
Message 2 of 3
(4,620 Views)

Hi, thanks for the help, i was needing only to keep turn on only one LED at a time, i guess i will take your model and do some modification.

0 Kudos
Message 3 of 3
(4,611 Views)