LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Solenoid control with digital output & Timer

 

Hello, 

I have been given a task to write an application for an Engine Fuel Supply system , process flow of which is summarized as follows- 

1.There is a fuel column. A 4-20mA output transmitter is connected to it. 
2. When the fuel is at it max.level it will output 20mA. 
3.When the fuel is at its total bottom (no fuel) 4mA is given. 

4.The 4-20 mA output is given to an intermediate device called scanner, where I have calibrated it for Span and Zero adjustment i.e. 4mA - 0;   20mA - 0.5.
These values are getting read in LabVIEW through serial port.
Hence, when the fuel is at its max.level scanner gives a value of 0.5 and a 0 for bottom.


5. There is a solenoid valve which handles the flow of fuel by accepting TTL voltage from NI USB 6211. 
6. When the fuel is at its max.level; solenoid should turn off to cut off the fuel supply to engine and there should be a "Timer" which starts immediately at that very moment. 
7. As the fuel gets consumed there comes a level when it outputs min.value i.e. 4mA . By sensing this value, labview should again ON the Solenoid valve by giving it 5V TTL to start the fuel supply again and at the same time the timer which is running simultaneously should stop immediately to display the time taken for total fuel consumption. 
8.This process should get repeated continuously. 

 

I have written a code in my knowledge and scope for this application which is attached herewith.

 

In my code the millisecond timer subtraction value is giving some huge numbers.

Kindly give me an idea to accomplish this task.

 

Best Regards,

Snehal Upadhye

 

 

 

0 Kudos
Message 1 of 6
(2,819 Views)

Hi,

I think you want to start fuel supply at 0.1. Right?

Then the system will not work well because sensor signal rerely be exactly 0.1. It will indicate a value very close to 1, e.g. 1.00003.

 

I suggest you to start if sensor signal is equal or larger than 0.1.

 

0 Kudos
Message 2 of 6
(2,814 Views)

Hi

 

Thanks for feedback.

 

As I have written, there is a scanner which reads the value from sensor and accordingly interprets depending upon span and zero values.

 

Anyways conditions for digital start/stop can be modified further , my problem here is to start the timer when Fuel reaches its max.level 0.5 and stop it immediately when the fuel reaches a level of 0.1. Furthermore, everytime it should be reset after displaying the total time for fuel consumption.

 

Hope I have cleared myself. Any help would be highly appreciated.

 

Best Regards,

 

Snehal Upadhye

0 Kudos
Message 3 of 6
(2,805 Views)

Hi, I confused your question.

 

Attatched vi is my suggestion using shift-register.

Miliseconds timer in Labview is an unsigned 32-bit interger variable. You can calculate the time interval by simple subraction without worring the case of overflow.

 

Regards.

 

0 Kudos
Message 4 of 6
(2,797 Views)

Hi,

 

Thanks for reply.

But this is not what I expect.

Solution given by you does exactly opposite of what I wanted.

My timer should start when my fuel reaches at top level i.e. at 0.5 and it should stop immediately at the reach of bottom level i.e.0.1.

According to your solution timer is starting at 'any' value below 0.5 and it is getting stopped at 0.5.

Kindly help.

 

Thanks & Regards,

Snehal Upadhye

0 Kudos
Message 5 of 6
(2,792 Views)

Hi,

I misunderstood your intension.

 

You may improve your VI with my basic idea of calculating time interval.

But, I improved it again for your need - I hope my understanding be correct - and attached it.

 

The timer indicates 0 if input is below 0.1.

As soon as the input reaches 0.5, the timer indicates time interval between 0.1 to 0.5.

After that, no action takes place.

 

Regards,

 

 

0 Kudos
Message 6 of 6
(2,788 Views)