Siemens S7-1200/1500PLC realizes the data transmission function of two storage areas

1. The Siemens S7-1200 PLC system block does not have a function block that can realize any area transfer of any data type. The following FC block is packaged by me. The specific block is shown in the figure below. Want to add source code to qq584472557

             

2. The following table lists the parameters of this instruction:

parameter

statement

type of data

Storage area

Description

Source_Area

Input

BYTE

I、Q、M、D

The following areas can be selected in the source storage area:

  • 16#81:Input

  • 16#82:Output

  • 16#83: Bit storage area

  • 16#84:DB

Source_DBNumber

Input

DINT, DB_ANY 1)

D

If AREA = DB, it is the number of data blocks in the source storage area, otherwise it is "0"

Source_Byte

Input

DINT

I、Q、M、D

The address to be written in the source storage area

Only the 16 least significant bits are used.

Destination_Area

Input

BYTE

I、Q、M、D

The following areas can be selected in the destination storage area:

  • 16#81:Input

  • 16#82:Output

  • 16#83: Bit storage area

  • 16#84:DB

Destination_DBNumber

Input

DINT, DB_ANY 1)

D

If AREA = DB, it is the number of data blocks in the destination storage area, otherwise it is "0"

Destination_Byte

Input

DINT

I、Q、M、D

The address to be written in the destination storage area

Only the 16 least significant bits are used.

Count

Input

DINT

I、Q、M、D

Number of bytes copied

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/u014780302/article/details/100112114