Questions about dpFunctions

Discussion about recent product features & solutions!
4 posts • Page 1 of 1
CyaNn
Posts:97
Joined: Tue Nov 23, 2010 9:48 am

Questions about dpFunctions

Post by CyaNn »

Hello ETM specialists,
Please can you answer some little question about dpFunctions :

- Is is possible to avoid the result
My basic idea was to merge some heartbeat and sometime I need to not trig it.

- Can I create my own function
I saw in the documentation that it is possible to set a function name in the "function" field. I tried to create my own but without success.

Thank you so much in advance for your responses.

fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

Re: Questions about dpFunctions

Post by fmulder »

The DpFunction is actually just a small script that is being called by the Event manager.

E.g. instead of saying 'p1 * p2' you could just as well say 'MyFunction( p1, p2 )'

* Implement your script function in a regular library
* Add the library via the config file or config.level
* [ui]
LoadCtrlLibs = "myfunctions.ctl"
* Now make a panel and test your function
* Now add the library to the event manager
* [event]
LoadCtrlLibs = "myfunctions.ctl"
* Restart your event manager so that it loads the library !
This is also why I've told you to test using a panel. You'll need to restart the Event whenever you make a bug in your script library.

Yes, there is a function to discard the value change... but I forgot the name.
I'm sure that someone will respond

Carefull with script code in the Event manager. Your(!) script bug now runs in the brains of WinCC OA

Share the fun
Frenk Mulder

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Questions about dpFunctions

Post by mkoller »

The function to discard the return value is called removeDoneCB()

CyaNn
Posts:97
Joined: Tue Nov 23, 2010 9:48 am

Re: Questions about dpFunctions

Post by CyaNn »

Oh many thanks Frenk and Martin.... It works perfectly....

4 posts • Page 1 of 1