04-18-2023 11:07 AM
If you are purchasing a NI product, I would recommend one that support a Digital Input Change Detection Event; this will make programming much easier. Basically you set a task that responds to a low to high transition or high to low transition or both transitions. When the transition occurs an event structure is triggered. Easy to implement, no need to poll, etc.
04-18-2023 11:09 AM
@govindsankar wrote:
As I said, we are not making any change to the hydraulic press. There is already safety implemented in the hardware of the hydraulic press. I am not making any changes. I just need to collect the data from the user to say if the hydraulic press has been successfully completed or not, and also in the beginning to scan the device using a scanner. For both these operations, I need buttons and DAQ. So for scan I need one button, then after completion the user tells software whether it is ok or not by pushing one of two push-buttons. So this part is clear to me. I have decided to buy the NI DAQ 6001. But now the confusing task is deciding the push button. So for the DAQ to read the push-button, the push-button gives a 5V signal to the DAQ. But I am confused on where does the 5V come from. Do I need a separate battery power supply to complete the circuit, or are there battery operated push buttons? Kindly let me know. Thank you.
The 6001 has 5V out.
04-18-2023 11:21 AM
@Yamaeda. Basically I can connect the 5V out from the DAQ to the push button and then back from the push button to DAQ input and then use it to program the system. Is that it. Thank you.
04-18-2023 01:29 PM
@govindsankar wrote:
@Yamaeda. Basically I can connect the 5V out from the DAQ to the push button and then back from the push button to DAQ input and then use it to program the system. Is that it. Thank you.
Almost. You need to add a resistor between the DAQ input and Ground. This is called a "Pull down resistor". Some DAQ devices have them, so check your hardware manuals to see if they do or not.
Check the current output specs on the 5V line, and make sure the resistor is sized to be large enough to not demand much current when you press the button. Something like a 10 kOhm resistor should work fine.
04-18-2023 01:36 PM
@BertMcMahan. Ok thank you very much. I will do that.
04-19-2023 03:20 AM
I need to design a circuit with a NI DAQ 6001 and 3 push buttons. Sorry I dont know any design softwares, so I just drew with my hand and it looks bad. But I can give an explanation for you to understand. Pins 1,2,3 are programmed to be digital out pins which give a 5V output and pins 4,5,6 are programmed to be digital input. So I need a 5V signal to the push button which will then be read by the NI DAQ. For this I wire from DO Pin 1 to the push button and then from push button to DI Pin 6. Similarily DO Pin 2 -> Push Button -> DI Pin 5 and DO Pin 3 -> Push Button -> DI Pin 4. On recieving the 5V at the DI terminals, rest will be done by the software. There is already a pull down resistor in the NI USB 6001. So i havent used any. Is this circuit correct. Sorry not sure how to upload a picture and post something written as well. So I will upload the picture as comment below. Kindly let me know. Thank You.
04-19-2023 10:41 AM
You're close! Don't use the programmable DO pins for your 5V source- there's a dedicated 5V pin on there.
04-19-2023 10:53 AM
Thanks @BertMcMahan, thats just one. I need three. So this solution wont work is what you are saying.
04-19-2023 11:12 AM
Just shove three wires into that one screw terminal (or solder three wires into one).
The dedicated 5V line should have a lot more current sourcing capability than the DO's will.
04-19-2023 11:14 AM
You can consider the 5V output pins on a DAQ card to be a low-current power supply. You don't want to drive a motor with it, but you can easily use it to source 3 (or more) Digital Ins. Just connect all 3 wires to the same terminal or get a little terminal block to tie them together.