Test and Measurement Forum

PS4424 return code

Post general discussions on using our drivers to write your own software here

PS4424 return code

Postby bane » Fri Jul 03, 2009 6:54 am

Hi,

ps4000SetTriggerChannelProperties returns with error code hex 0x49.

In the documentation there is no description for this code. The highest number is 0x44.

This error can be reproduced.

Scenario:
- Open connection

1st step
- set up trigger
- run block
- stop scope, works fine

2nd step
- set up trigger -> error occurs.

Thanks in advance!

BRegs
Bane
bane
Active User
Active User
 
Posts: 9
Joined: Thu Apr 02, 2009 8:22 am

Postby Robin » Fri Jul 03, 2009 9:03 am

Hi

0x49 corresponds to PICO_INVALID_TRIGGER_PROPERTY (see picoStatus.h)

This indicates that one or more of the trigger properties is out of range. Are you changing the trigger properties before the second call?

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Postby bane » Fri Jul 03, 2009 9:42 am

Hi Robin,

trigger property is not changed.

The picoStatus.h is not included in ps4000 SDK.
I found the file in ps5000 SDK. Can I use this one?
I am asking because ps4000 and ps5000 SDKs are different.

If you like I can send you the code with the trigger configuration?!

Regards
Bane
bane
Active User
Active User
 
Posts: 9
Joined: Thu Apr 02, 2009 8:22 am

Postby Robin » Fri Jul 03, 2009 9:45 am

Hi

Can you post your code?

picoStatus.h from the 5000 SDK is fine and I will ensure a copy is put in to the 4000 SDK. I will also make sure the manuals get updated to include these error codes.

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Postby bane » Fri Jul 03, 2009 11:27 am

Hi Robin,

below the piece of code for the SetTrigger.
After calling this several times the function: ps4000SetTriggerChannelProperties
returns 0x49. Trigger Channel Property does not change.

Regards,
Bane

Code: Select all

...
short thresholdUpper = VScopeInterface.VoltageToADC(3000); // 3V default
      ushort thresholdUpperHysteresis = (ushort)(VScopeInterface.VoltageToADC(500)); // 0,5V default

      TriggerChannelProperties[] channelProperties = new TriggerChannelProperties[] {
              new TriggerChannelProperties( thresholdUpper,
                                            thresholdUpperHysteresis,
                                            0, 0, source, ThresholdMode.Level)};

      short code = NativeMethods.ps4000SetTriggerChannelProperties(mHandle,
                                                                   channelProperties,
                                                                   0, 0, 0);
      mLastErrorCode = (ErrorCode)(code);
      if (mLastErrorCode != ErrorCode.PICO_OK)
      {
        return false;
      }
...

bane
Active User
Active User
 
Posts: 9
Joined: Thu Apr 02, 2009 8:22 am

Postby Robin » Mon Jul 06, 2009 12:19 pm

Hi Bane

I have not been able to repeat this. I have tried modifying the C console example so that it calls ps4000SetTriggerChannelProperties several times.

The driver should only return this error when one of the parameters is out of range. Could it be a type or marshalling issue?

You shouldn't need to call ps4000SetTriggerChannelProperties more than once before collecting data.

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests