[?]: build SCL Code

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
Mrc2
Posts: 32
Joined: Tue Jun 15, 2010 9:05 pm

[?]: build SCL Code

Post by Mrc2 »

Hallo,
can somebody help me to build scl source code to generate exactly this array structure with
the struct and end_struct lines :?: :?: :?: :shock:

Code: Select all

+0.0                D_0            INT                               0
+2.0                D_1            INT                               0
+4.0                D_2            ARRAY[1..1]
*0.0                                  STRUCT
+0.0                   Adjust     BYTE                             B#16#1
+1.0                   Monitor   BYTE                             B#16#0
=2.0                                 END_STRUCT
+6.0                 D_3           INT                                 0
i dont now how can paste a picture for better viewing???
dehell
Posts: 104
Joined: Sat Jun 13, 2009 12:25 pm
Location: Europe

Re: [?]: build SCL Code

Post by dehell »

Hi,
Try this:

Code: Select all

DATA_BLOCK DB 4
TITLE =
VERSION : 0.1


  STRUCT 	
   D_0 : INT ;	
   D_1 : INT ;	
   D_2 : ARRAY  [1 .. 1 ] OF STRUCT 	
    Adjust : BYTE  := B#16#1;	
    Monitor : BYTE ;	
   END_STRUCT ;	
   D_3 : INT ;	
  END_STRUCT ;	
BEGIN
   D_0 := 0; 
   D_1 := 0; 
   D_2[1].Adjust := B#16#1; 
   D_2[1].Monitor := B#16#0; 
   D_3 := 0; 
END_DATA_BLOCK


Mrc2
Posts: 32
Joined: Tue Jun 15, 2010 9:05 pm

Re: [?]: build SCL Code

Post by Mrc2 »

i try it...
muchas gracias (clap)