• No results found

Normally Closed Contact ( )

In document ED4260 Manual (Page 78-98)

7-1 Using the toolbar

4) Normally Closed Contact ( )

Normally closed contact, which can be thought of as the “b” contact in sequence control. (Shortcut key: F3)

※ After clicking the icon, and move the cursor to the desired position and left click. [Note] , cannot be placed at the right end. (rule)

5) Positive Transition Detection Contact ( )

Positive Transition detection contact detects the change of “0” to “1” and connects for the duration of one scan. (Shortcut key 󰍬 + 󰍟)

※ Click the icon for positive transition detection contact and move the cursor to the desired place for editing and left click.

6) Negative Transition Detection Contact ( )

Negative Transition detection contact detects the change of “0” to “1” and connects for the duration of one scan. (Shortcut key 󰍬 + 󰍠)

※ Click the icon for negative transition detection contact and move the cursor to the desired place for editing and left click.

7) Horizontal and Vertical Lines ( , )

The horizontal and vertical lines are used to establish connection between two con- tacts, contact and coil, or branch circuits, horizontally and vertically. (Shortcut key 󰍢, 󰍣)

8) Coil and Reverse Coil ( , )

Coil represents the output which is magnetized if the input from the left is ON, and demagnetized if it is OFF. Reverse coil work in the opposite way, being magnetized if the input from the left is OFF and demagnetized when the input is ON.

If the left circuit input is ON If the left circuit input is OFF

Coil Magnetized Demagnetized

Reverse

Coil Demagnetized Magnetized

※ Directions for use and function description

Below is a comparison between the case of coil and reverse coil:

◈ Coil: If %I0.0.0 is “1” then the output of the coil %Q0.2.0 produces “1” If %I0.0.0 is “0” then the output of the coil %Q0.2.0 produces “0” ◈ Reverse coil is the opposite:

If %I0.0.0 is “1”the output of the reverse coil %Q0.3.0 produces “0” If %I0.0.0 is “0”the output of the reverse coil %Q0.3.0 produces “1”

9) Set Coil and Reset Coil ( , )

In setting coil, the state of the boolean variable becomes ON when the input at the left becomes ON and remains set state until it is reset by the RESET coil.

Reset coil is use to reset a coil which is at ON on state. (Shortcut key 󰍭+󰍡, 󰍭+ 󰍢 )

※ Directions for use and function description

◈ If the contact signal is ON, the output %Q0.2.0 becomes ON and remains at the magnetized state even if all the contacts are OFF.

◈ By turning the reset contact ON, the output %Q0.2.0 becomes OFF and the output becomes demagnetized.

10) Positive and Negative Transition Detection Coil ( , )

Positive Transition detection coil stays ON for one scan after the rising edge of input going from OFF to ON in the previous scan. Negative Transition detection coil stays ON for one scan after the falling edge of input going from ON to OFF in the previous scan.

※ Directions for use and function description

◈ Positive Transition detection coil M1 stays On for one scan from the moment the input switch %I0.0.1 becomes ON, as shown in the time chart below. It stops operating after that, so self holding circuit has been added.

The magnetized output %Q0.2.1 is demagnetized by the input switch %I0.0.0.

◈ Negative Transition detection coil M2 is activated when the switch %I0.0.2 has been released after being pressed and stays magnetized by the output coil %Q0.2.2.

[Positive Transition Detection Coil] [Negative Transition Detection Coil]

11) Function ( )

Basic functions include move function, type Transition function, comparison function, arithmetic function, logical function, bit shift function, etc.

(1) Function immediately outputs the result of computation in one scan, and there is only one result.

(2) IN and OUT variables of the move function can have all kind of data types, but the types of data must be a same type.

(3) IN1, (IN2), and OUT variables of arithmetic functions (ADD, MUL, etc) can only take the numeric data type (ANY_NUM), and all data types must be the same.

(4) IN1, (IN2), and OUT variables of logical functions (AND, OR, etc) must be the bit data type (ANY_BIT), and all types must be the same.

(5) IN and OUT variables of type Transition functions (INT_TO_BCD, BCD_TO_INT, etc) is bound to be the assigned data type and the functions are placed in libraries for use.

(6) Usage of the move function:

MOVE (Data Transfer)

Function Description

