Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
search inside all forums
Some functions in cyclone sdk c# example doesn't work well.
Sanshun L. Jan 14, 2018 at 05:56 AM (05:56 hours)
Staff: Johnny N.

  • Dear guys,
    We bought some cyclone maxs for manufacturing in our plant and I tried to use it automatically by cyclone control sdk. Fortunately, I found C# example in msvcsharp folder, but some functions didn't work as blow.
    eraseCycloneImage--nothing happened.
    addCycloneImage--error will show 0011: SAP image ID is greater than total number of images
    getPropertyValue--nothing happened.
    getImageDescription--nothing happened.
    compareImageInCycloneWithFile--always shows "false" whatever SAPs are some or not.

    I want to attach code, but I don't know where to attach them in this topic.




    Comments

  • Perhaps you can attach your code in a comment?

  • I have the same problem.  Whenever I attempt to call getPropertyValue, My C# environment (MS Visual Studio 2015) throws an exception related to the heap changing.

  • private byte u8GetCycloneImageFor( eCycloneImage eWhichChip )
    {
    byte u8Return = 0;
    uint i;
    string strNameToMatch;

    // Get the name of the firmware image we need
    switch( eWhichChip )
    {
    case eCycloneImage.CycImageHVAC:
    strNameToMatch = (string)Properties.Settings.Default["strCycloneImageNameHvacFw"];
    break;

    case eCycloneImage.CycImageRELAYS:
    strNameToMatch = (string)Properties.Settings.Default["strCycloneImageNameRelayFw"];
    break;

    case eCycloneImage.CycImageTANKMON:
    strNameToMatch = (string)Properties.Settings.Default["strCycloneImageNameTankmonFw"];
    break;

    case eCycloneImage.CycImageLIGHTING:
    strNameToMatch = (string)Properties.Settings.Default["strCycloneImageNameLightingFw"];
    break;

    case eCycloneImage.CycImagePWM:
    strNameToMatch = (string)Properties.Settings.Default["strCycloneImageNameModulationFw"];
    break;

    default:
    strNameToMatch = "NONE";
    break;
    }

    for( i = 0; i < gu8ImageCount; i++ )
    {
    // TODO MJS What is wrong with this code?!
    gstrImageInfo = CycloneSupport.cyclone_control_api.getImageDescription( gu32CycloneHandle, ( i + 1 ) ); // Image numbers start at 1

    if( gstrImageInfo == strNameToMatch )
    {
    break;
    // Found a match for i
    }

    }

    if( i != gu8ImageCount )
    {
    // We found it.
    u8Return = (byte)( i + 1 ); // Image numbers start at 1
    }
    else
    {
    // TODO Need a message for "Image name not found in cyclone."
    }

    return u8Return;
    }

  • I get the same exception with this:
    string gstrImageInfo = CycloneSupport.cyclone_control_api.getImageDescription( gu32CycloneHandle, 1) ); // Should be pretty simple...

  • HELLO.  Any help here?  Or should be be looking at alternative programmers?

Add comment


   Want to comment? Please login or create a new PEMicro account.







© 2018 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement