ISaGRAF. Version 3.4

         

(ST)


ST (Structured text) - . , , , . ST SFC.




() . EZS . supl_prj , . supl_prj . supl_prj supl_prj.

ISaGRAF .



ISaGRAF


ISaGRAF Workbench . ISaGRAF. - ISAWIN. , :

ISaGRAF

APL

ISaGRAF

,

COM

EXE

ISaGRAF

LIB

IsaGRAF:

-

-

-

LIB\IOC

/

LIB\FNC

, IEC

LIB\FBL

, IEC

LIB\SRC

LIB\DEFS

LIB\RELS

LIB\DEV

є

makefiles, ..

TMP

: TMP ISaGRAF .

. , WS001

ISA.ini, EXE. WS001:

Isa

ISaGRAF

IsaExe

ISaGRAF

IsaApl

ISaGRAF

IsaTmp

IsaSrc

IsaDefs

, IsaTmp , OBJS, RELS DATA .

WS001 ISaGRAF:

;file c:\ISAWIN\EXE\ISA.ini

[WS001]

Isa=c:\isawin

IsaExe=c:\isawin\exe

IsaApl=c:\isawin\apl

IsaTmp=c:\isawin\tmp

IsaSrc=c:\isawin\lib\src

IsaDefs=c:\isawin\lib\defs

є ISaGRAF, \ISAWIN\LIB\DEV

: , , .. \ISAWIN\LIB\RELS

, є , ISaGRAF є , LINK.




"" , .

"" "" . ISaGRAF. . . , .

"" "" . . , "" , , . , .

"" "" . , . :

                     8

                    

                     ,

                    

" " "" .




. .

DEL . / , DEL. , , .

/ , /

. . . .

/ . , , ST IL.

/ , . , .

/ . , ASCII .




ISaGRAF . , , .

:

 

 

  LD FBD

  /

:

 

  ( /)

  ( /)

  ( )

TRUE FALSE - , . , , , . , , , , , .

SFC

SFC , . SFC . :

SFC: SFC .

SFC:........ .

SFC: .

SFC: () , .


GSTART, GKILL, GFREEZE GRST .

SFC, , SFC. :

 

 

 

: .

SFC, , SFC. :

 

 

  ( )

: . , . : . , .



