I would like to use the outputs DATE,TOD,WEEKDAY of that functionblock .
But I unable to initialise the parameter asISchedule.
It's a pointer of schedule, and I don't know howdoes it works.
Have you any idea how to set that parameter ?
Thanks for your help
and the last
It is a pointer to the first element of an array.
Declare an array in your code, like
mySchedule : ARRAY [1..32] OF Schedule := [(usiSwitch := 1, todFirstOn := ..., todLastOn := ..., byDayFlags := 2#0010_1001), ...];
and then assign ADR(mySchedule) to aslSchedule.
A tip: instead of posting screenshots of online help, post the link.
Thanks for your help.
All the mecanism of pointer to schedule seems to be difficult to understand for me .
I probably not correctly set the pointer to asISchedule input of the function block.
Here is a screenshot of what i received.
Can you tell me where is my mistake ?
The aim of that function block , is to receive DATE,TOD,WEEKDAY and to compare with an array [1..7,1..4] of boolean corresponding of [1..4,1..2] TOD ON and OFF (validation for each day of week of 4 schedule) (a sort of multischeduler but only 4 schedules and 1 binary output.
So I don't know how to force the input asISchedule.
Ooook, did not try but just looked the docs.
From the error it seems that aslSchedule is VAR_IN_OUT, so just put the array without ADR and .
Well, with the last indications the program compile.
But with the same settings , one program is working and the other no !
I don't understand the error of pointer !
Does someone have any idea ?
You can see in the CFC part that aslSchedule is 0, so the function block did not receive "mySchedule" position in memory.
Maybe the culprit is a stale connection (shown connected but actually not), try to delete and reconnect it.
Log in to post a comment.