Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create *multiple* TC Channels in Measurement Studio (VB)?

I'm using Measurement Studio in VB and have open the sample for continuous thermocouple analog in operation. I am basically trying to alter that code to read multiple channels ... However, my problem seems to be in the actual acreation of multiple channels. I have created an AIChannelCollection called myChannels, but now I can't seem to add channels to it as the sample did (in adding one).

Simply put ... I can't do myChannels = myTask.AIChannels.CreateThermocoupleChannel("SC1Mod2/ai0:3" ...) or anything of the sort - I also tried a for loop since the command appears to only create one channel at a time ... but still with no luck.

Any suggestions? I've got a hunch it has something to do with AICh
annelCollection being an array, although (even in my for loop attempt at adding) I can't seem to index it.

Thanks for any help.

Brett
0 Kudos
Message 1 of 3
(5,905 Views)
Hello Brett,

I looked for some examples but I couldn�t find any in specific for multiple thermocouples. There are some for doing multiple analog inputs so I think it would be a good idea to open one of them and see how they configure the task to have multiple channels.
Another resource you can use to check how to call functions on DAQ is the Traditional NI-DAQ Function Reference Help that is located in Start»Programs»National Instruments»NI-DAQ.
There you can find several functions and how each functions is built.
Hope this helps.

Ricardo S.
National Instruments.
0 Kudos
Message 2 of 3
(5,905 Views)
Ricardo -

Thanks for the help, but I ended up figuring it out. Seems that the easiest way is just a for loop, with each iteration configuring a new TC channel. I had tried it before but it didn't work for some reason, perhaps I wasn't using the proper format for the physical channel string. All is well now - I'm cooking with gas.

Thanks.

Brett
0 Kudos
Message 3 of 3
(5,905 Views)