Logo  
企业邮局QQ快速登录
浏览文档 当前位置:广州若恒 >> 支持中心 >> 网上课堂 >> 可编程控制器 >> S7-1200 >> 浏览文档
Which data type do you need in STEP 7 V10.5 for parameterizing an ANY pointer for a block parameter?
Which data type do you need in STEP 7 V10.5 for parameterizing an ANY pointer for a block parameter?
核心提示:The VARIANT data type is used to transfer data areas. This data type is a pointer that points to the variables of different data and parameter types. More information on the VARIANT pointer is is available in the STEP 7 V10.5 Online Help under

Description
The "VARIANT" data type is used to transfer data areas. This data type is a pointer that points to the variables of different data and parameter types. More information on the "VARIANT" pointer is is available in the STEP 7 V10.5 Online Help under

  • "Valid data types in the code block interfaces"
  • "VARIANT"

The table below gives instructions for the communication that includes a parameter of the "VARIANT" data type.
 

Blocks with a parameter of the "VARIANT" data type

Block Function Parameter of the
"VARIANT" data type
TSEND_C Send data via Ethernet DATA1)
TRCV_C Receive data via Ethernet DATA1)
TSEND Send data via an existing communication connection DATA1)
TRCV Receive data via an existing communication connection DATA1)
SEND_PTP Send point-to-point message BUFFER2)
RCV_PTP Receive point-to-point message BUFFER2)
Table 01
1)
Indicates the send or receive area that contains the address and length of the data to be sent or received.
2) Indicates the initial address of the send or receive buffer.

The table below contains a few examples of how to assign a block parameter of the "VARIANT" data type with the ANY pointer.
 

No. Examples for parameterizing with the ANY pointer
1 The "DATA" parameter of the extended instruction "TSEND_C" is parameterized with the input area from E1.0 to E8.7 (8 bytes).


Fig. 01

2 The "DATA" parameter of the extended instruction "TSEND_C" is parameterized with the marker area from M20.0 to M27.7 (8 bytes).


Fig. 02

3 The "DATA" parameter of the extended instruction "TSEND_C" is parameterized with a data area of bytes of data block DB22.

If you want to parameterize the above-mentioned parameters with the data block variables and the ANY pointers, you must disable symbolic addressability when creating a data block.

  1. Open the "Add new block" dialog by double-clicking on the "Add New Block" function in the "Program Blocks" folder.
  2. Click on the "Data block (DB)" button to create a data block.
  3. Disable the "Symbolic access only" option.
  4. Confirm with OK.


Fig. 03

Now you can parameterize the "DATA" parameter of the "VARIANT" data type with the ANY pointer and the DB variables for the required data area.


Fig. 04

Table 02

Note
You can also disable the "Symbolic access only" option under "Options > Settings > PLC Programming" in the "Presetting for new blocks" group. Then all new blocks are created with this presetting (as in Fig. 03). This presetting does not affect instance DBs and blocks already present.

Creation environment
The pictures and downloads in this FAQ were created with STEP 7 Basic version V10.5.


Tags:data type STEP 7 V10.5 ANY pointer

0% (0)
0% (10)
发表评论
用户评论
最新文档
·What alternatives are there to 
·Which data type do you need in 
·How can you reset the IP addre 
·How can you download to a netw 
·Which organization blocks can  
推荐文档
视觉焦点
What alternatives are there to BLKMOV (Block move with STEP 7 V5.x) and the ANY pointer for copying memory areas in STEP 7 Basic V10.5?
Which data type do you need in STEP 7 V10.5 for parameterizing an ANY pointer for a block parameter?
  2880306702
  sales@gzrh.com   在线发送
微信扫一扫
  技术支持
  技术论坛
  Support@gzrh.com   在线发送
  项目洽谈
  Support@gzrh.com   在线发送
  投诉与建议
  gzrh@gzrh.com   在线发送
  订阅精彩内容
  填写您的邮件地址,订阅我们的精彩内容:
  联系我们
销售热线:020-85520027/85520287
项目洽谈:020-85533142/85533145
联系传真:020-85520030/85536394
技术热线:020-61087040
咨询邮箱:gzrh@gzrh.com
公司地址:广州市天河区黄埔大道中662号金融城绿地中心509室