Input EN: If 1, the function is computed. IN: Data to transfer

Output ENO: Same as EN OUT: Data transferred

Data types of IN and OUT must be a same type. ex) if IN is %IB0.0.0, then OUT must be %QB0.2.0.

A. Program application example 1

If the execution condition (%I0.0.8) becomes ON, the MOVE function is executed and the ON/OFF information of the byte (8 bits) at 0.0.0~0.0.7 is copied to the corresponding bits in 0.2.0~0.2.7. (moved in units of byte)

B. Program application example 2

If one of the three switches 0, 1, 2 is set to ON, the MOVE function is executed and the code value is transferred to %QW0.3.0.

◈ LD confirmation using a simulator

① Turning ON the 16#0000 (%IX0.0.0) of the first IN1 is the command to put a hexadecimal code of 0000 at the output %QW0.3.0 (hex).

② Turning ON the 16#1111 (%IX0.0.1) of the second IN1 is the command to put a hexadecimal code of 1111 at the output %QW0.3.0 (hex).

③ Turning ON the 16#FFFF (%IX0.0.2) of the third IN1 is the command to put a hexadecimal code of FFFF at the output %QW0.3.0 (hex).

(7) Types and usages of type Transition functions

A. BCD_TO_*** (Converts BCD to integer)

Function Description

Input EN: If 1, the function is computed.

IN: ANY_BIT Input value encoded in BCD Output ENO: Same as EN

OUT: Type converted data

A) Function

Converts the INPUT type and writes the output on OUT.

FUNCTION Input Type Output Type Content

BCD_TO_SINT BYTE SINT

Converted correctly only if the input is encoded in BCD.

(If the input data type is WORD, the conversion is valid only for values in the range of 0~16#9999)

BCD_TO_INT WORD INT

BCD_TO_DINT DWORD DINT

BCD_TO_USIN

T BYTE USINT

BCD_TO_UINT WORD UINT

BCD_TO_UDIN

T DWORD UDINT

If IN contains data which is not a valid BCD value, the output is set to “0” and _ERR (Arithmetic error flag) and _LER (Arithmetic error latch flag) are set to ON.

B) Program Application

Providing the BCD value 3333 as the input using %IW0.1.0 and setting %IX0.0.0 to ON will cause to produce the integer converted value on the output.

B. INT_TO_*** (INT type conversion)

Function Description

Input EN: If 1, the function is computed. IN: Integer input

Output ENO: 1 if there is no error OUT: Type converted data

A) Function

Converts the type of IN and writes the output on OUT.

FUNCTION Data

Type Content

INT_TO_SINT SINT

Appropriately converted If the input is in the range -128~127, but for values out of this range will cause error.

INT_TO_DINT DINT Convert to DINT type.

INT_TO_USINT USINT

Appropriately converted If the input is in the range 0~255, but for values out of this range will cause error.

INT_TO_UINT UINT

Appropriately converted If the input is in the range 0~65535, but for values out of this range will cause error.

INT_TO_UDINT UDINT

Appropriately converted If the input is in the range 0~4294967295, but for values out of this range will cause error.

INT_TO_BOOL BOOL Takes the lowest 1 bit and converts it to BOOL type.

INT_TO_BYTE BYTE Takes the lowest 8 bits and converts it to BYTE type.

INT_TO_WORD WORD Convert to WORD type without modifying any

bits.

INT_TO_DWORD DWORD Convert to WORD type by filling the highest bits with 0's.

INT_TO_LWORD LWORD Convert to LWORD type by filling the highest bits with 0's.

INT_TO_BCD WORD

Appropriately converted If the input is in the range 0~9999, but for values out of this range will cause error.

B) Error

In case of conversion error, _ERR (Arithmetic error flag), _LEE (Arithmetic error latch flag) is set to ON.

C) Program Application

If forced variable 6666 is fed as the integer value when the input switch of %I0.0.0, the BCD value for the 6666 is written to %QW0.2.0 and if the maximum

allowed integer value of 9999 or 16#270F is inputted to the INT_TO_BCD function, the BCD value of 16#9999 is written to %QW0.2.1.

◈ LD confirmation using a simulator

C. GT (‘Greater than’ Comparision)

Function Description

Input EN: If 1, the function is computed. IN1: Value to compare

IN2: Value to compare

