14.01.2015 Views

Gemini GV6K and Gemini GT6K Programmer's Guide

Gemini GV6K and Gemini GT6K Programmer's Guide

Gemini GV6K and Gemini GT6K Programmer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Storing Programs<br />

After a program or compiled program/profile is defined (DEF) or downloaded to the Gem6K<br />

controller, it is automatically stored in non-volatile memory (battery-backed RAM).<br />

Information on controlling memory allocation is provided below (see Memory Allocation).<br />

Memory Allocation<br />

Your controller's memory has two partitions: one for storing programs <strong>and</strong> one for storing<br />

compiled profiles & PLC programs. The allocation of memory to these two areas is<br />

controlled with the MEMORY comm<strong>and</strong>.<br />

“Programs” vs. ”Compiled Profiles & PLC Programs”<br />

Programs are defined with the DEF <strong>and</strong> END comm<strong>and</strong>s, as demonstrated in the Program<br />

Example on page 10.<br />

Compiled Profiles & PLC Programs are defined like programs, using the DEF <strong>and</strong> END<br />

comm<strong>and</strong>s, but are compiled with the PCOMP comm<strong>and</strong> <strong>and</strong> executed with the<br />

PRUN comm<strong>and</strong> (PLC programs are usually executed in PLC Scan Mode with the<br />

SCANP). A compiled profile (a series of GOBUF comm<strong>and</strong>s). A PLC program is a<br />

pre-compiled program that mimics PLC functionality by scanning through the I/O<br />

faster than in normal program execution.<br />

Programs intended to be compiled are stored in program memory. After they are<br />

compiled with the PCOMP comm<strong>and</strong>, they remain in program memory <strong>and</strong> the<br />

segments (see diagram below) from the compiled program are stored in compiled<br />

memory. The TDIR report indicates which programs are compiled as compiled<br />

profiles (“COMPILED AS A PATH”) <strong>and</strong> which programs are compiled as PLC<br />

programs (“COMPILED AS A PLC PROGRAM”) .<br />

For information on compiled profiles, refer to Compiled Motion Profiling on page<br />

139; <strong>and</strong> for information on PLC programs, refer to page 120.<br />

MEMORY<br />

comm<strong>and</strong><br />

syntax<br />

(example)<br />

MEMORY150000,150000<br />

Memory allocation for<br />

Programs (bytes).<br />

Storage requirements<br />

depend on the number of<br />

ASCII characters in the<br />

program.<br />

Memory allocation for Compiled Profiles & Programs (bytes).<br />

Storage requirements depend on the number of segments<br />

(1 segment consumes 76 bytes). A segment could be one of<br />

these comm<strong>and</strong>s:<br />

Compiled Motion:<br />

GOBUF *<br />

PLOOP<br />

GOWHEN<br />

TRGFN<br />

POUTA<br />

POUTB<br />

PLC (PLCP) Program:<br />

IF **<br />

ELSE<br />

NIF<br />

L<br />

LN<br />

OUT<br />

ANO<br />

EXE<br />

PEXE<br />

VARI **<br />

VARB **<br />

* GOBUF comm<strong>and</strong>s may require up to 4 segments.<br />

** IF statement require at least 2 segments, each AND or OR<br />

compound requires an additional segment. VARI <strong>and</strong><br />

VARB each require 2 segments.<br />

Chapter 1. Programming Fundamentals 11

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!