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: 

Problem generating C code for DAQmx Create Virtual Channel (VI)

Hi all,

i am trying to generate .c file for DAQmx create channel(VI) function using LabVIEW C Generator Evaluation version. I get a warning saying that the type is not supported by the LabVIEW C Generator. 

 

Example:  task in, task out, physical channels, custom scale name are not supported by C Generator

 

Is there is way to solve this issue???

 

Once the .c file is generated, i want to generate a .dll file using any C Compilers.

 

Any help would be greatly appreciated.

 

 

 

 

Regards,
KM
0 Kudos
Message 1 of 6
(2,681 Views)
Since there are c/c++ interfaces to DAQmx, your approach seems extremely convoluted. There are examples that come with DAQmx.
Message 2 of 6
(2,672 Views)

Hi Dennis,

Thanks for your time and reply,

I went through the example C programs that ships along with DAQmx drivers. That was really helpful. I am basically trying to convert individual DAQmx functions to .c files. I am facing issues while i try to convert as briefed earlier.

 

For Example:  task in, task out, physical channels, custom scale name are not supported by C Generator

 

Type is not supported for the above mentioned inputs and outputs.  

I am jus curious to know if i can resolve this issue.

 

 

 

 

 

Regards,
KM
0 Kudos
Message 3 of 6
(2,642 Views)
Don't use the c code generator. It does not support every function, is very expensive, and just a silly use for this project of yours. All of the DAQmx functions already have their c equivalent. This would be a Rube Goldberg of epic proportions.
0 Kudos
Message 4 of 6
(2,637 Views)

What Dennis wants to tell you: AS the C DAQmx API already provides you with the same functions as the LV DAQmx API VIs, there is no need to create convoluted wrappers using a C Code Generator.

 

What you should do is to get familiar with DAQmx overall. Use LV (and online material) to discover the options, DAQmx provide you when using NI hardware. You maybe should also attend the LV DAQ class for more detailed training.

Then use the C DAQmx API to create a generic C application for your needs. If required, you can of course wrap "high level functions" (which means: a collection of low level functions in a specific order and specific parameters) as new "simple DAQ API".

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 5 of 6
(2,630 Views)
Norbert,

Thanks for providing the additional detail. I was laughing to much at the idea that I couldn't do much more than provide a quick answer.
0 Kudos
Message 6 of 6
(2,622 Views)