//PROJNAME=Demo - Traffic Lights
//MODULENAME=DMTL
//PLATFORM_PLC_ID=0
%CYCLE=500
%IPHOST=192.168.0.3:10111/0.0.0.0
%COM1GENERAL=01
%COM1BAUD=57600
%COM2BAUD=9600
%COM3BAUD=9600
%COM4BAUD=57600
%COM1PARITY=0
%COM2PARITY=0
%COM3PARITY=0
%COM1STOP=1
%COM2STOP=1
%DEVICES=000D
%EXTERNAL=001D
%EXTMAIN=0000
%EXTREQ=001D
%EXTIRR=0000
%SAVETBL=000F
%COMTHREAD=1,0,0
%COMTHREAD=2,0,0
%COMTHREAD=3,0,0
%TSNETADDR=0
%PROGID=03022022155647006

// Устройства
~0000:0000 STGA [t]t/*GROUPS*/Traffic Lights Logic
{FFFF.1}
{7000.0}
0
0
0
0
groups=5
{1.0}
{2.0}
{3.0}
{4.0}
{5.0}
.
~0001:0001 DLY [red]red/*GROUPS*/Traffic Lights Logic
inp={0.6}
time=14
.
~0002:0002 DLY [red_yellow]red_yellow/*GROUPS*/Traffic Lights Logic
inp={0.7}
time=4
.
~0003:0003 DLY [green]green/*GROUPS*/Traffic Lights Logic
inp={0.8}
time=14
.
~0004:0004 DLY [green_flashing]green_flashing/*GROUPS*/Traffic Lights Logic
inp={0.9}
time=6
.
~0005:0005 DLY [yellow]yellow/*GROUPS*/Traffic Lights Logic
inp={0.A}
time=6
.
~0006:0006 GNR [red_yellow]red_yellow/*GROUPS*/Traffic Lights Logic
en={0.7}
tlow=1
thigh=1
.
~0007:0007 GNR [green_flashing]green_flashing/*GROUPS*/Traffic Lights Logic
en={0.9}
tlow=1
thigh=1
.
~0008:0008 MCHB [red]red/*GROUPS*/Traffic Lights Logic
trigresnum=0
suspendnum=0
inputnum=2
0
0
0
0
0
3
0 {0.6}
1 {0.7}
.
~000A:0009 MCHB [green]green/*GROUPS*/Traffic Lights Logic
trigresnum=0
suspendnum=0
inputnum=1
0
0
0
0
0
3
0 {0.8}
1 {7.0}
.
~000C:000A MCHB [yellow]yellow/*GROUPS*/Traffic Lights Logic
trigresnum=0
suspendnum=0
inputnum=1
0
0
0
0
0
3
0 {6.0}
1 {0.A}
.

//Таблица внешнего доступа
@0000:0001.01 RW - - 00.DLY_red_Time
@0001:0002.01 RW - - 00.DLY_red_yellow_Time
@0002:0003.01 RW - - 00.DLY_green_Time
@0003:0004.01 RW - - 00.DLY_green_flashing_Time
@0004:0005.01 RW - - 00.DLY_yellow_Time
@0005:0008.01 RO - - 00.MCHB_red_Sost
@0006:0008.03 RO - - 00.MCHB_red_Plata
@0007:0008.06 RW - - 00.MCHB_red_Control
@0008:0008.07 RW - - 00.MCHB_red_Blok
@0009:0008.08 RW - - 00.MCHB_red_TimeStart
@000A:0008.0A RW - - 00.MCHB_red_Channel1
@000B:0008.0B RW - - 00.MCHB_red_Channel2
@000C:0008.0C RW - - 00.MCHB_red_Flags
@000D:000A.01 RO - - 00.MCHB_green_Sost
@000E:000A.03 RO - - 00.MCHB_green_Plata
@000F:000A.06 RW - - 00.MCHB_green_Control
@0010:000A.07 RW - - 00.MCHB_green_Blok
@0011:000A.08 RW - - 00.MCHB_green_TimeStart
@0012:000A.0A RW - - 00.MCHB_green_Channel1
@0013:000A.0B RW - - 00.MCHB_green_Channel2
@0014:000A.0C RW - - 00.MCHB_green_Flags
@0015:000C.01 RO - - 00.MCHB_yellow_Sost
@0016:000C.03 RO - - 00.MCHB_yellow_Plata
@0017:000C.06 RW - - 00.MCHB_yellow_Control
@0018:000C.07 RW - - 00.MCHB_yellow_Blok
@0019:000C.08 RW - - 00.MCHB_yellow_TimeStart
@001A:000C.0A RW - - 00.MCHB_yellow_Channel1
@001B:000C.0B RW - - 00.MCHB_yellow_Channel2
@001C:000C.0C RW - - 00.MCHB_yellow_Flags

// Таблица SaveTbl
$0000:0008.07=0.D
$0001:0008.08=2.D
$0002:0008.0A=4.D
$0003:0008.0B=6.D
$0004:0008.0C=8.D
$0005:000A.07=A.D
$0006:000A.08=C.D
$0007:000A.0A=E.D
$0008:000A.0B=10.D
$0009:000A.0C=12.D
$000A:000C.07=14.D
$000B:000C.08=16.D
$000C:000C.0A=18.D
$000D:000C.0B=1A.D
$000E:000C.0C=1C.D

// COM-threads devices list
//MTR_EXTRA_DATA_BEGIN
//MTR_EXTRA_DATA_END
