
[Help]
DefineTag=(no need '=') TagName, TagDataType, TagDefaultValue
SupportedDataType=DataType(Bytes): Float(R4), Int(I4), Bool, String, Byte(UI1), Short(I2), Word(UI2), DWord(UI4), Double(R8), Date

[Define-Tags]
bRecordDate1		, Bool	, NULL
bRecordDate2		, Bool	, NULL

dtStartDate_Shift	, Date	, NULL
dtEndDate_Shift		, Date	, NULL

fRetentive1			, Float	, NULL
nRetentive2			, Int32	, NULL


fEditBox1_Edit		, Float	, NULL
fEditBox1_Download	, Float	, NULL

bCheckBox1_Edit		, Bool	, NULL
bCheckBox1_Download	, Bool	, NULL

bDemoBoolToInt		, Int32	, NULL

nSlider1_Edit		, Int32	, NULL
nSlider1_Download	, Int32	, NULL

nComboBox1_Edit		, Int32	, NULL
nComboBox1_Download	, Int32	, NULL

bInterlockEdit1		, Bool	, NULL
bInterlockEdit2		, Bool	, NULL

bSetOnOff1			, Bool	, NULL
bSetOnOff2			, Bool	, NULL
bSetOnOff3			, Bool	, NULL

fPhyExcCur1			, Float	, NULL
fPhyExcOut1			, Float	, NULL
fPortExcOut1		, Float	, NULL
	
fAnalog1			, Float	, NULL
nAnalog1			, INT	, NULL
bTest1				, Bool	, NULL
bTest2				, Bool	, NULL
	
bAllowTurnOn		, Bool	, NULL
bAllowTurnOff		, Bool	, NULL
bTurnOn				, Bool	, NULL
	
fDummy				, Float	, NULL
	
bStartTimer1		, Bool	, TRUE
bResetTimer1		, Bool	, NULL
fTimer1				, Float	, NULL
	
nTimerID2			, INT	, 2
bStartTimer2		, Bool	, TRUE
bResetTimer2		, Bool	, NULL
fTimer2				, Float	, NULL
	
strTag1				, String, NULL


[Calc-Tags]

bDemoBoolToInt = {bDemoBool}

nAnalog1 = {fAnalog1}

dtStartDate_Shift = ({bRecordDate1} == 1) ? {fCurDateTimeMiladi} : {dtStartDate_Shift}
bRecordDate1 = 0
dtEndDate_Shift = ({bRecordDate2} == 1) ? {fCurDateTimeMiladi} : {dtEndDate_Shift}
bRecordDate2 = 0

//bIsOnTransBelt1 = {PAHP.Belt.bIsOn.ToLeftTransBelt1} || {PAHP.Belt.bIsOn.ToRightTransBelt1}
//Render DO2DI in Demo for Trans Belts.
//PAHP.Belt.bIsOn.ToLeftTransBelt1	= ({eDataSource}==1) ? {PAHP.Belt.bTurnOn.LeftTransBt1}  : {PAHP.Belt.bIsOn.ToLeftTransBelt1}
// Interlock, Do NOT let to take on both 'bTurnOn.Left' and 'bTurnOn.Right' of Trans Belts.
//PAHP.Belt.bTurnOn.LeftTransBt2 = {PAHP.Belt.bTurnOn.RightTransBt2} ? 0 : {PAHP.Belt.bTurnOn.LeftTransBt2}
//fExcOutputPercentBelt0 = {PAHP.AI.ExcitationOutput.fCurrentExcitationOutputB0} / 27648 * 100

fDummy		= StartTimer(1, {bStartTimer1}, {bResetTimer1})
fTimer1		= GetTimer(1)

bResetTimer2= {bStartTimer2} // Cause to rest Timer only at Start (Not at Stop)
fDummy		= StartTimer({nTimerID2}, {bStartTimer2}, {bResetTimer2})
fTimer2		= GetTimer({nTimerID2})

fDemoFloat = ({fDemoFloat} > 100) ? 0 : {fDemoFloat}
