Siemens SINUMERIK 840D sl Function Manual page 1042

Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

P3: Basic PLC program for SINUMERIK 840D sl
13.17 Block descriptions
CALL
UN
R
NC programming from synchronized actions
Data transfer from NC to PLC, with data written via synchronized actions;
Byte 0 serves as the semaphore
ID=1 WHENEVER $A_DBB[0] == 0 DO $A_DBR[4] = $AA_IM[X] $A_DBB[0] = 1
Data transfer from PLC to NC, with data read via synchronized actions;
Byte 1 serves as the Semaphore:
ID=2 WHENEVER $A_DBB[1] == 1 DO $R1 = $A_DBR[12] $A_DBB[1] = 0
Example 2: Read word of position offset 8 without semaphore and save in MW 104:
CALL
1042
FC21(
Enable
:= M 10.0,
Funct
:= B#16#3,
S7Var
:= P#M 100.0 DWORD 1,
IVAR1
:= 4,
IVAR2
:= 0,
Error
:= M 10.1,
ErrCode
:= MW12);
M10.1;
M10.0;
FC21(
Enable
:=M 10.0,
Funct
:=B#16#3,
S7Var
:=P#M 104.0 WORD 1,
IVAR1
:=8,
IVAR2
:=-1,
Error
:=M 10.1,
ErrCode
:=MW12);
// if TRUE, FC 21 is active
//Read data
//Enable while 1, until value is read
// if TRUE, FC 21 is active
//Read data
Function Manual, 01/2015, 6FC5397-0BP40-5BA2
Basic Functions

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents