LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with timers...

Solved!
Go to solution

I am building a building a machine that uses smallish vibrating motors. In order to overcome inertia, when they are still, a higher voltage must be applied than would be required to run them at low speed. If the voltage applied is low and the motors are not spinning, one can push the motor manually and it will begin to spin slowly. The slow spin is desired at that point. The problem is overcoming the initial inertia. I want to provide a temporary, brief pulse of higher voltage and then go quickly to letting the motor voltage be determined by an input. The input signal will vary and when it is below a certain point, output should be held to zero. However when the input signal crosses a threshold, the output should be high briefly to overcome inertia and then have output and input match until the input drops below the threshold again.

 

I have set up an illustration to describe the desired behavior. Please keep in mind that I am having trouble getting the brief high voltage timer to reset.

 

 

KickStarter.png

 

 

 

-Chris
0 Kudos
Message 1 of 9
(2,673 Views)

Is there really no help here? Is it too basic or too difficult?

-Chris
0 Kudos
Message 2 of 9
(2,616 Views)

I think something is wrong with this logic (shown below), can you explain this piece of code.

 

Is Logic Correct.PNG

 

Well I would like to include, the output of 'Wait (ms)' (which is being compared with 1000) is not elasped time but its the system timer value and for most of instances (99.999%) it will be higher than 1000.

 

Check this code

 


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 3 of 9
(2,612 Views)

I have seen that to be the case. I really want to record the system time only once when the outer conditional loop is true. Then I want to make the inner conditional loop true when their difference is 1000. This should happen only once while the outer loop is true but should restart if the outer loop goes back to false and then becomes true again.

 

I want 1 second where the output is 50, and then the output should equal the input. All while the input is above 3. When the input drops below 3 output goes to zero. Then if the input goes above 3 I want the output to be 50 again for 1 second, after which the output will equal the input. This process should occur anytime the input goes from below 3 to above 3.

 

I tried several schemes using subVIs from the timing palette and only uploaded the pic of the general idea. I am stumped.

-Chris
0 Kudos
Message 4 of 9
(2,607 Views)
Solution
Accepted by topic author random_variable

I tried something, changed your code into a STATE-MACHINE. check it out.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


Message 5 of 9
(2,600 Views)

Strangely enough Code only goes so far to fix things....

 

What you really need is a largeish capacitor in your system to provide that additional surge of current when you throw the switch to start the motor.  Hardware.  Fix the hardware design error.  Then and only then think about controlling the well designed system.


"Should be" isn't "Is" -Jay
Message 6 of 9
(2,597 Views)

This is exactly what I was looking for. However I have no idea what you did. I haven't used anything .ctl... can you recommend a good tutorial?

-Chris
0 Kudos
Message 7 of 9
(2,581 Views)

Ah I see what you did. If I did the same thing but used integers instead of strings then I wouldn't need a file with .ctl, would I?

-Chris
0 Kudos
Message 8 of 9
(2,579 Views)

@random_variable wrote:

However I have no idea what you did. I haven't used anything .ctl... can you recommend a good tutorial?


I had mentioned link for STATE-MACHINE, that is relevant/related study material, that you wanna go through.

If you see the same link & section 4, you'll get an idea, why I used .ctl.

 


@random_variable wrote:

Ah I see what you did. If I did the same thing but used integers instead of strings then I wouldn't need a file with .ctl, would I?


You can use, integers/strings/enum (wait I wanna tell you, I had used enum and not strings), but if you decide to make it 'type-def' then that type-def file needs to be included (as .ctl or .ctt file).


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


Message 9 of 9
(2,563 Views)