LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

URGENT need HELP creating a small project

hello all .I've got a small project to create as a test for entering a company . I need to make something that works like a sensor tap simulated by led. count up to a number you chose ( lets say 2000ms ) by pushing a button that simulate the sensor , if you let go of the button it will reset and if you pushed it for 2ms it will turn on the led. when the led is on it needs to start a count to a number you chose (lets say 3500ms) and if the button is pressed it will be reset as well , if the button not pressed for 3500ms it will turn off the led . 

so far I was managed to create just the off delay. 

thank for the helpers in advance. 

0 Kudos
Message 1 of 9
(984 Views)

What is "entering a company"? Is this like for a job interview?

 

In my opinion, if you need to ask here, you are probably not qualified for the job. Seems like you picked up some bits and pieces from the forum here, but really messed things up and there are quite a few red flags that would make anyone hesitate to hire you.

 

Examples of glaring problems:

 

  1. indicators without label. Bad in general, but even worse if you also have local variables of it.
  2. Front panel maximized to the screen for no reason at all.
  3. Indicators that have the wrong representation.
  4. Wires hidden under structures and flowing in all directions.
  5. The event should not fire for entering the off-delay.
  6. Customizing an LED by adding a free label (TAP) to the control while deleting the label is just plain backwards
  7. Messy code (Rule of thumb: if the cleanup button improves the look of the diagram, it was really bad before!)
  8. etc.

I would start with the basic LabVIEW tutorials and get at least a few months experience first.

Message 2 of 9
(944 Views)

@altenbach wrote:

What is "entering a company"? Is this like for a job interview?

 


I interpret it as that his school project is to write a LabVIEW that simulates the key fob entry systems.

 

.

0 Kudos
Message 3 of 9
(933 Views)

No need to be so hard on me there haha. its for school projects that works with this company, look I know LabVIEW for 2 days now, I did my best to learn in this short time and that's the best I got . I'll be honest I'm looking for someone to help me get to the solution and I can really learn from it. 

0 Kudos
Message 4 of 9
(895 Views)

yeah just that its no a key fob entry systems its sensor tap .  I did write a python code for it and it did work but I need it in LabVIEW too . 

I'll leave the python code here so you can run it and see what I mean.

0 Kudos
Message 5 of 9
(888 Views)

So, after two days of learning LabVIEW, this is actually quite good. 😄

 

I wasn't hard on you, but on your program. They are all very valid concerns that you should look into. it will save you days of going in the wrong direction. Basically, instead of focusing on the code logic, you did a lot of strange detours that wasted a lot of time. For example just changing the label of the LED takes seconds, but you probably wasted many minutes customizing the LED in the control editor adding a free label there. 😄 Nobody ever does that!

 

As a first step we need to know the exact functionality:

 

Your description:

"I need to make something that works like a sensor tap simulated by led. count up to a number you chose ( lets say 2000ms ) by pushing a button that simulate the sensor , if you let go of the button it will reset and if you pushed it for 2ms it will turn on the led. when the led is on it needs to start a count to a number you chose (lets say 3500ms) and if the button is pressed it will be reset as well , if the button not pressed for 3500ms it will turn off the led "

 

My interpretation and some questions:

So, I assume your button should be "switch until released" (like a car horn). Is this correct? Do you know about mechanical action settings?

Now the user presses the button and two things can happen:

  1. The button is released before 2000ms. system resets.
  2. The button is released after 2000ms. start a new countdown, now 3500ms
  3. After 3500ms, the system resets.

I don't understand the 2ms part. It is probably physically impossible to just press for 2ms. Did you mean 2s?

 

 

 

0 Kudos
Message 6 of 9
(854 Views)

See if you can glean some ideas from this small draft.

 

altenbach_0-1652370383990.png

 

Notes:

  • Sensor is switch until released (right-click...mechanical action). You fire an event on press and on release.
  • Events have a "time" output which is identical to tick count. No "tick count" needed at all.
  • It would be easy to count down to zero instead.

 

0 Kudos
Message 7 of 9
(833 Views)

Yes my mistake I meant 2000ms. I'll try to explain again and ill leave again the python code that you can run to see what I mean cause it worked there really good . 

so its like a sensor tap the tap is presented by a LED and the sensor by a button . You press the button for two seconds and then the LED turns on

( like when you put your hands two second under the tap and then water comes out) if you stop pushing  before 2 seconds you count reset. after 2 seconds when the LED is on it needs 3.5 seconds to turn off and if you push the button the count down reset and the LED still on. just after 3.5 seconds that the button wasn't pushed the LED turns off. Thank you in advance . 

0 Kudos
Message 8 of 9
(755 Views)

Yess thank you, you really helped me here 😀

0 Kudos
Message 9 of 9
(827 Views)