LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A task created in MAX is not recognized in LabVIEW

I have the following HW and SW:
 
PXI 6259 Multifunction DAQ module
MAX 3.1
LabVIEW version 7.1
 
I have created a DAQmx task in MAX. I put a task constant on my block diagram, selected the task that had created in MAX, right click on the border of the constant and select Generate Code-> Example which creates a simple code that starts the task, reads and displays the data, and stops the task. But when I run the VI, I get an error "Task specified is invalid or does not exist". Clearly the task existed since I was able to select it from the task constant. I can also see the task in MAX and run the test which is fine. So what is the problem?
0 Kudos
Message 1 of 12
(4,352 Views)
Hi!

I am not sure if you could create a task in MAX and then use it in your VIs.
Is there any reason why you wanna do this? Typically, one creates a task within the VI itself.
From my experience, MAX and Labview seem to run independently when creating tasks but I am not absolutely sure. I used MAX more frequently to troubleshoot my hardware. I never used it for programming.

Goy
0 Kudos
Message 2 of 12
(4,348 Views)
Fataneh,

I am positive that you should be able to get this to work.  I am not sure why it is not working for you.

Have you tried restarting your computer, LabVIEW, and MAX?

can you try to create another task and see if you see the same behavior?

What is the error number you are recieving?

What type of card are you using?

What type of task did you create (analog/digital/counter, input/output, singlepoint/continuous/finite/hardware timed, how many/which channels, etc.)?

thanks,
Lorne Hengst
Application Engineer
National Instruments
0 Kudos
Message 3 of 12
(4,322 Views)

I did restart my computer, LabVIEW, and MAX and still got the same results. The strage thing is that once in a while, I run my VI and it works, meaning that the task is recognized and everything's fine. But most of the time, I get an error number -200088 "Task specified is invalid or does not exist". I don't understand the inconsistency.

I'm using a PXI-6259 module which is a multifunction DAQ module. My task is Analog In, Voltage, Continuous, Internal Clock, rate of 200,000, 10,000 samples to read.

I tried creating the task in my program and that works. But the literature (and my NI field engineer) tells me that I shoud be able to create a task in MAX and use it in my program, which I prefer.

Fataneh
0 Kudos
Message 4 of 12
(4,317 Views)
Fataneh,

Ok, we are running out of options.

Make sure you have administrative privilages on the computer you are using.  Mostly, make sure you have complete access to all of the files on your PC.

If that does not solve your problem, I would suggest reinstalling your device drivers (which can be a pain in the butt if you have a lot of device drivers installed).

Lorne Hengst
Application Engineer
National Instruments
0 Kudos
Message 5 of 12
(4,303 Views)
This problem looks like a bug in Labview. I have been experiencing the same issues as Fataneh, including the apparent intermittency (i.e. sometimes the code works, sometimes it doesn't). When I demonstrated the problem for my local field engineer, he created the attached example that shows the problem in very simple code.
 
John
0 Kudos
Message 6 of 12
(4,264 Views)

I wondered if this was a LabVIEW bug. But being new at LabVIEW programming, the first place I look for fault is myself! Can an NI engineer look at this and give us a definite answer whether or not this is in fact a LabVIEW bug. Thank you very much.

0 Kudos
Message 7 of 12
(4,253 Views)

Fateneh,

I think I stumbled upon the solution: you  have to use the "create task" vi. See the attached modified test code.

John

0 Kudos
Message 8 of 12
(4,245 Views)
Fateneh and John,

The KB found through the link below refers to the issue John is having with his code.

http://digital.ni.com/public.nsf/websearch/368AE98647EEE86E86256EBE0067B167?OpenDocument

I am not sure if this is the same problem you are having Fateneh.  When you create your code is the first function after your DAQmx Task constant a property node?  If not, this might not solve your problem.

The issue discussed in the KB above is fixed in LV 7.1.1, you might want to try upgrading your version of LabVIEW to fix the issue.

Fateneh, if this does not fix your problem, could you send me the code you created that does not work so I can take a look at it?

Thanks,
Lorne Hengst
Application Engineer
National Instruments
0 Kudos
Message 9 of 12
(4,236 Views)

I've been having this same 200088 error problem.

HW: PCI-6624

SW: Labview 7.1

I opened a counter in VI.lib/DAQmx/read.lib. I created a new task for a period and pulse width measurement in a sequence structure. Everything was fine until I left Labview and came back in. It gave me this 200088 error saying it couldn't find the task. I opened up the Measurements and Automation studio and tested each task I created. They all worked fine. Shut down my PC and brought it back up. Same error.

I found a solution on one thead here in NI, but so far it's not working either. On that thread, it was said this is a known problem with Labvew and should have a fix soon. Their solution was to put a "DAQmx task is done.vi" in after my task, but before any property nodes. I got the 200088 error again, but this time it said:

Error -200088 occurred at Property Node DAQmx Task (arg 1) in DAQmx Is Task Done.vi->32 chn Front Panel VER6.vi

Possible reason(s):

Task specified is invalid or does not exist.

So I am trying a different approach. Frustrated in Columbus.

0 Kudos
Message 10 of 12
(4,206 Views)