Discussion:
reading/writing digital lines without external hardware (besides daq device)
(too old to reply)
Chapashop
2007-09-03 11:10:15 UTC
Permalink
Hi,I have a USB-6259 (mass
termination).  I don't have any additional hardware, just the USB
device.  I  am trying to use the MAX utility (4.2.1) with NIDAQmx
(8.5).  I eventually want to program digital lines (read and write
them) using the NIDAQmx API.  I ran some of the VB6 samples.  I thought
how it works is that I could run the WriteDigChan VB code to set
line(s) on or off, then use the ReadDigChan VB code to read those lines
I changed.  However that did not work so I started created some tasks
using MAX however that does not work either.  I hope this is not too
stupid a question but I am not too familiar with the hardware.  Do I
need some additional hardware connected to my 6259 to keep those digital lines in one state or another?&nbsp; I don't need to know about VB but generally using MAX.thanks, David <img src="../../i/smilies/16x16_smiley-indifferent.gif" border="0" height="16" width="16">
Jordan D
2007-09-04 17:40:07 UTC
Permalink
Hi David,

Measurement and Automation Explorer (MAX) is a utility that allows us to
configure and test our hardware without any programming. If you are trying to
test your USB-6259, you can right click on your device under My System »
Devices and Interfaces » NI-DAQmx Devices and run the Test Panels. The Test
Panels will allow you to write to/read from your digital input/output.

Tasks in MAX are defined to be Digital Output or Digital Input. Are you trying
to use the same lines for input and output?

In order to troubleshoot this problem there are a few tests that we can
perform.

First, wire one of your digital output lines from one port, to one of your
digital input lines on a second port. Once this is done, use the MAX Test
Panels to verify the operation of your digital input/output. Once this has been
verified, write some code in VB to output on one port and use the test panel to
read in the data on a second port.

Keep me posted on your results.
Chapashop
2007-09-05 13:10:09 UTC
Permalink
First, wire one of your digital output lines from one port, to one of your
digital input lines on a second port. Once this is done, use the MAX Test
Panels to verify the operation of your digital input/output. Once this has been
verified, write some code in VB to output on one port and use the test panel to
read in the data on a second port.Jordan, Thanks for your reply.I am trying to understand the concept of digital lines, I actually have been using measurement studio for a while.&nbsp; I am doing some programming work for a friend who handles all the hardware.&nbsp; All I have right now is the USB6259 box.&nbsp; My knowledge with programming is limited in that I use very few acquisition types and are pretty simple to me.&nbsp; The functions I use in MS 6 is:to read:CWDIO2.Ports.item(0).Lines.item(Channelx).SingleRead Resultto write:CWDIO2.Ports.item(Portx).Lines.item(Channelx).SingleWrite False&nbsp; (or TRUE)I am not trying to use these now, I am just showing you what I am familiar with.I initially was trying to use the VB6 code examples which did not appear to work (for me).&nbsp; I was able to program my analog signal stuff so I am not a complete dumbass.&nbsp;&nbsp; But for the DIO stuff I am not sure how it is supposed to work.&nbsp; That is why I was am trying to read/write inside of MAX which also does not seem to work for me.&nbsp; But I realize I may not understand how it works.&nbsp; I created some tasks in MAX, one to write 1 (or more) digital line(s) on port 0.&nbsp; Then I created a read task to read line 0-7 on port 0.&nbsp; None of lights come on during the read.&nbsp; Like I said I don't have anything plugged into my USB 6259 via a connector.I read your part about:
First, wire one of your digital output lines from one port, to one of your
digital input lines on a second port..&nbsp; I am not sure what you are talking about.thanks, David
Loading...