Excel data transfer

Post your VB and VBA discussions here
Post Reply
bruceh
Newbie
Posts: 0
Joined: Mon May 19, 2014 2:28 am

Excel data transfer

Post by bruceh » Mon May 19, 2014 3:39 am

Hi, I am trying to use ps4000.xls to log data from a Picoscope 4424
I have ps4000wrap.dll, ps4000.dll and picoIpp.dll installed in the win 64 system folder.
When I enable macros and hit "Get Data" there is a pause then I get a VB error:
Run-time error '49':
Bad DLL calling convention.

Debug shows the last of the 3 calls in the set trigger section
'Set trigger
Call ps4000SetTriggerChannelConditions(handle, triggerConditions, 1)
Call ps4000SetTriggerChannelDirections(handle, 2, 2, 0, 0, 0, 0)
Call SetTriggerProperties(handle, triggerChannelPropertiesArray(0), 1, 1, 1000)

Any ideas??

Bruce

Hitesh
Site Admin
Site Admin
Posts: 2793
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Excel data transfer

Post by Hitesh » Mon May 19, 2014 12:56 pm

Hello Bruce,

If you are using version 10.5.0.32 of the SDK, then the wrapper dll has been changed to incorporate new functions and also some existing functions have been changed where an input parameter is not used.

In this case, the auxEnable parameter is not used and has been removed from the function declaration.

Please modify the following lines of code in the example:

Code: Select all

'Declare Functions
Declare Function SetTriggerProperties Lib "ps4000Wrap.dll" (ByVal handle As Integer, triggerChannelPropertiesArray As Long, ByVal nProperties As Integer, ByVal autoTrig As Long) As Integer

'Calling SetTriggerProperties
Call SetTriggerProperties(handle, triggerChannelPropertiesArray(0), 1, 1000)


Note that the wrapper dll is now called ps4000Wrap.dll where the 'W' has been capitalised.

I hope this helps.
Hitesh

Technical Support Engineer

Post Reply