LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pump auto alteration code

Hii,

 

please guide for LabVIEW code as below logic.

LEVEL0= BOTH PUMP OFF then ,  LEVEL 1 = PUMP1 ON then,  LEVEL 0 = PUMP 1 OFF then LEVEL 1 = PUMP2 ON then LEVEL2 = BOTH PUMP ON then, LEVEL1 PUMP2 ON then LEVEL 2 = BOTH PUMP ONN then, LEVEL 1 = PUMP2 ON  LEVEL0 =BOTH PUMP OFF.

The concept is when first time i make level1 on then pump1 should on and after turn it off and again ON pump2 should be ON . It should store the value of last pump on even after closing the VI , so when i again run the VI next pump should ON.

 

Thanks,

Holas

0 Kudos
Message 1 of 4
(174 Views)

Is this a homework assignment?

 

If so, we won't do it for you.  If you put in some effort, and still have problems, you can post what you have so far and we can point you in the right direction.

 

If this is a real pump, please provide more details such as how you are interfacing with the pump.

0 Kudos
Message 2 of 4
(126 Views)

Hi Holas,

 


@Holas1505 wrote:

below logic:

LEVEL0 = BOTH PUMP OFF

LEVEL1 = PUMP1 ON

LEVEL0 = PUMP1 OFF

LEVEL1 = PUMP2 ON

LEVEL2 = BOTH PUMP ON

LEVEL1 = PUMP2 ON

LEVEL2 = BOTH PUMP ON

LEVEL1 = PUMP2 ON

LEVEL0 = BOTH PUMP OFF


Your "logic" is quite blurry.

I would reorganize to:

LEVEL0 = BOTH PUMP OFF
LEVEL1 = PUMP1 ON
LEVEL0 = PUMP1 OFF
LEVEL2 = PUMP2 ON
LEVEL3 = BOTH PUMP ON
LEVEL2 = PUMP2 ON
LEVEL3 = BOTH PUMP ON
LEVEL2 = PUMP2 ON
LEVEL0 = BOTH PUMP OFF

This way the level already defines which pumps are ON: the levels 0, 1, 2, 3 (in decimal) can be displayed as binary number as 00, 01, 10, 11. Now you only need to output those binary/boolean values to your DO channels to switch the pumps.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 4
(97 Views)

Holas1505_0-1715235267254.png

Holas1505_1-1715235289684.png

no this is not homework, i am working on project which has requirement of pump auto alteration:

Concept: 2 pump system auto alteration sequence as below:

if L1(level switch) ON pump1 on, then L1 OFF and pump1 will OFF. now if again L1 switch ON than Pump2 will ON , as pump1 already ON in first sequence. so every time i have to store the status of Pump ON, So it will make the other pump to be turn ON.

0 Kudos
Message 4 of 4
(43 Views)