Jeffery, Thanks, ( sorta ) got me looking in the right place.
I have a "sorta working" program. ( Visual C# 2019 ) After checking that my boards are attached, I run:
Globals.AIMhandle = MccDaq.MccService.ScaledWinBufAllocEx(Globals.AINumPoints); // Globals.AINumPoints is 16 for my 16 channels in.
then
AInOptions = MccDaq.ScanOptions.ScaleData;
short[] channels = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
MccDaq.Range[] ranges = { MccDaq.Range.Bip1Volts, MccDaq.Range.Bip1Volts, MccDaq.Range.Bip1Volts, MccDaq.Range.Bip1Volts,
MccDaq.Range.BipPt078Volts, MccDaq.Range.BipPt078Volts, MccDaq.Range.BipPt078Volts, MccDaq.Range.BipPt078Volts,
MccDaq.Range.Bip20Volts, MccDaq.Range.Bip20Volts, MccDaq.Range.Bip20Volts, MccDaq.Range.Bip20Volts,
MccDaq.Range.BipPt625Volts, MccDaq.Range.BipPt625Volts, MccDaq.Range.BipPt625Volts, MccDaq.Range.BipPt625Volts
};
ULStat = Globals.DaqBoardAnalog.ALoadQueue(channels, ranges, 16);
then ( which happens once a second usually )
int Rate = 10;
ULStat = Globals.DaqBoardAnalog.AInScan(lowChan: Globals.LowChannelNumber, highChan: Globals.HighChannelNumber, numPoints: Globals.AINumPoints,
rate: ref Rate, range: Globals.ChRange, memHandle: Globals.AIMhandle, options: AInOptions); // I had a problem here, Globals.ChRange was set to MccDaq.Range.Bip10Volts, and that caused the clipping. ( ?? As I read the doc, the queue should dominate ?? )
then
numpoints = Globals.AINumPoints;
ADDataV = new double[numpoints];
AIFirstPoint = 0;
ULStat = MccDaq.MccService.ScaledWinBufToArray(Globals.AIMhandle, ADDataV, AIFirstPoint, numpoints);
to bring the data into an array.
This seems to work, but, if the queue setting doesn't get some channels read at the higher resolution I may be hurt on accuracy. ( Tho I can probably live with 1mV errors. )
My problems now, ( attached file ) under current I'm reporting volts across a 0.002 Ohm resistor, so nearly 90A, temp readings are thermocouples in air. volts readings are OK to start, Ground resistance is unconverted ( my bug ) voltage across a series sense resistor. This shows one of 4 test nests. The other 3 were not powered.
Readings here and on the other nests were good until the ground resistance dropped ( checking with my meter, it seems it really did, from 40+ MOhms to ~ 1 KOhm. ) this sent the voltage across the sense resistor too high. I unplugged the connector for those channels. ( about line 43 ) then things got weird. The voltage readings went down - I still saw 13V with my meter at the connector, the voltage readings on the other nests went up to several volts ( they were 0 ) , temperature readings went up ( my meter showed ~ 70 F ) .
Can the open channels ( as I unplugged to not put 24V on the inputs ) cause other channels to read wrong?.
Thanks,
dave
dataTK_test_2022-12-13T16-55-49_Nest_1.csv