Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

CONVERT: Convert value

The "Convert value" instruction can be used to reads the content of


the IN parameter and converts it according to the data types selected
in the instruction box. The converted value is sent to the output
OUT.
To add normally open contact address i0.0
To add an CONVERT instruction
Instruction basic instruction Conversion operation CONVERT
Double click the instruction or drag and drop the instruction into the network
Select the data type for the instruction from the "<???>" drop-down list of the box
Select the two data types for convert operation one is input (INT) another one is
output(BCD)
Data type selected for input and output
To create the data block:
Program block click add new block open data block
Data block_1 is opened
Click add new to create tag for first operand enter the name ,select the data type
Like wise to create second operand
Two operand created
select and copy the Tag(IN) in the data block
Paste the copied tag from data block to operand IN
Like wise to copy and paste the second tag of the data block for operand out
Compile and download the program
Go to monitor mode
Select and right click the first input modify modify operand
Enter the value in modify value and click ok
If operand Tag_1" has the signal state 1, the content of operand IN" is read and
converted to BINARY CODED DECIMAL.
The result is stored in operand OUT.
DECIMAL TO BCD TABLE

DECIMAL BINARY CODED DECIMAL


20 32
21 33
22 34
23 35
24 36
25 37
26 38
27 39
28 40
29 41
30 48
31 49
32 50
33 51
34 52
35 53

You might also like