Jump to content
  • 0

VB6 oldmGetValidSample error


SLam5

Question

Error: valid samples = 0 <> adc bufferlength = 4800

I am somewhat new to VB6. I am having the error above when I restart my program (Start->Stop->Start->Error). There is no error on the first start. I understand that the oldmGetValidSample is an imported function, but, for some reason, on the second start, samples is set to 0 instead of being updated. What does oldmGetValidSample do to the samples variable exactly?

Capture.PNG

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello @SLam5.

Please reference Data Translation's Data Acquisition SDK Help file for that function.

C:\Program Files (x86)\Data Translation\Win32\SDK\Documentation\dasdk.chm

Also, Visual Basic 6 is no longer supported by Microsoft.  Please reference and test Data Translation's VB examples located in the following folder:

C:\Program Files (x86)\Data Translation\Win32\DTx-EZ\Examples\ExamplesVB

 

image.png

 

Regards,

Fausto

Link to comment
Share on other sites

  • 0

Hello @SLam5.

That function determines the number of valid samples in a buffer.  The data width is not "so large".  Most likely, there are no valid samples up till the error occuring. 

Additional reference is the DTxEZ Getting Started Manual in the 'C:\Program Files (x86)\Data Translation\Win32\DTx-EZ\Documentation' folder.

Regards,

Fausto

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...