Jump to content
  • 0

USB-1208LS Sample Program doesn't work


Hammer

Question

Hi,

I have installed USB-1208LS to Windows10 PC and it is ok when I test it using test mode of instacal.
I have compiled and built the sample program "ULAI01.C" with Visual Studio 2022.
But,when I test it, it doesn't work and outputs the message "USB-1208LS (board 0) does not have analog input channels.".
what should I do?

Best Regards,

Hammer

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Hello Hammer,

Attached to this message is a 32-bit C console program that should work with your USB-1208LS. Instead of using the cbAIn function, it uses cbAInScan and acquires the data as a background task. Create a 32-bit C console project with this code and let me know if you still get the no channels error. 

Best regards,

John

USB_1208LS.cpp

Link to comment
Share on other sites

  • 0

Hello John,

Thank you for your help.

I tried to compile your program. But, Visual Studio 2022 outputs the message "'stdafx.h':No such file or directory".

Now I'm looking for a solution to this problem. Do you know how to solve it?

Best Regards,

Hammer

Link to comment
Share on other sites

  • 0

Hello John,

Thank you for your help.

I tried your zip file and  I could build it in VS2022. But, the size of exe file bult was 0 byte. I don't know the reason why.

So,I copied the files "stdafx.h", "targetver.h" and "stdafx.cpp" to my VS2022 project folder , then I could build it sucessfully.

When it starts running, it outputs error message "Count must be integer multiple of packet size for Continuous mode.".

So, I push Enter key, it outputs text "146". Next, I push Enter key again, it outputs the message "Completed...press any key to exit".

When it runs, I applied a voltage of about 4V DC only to CH0.

How can I avoid this error?

Best Regards,

Hammer

Error Message.png

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...