Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

still int64 problem---data overflow

I rewrite the prototype of DAQmxCfgSampClkTiming and other fbunctions that have int64 type parameters. I successfully acquired the data to the array I defined.But there's still a problem.
After I call the data reading function , I want to caculate the average data of data(n). then "overflow" error occured like this:
sub GetData() 'Get the data and caculate the average. the data I Acquired stored in : data(10)
....... 'call data Reading function....
for I=0 to 10
val1=val1+data(i) <---- overflow at this point
next I
aver=val1/11
end sub

but when I write caculate process in another function, the "overflow" error disappeared. Like this:

sub Getdata()'Get the data
....... 'call data Reading function....
end sub

sub Caculate() 'caculate the average
for I=0 to 10
val1=val1+data(i) <---- not overflow
next I
aver=val1/11
end sub

I don't know why?
^_^^_^
0 Kudos
Message 1 of 2
(2,708 Views)
Hello,

Were you having the same problem before changing the prototype of DAQmxCfgSampClkTiming and the other functions that have int64 type parameters?

Thanks,

LA
0 Kudos
Message 2 of 2
(2,696 Views)