Hi,
I want to read out the cpu time and put the the time in arrays in different datablocks. I have wrote the code in SCL but when I compilate the code it generates error. My code looks like this:
IF READ_TIME THEN;
SFC_ERROR := READ_CLK(CDT := WORD_TO_BLOCK_DB(DB_NR_I).LOGTIME[LOGTIME_I]);
READ_TIME := FALSE;
END_IF;
DB_NR_I = Index for datablock, could be 101, 102, 103
LOGTIME = Is an array in datablock with the datatype DATE_AND_TIME
LOGTIME_I = Is index for array, 1-6
Can anyone se where the problem is or can I do this in some smarter way??
/Globe
I want to read out the cpu time and put the the time in arrays in different datablocks. I have wrote the code in SCL but when I compilate the code it generates error. My code looks like this:
IF READ_TIME THEN;
SFC_ERROR := READ_CLK(CDT := WORD_TO_BLOCK_DB(DB_NR_I).LOGTIME[LOGTIME_I]);
READ_TIME := FALSE;
END_IF;
DB_NR_I = Index for datablock, could be 101, 102, 103
LOGTIME = Is an array in datablock with the datatype DATE_AND_TIME
LOGTIME_I = Is index for array, 1-6
Can anyone se where the problem is or can I do this in some smarter way??
/Globe