LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ assistant error 200022 and 200524

Hey guys!
I am having some problems reading/writing to a few of our DAQ's. I am not sure which DAQ model numbers we are using, but the DAQ assistant screenshot's have the functionality of them listed on the block.

 

Please forgive the misnaming of the global variables, that's something (not urgent) which will be fixed soon, as IN should be OUT and vice-versa.

I have been tasked with simplifying the running process, as before the DAQ assistants for read/write were in separate .vi files, which had to be opened and running before the main program could be used. My task was to simplify this issue by having the DAQ assistants imbedded in the block diagram of the main program.

One final thing, I cannot post the whole .vi here because my boss won't allow it, but screenshots of the problem area are ok.

 

 

DAQ 01:

Analog voltage output, 16 channels, the first 8 are used

Error 200524: Write cannot be performed b/c the # of channels in the data does not match the number of channels in the task. Task = 16, Data = 1.

I tried to fix this error by moving the DAQ assistant out of the while loop so all of the channels would concatenate into one data stream...but it does not seem to fix the issue.

 

DAQ 04-07:

Analog voltage input, 16 channels each, all are used. 

Error 200022: Resource requested by this task has been reserved by a different task.

I am not sure where this error comes from, as the DAQ is not referenced in any other instance before this. I figure it might have something to do with the DAQ read in a while loop, reading the value and writing it to a global variable, which is then used (maybe at the same time?) to display info on a chart and indicator.

 

 

Thanks again for all of your help! Please try to dumb down responses, so a beginner like me can understand. I've had the ...wonderful pleasure of trying to learn the whole program in 2 days.

Download All
0 Kudos
Message 1 of 7
(2,442 Views)

Hi Huntr,

 

the problem with images is: you don't allow us to debug your code.

the problem with ExpressVIs (like the DAQAssistent) is: you even hide code in the image of your block diagrams from examination.

 

So in the end: which kind of help do you expect when you hide all the relevant information and don't allow us to debug your VI(s)?

 

On DAQ01: When the task includes 16 channels you need to provide data for all 16 channels, not just one. The problem probably is due to excessive use of DDT wires (and ExpressVIs)…

 

On DAQ04: There are so many DAQAssistents in your image so there surely is a resource conflict between two (or more) of them…

Best regards,
GerdW


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

GerdW,

 

Thanks for the quick reply. I understand the issues with trying to debug the images and also looking at the DAQ assistants, but unfortunately I cannot post my VI's to the forum :/.

I can't open the DAQ assistants on my computer (Mac), but I do know how they are wired up to the sensors. 

 

I've attached files from the old LabVIEW program which I am rewriting to improve/document the structure and make it easier for first time users to follow.

I am trying to follow the old structure (DAQ_old_01) but implement it inside it's own loop instead of a loop with calculation functions. The reason for this is because my employers want "plug and play", where they can redefine which DAQ does what through the use of a .csv file, whereas the old system was hardcoded and impossible to change up.

 

In here (DAQ_old_0507), I have taken the DAQ assistants reading from Slot 5-7 and broken them up into individual DAQ's (look at my first post). This way if they want to change the system up and say, use a pressure transducer instead of a thermocouple in DAQ 06, slot 8, they don't have to go change every global reference to TC 24, but instead use (old picture) DAQ_06_07.

 

With their current setup, DAQ's 4, 5-7, and 8 are in separate .VI's which must be running before the main program can be started. I have been tasked with implementing these functions into the main .VI, so they only need to open up one file and click run.

I understand it's frustrating that you can't look at the .VI's, but I appreciate the response and potential fixes. In regards to providing data for all 16 channels, there is already data present from user presets and from values in the, so I am just as confused as to where this error is coming from.

 

Thanks again, Huntr

Download All
0 Kudos
Message 3 of 7
(2,414 Views)

Hi Huntr,

 

I have been tasked with implementing these functions…

As hard as it sounds: Learn LabVIEW!

 

- In the header of this LabVIEW board you will find links to learning resources.

- LabVIEW comes with a huge example library.

- To master DAQmx you need to read this article.

 

From your images I need to say: there are better software architectures than just placing 48 globals next to 48 indicators, all wired up using a huge SplitSignal and all those DDT wires.

Do yourself a favour and "Learn LabVIEW"…

Best regards,
GerdW


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

Hey all,

 

So I was able to go out into the lab and mess around with the "while" loop from my first post with the individual DAQ's. I found the issue is that some of the DAQ's don't like running with the other ones. So DAQ 4 does not like to run in the same loop as 5, 6, or 7. DAQ 6 and 7 don't like DAQ 8. Etc... Only issue is, I had limited time and won't be able to access the lab for another ~4 hours 😕

 

Would somebody be able to point me towards a solution where I can have the different DAQ's run from within the file tree when the "Run" button is pressed on the main program? I think I can use a subVI, but my fear is that they still won't be compatible with one another if I try to run them in the same VI. Is there a way I can execute the different DAQ VI's from within the Main VI without turning my DAQ's into SubVI's?

 

Thank you! I appreciate the help
Huntr

0 Kudos
Message 5 of 7
(2,406 Views)

Hi Huntr,

 

I think I can use a subVI, but my fear is that they still won't be compatible with one another if I try to run them in the same VI.

Yes, even when you use subVIs with your seperate DAQmx assistents they will still produce the same error - as the hardware didn't change…

 

Is there a way I can execute the different DAQ VI's from within the Main VI without turning my DAQ's into SubVI's?

Using subVIs is recommended!

But you need to learn DAQmx and learn about using your hardware!

Can't you use the channels in one task? For my testbench software I handle upto 128 channels within one DAQmx task - and the whole setup is configurable by the user…

 

As said before: get rid of ExpressVIs and do some "real" programming…

Best regards,
GerdW


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

Rule #1 (especially when using the Dreaded DAQ Assistant) -- Do Not Attach Pictures (we can't "click" on the DAQ Assistant image and get it to open up and let us see how it is configured).  Instead, attach your VI (if there are many VIs, you can compress the Folder containing them all and attach the resulting ZIP file).

 

Suggestion #1 -- learn to leave the Dreaded DAQ Assistant, and "Learn 10 Functions in NI-DAQmx and Handle 80% of your Data Acquisition Applicatons".  [That's the title of an NI White Paper -- search for the first 3-4 works on the Web and read the Paper.]

 

Suggestion #2 -- Connect your device to your PC.  Open MAX.  Find your Device.  Open a Test Panel.  Configure your Device for one of the Tasks you want to do.  Run your Task.  Does it work?  If so, create a Task in MAX.  Now, when you open LabVIEW, you can drop down a "DAQmx Start Task" function, right-click the Task input (upper left) terminal, Create Constant (giving you a blank Task constant), click the little Selection Arrow, and choose the Task you just created in MAX.  Presto, all the channels are configured, the Timing is set, and you are Ready to Roll.  Add a DAQmx Read (or Write, as the case may be), a Loop if needed, and end with DAQmx Stop Task.  All done, with only 3 DAQmx functions.  Repeat for other Tasks.

 

Bob Schor

0 Kudos
Message 7 of 7
(2,392 Views)