12-29-2020 03:08 PM
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,
12-29-2020 03:33 PM
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.
12-29-2020 11:52 PM
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.
12-30-2020 06:17 AM
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,
12-30-2020 08:46 AM
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.
12-30-2020 11:12 AM
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,
12-30-2020 11:24 AM
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
12-30-2020 12:22 PM
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,
12-30-2020 12:32 PM
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.
12-30-2020 12:45 PM
@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