How to get Codesys License number by using function call ?

alrcastro
2020-03-09
2020-03-25
  • alrcastro

    alrcastro - 2020-03-09

    I'm trying to use piece of existing codes found elsewhere, but no one is working, actually there are compilation errors:

    _3S_License.OLM_OnlineLicenseManager.GetUserLicenseValue(udiLicenseID); 
    

    Could someone give a link to a tutorial explaining that ?

     
  • alrcastro

    alrcastro - 2020-03-17

    Without success, I left the above approach aside and went on to this other possibility, but it also does not return the license number:

    CmpCodeMeter.CodeMGetInfo
    

    It is bizarre the lack of working code examples on the Web. I would have opened a ticket on the Codesys Store website to ask for help, however the popup form is buggy and does not allow to complete the ticket.

     
  • alrcastro

    alrcastro - 2020-03-18
    https://faq.codesys.com/display/CDSFAQ/Licensing%3A+Querying+the+Container+Information
    

    @Edwin,

    This was the first attempt I made, but if you have a look to the link, there are errors on this documentation. Note that it mentions a struct called ST_CODEMETER_INFO_EX however there is nothing there but a VAR declaration list, re-typed right bellow, named as "Deklaration" in german.

     

    Last edit: alrcastro 2020-03-18
  • eschwellinger

    eschwellinger - 2020-03-19

    Hi.
    thanks for reporting this,
    we will extend/improve this.
    Attached a project examle which should show how to read the runtime license info either from runtime key or softlicense container.

    BR
    Edwin

     
    πŸ‘
    1

    Last edit: eschwellinger 2020-03-19
  • alrcastro

    alrcastro - 2020-03-21

    Hi,

    Thanks for the help, now that the program from the link above is fixed, I was able to list the 2 containers and their details by using the CmpCodeMeter.CodeMGetInfo method:

    • Patch Protection Only
    • 3S-Smart Software Solution Softlicences

    However, a valuable information which is not available in this ST_CODEMETER_INFO_EX structure, is the license status, whether active or not:

    Is there anything else I'm missing ?
    I mean, how could I get the status of the lincense?

    Thanks in advance,
    Andre.

     

    Last edit: alrcastro 2020-03-21
  • eschwellinger

    eschwellinger - 2020-03-21

    hm... this is from my point of view more or less only the information if the licensecontainer i active or not.
    I think if you read the information according the the license this information is included isn't it?
    BR
    Edwin

     

    Last edit: eschwellinger 2020-03-21
  • alrcastro

    alrcastro - 2020-03-21

    Hi Eschwellinger,

    The problem arises in the fact that I'm under a big scale procedure, using one Desktop system ( having the Codesys license activated, along with many other softwares installed ) acting as the reference disk image to be cloned along dozens of other computers of the same brand/model.

    After that, we can see both above repositories there at each one, but with their Codesys status tagged as something like 'not valid' as expected, therefore the mere existence of a 3S repository is not an indication of an active license.

    Andre,

     
  • eschwellinger

    eschwellinger - 2020-03-21

    Hi Andre,
    OK I understand, let me check how we could reconnize, valid,brocken Container.
    BR
    Edwin

     
  • alrcastro

    alrcastro - 2020-03-24

    Not wanting to bump this thread, just to avoid falling by wayside; could you estimate a deadline to assess the requested feature ?

     

    Last edit: alrcastro 2020-03-24
  • eschwellinger

    eschwellinger - 2020-03-24

    Hi Andre,
    still waiting for ans answer... mabye need some extra time due the situation ;-(
    As soon I have it I will post it here.
    BR
    Edwin

     
    πŸ‘
    1
  • eschwellinger

    eschwellinger - 2020-03-24

    Hi Andre,
    attached an additional example, not really sure if this fit all your needs but let us see.
    BR
    Edwin

     
  • alrcastro

    alrcastro - 2020-03-25

    As you feared, this code do not bring relevant additional information.
    Actually, it is not much diffferent from the previous one.

    Now, there is another issue:

    The previous code ( the one at the fixed link ) show all repositories and respective details (versions, serial, etc...), perfect ! However, the expiration date has nothing to do with either license activation date or controller's current clock date. I was trying to make use of this information as a workaround solution, but seems completely inconsistent, something 9 years ago:

    Please forward both these 2 issues to someone one layer above there on the Codesys support chain (wrong date / missing license status flag), it is really important, but tickets on Store take somewhat long time to be answered; I expected a few more from their side, we have a big order and I need to make sure everything running as expected.

    Thanks in advance.

     

    Last edit: alrcastro 2020-03-25
  • eschwellinger

    eschwellinger - 2020-03-25

    Hi
    have you really raised a support case in the CODESYS store?
    This is the right way to do in general... for this. But I could not really find case from you.
    (Maybe I'm wrong)

    BR
    Edwin

     
  • eschwellinger

    eschwellinger - 2020-03-25

    possible that you ask your technical questions not as bug report - accidentally added as sales request?
    We could not see them.
    I agree that these request should be handled by my question bug report in the CODESYS store.
    Would be nice if you add them there (if needed again please)

     

    Last edit: eschwellinger 2020-03-25
  • alrcastro

    alrcastro - 2020-03-25

    Yes, I had open as BUG report although it do seem rather a support request; refer to ticket number '____'. (2020 Mar, 19th) however I'm not the user there on the tickets, since the original purchase was made from another account (my boss) and all further purchases will be made form billing department (yet another account).

    Actually, I did not were specific, I forgot to mention I wanted a Structured Text code example, and now I see that I missed this crucial information; anyway the ticket got closed soon and now I'm unable to give a feedback, so could you re-open it if possible?

    Please keep further details on the user name of the above ticket as confidential, ok ?

     

    Last edit: eschwellinger 2020-03-25
  • eschwellinger

    eschwellinger - 2020-03-25

    let us move the communication back to this case
    BR
    Edwin

     
    πŸ‘
    1

Log in to post a comment.