summaryrefslogtreecommitdiffstats
path: root/tests/symbols.awl
blob: e5b68ff81ab78ab3f0b437510816440caa51a887 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
DATA_BLOCK "Data_1"
STRUCT
	VAR0		: INT
END_STRUCT
BEGIN
	VAR0		:= 123
END_DATA_BLOCK


ORGANIZATION_BLOCK OB 1
BEGIN
	// Test symbolic M access
	__STWRST
	U		"sym_M_0.0"
	__ASSERT==	__STW VKE,	0
	SET
	=		M 0.0
	__STWRST
	U		"sym_M_0.0"
	__ASSERT==	__STW VKE,	1
	CLR
	=		"sym_M_0.0"
	__STWRST
	U		M 0.0
	__ASSERT==	__STW VKE,	0


	// Test symbolic fully qualified access
	L		"Data_1".VAR0
	__ASSERT==	__ACCU 1,	123

END_ORGANIZATION_BLOCK
bues.ch cgit interface