LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Exporting a task in NI-MAX to LabView


Hello,

I need to aquire a single voltage reading from a BNC-2080 board. I noticed you can create a task in MAX in a very similar way to the DAQ Assistant. How can I export these tasks into LabView?

In a related note, I have tried to programmatically aquire the voltage, but am facing some difficulties:
1. The Create Virtual Channel functions returns error -200428 (Value passed to the Task/Channels In control is invalid. The value must refer to a valid task).
2. I require a single measurement per calling of the VI. This is intuitive to set up in as a task in MAX (aquisition mode: 1 sample mode, (on demand)), but I am uncertain how this is implemented with functions.

 

I have attached the VI.


Thanks!

0 Kudos
Message 1 of 4
(4,251 Views)
Create a DAQmx task node on your blobk diagram that is linked to the task. Then right click on it and go to the "Generate Code" sub menu.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 4
(4,224 Views)

Adding to that, if you're trying to learn how to work with the function calls instead of the DAQ Assistant, go to Help -> Find Examples.  There are quite a few DAQmx tasks under the "Hardware Input and Output" folder in the tree.  Taking a look at those examples, you can see how the functions are generally used.

0 Kudos
Message 3 of 4
(4,214 Views)

Well, as it is sometimes, the problem was bad drivers (installed version 15 before uninstalling 14), so all the VI's were acting up, I couldn't find any examples...

 

So thanks for the help!

0 Kudos
Message 4 of 4
(4,181 Views)