From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting DAQ Assistant to Task

Solved!
Go to solution

When I try to convert my DAQ Assistants to Tasks using right click-convert to NI-DAQmx Task I get a name and a scrolly input output with all the wires broken. Likewise, if I create a task in MAX and then use a Task Name constant on the block diagram I get the same scrolly unput output. Am I missing a step here?

 

Thank you

0 Kudos
Message 1 of 14
(4,310 Views)
Please post a screenshot of what this looks like.  Perhaps post a copy of the VI as well.  Although we wouldn't have the task defined in our PC's, we might be able to see something in the actual VI.
0 Kudos
Message 2 of 14
(4,304 Views)

Hi Mirabelle

 

When you try to convert the DAQ Assistant to a task, do you get a dialog popup telling you that the task has errors? In the event of the task having an error, such as the DAQ device being disconnected or without power, the DAQ Assistant will simply be converted to a DAQmx Task Name (as has happened to you). The same thing occurs when a DAQmx Task is created in MAX. If no obvious error does show up, then if you could send me your VI then that also may help to get to the root of the problem. Look forward to hearing back from you,

 

Regards

Jeremy T
Technical Marketing
NI
Message 3 of 14
(4,296 Views)

Thanks for the help. I went back and looked at it carefully and it appears that the problem was that I had configured an analog trigger without actually plugging one in... However, I am wondering if one can just go ahead and use the DAQmx express. I read that one converts to tasks in Max in order for it to be available to all applications. But the task appearances are a lot less intuitive to me than just calling up the menu with the express function. So can I just forgo creating tasks if I only use these tasks in only one application? (Even if I use them more than once in the same program?). If I must convert to tasks, then when I modify it in MAX, will that update automatically in LabView?

 

Thanks again

 

Mirabelle

 

 

PS. Also, what is the difference between using one of the examples for analog voltage with trigger shipped with LabView or using MAX and then creating the code?

Message Edited by Mirabelle on 11-10-2008 08:26 AM
Message Edited by Mirabelle on 11-10-2008 08:26 AM
0 Kudos
Message 4 of 14
(4,262 Views)
Solution
Accepted by topic author Mirabelle

Hi Mirabelle

 

Glad to hear that you managed to solve the problem! In answer to your questions:

 

- The information you read about creating tasks in MAX is correct; it is possible to create a global task (one available to many VIs) in MAX. However, it is not necessary to create all tasks in MAX. As you suspected, if you are using the task within a single VI, there is no need to create the task in MAX - in fact it is probably simpler to just create the task within the VI itself, either using DAQ Assistant Express VIs or the individual DAQmx VIs found in the Functions Palette, located under Measurement I/O>>DAQmx - Data Acquisition.

 

- When tasks are modified in MAX, they will not be automatically modified in LabVIEW. In order to modify them in LabVIEW you will need to either change the task's properties within LabVIEW, or delete the old task and replace it with the modified one.

 

- I'm not 100% sure about what you mean by the question in your 'P.S.', but I'll try my best to answer it. Is there a specific example that you are referring to? If you are asking about the use of DAQmx VIs such as DAQmx Create Virtual Channel, DAQmx Control Task and DAQmx Read etc., as shown in the shipping examples, then there are a couple of reasons for using those. Basically, DAQ Assistant Express VIs are formed of a combination of the VIs in the DAQmx - Data Acquisition section of the function palette. In general, DAQ Assistant Express VIs will run slower than the standard DAQmx VIs. Also it can be easier to debug code when using standard VIs, as it is more obvious what task each section of the code is performing. And finally, there are also certain limitations to using DAQ Assistants, so whilst they may be easier to use in the short-term, in the long-term I'd recommend getting familiar with the standard VIs, because they make more complex tasks possible.

 

Hope this helps! Don't hesitate to let me know if you'd like me to clarify anything or if you have anything else I can help you with.

 

Best regards

Jeremy T
Technical Marketing
NI
Message 5 of 14
(4,226 Views)

Hi Mirabelle,

 

In addition to that it is easier to synchronize your multiple input/output tasks by using DAQmx Vi's rather than express vi's. Hope that helps.

 

PS: Good one Jeremy.

 

Best regards,

 

Fawad Nisar
Applications Engineer
National Instruments UK & Ireland
Message 6 of 14
(4,220 Views)

Thanks for your answers. They do indeed respond to many of my questions.

 

As to my "P.S", what I was refering to are the examples in the Help->Find Examples->Hardware... section of LabView. There is an example for analog voltage input with analog trigger. That is exactly what I am configuring with the Assistant VI and to me it just seemed to do the same thing except break down into many parts the different steps:max min voltage, number of samples, rate, trigger source etc. So, in addition to taking up more space on my block diagram, it seemed more complicated in the event that I needed to change the properties instead of just clicking properties in the Assistant VI and then changing the values from nice menus. 

 

Why does the Assistant VI run slower than the standard VIs? Seeing as how I am acquiring quite a bit of data, that would probably be a deciding factor!

 

Thanks again

 

Mirabelle 

0 Kudos
Message 7 of 14
(4,199 Views)

Hi Mirabelle,

 

I hope you are doing fine. Well the choice of using DAQmx assistant vi or DAQmx vi very much depends upon your application. With DAQmx vi's you certainly have more control over your operation and you can manipulate the minute factors such as timing issues , how you want to trigger and synchronization.

 

Typically, there is more overhead involved in using the DAQmx Assistant Express VI, which slows the execution down slightly, especially when doing single point input and output. Hope that helps.

 

Best regards,

 

 

Fawad Nisar
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 8 of 14
(4,167 Views)

Dear All

 

I have plotted waveform graph frequency vs amplitude of real time signal. I am using measurement computing USB1208FS. I used fft.vi to plot the graph and get the waveform which is attached (attachment 2). On X-axis frequency is form 0 to 0.49HZ. But I want to increase that from 50 to 500 hz . When X-axis scale is in auto select mode then it automatically adjust to 0 to 0.499 hz. When I deselect autoselect mode and edit x-axis from 50hz to 500hz then no waveform comes on display. I have set the sapling rate of 1024 and count of 500. Please guide me how can i get the desired waveform graph (attachment 1).

 

The graph scales which i want are shown in attachment.(below mentioned graph i get from book)

 

waiting for response

 

Kind Regards

Urfee

Download All
0 Kudos
Message 9 of 14
(3,477 Views)

Your question has nothing to do with the 4 year old thread you posted into.

 

You really should start a new thread.  And when you do, you should post your VI.  My guess is that you are feeding raw data to the FFT function and it doesn't include any of the timing data.  Thus the FFT thinks your data is at 1 Hz, and the FFT yields values up to the Nyquist value of 1/2 the sampling frequency, thus 1/2 Hz.

0 Kudos
Message 10 of 14
(3,472 Views)