Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -50352 at DAQmx Create Channel

I have a PXI-6251 daq card on a pxi running a Real-Time environment. I am creating a few local tasks with the create channel vi, two counter channels (on another card) a digital output task with 8 lines, and an analog input task with 5 voltage inputs and one thermocouple. I create the AI task first, then the others. This works perfect fine in the programming environment. But when I create an executable, the analog task returns error -50352. The other tasks are created successfully and work fine. The description of the error doesn't include any useful information, but it looks from forum posts like that error deals with some sort of lack of memory condition (which is why I made sure that task gets created first). Prior to creating the tasks, I'm also clearing any tasks that may be open and then resetting both devices (this was an attempt to free up memory). Any ideas on what might be the problem?

 

Dan

0 Kudos
Message 1 of 4
(2,353 Views)

Hi Dan,

 

Thanks for posting to the Discussion Forums! I understand you are experiencing an issue when trying to run a Real-Time executable with numerous different DAQmx tasks. Is this the first and only time you have seen this problem occur? I would be interested in knowing if you can reproduce the same error under different conditions, such as with a different executable that maybe only contains a few analog input channels for example. What versions of LabVIEW RT and NI-DAQmx are you using? When you create the channels, are you calling the DAQmx Create Task VI first, or just the DAQmx Create Channel VI? Additionally, do you have any DAQmx Channels, Tasks, or Scales in your project explorer or are you only creating the channels programmatically? Finally, is there any way you can post a screenshot of your block diagram and/or the error you are receiving? Any further information or perhaps even posting your code may be useful in helping to determine the problem. Thanks, and I look forward to hearing back from you soon!

Daniel S.
National Instruments
0 Kudos
Message 2 of 4
(2,315 Views)

I seem to have gotten it working, but I'm not sure what the problem was or if this error might happen again. I was just playing around with stuff and I changed the name of the daq card from "Dev3" to "DAQ" and it seems to be workign fine now. Is it possible some config file on the PXI was corrupted and it was having difficulty finding Dev3? Although I would expect both the digital out task and analog in task to have problems if that was the case. But it seems like this is not a real solution, or at least that I haven't found the real problem.

 

This is the first time I've tried to create a Real-Time Executable, and yes I have been able to reproduce this error with a very stripped down executable that only creates an analog in task I'm using Labview RT 8.5 and NI DAQ-mx 8.7.1. I tried upgrading to 8.8 but this broke something else. Now when I use a project task or channel I get an error saying it isn't a valid task while running it in the source environment (although it runs fine in the task creator). So I rolled back to 8.7.1, but the problem persisted (this used to work fine). I don't use thecreate task.vi, create channel should create it's own task when it's called right? I attached a sccreenshot of the code.


Dan

0 Kudos
Message 3 of 4
(2,308 Views)

Hi Dan,

 

That is a very interesting solution you have found. I am wondering if you rename the device back to "Dev3", if it will continue to work or not. Also, you are correct that the DAQmx Create Task VI is not necessary, though I just wanted to know if you were using it in this situation since I have seen a similar issue where the use of that function, amongst other things, caused a similar problem. I am still trying to figure out if this issue is related or not. Is there any way you can attach a stripped down version of your application which you found to still be causing this issue you are seeing? I would like to get exactly what you were running to see if I can reproduce the same error you were seeing. Thanks, and I look forward to hearing back soon!

Daniel S.
National Instruments
0 Kudos
Message 4 of 4
(2,272 Views)