LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with NI 6293 in cDAQ-9189: Works in Test Panels but Fails in LabVIEW Code and DAQExpress

Solved!
Go to solution

Hello, I am currently using an NI 6293 module in a cDAQ-9189 chassis. The device was installed successfully and works perfectly when tested using the Test Panels. It also appears in the DAQ Assistant within my LabVIEW program. However, when I try to send a signal using my code, it does not work. I also attempted to test it using DAQExpress, but DAQExpress does not recognize the device at all.

0 Kudos
Message 1 of 8
(439 Views)

Can you confirm you actually mean an NI 9263?  6293 isn't a model number that I can find.

 

Apart from that your post is missing a ton of details, and when something like this doesn't work, details are very important.

 

Please post as many of the following as you can:

  • Screenshots of its configuration in NI-MAX
  • A screenshot of NI-MAX showing everything under the "software" tab, to show what versions of everything you have installed
  • Your test code that doesn't work
    • *.vi files are 10 times better than screenshots 
    • Preferably saved as LabVIEW 2019 or older since many forum members are not updated to newer versions
  • Number codes and screenshots of any error messages you get
  • Screenshots of DAQExpress failing
0 Kudos
Message 2 of 8
(426 Views)
Solution
Accepted by topic author Danny0806

Did you try the Example program for DAQmx Digital Output (which says it supports the 9263) that ships with LabVIEW?  Note -- if you open the Example, I recommend you do a "Save As:" and put it on your Desktop or in your LabVIEW Data folder, close the Example, and work with your copy (just in case you mess something up).

 

The Example code will show you much more than you probably need to use, but it will use DAQmx and show you how relatively simple DAQmx can be if you are doing relatively simple things (like configuring a D/A channel and getting the D/A to output a value on command).

 

To learn more about DAQmx (and to avoid using the Dreaded DAQ Assistant), search for "Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications" (you don't have to type the entire title into Google -- it will find in by the third or fourth word).

 

Bob Schor

0 Kudos
Message 3 of 8
(392 Views)

I just took my own advice and opened the "On Demand Output.vi" example in LabVIEW 2019.  It's really simple, but has a curious "feature" which puzzled me until I realized I was looking at an "Example without explanation".

 

Like many of the canned NI DAQmx Examples, this attempts to cram all possibilities into one piece of code.  The Front Panel lets you choose one or multiple Physical Channels, and output one sample at a time (using an Array with one value per Physical Channel).  Inside the While Loop, the DAQmx Write function is set for Analog 1D Dbl NChan 1Samp, meaning it writes the contents of the 1D Dbl Array "Channel Array", a single value for each channel, with each Write. 

 

But what if (as in the Example), you only specify a single Channel?  Then, instead of the data being a Channel Array, it will be a Channel Value, a simple Dbl.  You'd click the Polymorphic Selector under the DAQmx Write and change it to Analog, Single Channel, Single Sample (and it would show you that you wire a Dbl, a single value, instead of an Array.

 

Note that the While Loop in the Example seems (to me) to be pretty silly -- it keeps generating the same voltage every 10 ms until you push the Stop button and stop/kill the Task (and then the output voltage depends on the behavior of the hardware ...

 

Bob Schor

0 Kudos
Message 4 of 8
(389 Views)

Hello! Sure , I ma attaching some info here

 

NI MAX Configuration 

Danny0806_0-1723468555833.png

 

DAQ Express and NI Device Monitor  not being able to recognize the device 

Danny0806_1-1723468637374.png

 

 

Software Tab

 

Danny0806_2-1723468697711.pngDanny0806_3-1723468717371.png

The Device works perfectly with the test panels, however it does not output anything with the code. There is no error , it just does not output the signal 

0 Kudos
Message 5 of 8
(377 Views)

I've not worked with a cDAQ, but it clearly is reached via TCP/IP (I've programmed a PXI system and a cRIO that you reached through TCP -- in my case, using LabVIEW's Network Streams).  Your code fragment shows you using dev1, which MAX shows as a USB-6229, so it is not surprising that it doesn't work with your cDAQ.

 

Have you explored the Examples that ship with LabVIEW, looking for Analog Output using a cDAQ?  [Hmm -- I didn't find much there.]  Maybe some of my colleagues on the Forum have some useful experience ...

 

Bob Schor

0 Kudos
Message 6 of 8
(343 Views)

Hello, I do chose the correct device in my code. The fragment here was taken like that just for illustration purposes. So the choice of the device is not the problem . Thanks anyways

0 Kudos
Message 7 of 8
(318 Views)

Thanks a lot for suggesting this. I just figure out that it works with one of the examples. The issue was associated with the sampling rate in my original code. I reduced it and now it works well. 

 

The device continues not being recognised by the NI Monitor or DAQ Express though. 

0 Kudos
Message 8 of 8
(315 Views)