DOCA0275EN-00

Custom Logic Editor User Interface

Introduction

A program written in this language consists of a series of instructions executed sequentially by the LTMT main unit. Each list instruction is represented by a single program line and consists of four components:

  • Line number

  • Logic command (Mnemonics)

  • Argument(s)

  • Comment(s)

Example of a Custom Logic Program

The following window is an example of a program created with the custom logic editor.

Editing Several Programs

You can create or modify several customized programs at the same time. Click the file name to switch between them.

For instance, in the Text view above, select either DIRECT_ONLINE.rtf or Untitled.If depending on the program you want to edit.

Instruction Elements

The following illustration is a sample of custom logic program:

A Line Number
B Logic Command
C Argument(s)

Line Number

The line number is an additional information:

  • It is defined only by the editor.

  • It does not have any importance in the custom logic function itself.

Logic Command

A logic command is an instruction which identifies the operation to be performed using one or more arguments. In the example, the LOAD_BIT command loads the value of the argument into an internal register called the 1-bit accumulator.

There are two types of commands:

  • Setup commands

    These set-up or test for the necessary conditions to perform an action (for example, LOAD and AND commands).

  • Actions commands

    These commands direct the LTMT main unit to perform an action based on information in the setup instructions (for example, assignment commands such as COMP).

NOTE: When you type a logic command, either uppercase or lowercase, it is automatically recognized and displayed in blue.

Argument

An argument is a number representing a value (register address, bit number, or constant) that the LTMT main unit can manipulate in an instruction. A logic command can have from 0 to 3 arguments depending on the type of logic command.

For example, in the sample program, the instruction LOAD_BIT 5629 1 includes a logic command LOAD_BIT and 2 arguments, 5629 and 1.

This instructs the LTMT main unit to load the value of the bit 1 of the register at the address 5629 (0x15FD) into the accumulator.

Using instructions with commands and arguments, the customized program can:

  • Read the status of digital inputs.

  • Read or write the status of digital outputs.

  • Activate basic logic functions such as timers and counters.

  • Perform arithmetic, logical, comparisons, and numerical operations.

  • Read or write to the LTMT main unit registers or to individual bits in those registers.

NOTE: When you type an argument, it is automatically recognized and displayed in the color assigned to the arguments.

Comments

In the custom logic editor, it is possible to add comments to the program:

  • At the end of each line after the arguments

  • In a whole line

NOTE:
  • When you type //, the custom logic editor automatically recognizes the text after it as comments and displays it in green.

  • Comments can not be retrieved from the LTMT main unit.

Syntax

In the custom logic editor, it is possible to write instructions:

  • With blanks, commas, or dots between arguments

  • In upper or lower characters

Syntax Check

During typing, the text editor checks the instruction syntax:

  • Correct instructions are displayed in bold blue characters.

  • Incorrect instructions stay displayed in black color and must be corrected before the compilation.

Keyboard Commands

Keyboard commands and shortcuts are the same as those for Windows operating systems (For example: Press DEL or DELETE to delete a character or line, press ENTER to go to the next line).

Saving

To save the program you edited or created, select Device > Custom Logic, then select Save Custom Logic or SaveAs Custom Logic.

NOTE: This file is saved with the extension *.If.
QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?