Справочник Пользователя для GE GFK-1918D

Скачать
Страница из 114
L o g i c   E d i t o r s
C Programs
88
CIMPLICITY Logic Developer - PLC Version 4.00
GFK-1918D
5
C   P R O G R A M S
Note: C programs are supported only on Series 90™-70 CPUs, firmware release 
6.00 and later.
A C program is an independent section of executable code, written in C language, 
that is downloaded to and executed on the associated target PLC. To develop a C 
program, use GE Fanuc's C Programmer's Toolkit for Series 90 PLCs User's Manual 
(GFK-0646). You then import it into a project.
A C program has access to all the % reference tables of the PLC except for the 
_MAIN LD block’s %P memory and the %L memory of any other LD block. A C 
program can also call any of the numerous PLC-embedded function blocks, which 
are included in the C Programmer’s Toolkit.
A C program cannot be called as a subroutine. Execution is controlled only 
through scheduling. A C program cannot call another block as a subroutine.
By setting the parameters of a C program, you enable it to access memory directly. 
When a C program begins to execute, it reads the data for all the parameters and 
makes a copy of the data. If the C program’s execution is interrupted or time-sliced 
over multiple scans, the C program, when it resumes execution, uses the copy of 
the data that it made upon beginning to execute. 
You can add C programs to a Series 90™-70 target only if the _MAIN block is an 
LD block. The LD program is then treated as a user program, which can be 
scheduled. The maximum number of C programs you can add is 15.
If you have State Logic on a Series 90™-70 target, it is compiled into a C Program 
called _STATE, whether State Logic coexists with LD logic or not. If State Logic 
does not coexist with LD logic, _STATE is the only C program supported by the 
target.
C programs can coexist with State Logic on a Series 90™-70 PLC. For such a 
target, the State Logic is compiled into a C program. This C program is named 
_MAIN if there is no LD logic; however, if State Logic coexists with LD logic, the 
State Logic is compiled into a C program named _STATE and one LD block must 
be named _MAIN.
U s e r   P r o g r a m s  
User programs consists of:
C programs
The LD program, if the _MAIN block is an LD block.
    Navigator: Project Tab
       A C Program