LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling LED using digital module NI 9401

Hello,

I am writing a program of water valve opening and closing by user input. The software program work good, but when I want to use for switching leby digital module , it create problem.

Please help me out with this.

I attach both the program and looking forward to your kind reply.

One more thing is that i am using NI 9401 two channels for led switching. 

Kindly check and give a solution for it. I am new to LabView.

 Thanks

Best Regards

Faisal

Download All
0 Kudos
Message 1 of 16
(2,384 Views)

Hi faisal,

 


@faisal_08 wrote:

The software program work good, but when I want to use for switching leby digital module , it create problem.

So the software is ok, but you got problems?

Which problems did you get?

How can we help when the problem is with your hardware (in case the software "works good")?

Best regards,
GerdW


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

Hello,

Thanks for you reply Sir. The thing is that you see my software when I press switch on front panel then led blink. So the same I wanted for my Led Blink on hardware. 

Problem is that I take two channels for LED but when I do DAQ and connect according to the condition only one LED blink on hardware, with open/right or may close/left.

I again attach the hardware loop also, please let me know how to resolve it.

 

Thanks BEst Regards

Faisal

Download All
0 Kudos
Message 3 of 16
(2,336 Views)

Hi Faisal,

 

how do you wire your LEDs on that board?

Can you attach an electronic schematic?

 

I wonder where those two wires are connected to and why there is only one resistor for two LEDs…

Best regards,
GerdW


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

Sir,

This the picture of system , I am using H-Bridge and adruino is just use to give power 5V to H-Bridge and NI module NI 9401. 

Sir, I think you understand what my software do, please specify is it correct or not. The Same led of /on i want on the led light. 

0 Kudos
Message 5 of 16
(2,319 Views)

Hi faisal,

 


@faisal_08 wrote:

Sir,

This the picture of system , I am using H-Bridge and adruino is just use to give power 5V to H-Bridge and NI module NI 9401.


Still no electronic schematic. How should we know about your copper wiring from looking at that image?

 


@faisal_08 wrote:

Sir, I think you understand what my software do, please specify is it correct or not. The Same led of /on i want on the led light. 


No, I cannot open LV2019 VIs right now. I'm using LV2017…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 16
(2,286 Views)

Hello Sir,

I attached the schematic wiring diagram of all the equipment and Sir, if possible please see the VIs also.

Kindly looking for your reply and also thankful to your help and support.

 

Best Regards

faisal

 

0 Kudos
Message 7 of 16
(2,278 Views)

Hi Faisal,

 

your schematic hides the most parts…

 

Are the LEDs connect in the right direction? (They are diodes…)

How is this resistor connected?

What is the input of your H bridge? What are the output pins?

Why do you need an Arduino as power supply? Does it provide enough power to drive your H bridge and LEDs?

Does the H bridge work correctly when you connect their input pins directly with needed signals (either +5V or GND)?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 16
(2,272 Views)

Sir,

The connection are 

1. H-Bridge is connected to 5V and one wire to ground from arduino. Arduino is use for giving supply of 5V to H-Bridge.

2. Problem is that when I press switch than one channel work fine and one LED is ON for given time according to program but other LED does not operate when I press other switch, the software shows the LED ON in front panel but not on board.

3. Input of the H_Bridge is given by user from front panel through NI 9401 and output is goes to LED.

4. If possible please check the both VI sir then it will be clear sir.

Thank you so much for your support sir.

 

Best regards,

Faisal

0 Kudos
Message 9 of 16
(2,264 Views)

Hi Faisal,

 

now I could look at your VI:

Why has the "Right" button no label?

Why don't you use AutoCleanup?

Why is the event structure excluded from AutoCleanup?

What is the purpose of all those BuildArray/Search1DArray/IndexArray operations inside the event cases? Why not just use a Select node to determine the output values???

Why do you set a timeout value for the tiemout event and also use the WaitUntilMultiple in the loop?

Why do you wire the millisecond timer value as TimeTarget into the ElapsedTime ExpressVI?

Why do you open and close that DO task in each iteration???

 

Did you examine any example VIs from example finder?

 

Problem is that when I press switch than one channel work fine and one LED is ON for given time according to program but other LED does not operate when I press other switch, the software shows the LED ON in front panel but not on board.

That's why I ask for a electronics schematic all the time: is that other LED wired correctly?

You still aren't able to show such a schematic…

Best regards,
GerdW


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