Home Forums SYSTEM VB Script Error

Viewing 1 reply thread
  • Author
    Posts
    • #51363
      Abdul Samad
      Participant

      Set LayoutMgr = Document.GetLayoutMgr
      Set Layout = LayoutMgr.GetCurrentLayout
      Set Canvas = Layout.GetCurrentCanvas
      Set PmMgr = Layout.GetParameterMgr

      Set BitRate = PmMgr.GetObjectByName(“Bit rate”)
      BitR = BitRate.GetValue(1)
      Set SymRate = PmMgr.GetObjectByName(“Symbol rate”)
      SymR = SymRate.GetValue(1)

      Set Filt = Canvas.GetComponentByName(“Band Pass Rectangle Filter”)
      RcvrBW = Filt.GetParameterValue(“Bandwidth”) * 1e9

      dim ThisComponent
      Set ThisComponent = GetThisComponent()

      C = ThisComponent.GetResultValue(“Signal Power (dBm)”)
      N = ThisComponent.GetResultValue(“Noise Power (dBm)”)

      C_N = C – N

      Function Log10(X)
      Log10 = Log(X)/Log(10)
      End Function

      PSD = N – 3 – 10*Log10(RcvrBW)

      EsNo = C_N + 10*Log10(RcvrBW/SymR)
      EbNo = C_N + 10*Log10(RcvrBW/BitR)

      ThisComponent.SetResultValue “C/N (dB)”, Cdbl( C_N )
      ThisComponent.SetResultValue “PSD (dBm/Hz)”, Cdbl( PSD )
      ThisComponent.SetResultValue “EsNo (dB)”, Cdbl( EsNo )
      ThisComponent.setResultValue “EbNo (dB)”, Cdbl( EbNo )

      What is the problem with this script?
      it’s showing Vbscript error in line 14 type mismatch.

    • #51373
      Ahmad Atieh
      Moderator

      Dear Abdul Samad,
      Did you write this script or automatically generated from OptiSystem GUI?
      Could you email the original project as a .zip file to ahmad.atieh@optiwave.com and I’ll take a look at the script?
      regards,
      Ahmad

Viewing 1 reply thread
  • You must be logged in to reply to this topic.