LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Executable not working with analog USB 6008

Hello,

 

I created an executable file in Labview 2022 and tried to deploy in windows 11 pc, but for some reason it is not communicating with USB 6008 analog ports. I am able to read it through NI MAX but not through executable.

I have installed the following in the computer.

DAQmx 22

runtime 22

VISA 22

 

Am I missing something? 

0 Kudos
Message 1 of 9
(737 Views)

Hi Newas,

 


@Newas wrote:

I created an executable file in Labview 2022 and tried to deploy in windows 11 pc, but for some reason it is not communicating with USB 6008 analog ports. I am able to read it through NI MAX but not through executable.


Which errors does your EXE output?

Is there error handling in your code?

How does that EXE access the NI6008 device? (Which device reference does it use?)

 


@Newas wrote:

Am I missing something? 


You missed to provide any details on your code!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(717 Views)

Does the executable run correctly on your development machine?

 

How do you select the device? Is it a hardcoded reference in your code, a front panel selection, or a NI-Max name?

 

Are you getting an error message? Are you capturing/reporting errors from you DAQmx calls?

 

If I had to guess, your USB device has been assigned a different device number on the new machine than your development machine.

0 Kudos
Message 3 of 9
(708 Views)

Hello Gerd,

Thank you for the quick reply. I am using Labview 2022 to write the files and creating an executable to pass on to a different computer. 

Inside the program I am using DAQmx to access the channels of USB 6008. These can also be accessed from the .exe file. 

I have two DAQ in my program to communicated with the relay and sensors. 

USB 9472/9162 carrier uses digital ports.

USB 6008 uses analog input and output ports.

 

When I transfer the executable to another computer, the digital ports on USB 9472 is reading in the program but USB 6008 AI/O does not communicate. However with NI max I am able to access the AI ports in USB 6008. I am not sure why the executable is not able to communicate? I do not see any errors while running the file. 

 

0 Kudos
Message 4 of 9
(703 Views)

Hi Gleichman,

 

Thank you for the reply. I have the DAQmx call that i can reference from the front page in the executable.  I have it referenced it as Dev3 and Dev4 but however when I connect the USB 6008 and other USB it reads as dev1 and dev2. I am renaming it in NIMax to make sure they are them same. 

Do you think this may be causing problem ?

0 Kudos
Message 5 of 9
(696 Views)

Hi Newas,

 


@Newas wrote:

Do you think this may be causing problem ?


Yes, definitely!

Your EXE needs to use the correct device names as defined in MAX!

 

You (as program creator) are responsible to have a configuration scheme for your program that allows to configure those device names as you cannot depend on the settings of your own development computer…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(675 Views)

If you haven't done so, I strongly recommend looking up "Learn 10 Functions in NI-DAQmx and Handle 80% of your Data Acquisition Applications" (I think that's the correct title, but if you start typing it into Google, it will find it probably after 4-6 words).

 

Here's what I do to "find" the right DAQ device -- I use some functions in DAQmx to enumerate the attached devices (they don't actually have to be attached, they only need to show up in MAX's list of "Devices and Interfaces", at least, I think that's correct).

Find DAQ Device (#2).png

Here's the idea:

      DAQmx System gives you a list of all of the Device names.  The For loop reads them one at a time and if the Product Type is one you want (here USB-6009), you can look at the serial number and give it a name (if you want).  What if you can't find it?  The following Case statement will get "False" as an input, and will ask "Do you want to simulate it?" and make up a name.  Alternatively, you could run the Error Line through this Case statement and generate a User Error (such as 5001, message "Device not found") and make the program exit.

 

Bob Schor 

 

0 Kudos
Message 7 of 9
(647 Views)

Hi,

 


@Bob_Schor wrote:

(I think that's the correct title, but if you start typing it into Google, it will find it probably after 4-6 words).


Typing just "daqmx 10" works for me to find that document in the first place of the results…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(636 Views)

Hi,

 

Thank you all. I found the problem and was able to troubleshoot it. There was voltage range conflict in the daqmx analog input.

 

0 Kudos
Message 9 of 9
(496 Views)