Product : ISaGRAF V3
Date : 23-February-1996
File : TICcode.More about TIC code and Data Base format.htm
Subject : More explanations about TIC code and Data Base format
Keywords: TIC - SFC
1) TIC code mapping for non SFC programs:
For non SFC programs or functions, the corresponding TIC code is mapped in just one sequence. The table described in data base document gives the list of entry points for each non SFC program or function. As for SFC actions, such a sequence is preceeded by a "step like" structure where the "begin" field is the only one significant, and contains the start address of the TIC code:
2) TIC instructions for FB calling
You have to distinguish the following FB types:
- user written functions in IEC languages
- standard embedded functions and function blocks
- user written functions and function blocks in C language
The passing of the input parameters to a function or function block is always made through one of the "param" TIC_P1? instructions.
The function or function block calling depends on the type of called object (user C or standard C, function or function block) such as defined in page 6. Calling a function written in IEC language is made through TIC instructions named TIC_A4? or TIC_OUT_A4?.
The "GET_PARAMETER" set of TIC instructions is used only in the body of a user function written in IEC language to get its inupt parameters. The "PUT_PARAMETER" set of TIC instructions is used only in the body of a user function written in IEC language to assign the return value of the function.
An important feature is that the ISaGRAF target kernel actually integrates a big list of embedded functions and function blocks, written in "C" (around 50 functions and 20 function blocks). The best would be, for a new target development, to provide the same set of embedded capabilities. All these functions and function blocks are only identified by an predefined index (used in TIC_SYS_???, TIC_STD_??? and TIC_STD_FBL instructions).
Below is the list of the functions and function blocks actually embedded in the ISaGRAF kernel:
system level functions
SYSTEM, OPERATE, REDGE, FEDGE
GSTATUS, GKILL, GSTART, GFREEZE, GRST
cast functions (type conversion)
BOO, ANA, REAL, TMR, MSG
HYSTER, AVERAGE, LIM_ALRM
RS, SR, R_TRIG, F_TRIG, SEMA
CTU, CTD, CTUD, CMP, STACKINT
TON, TOF, TP
ABS, EXPT, LOG, SQRT, TRINC, POW
COS ,SIN, TAN, ACOS, ASIN, ATAN
data handling functions
AND_MASK, OR_MASK, XOR_MASK, NOT_MASK
LIMIT, MIN, MAX, MOD, SEL, MUX4, MUX8, RAND, ODD
ROL, ROR, SHL, SHR
string handling functions
ASCII, CHAR, DAY_TIME
DELETE, INSERT, FIND, REPLACE, LEFT, RIGHT, MID, MLEN
array handling functions
ARCREATE, ARREAD, ARWRITE
file handling functions
F_ROPEN, F_WOPEN, F_CLOSE
Copyright © 1996-2009 ICS Triplex ISaGRAF Inc. All rights reserved.