Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

9235, strain and visual studio

Hi everybody,

I have just been assigned to a new project: I have to log strain measurements with a cDAQ-9188 and the NI 9235 8 channel quarter-bridge analog in module.

The project should be done as a Visual Studio (C or C++) project, we will not use LabView.

I have therefore opened the NI examples (Documents -> National Instruments -> NI-DAQ -> examples -> DAQmx ANSI C -> Analog In -> Measure Strain -> Cont Strain Samples).

After having set the parameters (physical channel etc.) the application can run, but all it does is just acquiring samples, without showing or logging them.
I would like to use these data of course, but I have no bare idea which function to use to catch or show the numbers I get.

May you help me?

 

I have another doubt: what is the relationship between the visual studio project and the settings I do in MAX? Do I need to create a task in MAX and refer to it from VS?

 

Thank you so much.

0 Kudos
Message 1 of 4
(3,171 Views)

Hi Roberto,

 

I'm Claudio, I spoke yesterday with you.

 

We created a Task In Max to see some values that you have to pass to various DAQ functions called in Visual Studio.

This is useful to understand the sense of parameters that functions accept.

It's not necessary to create a Task in MAX and call it in VisualStudio.

 

You can create a Task directly in VisualStudio calling the various DAQ functions and passing them the requested parameters.

 

Another option is:

Create a Task in MAX and then call the same in Visual Studio.

 

Regards,


Claudio

 

 

 

 

0 Kudos
Message 2 of 4
(3,161 Views)

Hi Claudio, thank you so much for your help,

I'll work on it 😉

If you or anybody else have suggestions for the first question in my post, let me know.


Thank you again !

 

Roberto 

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

Hello Roberto, 

 

Like Claudio correctly said , there are two ways that you can call a Task in Visual Studio.

 

You can either create a new Task programmatically using the DAQmxCreateTask instruction,

 

or you can load a Task that you have already created in MAX using the DAQmxLoadTask instruction.

 

I am sure the following link will be of assistance.

 

http://zone.ni.com/devzone/cda/tut/p/id/5409#toc2

 

Kind regards,

Antonios
0 Kudos
Message 4 of 4
(3,155 Views)