※ The number of inputs can be expanded to up to 8.

IN1, IN2,... must be the same type. Output ENO: same as EN

OUT: the result of the comparison

A) Function

If the condition IN1 〉IN2 〉IN3... 〉INn holds true for the inputs, “1” is produced for OUT. If not, OUT becomes “0”,

B) Program Application

(a) If the execution condition %IX0.0.0 is ON, GT function executes.

(b) If the input variables carry the values IN1=300, IN2=200, IN3=100, IN1 〉IN2 〉 IN3 is true, so the output %QX0.3.0 becomes “1.”

D. GE (‘Greater than or equal to’ comparison)

Function Description

Input EN: If 1, the function is computed. IN1: Value to compare

IN2: Value to compare

※ The number of inputs can be expanded to up to 8. IN1, IN2,... must be the same type.

Output ENO: same as EN

A) Function

If the relationship IN1 ≥IN2 ≥IN3... ≥INn (n: the number of inputs) holds true for the inputs, OUT is set to “1.” Otherwise, OUT is set to “0.”

B) Program Application

(a) GE function operates if the activation condition %IX0.0.0 is set to ON.

(b) Assuming the inputs are set to IN1=300, IN2=%IW0.0.1, IN3=100, the output %QX0.3.0 is set to “1,” since result of the comparison checks that IN1 ≥ IN2 ≥ IN3 holds true, that is, if the value of IN2 is greater than or equal to 100, or if it is less than or equal to 300, %QX0.3.0 is set to “1.”

E. EQ (‘Equal to’ comparison)

Function Description

Input EN: If 1, the function is computed. IN1: Value to compare

IN2: Value to compare

※The number of inputs can be expanded to up to 8. IN1, IN2,... must be the same type.

Output ENO: same as EN

OUT: the result of the comparison

A) Function

If the condition IN1 = IN2 = IN3... = INn (where n is the number of inputs) holds true for the inputs, OUT becomes “1.” If not, OUT becomes “0.”

B) Program Application

If BCD_TO_INT function is executed when %IX0.0.0 is ON, and %QX0.3.0 becomes “1” only if IN3 (%IW0.0.1) within is 300.

F. LE (‘Less than or equal to’ comparison)

Function Description

Input EN: If 1, the function is computed. IN1: Value to compare

IN2: Value to compare

※ The number of inputs can be expanded to up to 8. IN1, IN2,... must be the same type.

Output ENO: same as EN

OUT: the result of the comparison

A) Function

If the condition IN1 ≤ IN2 ≤ IN3... ≤ INn (where n is the number of inputs) holds true for the inputs, OUT becomes “1.” If not, OUT becomes “0.”

B) Program Application

If BCD_TO_INT function is executed when %IX0.0.0 is ON, and %QX0.3.0 becomes “1” only if IN2 (%IW0.0.1) is between 100 and 300 inclusive.

◈ LD confirmation using a simulator

G. LT (‘Less than’ comparison)

Function Description

Input EN: If 1, the function is computed. IN1: Value to compare

IN2: Value to compare

※ The number of inputs can be expanded to up to 8. IN1, IN2,... must be the same type.

Output ENO: same as EN

OUT: the result of the comparison

A) Function

If the condition IN1 〈 IN2 〈 IN3... 〈 INn (where n is the number of inputs) holds true for the inputs, OUT becomes “1.” If not, OUT becomes “0.”

B) Program Application

If BCD_TO_INT function is executed when %IX0.0.0 is ON, and %QX0.3.0 be comes “1” only if IN2 (%IW0.0.1) is between 101 and 299 exclusive.

H. NE (‘Not equal’ comparison)

Function Description

Input EN: If 1, the function is computed. IN1: Value to compare

IN2: Value to compare

※ The number of inputs can be expanded to up to 8. IN1, IN2,... must be the same type.

Output ENO: same as EN

OUT: the result of the comparison

A) Function

If IN1 and IN2 is not compute to be equal, OUT becomes “1”. If they are equal, OUT becomes “0.”

B) Program Application

If BCD_TO_INT function is executed when %IX0.0.0 is ON, and %QX0.3.0 becomes “0” only if IN2 (%IW0.0.1) is 300, and becomes "0" otherwise.

In document ED4260 Manual (Page 78-98)

Related documents