EasyManua.ls Logo

Fuji Electric NP1L-RS4 - 5-6 Writing Send Data

Fuji Electric NP1L-RS4
94 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
5-8
5-6 Writing the Send Data
Writing the Send Data
Send data is written in the variables (WORD type array data) which are connected to send data terminal S_DAT. When
the volume of send data is small, the send data writing program is created on the same work sheet as that for expansion
FB; when the volume is large, it is better to create the program on separate work sheet or POU. This paragraph describes
how to create a send data writing program on a POU other than that including the non-procedural FB.
IF SSET THEN
SDAT[0] := WORD#16#0000 ;
SDAT[1] := WORD#16#0001 ;
SDAT[2] := WORD#16#0002 ;
SDAT[3] := WORD#16#0003 ;
SDAT[4] := WORD#16#0004 ;
SDAT[5] := WORD#16#0005 ;
SDAT[6] := WORD#16#0006 ;
SDAT[7] := WORD#16#0007 ;
SDAT[8] := WORD#16#0008 ;
SSET := FALSE ;
END_IF
<Sample variable declaration>
Because it is used by the POU on which an expansion FB is pasted, the send data variable "SDAT" must be global.
Therefore, it is necessary to make variable declaration at 2 locations, as below:
<Sample setting program>
To set a desired value for WORD type array data "SDAT"
VAR_GLOBAL
PARA : _C_PAR_TYP11;
PSET : BOOL := TRUE ;
SDAT : _C_SND_TYP11 ;
SSET : BOOL := TRUE ;
END_VAR
VAR_EXTERNAL
SDAT : _C_SND_TYP11;
SSET : BOOL ;
END_VAR
Global variable declaration
Local variable declaration
Setting operation flag
After all necessary values are set, the processing for
the above setting will not be executed from the next
scan when the flag is set to "FALSE."
Used by the POU for setting parameter values
Data type "_C_SND_TYP11" is
automatically declared when non-procedural
FB is pasted.

Table of Contents

Related product manuals