‎03-14-2023 05:45 AM
Hi,
I am having some trouble with getting the state of all pins low when I write to my NI USB 6501 for the first time after a computer restart.
I am using the NI USB 6501 to control a series of valves via transistors. I am using all pins as outputs and I would like them to start in a low state. As it is not possible to configure the startup state of the NI USB 6501 (the pins are configured as inputs at startup) I have used a pull down resistor of 660 ohm to lower the output voltage to below the activation voltage of the transistor. When I initialize my labview program I set the pins to output and then set them low as shown below. I call this function once for each pin.
The problem is that the first time I run my program after a computer restart, all outputs are set to high even if I write low. If I immediately after this function adds an identical function to set pins to outputs and write low then all pins are set low as expected. It is also strange that this only happens after a computer restart. Unless I restart my computer I can not repeat this error.
Have anyone experienced something similar or have any ideas of how to fix this?
Thanks,
Rui
‎03-14-2023 07:29 AM
This feature is called Power-up state, you can define what the digital state of the pins are when the DAQ is power up (i.e., computer restart).
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9qRSAS&l=en-US
But as the document, 6501 does not have that feature. You could use external circuit with one of the DO pins to connect/disconnect the transistors to the DO lines, in this way, only if you pull the DO line low, those transistor is connected to the DO pins.
‎03-16-2023 02:47 AM
Hi,
Thanks for your reply but if the power-up state is the issue, then shouldn't the transistors be activated as soon as my computer is restarted (and the NI USB 6501 is powered)?
In my case, the transistors are not activated after restart, which is good. They are only activated when I start my labview program and set the pins to output and write "low". And this only happens the first time I do this after a compunter restart, if I set the same pins to output and write "low" again the transistors are deactivated as expected.
My quickfix is to write "low" two times in a row when I initialize my program. However it's not ideal that the transistors are all active for a short while and it's annoying not to understand the problem.
Have anyone experienced something similar?
Thanks,
Rui
‎03-17-2023 02:57 PM
Could you please share a schematic diagram of the transistor connection with 6501?