LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling LED by increment & Decrement in the Process time

Hello, I have a task assigned to me, and I'm facing challenges with the increment and decrement operations using the UP and DN buttons in my LabVIEW VI. Currently, only the increment operation is functioning.

Additionally, I'm seeking guidance on how to link the Stroke Length value with a delay function in my VI. I want to ensure that both the increment and decrement operations work seamlessly, and that the Stroke Length value accurately controls the duration of the delay function. Any assistance or insights would be greatly appreciated.


Task:

  • (You are supposed to design a front panel for a system which consist of five components shown in figure. Once the operator presses Stroke button the hammer is down for a specific duration already set by operator and being indicated in Stroke Length in seconds. During a stroke, Stroke button will not take any effect. Operation Status LED indicates if the hammer/machine is in operation right now. Operator can vary the Stroke Length (sec) by pressing the UP and DN buttons to an increased or decreased value. UP and DN would be working during the stroke as well)

 

0 Kudos
Message 1 of 10
(1,116 Views)

Hi MCTAB,

 

usually we don't solve your homework for you.

But we are happy to assist in solving it - once you show some effort on your own!

 

So what have you tried and where are you stuck?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(1,103 Views)

Dear GerdW,

I wanted to express my sincere thanks for your guidance.
The problem has been fixed. My instructor gives a brief explanation of the key goals and technical requirements needed to finish this task successfully.

warmest regards.

0 Kudos
Message 3 of 10
(1,058 Views)

I recently came across a task that piqued my interest. Can you kindly share your task solution with me since I found this problem very interesting and challenging. Thank you in advance for considering my request. Your input is highly regarded, and I look forward to hearing from you. 

0 Kudos
Message 4 of 10
(1,026 Views)

I recently came across a task that piqued my interest. Can you kindly share the task solution with me since I found this problem very interesting and challenging. I tried many times but couldn't be able to find the solution yet. Thank you in advance for considering my request. Your input is highly regarded, and I look forward to hearing from you.

0 Kudos
Message 5 of 10
(1,025 Views)

thank u so much for your extreme interest in this task.
check the attach file.

0 Kudos
Message 6 of 10
(984 Views)

@MCTAB wrote:

thank u so much for your extreme interest in this task.
check the attach file.

task%20LED%20control


No, just no!!!

 

Two greedy loops and all data bounced around via local variables talking to themselves is not reasonable code. Race conditions everywhere! "AND FALSE: is always false, so the loop on the right can never stop. The loop on the left has the conditional terminal not even connected. Beside, we can't even see what is the other cases of the case structures or determine the mechanical actions of the buttons.

 

As we can see from the run button, the code is broken anyway.

 

If you want help, attach your VI, not a picture.

 

 

0 Kudos
Message 7 of 10
(975 Views)

i am trying to create a code where i need to increase or decrease the set time (as constant named operater timer) with UP/DOWN push botton during the stroke button pressed and even before pressing the stroke button

0 Kudos
Message 8 of 10
(910 Views)

incredibly impressive work;
I completed it by using the technique that is attached to this message.

0 Kudos
Message 9 of 10
(901 Views)

@MCTAB wrote:

incredibly impressive work;
I completed it by using the technique that is attached to this message.


No, not impressive at all and completely wrong!!!! Full of race conditions and completely meaningless code! Also note that the values are milliseconds, not seconds.

 

See if this can give you some ideas! No local variables! One loop!

 

altenbach_0-1702925164650.png

 

 

0 Kudos
Message 10 of 10
(891 Views)