LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulate the opening and closing of a solenoid valvve during every second

Solved!
Go to solution

Sorry, in my previous message, i didn't main "trained"

For the moment, the work is to simulate the operation of the solenoid valve. The question of the relay and power, we will see that after.

I think about the choice of digital DAQmx that i will add in my program to drive the led. My actual program (test1.vi) is avaible as an attachment.

 

Best regards,

0 Kudos
Message 11 of 26
(1,118 Views)

That VI doesn't show your attempt at putting in DAQmx functions.  Why didn't you attach that VI I like asked?

 

Jay brought up some good points about DAQ and the physical hardware you are trying to control.  Those issues still need to be solved.

 

But attached is your VI with some basic DAQmx functions added that will control a digital output on a DAQ card.

 

 

0 Kudos
Message 12 of 26
(1,114 Views)

Note, there was small error in the last VI due to a mis-click.  The purple task wire is supposed to go through the shift register on the left side of the loop, and not through a separate tunnel.

0 Kudos
Message 13 of 26
(1,103 Views)

Thank you very much for your message. 

I have a question for you: Do you think it is possible to control my led with a digital output DAQmx ? or even analog ? with this code ?

 

Best regards,

0 Kudos
Message 14 of 26
(1,096 Views)

Yes you can control a real, physical LED with this code.

 

You could use an analog output if wrote a 0 to turn it off and a higher number such as 5 V to turn it on.  With an analog output, you may need to put a current limiting resistor in series with the LED.

0 Kudos
Message 15 of 26
(1,089 Views)

Ok thanj you. I modified the code to put  DAQmx analog output to be able to control a led. Can you tell me if my code is correct please ? Among the DAQmx that are in the code, witch on should i connect my led ?

Thanks in advance

 

Best regards,

0 Kudos
Message 16 of 26
(1,084 Views)

Reread message 13 about a wiring error I made.

 

As for your question, I don't understand it.  Are you talking a real physical LED?  Or an LED indicator on the front panel?  Earlier it seemed like you were talking physical.  This question sounds like software.

 

Do a comparison of > 2.5  (half way between 0 and 5).  Wire the terminal of a front panel LED to that.

 

I would recommend you learn more about LabVIEW from here. How to Learn LV

0 Kudos
Message 17 of 26
(1,079 Views)

Yes i am talking about a real physical led.

I fixed the error you reported and tweak the code a litle bit. I didn't understand what you offered me. This code can't control the led between 0 and 5V ?

 

Best regards, 

 

0 Kudos
Message 18 of 26
(1,072 Views)

Yes, that code can control a physical LED.  When you output 5 volts, it should be on.  When you output 0, it should be off.

 

But you might need a resistor between the LED and the analog output terminal.

0 Kudos
Message 19 of 26
(1,067 Views)

@RavensFan wrote:

Yes, that code can control a physical LED.  When you output 5 volts, it should be on.  When you output 0, it should be off.

 

But you might need a resistor between the LED and the analog output terminal.


Depends on how the damn thing is wired!  Complete circuit equal on if enough power.

 

Complete circuit equal "POOF" without the resistor!  

 

Other options include off, dim, and therapeutic electro shock.  AmpsxVolts=power.  Work is power times time

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 20 of 26
(1,063 Views)