Hi,
I recently bought PicoScop4224, I want to use it by transfering data to my PC , I'm using your sample that called ps4000con.c with no success , there are some H files that missing that needs to run _getch & _kbhit functions , I tried to download it from the internet but he keep asking me for more and more H FILES.
I'm compiling with CVI.
Please advise me what I have to do to run your sample.
Regards
israel.
Those functions are in the MS C runtime library (included with Visual Studio and many other IDEs) and are defined in the header conio.h. It sounds like your IDE doesn't include these library functions.
You could change the code so that it doesn't use these functions.
I have the conio.h, but he needs more files like:
cdefs.h
ioctl.h
select.h
sys-types.h
termios.h
types.h
unistd.h
those files are not there .....I download them from the internet
but it's still not enough.
I also tried to change the code, but it's not simple as u think.
I dont know what those function do.
I guess that _Kbhit wait for the user hit the keyboard , so why use a special function????
Please advise me what to do.
I'm using CVI compiler it's belong to NI.
I need simple things from this driver, just to set the picoscop and read data.
I need simple things from this driver, just to set the picoscop and read data.
Even if you cannot run the example, it should help you to understand how to collect a block of data, for example. The API functions are described in the Programmer's Guide.
Regarding using the MS C Runtime Library, the following might help...
Thanks for your help, I succeded runing your example by changing the function "_getch()" to "getchar()" and "_kbhit()"
to "keyHit()" .
I have some question regarding to your sample:
1.GetTimeBase function: is it function to set the timebase or just discover which timebase available in the scop.
I'm entering squre wave drom the pulse generator and when
I set the PG freq to 1-10Hz i see the data is very well, but when I i set the PG to 1Khz the data is defective.
I think its because I don't change the timebase correctly.
here are the defines that i'm using:
ps4000GetTimebase can be used to discover the available timebases and it returns the sample interval for a given timebase code. It does not set the timebase and you don't have to use it.
There are four columns because the example uses aggregation and these are the min and max values, as described in section 4.6.4 of the programmer's guide.
sorry, But i still have the first problem.
When I changing the setting of th PG to 1KHz the data that I receive is defective, why is that?
do i need to change some other function or setting to receive
correct data?
that is the thing , How do i Change the TimeBase ??
the GetTimeBase function like u said is just to discover....but How do i changed it???, I understand that if i change the Freq int the PG I need to chang also another thing in the setting function so I can receive correct data.
When using block mode, the timebase is passed to ps4000RunBlock. When using streaming, you pass the sample interval to ps4000RunStreaming.
Aggregation is described in the programmer's guide. It is a way of reducing the data returned by the drive. For example, if you had an aggregation factor of 10, the driver would return the minimum and maximum values from each set of 10 samples.