Example .XLS program crashes when # 0f samples exceeds 100

Post your VB and VBA discussions here
Post Reply
brucegsun
User
User
Posts: 2
Joined: Wed Apr 25, 2007 2:20 pm
Location: Fredericksburg, Virginia

Example .XLS program crashes when # 0f samples exceeds 100

Post by brucegsun »

I having problems getting the example program to handle more than 100 samples. In my application, I'll need at least 50,000 samples. I'm using the original time base of 13. The program crashes any time I do one of two things, when I increase no_of_samples value above 100 and if I increase "i" in the for next loop after the ps3000_get_times_and_values command. Is this an Excel problem or a ps3000 set up problem? I have attached the modified example .XLS file with the VBA code. Thank you very much for your time and assistance.
Attachments
ps3000-2.xls
(73 KiB) Downloaded 685 times

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

Hi,

When you change the number of readings to 50,000 you will also have to change the arrays as well....

ReDim values_a(50000) As Integer
ReDim values_b(50000) As Integer
ReDim values_c(50000) As Integer
ReDim values_d(5000) As Integer
ReDim times(50000) As Long

Best regards,
Mark S.

brucegsun
User
User
Posts: 2
Joined: Wed Apr 25, 2007 2:20 pm
Location: Fredericksburg, Virginia

Post by brucegsun »

Thank you for your kind assitance. The program works fine now. I appreciate your help.

Post Reply