Topic: DMD0431

Help File Version: 2.9.4.37

Assignment Operations and Instructions


Bit and numeric data in a Do-more CPU is stored in data blocks or structures. Turning the bits On and OFF, setting the value of a numeric locations and copying one or more Bits and numeric location are a normal part of the process of solving a process problem. And like many things in a Do-more PLC, there are multiple ways to do the required work. But because of the underlying architecture, there are some restrictions to the types of data that can be handled by certain instructions, for example, Strings are structures not simple arrays of characters. To assist you in finding the correct instruction (or in many cases instructions) to perform the desired type of data manipulation, we have assembled the following chart that details the type of data operation you'd like to do and which instructions can perform that operation.

 

 

PLC Instruction to perform the operation

 

Operation

COPY

 

INIT

 

MAPIO

 

MEMCLEAR

(7)

MEMCOPY

 

MOVE

 

MOVEBIT

 

MOVER

 

PUBLISH

 

REFWRITE

(7)

SETNUMR

 

SUBSCRIB

(8)

STRPRINT

(7)

STRSUB

(7)

STRCLEAR

 

RST

 

RSTR

 

SET

 

SETR

 

OUT

 

Turn a Single BIT OFF

Yes

Yes

 

Yes

 

Yes

     

Yes

         

Yes

Yes

   

Yes

Turn a Single BIT ON

Yes

Yes

     

Yes

     

Yes

             

Yes

Yes

Yes

Turn a range of BITs OFF

Yes

Yes

 

Yes

 

Yes (6)

   

Yes (6)

 

Yes (6)

         

Yes

     

Turn a range of BITs ON

Yes

Yes

     

Yes (6)

   

Yes (6)

 

Yes (6)

             

Yes

 

Copy a single BIT to

another BIT

Yes

Yes

Yes

 

Yes

Yes

Yes

Yes

 

Yes

               

 

Yes

Copy a single BITs to

a range of BITs

(1)

(1)

(1)

                                 

Copy a range of BITs to

another range of BITs

Yes

Yes (2)

Yes (2)

                                 

Write a constant value to

a numeric location

Yes

Yes

 

Yes (3)

 

Yes

   

Yes

Yes

Yes

Yes

               

Write a single constant value to a

range of numeric locations

Yes

Yes

 

Yes (3)

       

Yes

 

Yes

Yes

               

Copy a single numeric location to

another numeric location

Yes

Yes

Yes

 

Yes

Yes

 

Yes

Yes

Yes

Yes

Yes

               

Copy a single numeric location to

a range of numeric locations

(1)

Yes

(1)

             

Yes

                 

Copy a range of numeric locations to

another range of numeric locations

Yes

Yes (2)

Yes (2)

 

Yes

Yes (6)

 

Yes

Yes

   

Yes

               

Write a string literal to a String

     

Yes (4)

               

Yes

 

Yes (4)

         

Write a string literal to

a range of Strings

     

Yes (4)

                   

Yes (4)

         

Copy a String to another String

Yes

     

Yes

             

Yes

Yes

           

Copy a String to a range of Strings

(1)

                                     

Copy a range of Strings to

another range of Strings

Yes

     

Yes

                             

Write a value to a structure

Yes

   

Yes (5)

                               

Copy a structure to

another structure

Yes

     

Yes

                             

Copy a single structure to

a range of structures

(1)

                                     

Copy a range of structures to

another range of structures

Yes

     

Yes

                             

Copy a single structure to a range

of numeric locations

       

Yes

                             

Copy a range of structures to

a range of numeric locations

       

Yes

                             

Copy a range of numeric

locations to a structure

       

Yes

                             

Copy a range of numeric locations

to a range of structures

       

Yes

                             

 

(1) Using multiple table entries of same location to multiple locations

(2) Using multiple table entries for individual locations

(3) Can only write a zero

(4) Can only clear the string

(5) Can only clear all the structure members (zeros; OFF)

(6) Only possible with casting

(7) Does not support casting

(8) Supports unaligned memory (allowing V1 / V2 as a double-word instead of requiring V0 / V1 as a double-word)

 


See Also:

Built-in Data Blocks

 

Structures and their Fields

 

User-Created Data Blocks and Structures

 

Arrays, Pointers and Tables

 

Cast Operations

 

Assignment Operations and Instructions

 

Using Constant Values

 

System Nicknamed Locations

 


Related Topics:

Element Browser

 

Element Picker