Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Transition from Legacy DAQ to DAQmx for writing to digital ports

Hello,

I have written code in LabWindows/CVI that controls our devices with static TTL level BCD outputs, and then read the two TTL feedback lines.  Up until now, we utilized the NI-6503, 24 line DIO card and the Legacy DAQ  “WriteToDigitalPort” and “ReadFromDigitalLine” commands.  e.g.:

WriteToDigitalPort (1, "1", 8, 0, 0x01);                     //Output BCD 0001 to low bits on Port 1

ReadFromDigitalLine (1, "0", 0, 8, 0, &doneFB1);     //Read Done feedback line 1 on Port 0

 

Each device requires four BCD inputs, so I was able to control two devices per port.  We utilize two lines of Port 0 for each devices feedback lines.  This allows control of four devices per DIO card.  We would like to transition to the USB version of the 24 line DIO (NI-USB-6501), which requires the DAQmx driver.  I have updated our version of CVI to allow DAQmx commands, but I’m not sure which of the DAQmx Digital I/O functions would be comparable to the legacy “WriteToDigitalPort” and “ReadFromDigitalLine”.  In addition, to be completely honest, the whole “DAQmx Task” thing has me a little confused. 

 

Definitely getting a feeling of “this used to be so simple…”.Smiley Very Happy

 

Any suggestions would be appreciated.

Thanks,

John

0 Kudos
Message 1 of 2
(3,253 Views)

Hi John,

 

Here are some links to some very useful information on how to transition your LabWindows/CVI project from Legacy DAQ to DAQmx.  Also, the Example Finder in LabWindows/CVI is a great resource to see how to configure DAQmx calls as well!  In LabWindows/CVI, if you go to Help » Find Examples, the Example Finder will open, and you can browse through and see the various examples of how to read and write to a device using DAQmx by going to Hardware Input and Output » DAQmx.  From here, there are numerous examples on how to create projects using DAQmx.  Hope this helps!

 

Transitioning from Traditional NI-DAQ (Legacy) to NI-DAQmx Using ANSI C and NI LabWindows™/CVI  

Transition from Traditional NI-DAQ(Legacy) to NI-DAQmx using ANSI C and NI LabWindows™/CVI: Part Two

Transition from Traditional NI-DAQ (Legacy) to NI-DAQmx using ANSI C and LabWindows/CVI: Part Three

Transition from Traditional NI-DAQ (Legacy) to NI-DAQmx using ANSI C and LabWindows/CVI: Part Four

Taylor G.
Product Support Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 2
(3,241 Views)