Write data into the slave station
This instruction writes data into the specified intelligent unit of the MEWNET-F slave station.
Input
Stores control data for master/slave configuration
Starting 16-bit area in CPU where words are read
Number of words to be read and then written to the slave unit (max. 32 words)
Starting memory address number in the intelligent unit where words are written
The variables s2_Start and d_Start have to be of the same data type.
Please refer to F152_RMRD
s1_Control stores the control data for the configuration of the master and slave units in the network. n words, beginning at the address in the CPU specified by s2_Start, are written to the intelligent unit of the slave unit beginning at the shared memory address number specified by d_Start.
Specifications of s1_Control:
Intelligent unit with bank: FP3 expansion data memory unit
Order number: AFP32091 AFP32092
if the control data s1_Control exceeds the limit of specified range
if no MEWNET-F master unit is found
if the data read exceeds the area of s2_Start
if the control data s1_Control exceeds the limit of specified range
if no MEWNET-F master unit is found
if the data read exceeds the area of s2_Start
All input and output variables used for programming this function have been declared in the POU header.The same POU header is used for all programming languages.
VAR
Start: BOOL:=FALSE;
ControlData: DWORD:=16#2020A;
(*No bank,
slot no. 2,
Master station 2,
Slave station 10*)
StartingAddress: WORD:=30;
NoWordsWrite: INT:=10;
WordsWritten: ARRAY [0..14] OF WORD:=[15(0)];
END_VAR
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 7 ;
NETWORK_BODY
B(B_F,F153_RMWT,,10,0,19,7,,?DEN?D@'s1'?Ds2?Dn?Dd?AENO);
B(B_CONTACT,,Start,4,1,6,3,);
B(B_VARIN,,ControlData,8,2,10,4,);
B(B_VARIN,,StartingAddress,8,3,10,5,);
B(B_VARIN,,NoWordsWrite,8,4,10,6,);
B(B_VARIN,,WordsWritten[0],8,5,10,7,);
L(1,0,1,7);
L(1,2,4,2);
L(6,2,10,2);
END_NETWORK_BODY
END_NET_WORK
END_BODY