Discussion:
Basic Questions - Need Help
(too old to reply)
LocutisofBorg
2008-08-01 21:40:10 UTC
Permalink
A few things.
 
First, we have a NI USB-6501 24-line Digital IO.
 
Second, based upon what I'm understanding from our electrical engineers, we need to create a very simple API that allows the engineers to turn on/off a line with a simple API call.  The API needs to be in C# 2.0.  Basically something like 2 calls LineON(int lineNumber) and LineOFF(int lineNumber).
 
So the questions that I have are as follows.
 
1)  Do we have the right piece of hardware to do this?
 
2)  If so, can anyone provide some sample code?  I have downloaded the latest drivers from the web and have the device installed and it is functioning properly.
2a)  If not, what then should be using.  I'm assuming that our eletrical engineers will have some of their own in house devices connected to these lines and simply want to turn them on/off at their leisure.
 
Thank you so much in advance for any help/guidance.
S_Hong
2008-08-04 18:40:19 UTC
Permalink
Hi LocutisofBorg,
 
I'm assuming you are using Visual Studios to write your C# code. In order to use your USB-6501&nbsp;with Visual Studios, you will need to install the <a href="http://joule.ni.com/nidu/cds/view/p/id/965/lang/en" target="_blank">DAQmx drivers</a>&nbsp;and install Visual Studios support. You&nbsp;should then be able access&nbsp;our DAQmx&nbsp;shipping examples for C#. I believe that the example we are particularly interested in is a simple Digital Write example, which can be found under C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Digital\Generate Values\WriteDigChan\cs.
&nbsp;
Please let me know if you have any more questions after looking at the code. I hope this helps,
LocutisofBorg
2008-08-04 18:40:19 UTC
Permalink
Yes, I have done that and apparently my version of the driver software does not contain those examples.&nbsp; Unfortunately it takes forever for your programs to install and uninstall and I am in the process of uninstalling so that I can re-install a newer version of your drivers.&nbsp; I will let you know if that contains the sample programs, the version I have, i.e. what came on the OEM disks only contains C examples.
Loading...