ps4000aGetTimebase() return value PICO_INVALID_CHANNEL

Post your C and C++ discussions here
Post Reply
hinxx
Newbie
Posts: 0
Joined: Mon May 13, 2019 12:45 pm

ps4000aGetTimebase() return value PICO_INVALID_CHANNEL

Post by hinxx »

Looking at the ps4000aCon.c I see no error checks when ps4000aGetTimebase() is used.
In my code I had to check the return status since I was getting PICO_INVALID_CHANNEL messages. I recall getting these early in development process, and I wonder if the reason is/was that I had no channels enabled through ps4000aSetChannel(). Is it mandatory to have at least one channel enabled in order for ps4000aGetTimebase() to succeed? Does it matter if many channels are enabled afterwards, and ps4000aGetTimebase() is not called again?

Martyn
Site Admin
Site Admin
Posts: 4499
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: ps4000aGetTimebase() return value PICO_INVALID_CHANNEL

Post by Martyn »

This function is more of a sanity check, if you understand the timebase values, number of channels enabled, and memory of the scope you don't actually need to use it.

A number of functions in the driver, including this one, are there to support the operation of our PicoScope 6 software.
Martyn
Technical Support Manager

Post Reply