LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a VI counter that when entered a number will countdown with a infrared led?

Hello

 

I'm new to Labview, I need to create a VI that does the following. I want to enter a number and this turns ON a motor and want the motor to turn off when it counted(with a infrared led) the amount I entered. How do I do this?

 

Thank you 

0 Kudos
Message 1 of 8
(3,091 Views)

Hi JE1325,

where do you have problems? Can you already read the infrared input? How do you read it? Can you start and stop the motor? Do you work with real hardware or is it first simulated?

 

Mike

0 Kudos
Message 2 of 8
(3,078 Views)

Hello 

          I want to simulate and them make it work with the DAQ, first I'm trying to do a simulation that when I for example put 10 blocks as input it will reduce by one (but this minus one is the amount of block that passes) in other word the motor will keep spinning until the 10 blocks has passed) and it will stop, not permiting any more blocks to pass. So I thought of making a loop that would check if it was equal to zero, if not it would add -1, then it would check again and keep doing this until it is true. Attached is an image of what I'm trying to do in lab view.

 

Thanks 

 

0 Kudos
Message 3 of 8
(3,070 Views)

HI JE1325,

maybe this helps as a start.

 

Mike

0 Kudos
Message 4 of 8
(3,063 Views)

Hello,

  

         WOW, that is impressive. I trying to understand all of it so I can learn from this, there is two parts that I don't fully understand which have a question symbol in the image attached. 

 

 

Thanks 

 

 

0 Kudos
Message 5 of 8
(3,056 Views)

Hi JE1325,

these strings show only what action could be performed in these cases.

 

Mike

0 Kudos
Message 6 of 8
(3,046 Views)

Cool, How would I modify it to request the user to enter a value and to send the values to the  motor circuit (through the DAQ) and to do the minus one when the block passes through the infrared sensor? Because when the block passes it will only send a difference of voltage. So I put a prompt user for input but it does not let me connect it to the diagram and I think i would take out the millisecond time because it would depend on the sensor (when the block passes). How would I do this?

 

Thanks a lot

0 Kudos
Message 7 of 8
(3,037 Views)

Hi JE1325,

can you show what you already have? You can use two different loops. One for User interaction and the other one to control your motor and maybe reading the input.

 

Mike

0 Kudos
Message 8 of 8
(3,013 Views)