How to use TimedFunc()

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
vince2e
Posts:39
Joined: Tue Aug 02, 2016 4:19 pm

How to use TimedFunc()

Post by vince2e »

Hey guys I'm trying to get the timedFunc() working, but I'm having some issues.


I copied this code out of Help:


main()
{

int rc;
dyn_int weekDayList = makeDynInt( 1, 1, 3, 3, 6, 6 );
dyn_int timeList = makeDynInt( 61200, 64800, 61200, 64800, 57600, 61200 );
dpCreate( "testTimedFunc", "_TimedFunc" );
dpSet("testTimedFunc.weekDay", weekDayList,"testTimedFunc.time", timeList,
"testTimedFunc.mode", 1,"testTimedFunc.interval", 10 );
rc = timedFunc( "workFunc", "testTimedFunc" );
}

void workFunc( string dp, time before, time now, bool call )
{
DebugN( dp, before, now, call );
}

and it returns this error:


WCCOActrl (3), 2017.06.29 10:59:37.322, PARAM,SEVERE, 51, Parameter incorrect, TimedFunc, TimerScript.ctl::workFunc() Dp:testTimedFunc handleAnswer, Illegal parameterization, can't work!


Any Ideas? Thanks!

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: How to use TimedFunc()

Post by leoknipp »

I've tested the example and it works.
For the test I made a modification to see if the work function is started. Instead of day 6 I used day 5. Also the timerange was changed to 3600, 61200 instead of 57600, 61200.

Which WinCC OA version are you using?

Best Regards
Leopold Knipp
Senior Support Specialist

vince2e
Posts:39
Joined: Tue Aug 02, 2016 4:19 pm

Re: How to use TimedFunc()

Post by vince2e »

I'm using V3.15 P003 - windows AMD64.

I've made the changes you made I'm still getting the same error.

3 posts • Page 1 of 1