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?
^_^^_^