Hello, I have some questions regarding programming the pc4424 in visual basic:
1. does anybody know if there is visual basic examples for the 4000 series? The programming guide found at: http://www.imex.ie/files/u3/ps4000pg_en_pdf_31123.pdf
seems to indicate that one exists, but i have not been unable to locate it.
2. I know that there is an excel example for the 4000, but for some reason I am having problems applying the same techniques to VB. More specifically I cannot even get open the device when using ps4000OpenUnit(handle) command.
Sorry if this post is poorly worded, but basically I am just lost and am new to this, so any help or direction would be much appreciated. Thanks
I am using Visual Basic6, I am trying to model my program very closely to the 4000.xls example. But I cannot seem to get the device to open (using the OpenUnit(handle) command). It always returns 0. Also every time I stop the program VB6 force closes, I dont know if this is related or not. Do you think u can take a look at what I have so far and offer advice?
I feel like if I can just get past this issue ill be ok...
thanks
the scope works when using Picoscope6. I made the changes you suggested and the result is still the same. I am unable to open the device and when stopping the program visual studio force quits. Am I supposed to add the ps4000.dll as a reference somehow?
Because when I try i get an error message ("unable to add reference to specified file")
I tried out the 4424.zip program that you posted and it opens the unit fine. Most likely the program isn't referencing the ps4000.dll correctly, be sure to either place the ps4000.dll in the same folder as your project or reference the full path of the driver.
The reason for the crashing when attempting to close the software is due to you never calling the ps4000CloseUnit function. Once I added that to the end of your program is closed without any issues. On the function also change it to:
Declare Function ps4000CloseUnit Lib "ps4000.dll" (ByVal handle As Integer) As Integer