![Jetter JetControl 365MC Скачать руководство пользователя страница 82](http://html1.mh-extra.com/html/jetter/jetcontrol-365mc/jetcontrol-365mc_user-manual_3889149082.webp)
Jetter AG
Programming | 8
User Manual – JetControl 365MC
82 / 148
8.2.6 Memory for non-volatile application program variables
Non-volatile variables are used to store data that must be maintained when the
JC-365MC is de-energized.
Properties
■
Global variables which are assigned to permanent registers (%RL)
■
Variables are stored in a compact manner, according to the size of their type
■
Size: 240,000 bytes (480,000 with -R option)
■
Register numbers: 1,000,000 ... 1,059,999 (up to 1,119,999 with option -R)
Types of access
■
By JetSym
■
From HMIs
■
From within the application program
JetSym STX
Program
In the following program 4 non-volatile variables are incremented every second.
The working range of the counters is between 0 and 255 (variable type: byte). For
these 4 variables the 4 bytes of register 1000010 are used.
Var
Cnt1, Cnt2, Cnt3, Cnt4: Byte
At
%RL
1000010
;
End_Var
;
Task
Count4
Autorun
Loop
Inc(Cnt1);
Inc(Cnt2,
2
);
Inc(Cnt3,
5
);
Inc(Cnt4,
10
);
Delay(
T#1s
);
End_Loop
;
End_Task
;
Setup pane
The JetSym setup pane shows the content of the variable. Since the 4 counters
are of the byte type, this will result in counter overflow after a relatively short time.
Number
Element
Description
1
Current content of
the variable Cnt1
The content of the variable is incremented by 1
every second.
2
Current content of
the variable Cnt2
The content of the variable is incremented by 2
every second.
3
Current content of
the variable Cnt3
The content of the variable is incremented by 5
every second.
4
Current content of
the variable Cnt4
The content of the variable is incremented by
10 every second.