Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Assistant Digital Output LabVIEW Code

I am interested in a more detailed understanding between the differences of the LabVIEW code examples below:

 

Turn on a DC Computer Fan using a Solid-State Relay, mDAQ, and LabVIEW

 

Output Light Using a Basic 5mm LED, NI myDAQ, and LabVIEW

 

Obviously, the code is controlling different hardware.  However, the application is very similar - The front panel control turns the digital output (a fan or LED) ON or OFF. The vi runs until the STOP control is pressed.

This is why the coding block diagrams are the same. 

 

The fan example states:

"When the Stop button is pressed and the while loop is exited, a False is output to the line, opening the SSR and turning off the fan for safety."

 

What is the purpose of the additional DAQ Assistant in the FAN example? How exactly does it provide added safety as not found in the LED example?

 

0 Kudos
Message 1 of 8
(10,320 Views)

It plainly states that at the end, the fan is turned OFF. Don't do that and the fan could be left running, correct? Do you think it might be even a slight hazard with leaving the fan running?

0 Kudos
Message 2 of 8
(10,309 Views)

Thank you Dennis.

 

When the vi is stopped in the LED example, the LED remains on?

0 Kudos
Message 3 of 8
(10,300 Views)

It remains in the last state that was set inside the loop.

Message 4 of 8
(10,297 Views)

Thank you for your response.  I see the difference now.

 

In the FAN example when the vi stops, an error is sent to the fan turning it off (for safety).

However, in the LED example, when the vi stops it remains in the last state. It is possible this state is ON.

 

Though the code is similar the differences are very important - one may not want their digital output to remain in an ON state should the vi stop.

0 Kudos
Message 5 of 8
(10,290 Views)

The error wire is there only to enforce data flow. It has nothing to do with the data being written. The Boolean array with a false constant is what is written out.

0 Kudos
Message 6 of 8
(10,285 Views)

I am having trouble with recreating the DC fan example with the code provided.  I am using a SSR Crydom CWD2410 relay.  My fan is On and then turns OFF but does not want to turn On again. Should it be first Off and then On?

0 Kudos
Message 7 of 8
(10,155 Views)

Hi greentea2,

 

The datasheet of your relay says that the input current is 10mA @ 12 V, if you are using a Digital Output from the myDAQ device (assuming that you are using one), you will have a 5V output and this means that you will need a 26mA current to activate your relay. The maximum output current per line is 4mA.

So my recommendation will be to implement a power stage between the myDAQ device and the relay that you are trying to use.

 

I hope this information will help you in your project.

 

Regards,

steve.bm
AE | NI
0 Kudos
Message 8 of 8
(10,140 Views)