Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

MAX settings in VC++

If I set up the chassis configuration in MAX for the SCXI 1000 to be multiplexed, can I use the following code in VC++ to scan all of the channels on my two SC1102B modules using an NI PCI 6221 card?
 
In particular, my channel strings may need checking! Smiley Very Happy
 

      int       error=0;

      TaskHandle  taskHandle=0;

    

      /*********************************************/

      // DAQmx Configure Code

      /*********************************************/

DAQmxErrChk (DAQmxCreateTask("",&taskHandle));

 

DAQmxErrChk(DAQmxCreateAIVoltageChan(taskHandle, "Dev1/SC1Mod1/ai31,Dev1/SCMod2/ai31",

"", DAQmx_Val_Cfg_Default,0, 10.0,DAQmx_Val_Volts,NULL));

 

           ....code truncated to keep in limit

 

Thanks in advance

John

0 Kudos
Message 1 of 3
(4,198 Views)
Hi John,

Have you tried the code that you have posted and it didn't work?


If it didn't have you tried the following for addressing one module:

DAQmxCreateAIVoltageChan(taskHandle, "SC1Mod1/ai0:ai31", "", DAQmx_Val_Cfg_Default,0, 10.0,DAQmx_Val_Volts,NULL

I don't have any SCXI equipment to directly try this at the moment but will try and hunt one out.

Have you been able to read any channels at all yet and if so how were you addressing.

Update:

I notice that this is a duplicate of the followign thread:

http://forums.ni.com/ni/board/message?board.id=231&message.id=4463

I presume this is now resolved?

Message Edited by S R on 07-07-2006 04:17 AM

Message 2 of 3
(4,186 Views)

Yes - this problem has now been solved by JamesC - many thanks, however, for your help Smiley Happy

John

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