, ST IL. (* *) . ST .
:
counter := ivalue; (* *)
(*
*)
c := counter (* *) + base_value + 1;
. , (* .
: IL .


ISaGRAF , , CJ International. :

:

bcd, scale

:

abs, acos, ArCreate, ArRead, ArWrite, ascii, asin, atan, char, cos, delete, expt, find, insert, left, limit, log, max, mid, min, mlen, mod, mux4, mux8, odd, rand, replace, right, rol, ror, sel, shl, shr, sin, sqrt, tan, trunc

:

average, blink, cmp, ctd, ctu, ctud, derivate, f_trig, hyster, integral, lim_alrm, r_trig, rs, sema, sr, stackint, tof, ton, tp

, , C ISaGRAF. . , , Windows . ISaGRAF , , , :

  , null . , ( ).

  C , . .



FC


:

FC

"" . . , . "" :

"" () . , "" .

FC

"" . . , "" ( ), "" . , . "":

"" () . "" ( ). "" , , .

FC

, . . :

.

FC

, . . "" :

. ST, LD IL. , , .

FC

. . ST, LD IL, "YES", "NO". :






.

- ST,

- LD, ,

- IL. IL ( ) , .

ST, . LD, . :

- 0 or FALSE NO

- 1 or TRUE YES

, .

FC

FC. FC . FC FC . FC, . FC, , . FC , " - ":



. FC . , , . " ":



. , FC:

- FC , , FC .

- FC

-

-

-



-

. . . , .

/ FC

/ , . , / . /. / , . / . " /":



/ , . , ST, LD IL, .

FC



. . , ( ), ( ). :



. .

FC FC110



, . , . "":





. - , . ( - ), . . , .

. .

. :

  ( )

  BEGIN

  SEQUENTIAL

  END

  ( )

Begin End . . Sequential . . Begin . Sequential SFC SFC. SFC. .

. - , . , . .


SFC.

, ( ) , , . . SFC.



- , ( SFC -. ) . ( ) . . , SFC.

SFC FC

SFC- - , . SFC.

SFC-, SFC- . SFC-, , .

FC

sequential FC . FC () FC . FC FC .

:

. SFC- SFC- . , .



. , , . FBD , LD, LD .


: SFC ( ), FBD ( ) LD

( ). : ST ( ), IL ( ). SFC . . , :

SFC............. Sequential Function Chart

........................... ( )

FC............... Flow Chart ( )

FBD............. Functional Block Diagram

........................... ( )

LD............... Ladder Diagram ( Quick LD)

........................... ( )

ST............... Structured Text ( )

IL................. Instruction List ( )


/


/ ISaGRAF ISaGRAF /. / :

  /

  /

  /

ISaGRAF /, / , /, , .

/ / ISaGRAF ( ). /” , . / , . / :

 

<><><_>_<_>

/:

I .

O

/:

X .

D .

M

/:

IX0_7 .. - 0 - 7

QD2 _4 - 2 - 4

/ / , /.



-


- . . :

'THIS IS A MESSAGE'

THIS IS A MESSAGE

: -. - . 255 , .

- :

'' (* *)

$:

ASCII

(hexa)

$$

'$'

16#24

'I paid $$5 for this'

$'

16#27

'Enter $'Y$' for YES'

$L

16#0a

'next $L line'

$R

16#0d

' llo $R He'

$N

16#0d0a

'This is a line$N'

$P

16#0c

'lastline $P first line'

$T

16#09

'name$Tsize$Tdate'

$hh (*)

16#hh

'ABCD = $41$42$43$44'

(*)hh - ASCII .




. .



LEFT


:

IN MSG

NbC INT ,

IN

Q MSG IN ( = NbC)

NbC < 0

IN NbC > IN

:

. .

(*FBD LEFT RIGHT*)

(* ST : *)

complete_string := RIGHT ('12345678', 4) + LEFT ('12345678', 4);

(* - '56781234'

RIGHT - '5678'

LEFT - '1234'

*)

(* IL : LEFT *)

LD '12345678'

LEFT 4

ST sub_string (* *)

LD '12345678'

RIGHT 4

ADD sub_string

ST complete_string



LIM_ALRM


:

H REAL

X REAL :

L REAL

EPS REAL ( )

QH BOO : TRUE X

H

Q BOO : TRUE X

QL BOO : TRUE X

L

:

.

. , , , EPS.

:



LIMIT


:

MIN INT

IN INT

MAX INT

Q INT

:

. .

(*FBD LIMIT*)

(* ST : *)

new_value := LIMIT (min_value, value, max_value);

(* [min_value..max_value] *)

(* IL : *)

LD min_value

LIMIT value, max_value

ST new_value



LOG


:

IN REAL

Q REAL ( 10)

:

( 10) .

(*FBD LOG*)

(* ST : *)

xpos := ABS (xval);

xlog := LOG (xpos);

(* IL : *)

LD xval

ABS

ST xpos

LOG

ST xlog




:

TRUE 1

FALSE 0

true false , , .




, , . . , BOOLEAN.

(* FBD *)

(* ST : *)

output1 := input1 AND NOT (input2);




- . SFC . SFC . :

, , - .

. . ( ). ( ). .

:

, SFC .

:

(* SFC *)

(* *) (* *)




ISaGRAF , true false, ST. . :

YES is TRUE

PI is 3.14159

OK is (auto_mode AND NOT (alarm))

,

ST . :

If OK Then

angle := PI / 2.0;

isdone := YES;

End_if;

(LOCAL) , (GLOBAL) (COMMON).

.

.

.

, .

:

ST , . :

: ܠ is FALSE

ܠ is TRUE

: ܠ is TRUE

:

- 16

-

- ,

:

, , :

PI is 3.14159

PI2 is PI*2

:

PI2 is 6.28318



MAX


:

IN1 INT

IN2 INT ( REAL)

Q INT

:

.

(*FBD MIN MAX*)

(* ST : *)

new_value := MAX (MIN (max_value, value), min_value);

(* [min_value..max_value] *)

(* IL : *)

LD max_value

MIN value

MAX min_value

ST new_value




: . , "Goto" .

: <labelname>:

: <labelname>

ISaGRAF: 16 , , , . , ":".

: , . ISaGRAF

: (* *)

loop:

PrintTime

Wait 1s

Goto loop



MID


:

IN MSG

NbC INT ,

IN

Pos INT

Pos

( 1)

Q MSG IN ( = NbC)

:

. .

(*FBD MID*)

(* ST : *)

sub_string := MID ('abcdefgh', 2, 4);

(* - 'de' *)

(* IL : *)

LD 'abcdefgh'

MID 2,4

ST sub_string



MIN


:

IN INT

IN2 INT ( REAL)

Q INT

:

.

(*FBD MIN MAX*)

(* ST : *)

new_value := MAX (MIN (max_value, value), min_value);

(* [min_value..max_value] *)

(* IL : *)

LD max_value

MIN value

MAX min_value

ST new_value



MLEN


:

IN MSG

NbC INT IN

:

.

(*FBD MLEN*)

(* ST : *)

nbchar := MLEN (complete_string);

If (nbchar < 3) Then Return; End_if;

prefix := LEFT (complete_string, 3);

(* 3 prefix 3 *)

(* IL : *)

LD complete_string

MLEN

ST nbchar

LT 3

RETC

LD complete_string

LEFT 3

ST prefix




. . .

, . - (OR) .

(* *)

(* (v1 OR v2 OR v3) *)

,

. .

(* *)

(* ST : *)

output1 := input1;

output2 := input1;

. - (OR) .

(* *)

(* ST : *)

output1 := input1 OR input2;

output2 := input1 OR input2;

output3 := input1 OR input2;



MOD


:

IN INT

Base INT

Q INT ( MOD )

-1 Base <= 0

:

.

(*FBD MOD*)

(* ST : *)

division_result := (value / divider); (* *)

rest_of_division := MOD (value, divider); (* *)

(* IL : *)

LD value

DIV divider

ST division_result

LD value

MOD divider

ST rest_of_division



MSG


:

IN BOO-INT-REAL

Q MSG false true IN -

, IN -

:

.

(*FBD MSG*)

(* ST : *)

bres := MSG (true); (* bres 'TRUE' *)

ares := MSG (125); (* ares '125' *)

(* IL : *)

LD true

MSG

ST bres

LD 125

MSG

ST ares



MUX


:

SEL INT ( [0..3])

IN1..IN4 INT

Q INT = value1 if SEL = 0

= value2 if SEL = 1

= value3 if SEL = 2

= value4 if SEL = 3

= 0

:

4 : .

(*FBD MUX4*)

(* ST : *)

range := MUX4 (choice, 1, 10, 100, 1000);

(* 4 , , - 1, 10 *)

(* IL : *)

LD choice

MUX4 1,10,100,1000

ST range


㬥:

SEL INT 楫 ᥫ ( [0..7])

IN1..IN8 INT 楫 稭

Q INT = value1 if SEL = 0

= value2 if SEL = 1

...

= value8 if selector = 7

= 0 㣨 祭 ᥫ

ᠭ:

⨯ 8 室: 롨ࠥ 쬨 楫 ᥫ.

(*FBD ਬ "MUX8"*)

(* ST : *)

range := MUX8 (choice, 1, 5, 10, 50, 100, 500, 1000, 5000);

(* 롨ࠥ 8 ।। 祭, ਬ, ᫨ ࠭ 3, 祭 㤥 50 *)

(* IL : *)

LD choice

MUX8 1,5,10,50,100,500,1000,5000

ST range




. , ( ), ( ) .

, . :

-

- ( )

-

-

-

-

-

-

-

-

- /

-

-

-

-

-

-

-

" / ". , ISaGRAF .

/ /

. , .

/ , , .

/ , . ( ) .

, , . . .




- ST IL, , . :

ACTION (N) :

(* ST *)

END_ACTION ;

:

:

 



NEG


:

IN INT-REAL

Q INT-REAL

:

.

(*FBD *)

(* ST : *)

ao23 := - (ai10);

ro100 := - (ri1 + ri2);

(* IL : *)

LD ai10

MUL -1

ST ao23

LD ri1

ADD ri2

MUL -1.0

ST ro100



ISaGRAF


ISaGRAF, , . . .

ISaGRAF . , .

. . , , .




- , /. ISaGRAF . %.

. s - . c - .

%IXs.c.............

%IDs.c.............

%ISs.c.............

%QXs.c.............

%QDs.c.............

%QSs.c.............

. s - . b - . c - .

%IXs.b.c.........

%IDs.b.c.........

%ISs.b.c.........

%QXs.b.c.........

%QDs.b.c.........

%QSs.b.c.........

:

%QX1.6 6- 1 ( )

%ID2.1.7 7-1 1 2 ( )

A .



NOT_MASK


:

IN INT

Q INT 32 IN

:

.

(*FBD NOT_MASK*)

(*ST : *)

result := NOT_MASK (16#1234);

(* result is 16#FFFF_EDCB *)

(* IL : *)

LD 16#1234

NOT_MASK

ST result




" / ", . , , :

, "0", "1".

: , , , .




, . .

. :

ISaGRAF , , .

 

: , , .




ISaGRAF / , , . . ASCII , Windows . . ASCII, Windows . . , , .

. :

. . .

ASCII Windows. . ASCII . .

. . , .

. . . - MS-DOS 0d-0a. .
.



. :



"" . "" . , "" .

, . . , . . .

. . - MS-DOS 0d-0a. . , . , . .



. :

  tab separators ( )

:

: Name Attribute Comment

level internal calculated water level

alrm1 output main

  comma separator ( )



:

: Name,Attribute,Comment

level,, calculated water level

alrm1,output,main alarm output

  semicolon separators ( )

:

: Name;Attribute;Comment

level;; calculated water level

alrm1;output;main alarm output

  commas commas and quotes ( )

: .

.

: "Name","Attribute","Comment"

"level","","internal calculated water level"

"alrm1","output","main alarm output"



, . :



. . . :

  16

 

  ,

 

ISaGRAF :

........................................... Name



.......................................... Comment

........................................ Address

Attributes (, input, output).... Attribute

'False' string....................... False

'True' string........................ True

Analog format (real or integer)................. Format

Analog unit string..................................... Unit

Analog conversion name......................... Conversion

Message maximum length........................ MaxLength

Function block library type....................... Library

Defined word equivalence....................... Equivalence

attribute...............................

Input attribute............................................ Input

Output attribute......................................... Output

Constant attribute..................................... Constant

Real analog format................................... Real

Integer analog format............................... Integer


DDE


ISaGRAF DDE ( ) . (an advise loop) ISaGRAF , ISaGRAF .

advise poke DDE ISaGRAF. request , . DDE , execute . , , . . :

Service name: ISaGRAF

Topic name:.. ISaGRAF

Item name:

, , , :

variable_name(program_name)

DDE ISaGRAF ISaGRAF, . 256 ISaGRAF. DDE , ISaGRAF , . - , ISaGRAF .




, , / . . / .

, :

. , .




:

, ISaGRAF.INI .

: -s

. 1 255, 13 ($0D). . , , . , , .

1 ISaGRAF.INI.

:

WISAKER.EXE -s=2

: ISaGRAF NT Options/Slave

(Up, Down) . ISaGRAF.

: -t

ISaGRAF Ethernet . -t. , COM1, COM2, COM3 COM4 , 1100, Ethernet.

: 1100 Ethernet COM1 - ISaGRAF.INI.

: Ethernet.

:

WISAKER -t=COM2

WISAKER -t=1101

:

, -t=COMx

:

baud

600

1200

2400

4800

9600

19200

parity

n

e

o

data

7 8

stop

1 2

flow

h

n

<
- 19200, , 8 , 1 , .

:

WISAKER -t=COM1 baud=1200 data=8 parity=n stop=2

: ISaGRAF NT Options/Communication



Ethernet. Ethernet . , .



. , .

: -x

, , /, .

0 1: 0 - , 1 - .

: - 0 , ISaGRAF.INI.

:

WISAKER -x=1 ,

:

, . .

ISaGRAF NT: -p

NT . , ISaGRAF , - .

0, 1, 2 3. 0 - , 3 - .

:

WISAKER -p=0

WISAKER -p=1

: ISaGRAF NT Options/Priority



- Real Time, - Idle.

0: Real Time

1: High priority

2: Normal priority

3: Idle priority

:

wisaker -t=COM1 ISaGRAF (1) COM1.

wisaker -s=3 -t=COM1 ISaGRAF 3 COM1.



ISaGRAF. SFC, FBD, LD, ST IL.




, ISaGRAF . , C , , C . ISaGRAF, .

"C", "C", ISaGRAF . PLC, .

, , - . , , (, ) .

ISaGRAF

ISaGRAF C . , C , - , .

ISaGRAF , C ST/FBD . ISaGRAF , C , . ISaGRAF .

C

ISaGRAF "C" . "C", ISaGRAF, "C" ISaGRAF.


-, ISaGRAF MS-DOS (.bat), DOS. - DOS. , Windows MS-DOS.



ISaGRAF .

"C", , , ISaGRAF.

, C , ISaGRAF. C :

,









C :

,









:

,

,

,

:

,







, , ...


ODD


:

IN INT

Q BOO TRUE

FALSE

:

: - .

(*FBD ODD*)

(* ST : *)

If Not (ODD (value)) Then Return; End_if;

value := value + 1;

(* *)

(* IL : *)

LD value

ODD

RETNC

LD value

ADD 1

ST value




- . . - . , , SFC, . .

:

, , . , . :

(* SFC *)

 



ISaGRAF LARGE (WDL) workbench


, ISaGRAF workbench. , - ( ), ISaGRAF ( , ). - , .

:

255 ,

蠠 20

, Workbench,

:

: 젠

򠠠 8 ⠠

ࠠ 8 ⠠

16 ⠠ +60

ࠠ 16 ⠠

255 +60

16 ⠠

16 ⠠

/ . (lib) 8 ⠠ C,

C

IEC

(lib)16 C,

C


IEC

/ 8 ᨬ

䨣 / 8 ᨬ

ࠬ 16 ᨬ

㭪 ८ࠧ 8 ᨬ

஢ ( ணࠬ):

ꥪ ᨬ 砭

ப SFC 600

SFC 20

SFC 4095 ᥣ ஥, 㯯 蠣,

樨騥 蠣, 砫

騥 蠣

࠭樨 SFC 4095 ᥣ ਫ

LD/FBD ।஢ 200

2000 ࠧ

।஢

祩.

Quick LD ।஢ ࠭祭 ࠭祭

魮 PC

IL ⪨ 251 ⮩ ணࠬ IL

஢ ⥪ 40KBytes

᫮ ( ஥):







᪨ ६

65535



65535

㯯 楫 ⢥ ६



65535

६ ᮮ饭

65535

। ᫮

4095

⮬ ᯨ᪥ (⮬ )

। ᫮

255

ᯮ㥬 ⮩ ணࠬ

८ࠧ

127

ᯮ㥬 ਫ

窨 ⠡

32

। ⮩ ᠬ ⠡ ८ࠧ

<


࠭祭 ᨬ쭮 ⢠ 㫥᪨, ப 㯯 ६, ப, 室 室 ६. ⠪ ६ ࠧ饭 ஬ ६. ⢮ ६ ।㥬 ( ⨯, ⢨), । ᫮ ॢ 16000. ᨬ 䨣樨 PC, ࠭祭 16000. ਫ 楫 ISaGRAF V1.21 ࠭ ᫨ 㬬୮ ⢮ ६ ⨯ 4095. ⠭⭠ "Modbus" ᯮ ⥢ ᯮ짮 ᫨ ⢮ ६ ⨯ ॢ室 4095.

/:

ꥪ ᨬ 砭

256 । ਫ

( ᫮ 㤮)

⢮ / ᫮ 㤮 ॢ蠥 256.

128

⥪:









㭪樨 ( IEC)

255

⠭ ⥪

㭪樮 ( IEC)

255

⠭ ⥪

㭪樨

255

⠭ ⥪

㭪樮

255

⠭ ⥪

㭪樮

4095

⮣ ⨯ 㭪樮쭮 ⮬ ਫ

室 ࠬ 㭪樨

31

ਬ 㭪 㭪, ᠭ 몥 IEC

ࠬ 㭪樮쭮

32

᢮ । 室묨 室묨 ࠬࠬ. 襩 ॡ 1 室 ࠬ

㭪 ८ࠧ

128

⠭ ⥪

䨣樨 /

255

⠭ ⥪

/

255

⠭ ⥪

㤮 /

255

⠭ ⥪



16



. ISaGRAF, . . , .

( ) , . :

:................ .

:..................... . , .

:........ , ISaGRAF . .

:........ . , , Workbench

:.......................... .

:.............................. .

: .......... , .

:......................... - .

:

:.................. .

:....................... .

:........... , .

:........... , , .

. , .




. , .

" " .

" " , . SFC and FC, 2.

" "

, . SFC FC, 2 .




, , auto close ( ) . ISaGRAF.

.


, . , ISaGRAF.

ST IL, / , , .




, :

. . ( , )

.

- , workbench. - , , .

. , .

. , (, , , ). .

, . , . . / , .

/ , , , , .




/ . .

, / bitmap . LCD , , - - /.

, / /. .

, / .

, , .




ISaGRAF . "" .

, , , . , . . ISaGRAF ( ), . , .




.

:

" ", , . , , .

"", .

.

SFC

SFC SFC 1 ( ), 2 SFC . , 1 2 .

,

  : (1 2 , )

  : , .

, . :

( ISaGRAF), , .

(1, 2, 3) . , . bitmap (.BMP). . .


FBD .

" / " , , . " " . "Document" .

"" , . Quick LD .

" / " , ISaGRAF. ST IL, . , . ISaGRAF .




LD, , .

" / () " , . , . .

, , - . , Quick LD . - , : 16 . :

: :

short text short text

long text with no separator long text with n

short text: long description short text

. , . . " / " . :

 

 

 

Quick LD LD , . " / / ", . " " " / ", ISaGRAF , Quick LD.
: .



" / " , , LD.

. , / .

. .

X/Y . . .

" / " ISaGRAF. , . ISaGRAF .



, ISaGRAF . - , , ISaGRAF, , .

"" , , . "".

, . >> . ISaGRAF 3 .

. , . ISaGRAF:

SIMULATE:........ ISaGRAF. , .

ISA86M:............. TIC (- ) ISaGRAF , Intel . .

ISA68M:............. TIC (- ) ISaGRAF , Motorola . .

SCC:................... ISaGRAF є, ISaGRAF .

CC86M:.............. ISaGRAF є, ISaGRAF .
ISaGRAF V3.23, "C" .

, ISaGRAF , PLC. ( , ) ISaGRAF (Workbench).

SFC

SFC, ISaGRAF SFC . , . , ISaGRAF, , ISaGRAF. ISaGRAF SFC . .



, ISaGRAF , .

.

, . , , .

, . , 2 + 3

5 . , .

, , .

, ( ). .


, , , .

, , . , : var := 1; var := X;, : var := X;.

, . , + 0 . , . , A & A

A.

, ( AND, OR, XOR NOT) . , , .

:

(.)..

ࠠ xxxx....................... (*)

xxxxxxxx............... xxxx

蠠 xxxx....................... xxxxxxxx

xxxx....................... xxxxxxxx

xxxx....................... xxxxxxxx

䠠 xxxx....................... xxxxxxxx

.............................. xxxxxxxx xxxx

蠠 xxxxxxxx............... xxxx

頠 xxxxxxxxxxx ........ xxxxxxxxxxx

(*) 2.


OPERATE


:

IO ANY

Funct INT

Arg INT /

Q INT

:

/.

OPERATE /. . /.



RETURN


<RETURN > . . <RETURN > : TRUE, .

(* FBD RETURN *)

(* ST : *)

If auto_mode OR alarm Then

Return;

End_if;

bo67 := (bi10 AND bi23) OR x_cmd;


RETURN , . RETURN .

TRUE, , .

:

LD - , , .

(* ST : *)

If Not (manual_mode) Then RETURN; End_if;

result := (input1 OR input3) AND input2;