; ---------------------------------------------------------------------------
; user2.cmm
; ---------------------------------------------------------------------------
  PMACRO.EXPLICIT

  PRIVATE &resetvector

  ; show path and name of this script (present practice file)
  ECHO ""
  ECHO %COLOR.BLUE "### " OS.PPF() " ###"

; ---------------------------------------------------------------------------


B::

; check if PowerView instance with InterCom name M0 is available
IF INTERCOM.PING(M0)
(
	ECHO ""
	ECHO %COLOR.BLUE "### Update M0-Window ###"
	
	InterCom M0 TOOLBAR   ON
	InterCom M0 STATUSBAR ON

	// very small: InterCom M0 FramePOS 1.8571 46.167 70. 20. Normal 3.
	InterCom M0 FramePOS 1.8571 38.154 92. 25. Normal 3.
	InterCom M0 WinPAGE.RESet
	InterCom M0 WinPAGE.Create P000
	InterCom M0 WinCLEAR

	InterCom M0 WinPOS 4.4286 10.846 80. 9. 0. 0. W001
	InterCom M0 AREA

	InterCom M0 WinPOS 1.5714 0.84615 71. 7. 16. 1. W000
	InterCom M0 WinTABS 10. 10. 25.
	InterCom M0 List.auto
	// very small: InterCom M0 WinPOS 1.8571 1.25 60. 11. 16. 1. W000
	// very small: InterCom M0 WinTABS 10. 10. 25.
	// very small: InterCom M0 List.auto

	InterCom M0 WinPAGE.select P000
)
else
(
	ECHO ""
	ECHO %COLOR.RED "### Cannot update 'M0'-Window ###"
)


TOOLBAR   ON
STATUSBAR ON
// FramePOS 4.0 1.0 208. 51.
// ok: FramePOS 4 1 95% 78% normal 3
// ok: FramePOS 1.0 10.769 165. 51.  normal 3
FramePOS 0.42857 11.692 165. 51.  normal 3
WinPAGE.RESet

WinPAGE.Create P000
WinCLEAR

WinPOS 1.8571 1.0 77. 18. 16. 1. W000
WinTABS 10. 10. 25.
// List.Hll  or  List.Auto
List.Hll

WinPOS 4.6 26.75 26. 13. 0. 1. W005
WinTABS 26. 26.
y.b.f

WinPOS 1.7143 32.923 156. 12. 0. 0. W001
AREA

WinPOS 17. 26.5 126. 6. 26. 1. W002
WinTABS 13. 0. 0. 0. 0. 0. 0. 0. 0. 72.
Break.List

WinPOS 32.571 24.769 79. 13. 16. 2. W006
// ok: Grafics: Var.PROfile %e (CddStp88XX_aStpPos[0]).nPos (CddStp88XX_aStpCtrl[0].Bit).nPos

// %e
// Access to static variables through the emulation memory.
//  By this option global or static variables may be displayed during the real-time emulation.
//  As this dual-port access cannot access target memory,
//    this option allows 'save' memory accesses, as illegal pointer values cannot cause wrong accesses to the target.

// ok: WinPOS 86.1 0.9 111. 39. 0. 0. W003
WinPOS 86.1 0.9 72. 14. 0. 0. W003
Var.Watch %E %SpotLight

WinPOS 86.143 22.0 46. 21. 5. 0. W004
Frame


// Break.RESet
// Break.CONFIG.VarConvert OFF
// Break.CONFIG.InexactData ON
// Break.CONFIG.InexactTrigger OFF
// Break.CONFIG.InexactResume ON
// Break.CONFIG.InexactAddress ON
// ok: Break.Set     CddStp_SpiRx /Program /DISable

// ok: Var.AddWatch              CddStp88XX_aSRegDiag2
// ok: Var.AddWatch              CddStp88XX_aSRegDiag1
// ok: Var.AddWatch %Hex         CddStp_Simulation_Data
// ok: Var.AddWatch %Hex %Fixed  CddStp8899Com_DataMirror
// ok: Var.AddWatch %open        CddStp8899Com_DataMirror.StatvRx.aSRegFault[0].Bit

Var.AddWatch   CtrlStpCore_DEBUG_RteWrite_Status_ucLWRState;
Var.AddWatch   CtrlStpCore_DEBUG_RteWrite_Status_ucLWRSpeed;
Var.AddWatch   CtrlStpCore_DEBUG_RteWrite_Status_ucLWRPosition;
Var.AddWatch   CtrlStpCore_DEBUG_RteWrite_TgtAll_sLwrTarget_boStop;
Var.AddWatch   CtrlStpCore_DEBUG_RteWrite_TgtAll_sLwrTarget_unMinStepPeriod;
Var.AddWatch   CtrlStpCore_DEBUG_RteWrite_TgtAll_sLwrTarget_nPosition;

Var.AddWatch   CtrlStpCore_DEBUG_RteRead_sVehicleSpeedSts_opVehicleSpeed;
Var.AddWatch   CtrlStpCore_DEBUG_RteRead_eEcuNmModes;
Var.AddWatch   CtrlStpCore_DEBUG_RteRead_sIgnitioinSts_eIgnitionSts;
Var.AddWatch   CtrlStpCore_DEBUG_RteRead_sNetworkMngmntSts_eSleepSts;
Var.AddWatch   CtrlStpCore_DEBUG_RteRead_sStepperTgt_eLevellingSts;
Var.AddWatch   CtrlStpCore_DEBUG_RteRead_sStepperTgt_eReferenceReq;
Var.AddWatch   applicationCodingData

WinPAGE.select P000

ENDDO
