ISPSoft User Manual

ISPSoft User Manual ISPSoft User Manual

02.09.2014 Views

Chapter 6 Symbols • VAR-General symbol The symbols of this class are for general operations only. The significance of a symbol of this class depends on the data type of the symbol or the corresponding device. • Latched symbol Only AH500 series modules support the symbols of this class. Users can not declare the symbols of this class in a function block. The function of the symbols of the VAR_RETAIN class is the same as the function of the symbols of the VAR class. The difference between the symbols of the VAR_RETAIN class and the symbols of the VAR class lies in the fact that the devices automatically assigned to the symbols of the VAR_RETAIN class are latched devices. As a result, the values of the symbols of this class will be retained after the PLC is disconnected. *. Users can not assign a device to a symbol of this class. Besides, the data type can not be TIMER, COUNTER, or STEP. • VAR_INPUT-Symbol used as an input pin of a function block A symbol of this class is used as an input pin of a function block, and is declared in the function block. If a function block is called, the symbol of this class can receive the input value from the caller. Besides, in a ladder diagram/function block diagram, the symbols of this class are put at the left sides of the function blocks, and the pins which receive the values from the caller are assigned to the symbols of this class. • VAR_OUTPUT-Symbol used as an output pin of a function block A symbol of this class is used as an output pin of a function block, and is declared in the function block. After the execution of a function block is complete, the operation result will be sent to the caller through the symbol of this class. Besides, in a ladder diagram/function block diagram, the symbols of this class are put at the right sides of the function blocks, and the pins which sent the operation results to the caller are assigned to the symbols of this class. • VAR_IN_OUT-Symbol used as a feedback pin of a function block A symbol of this class is used as a feedback pin of a function block, and is declared in the function block. Please refer to the following example. When the function block is called, the caller sends the value in D1 to DT_IO, which is a symbol of the VAR_IN_OUT class. After the operation comes to an end, the final value of DT_IO is sent to D1. Besides, in a ladder diagram/function block diagram, the symbols of this class are put at the right sides of the function blocks, and the blue pins which connect to the caller are assigned to the symbols of this class. 6.1.3 Data Types The data type of a symbol determines the significance of the value of symbol. Suppose there are two symbols VAR_1 and VAR_2. The data type of VAR_1 is BOOL, and the data type of VAR_2 is WORD. When VAR_1 and VAR_2 are used in a program, VAR_1 represents a contact, and VAR_1 represents a 16-bit device which can be involved in arithmetic or data transfer. The data types supported by ISPSoft are listed below. Different models support different data types, and the symbols which can be declared in a POU of the program type are different from the symbols which can be declared in a POU of the function block type. 6-3

ISPSoft User Manual Data type BOOL WORD DWORD LWORD INT DINT LINT REAL LREAL ARRAY STRING Description AH500 DVP Program FB Program FB Boolean data type A Boolean value represents a state of a contact 16-bit value 16-bit data can be stored. 32-bit value 32-bit data can be stored. 64-bit value 64-bit data can be stored. 16-bit signed integer The highest bit represents a positive/negative sign. 32-bit signed integer The highest bit represents a positive/negative sign. 64-bit signed integer The highest bit represents a positive/negative sign. 32-bit floating-point value A decimal is represented by a 32-bit value. 64-bit floating-point value A decimal is represented by a 64-bit value. Array data type When a symbol is declared, the size of the array and the array type which will be stored are specified. (An array is composed of 2048 elements at most.) String data type An ASCII code is represented by an 8-bit value. When a symbol is declared, the length of the string is specified. (A string is composed of 128 ASCII codes at most.) (*3) STEP It is used as a recognition flag for a step. (*1) (*3) Function Block It represents the name of a function block. (*2) COUNTER Counter data type It represents a counter. (*3) TIMER Timer It represents a timer. (*3) POINTER It is a pointer for a word device. (*4) T_POINTER It is a pointer for a timer. (*4) C_POINTER It is a pointer for a counter. HC_POINTER It is a pointer for a high-speed counter. (*4) *1. Please refer to chapter 12 for more information about steps. *2. A symbol in a function block has a special significance. Please refer to chapter 7 for more information. *3. The data type of a symbol of the VAR_INPUT class, the VAR_OUTPUT class, or the VAR_IN_OUT class can not be STRING, STEP, COUNTER, or TIMER. *4. Please refer to chapter 7 for more information about pointers. 6-4

Chapter 6 Symbols<br />

• VAR-General symbol<br />

The symbols of this class are for general operations only. The significance of a symbol of this<br />

class depends on the data type of the symbol or the corresponding device.<br />

• Latched symbol<br />

Only AH500 series modules support the symbols of this class. <strong>User</strong>s can not declare the symbols<br />

of this class in a function block. The function of the symbols of the VAR_RETAIN class is the<br />

same as the function of the symbols of the VAR class. The difference between the symbols of the<br />

VAR_RETAIN class and the symbols of the VAR class lies in the fact that the devices<br />

automatically assigned to the symbols of the VAR_RETAIN class are latched devices. As a result,<br />

the values of the symbols of this class will be retained after the PLC is disconnected.<br />

*. <strong>User</strong>s can not assign a device to a symbol of this class. Besides, the data type can not be TIMER, COUNTER, or<br />

STEP.<br />

• VAR_INPUT-Symbol used as an input pin of a function block<br />

A symbol of this class is used as an input pin of a function block, and is declared in the function<br />

block. If a function block is called, the symbol of this class can receive the input value from the<br />

caller. Besides, in a ladder diagram/function block diagram, the symbols of this class are put at<br />

the left sides of the function blocks, and the pins which receive the values from the caller are<br />

assigned to the symbols of this class.<br />

• VAR_OUTPUT-Symbol used as an output pin of a function block<br />

A symbol of this class is used as an output pin of a function block, and is declared in the function<br />

block. After the execution of a function block is complete, the operation result will be sent to the<br />

caller through the symbol of this class. Besides, in a ladder diagram/function block diagram, the<br />

symbols of this class are put at the right sides of the function blocks, and the pins which sent the<br />

operation results to the caller are assigned to the symbols of this class.<br />

• VAR_IN_OUT-Symbol used as a feedback pin of a function block<br />

A symbol of this class is used as a feedback pin of a function block, and is declared in the function<br />

block. Please refer to the following example. When the function block is called, the caller sends<br />

the value in D1 to DT_IO, which is a symbol of the VAR_IN_OUT class. After the operation comes<br />

to an end, the final value of DT_IO is sent to D1. Besides, in a ladder diagram/function block<br />

diagram, the symbols of this class are put at the right sides of the function blocks, and the blue<br />

pins which connect to the caller are assigned to the symbols of this class.<br />

6.1.3 Data Types<br />

The data type of a symbol determines the significance of the value of symbol. Suppose there are<br />

two symbols VAR_1 and VAR_2. The data type of VAR_1 is BOOL, and the data type of VAR_2 is<br />

WORD. When VAR_1 and VAR_2 are used in a program, VAR_1 represents a contact, and VAR_1<br />

represents a 16-bit device which can be involved in arithmetic or data transfer.<br />

The data types supported by <strong>ISPSoft</strong> are listed below. Different models support different data types,<br />

and the symbols which can be declared in a POU of the program type are different from the symbols<br />

which can be declared in a POU of the function block type.<br />

6-3

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

Saved successfully!

Ooh no, something went wrong!