Hy
I spent some time go get the actual used license container.
Is there an possibility to get the actual used license container from control or api?
Best regards
Get actual used license container
- mkerk
- Posts:75
- Joined: Wed Oct 20, 2010 12:25 pm
Re: Get actual used license container
Hello,
Have you more then one license container installed on the same PC? If yes, then normally you should specify which one you want to use in your project. This is possible by using the config entry useCMContainerSerialNumber in the general section. If you are using this config entry, then you can read the value of this config entry using the function paCfgReadValue().
You can also use the method getContainerListSerials (defined in the class “<WinCC OA version>/scripts/libs/classes/cm/CmCOntainerDataProcessor.ctl”) to get the serial numbers of the containers installed on your PC.
You can also use and chek the code in the standard WinCC OA Panel to get the licensing information . This panel can be opened from the WinCC OA Project Administrator or WinCC OA Console, when you click on the button “License Information”.
BR,
Mousser
Have you more then one license container installed on the same PC? If yes, then normally you should specify which one you want to use in your project. This is possible by using the config entry useCMContainerSerialNumber in the general section. If you are using this config entry, then you can read the value of this config entry using the function paCfgReadValue().
You can also use the method getContainerListSerials (defined in the class “<WinCC OA version>/scripts/libs/classes/cm/CmCOntainerDataProcessor.ctl”) to get the serial numbers of the containers installed on your PC.
You can also use and chek the code in the standard WinCC OA Panel to get the licensing information . This panel can be opened from the WinCC OA Project Administrator or WinCC OA Console, when you click on the button “License Information”.
BR,
Mousser
- becc-mschmit
- Posts:6
- Joined: Thu May 17, 2018 12:48 pm
Re: Get actual used license container
Hello Mousser,
We have only one container on the wincc oa server. We need to know the container number on the remote client. Because of that we do not have the config entry in the config file (server and client).
I saw that there exists a report flag (-report license) which returns the needed information BUT we can not call this report flag if the pmon is not running.
Is there a possibility to call this report flag it only a ui-manager is running (without pmon)?
We have only one container on the wincc oa server. We need to know the container number on the remote client. Because of that we do not have the config entry in the config file (server and client).
I saw that there exists a report flag (-report license) which returns the needed information BUT we can not call this report flag if the pmon is not running.
Is there a possibility to call this report flag it only a ui-manager is running (without pmon)?
- kilianvp
- Posts:443
- Joined: Fri Jan 16, 2015 10:29 am
Re: Get actual used license container
you can create a ctrl extension and use Resources.hxx
//functions to return CodeMeter licensing options
static bool useCMLicense() { return(useCMLicense_); }
static unsigned short getCmContainerBoxMask() { return cmContainerBoxMask_; }
static unsigned int getCmContainerSerial() { return cmContainerSerial_; }
- dbindernagel
- Posts:161
- Joined: Mon Feb 23, 2015 1:34 pm
Re: Get actual used license container
If you have only one container on a server , couldn't you, on server start, write the serial to a datapoint and have the client read this datapoint if needed.
According to the help you cannot change the license container during runtime so it would be enough to read and write this only once during startup with a control script.
According to the help you cannot change the license container during runtime so it would be enough to read and write this only once during startup with a control script.
Code: Select all
A container is bound to project a when a project is started. This container cannot be replaced at run time. Therefore, to replace a container (e.g. a dongle), a restart of the project is required.- becc-mschmit
- Posts:6
- Joined: Thu May 17, 2018 12:48 pm
Re: Get actual used license container
Thanks thats exactly what i need
- gschijndel
- Posts:376
- Joined: Tue Jan 15, 2019 3:12 pm
Re: Get actual used license container
becc-mschmit wrote: ↑ Thu Sep 17, 2020 12:56 pm Is there a possibility to call this report flag it only a ui-manager is running (without pmon)?
By writing the debug/report flag followed by a space ('-report license ') to the file 'dbg' in the 'log' directory and sending the signal '3' to the manager a debug/report flag can be activated without pmon, see topic How to record Code coverage using API call?