📄 transmitgme.vb
字号:
search.insert(strsql)
'Catch ex As Exception
' MessageBox.Show(ex.Message, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning)
'End Try
End Sub
'''保存吉兆1153A-C、D型激励器单元参数、发射机激励器运行日志表-tranExciterRunLogGME(主要针对吉兆电视发射机)CDate(Master.strSamplingTime)
Public Sub SaveGMEExciter(ByVal i As Integer)
Dim strsql As String
strsql = "insert into tranExciterRunLogGME values(" & TransmitID & "," _
& i + 1 & ",'" _
& Now & "', " _
& GMEInspirit(i).iHighVswr & "," _
& GMEInspirit(i).iAGC_PA & "," _
& GMEInspirit(i).iSaveMode & "," _
& GMEInspirit(i).iMGC & "," _
& GMEInspirit(i).iAGC_EX & "," _
& GMEInspirit(i).iEX & "," _
& GMEInspirit(i).iVideo & "," _
& GMEInspirit(i).iLO_Lock & "," _
& GMEInspirit(i).dP_EX & "," _
& GMEInspirit(i).dA_DEV & "," _
& GMEInspirit(i).dV_MOD & "," _
& GMEInspirit(i).dV_AGC & "," _
& GMEInspirit(i).dI_1WPA & "," _
& iTempflag & ")"
'Try
If search.con.State = ConnectionState.Open Then
search.con.Close()
End If
search.insert(strsql)
'Catch ex As Exception
' MessageBox.Show(ex.Message, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning)
'End Try
End Sub
'''保存电源及冷却系统参数-PSsysyemUnit(主要针对吉兆电视、调频发射机)'''CDate(Master.strSamplingTime)
Public Sub SavePSsytem()
Dim strsql As String
strsql = "insert into PSsystemUnit values(" & TransmitID & ",'" _
& Now & "', " _
& PSsystem.iPS & "," _
& PSsystem.iPSI_EQU & "," _
& PSsystem.iPA_PS & "," _
& PSsystem.iFANS & "," _
& PSsystem.iFAN & "," _
& PSsystem.iSTART_TR & "," _
& PSsystem.iSHUT_TR & "," _
& PSsystem.iFRA & "," _
& PSsystem.dPS1 & "," _
& PSsystem.dPS2 & "," _
& PSsystem.dPS3 & "," _
& PSsystem.dPS4 & "," _
& PSsystem.dPS5 & "," _
& PSsystem.dPS6 & "," _
& PSsystem.dPS7 & "," _
& PSsystem.dPS8 & "," _
& iTempflag & ")"
'Try
If search.con.State = ConnectionState.Open Then
search.con.Close()
End If
search.insert(strsql)
'Catch ex As Exception
' MessageBox.Show(ex.Message, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning)
'End Try
End Sub
'''保存功放单元参数、发射机功放插件运行日志表-tranUnitRunLog'''CDate(Master.strSamplingTime)
Public Sub SavePA(ByVal i As Integer)
Dim strsql As String
strsql = "insert into tranUnitRunLog values(" & TransmitID & "," _
& i + 1 & ",'" _
& Now & "', " _
& Amplifier(i).bWork.GetHashCode & ", " _
& Amplifier(i).dOutputPower & "," _
& Amplifier(i).dInputPower & "," _
& Amplifier(i).dReflectPower & "," _
& Amplifier(i).dRefPower & "," _
& Amplifier(i).dUnbalacePower1 & "," _
& Amplifier(i).dUnbalacePower2 & "," _
& Amplifier(i).dDrivePower & "," _
& Amplifier(i).dCurrent & "," _
& Amplifier(i).dVoltage & "," _
& Amplifier(i).dTemputer & "," _
& Amplifier(i).dTCurrent & "," _
& Amplifier(i).dCurrent1 & "," _
& Amplifier(i).dCurrent2 & "," _
& Amplifier(i).dCurrent3 & "," _
& Amplifier(i).dCurrent4 & "," _
& Amplifier(i).dCurrent5 & "," _
& Amplifier(i).dCurrent6 & "," _
& Amplifier(i).dCurrent7 & "," _
& Amplifier(i).dCurrent8 & "," _
& Amplifier(i).bTemp.GetHashCode & "," _
& Amplifier(i).bPull.GetHashCode & "," _
& Amplifier(i).bDsw.GetHashCode & "," _
& iTempflag & "," _
& Amplifier(i).bPnP.GetHashCode & "," _
& Amplifier(i).bOverInspirit.GetHashCode & "," _
& Amplifier(i).bPcbok.GetHashCode & "," _
& Amplifier(i).bNobal.GetHashCode & "," _
& Amplifier(i).bDcov.GetHashCode & ")"
'Try
If search.con.State = ConnectionState.Open Then
search.con.Close()
End If
search.insert(strsql)
'Catch ex As Exception
' MessageBox.Show(ex.Message, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning)
'End Try
End Sub
'Public Sub SysAlarm()
' '''报警类型
' '1、功率过低
' '2、驻波比过高
' '3、温度过高
' If isClose() = True Then
' Else
' If Master.dPo > 1000 And Master.dPo < CDbl(power(TransmitPower) * powerPoint) Then
' CommStatus = 3
' SaveAlarmLog(TransmitID, "Po=" + CStr(Master.dPo) + " 输出功率过低!", "0")
' End If
' If Master.dVswr > CDbl(VswrPoint) Then
' CommStatus = 3
' SaveAlarmLog(TransmitID, "Vswr=" + CStr(Master.dVswr) + " 驻波比过高!", "0")
' End If
' If Master.dTemputer > CDbl(TempPoint) Then
' CommStatus = 3
' SaveAlarmLog(TransmitID, "温度=" + CStr(Master.dTemputer) + "℃ 温度过高!", "0")
' End If
' End If
'End Sub
'Public Sub AmpAlarm(ByVal i As Integer)
' If isClose() = True Then
' Else
' If Amplifier(i).bTemp = True Then
' CommStatus = 3
' SaveAlarmLog(TransmitID, "功率放大器" + CStr(i) + " 过温保护!", "0")
' End If
' If Amplifier(i).bPull = True Then
' CommStatus = 3
' SaveAlarmLog(TransmitID, "功率放大器" + CStr(i) + " 过载保护!", "0")
' End If
' If Amplifier(i).bOverInspirit = True Then
' CommStatus = 3
' SaveAlarmLog(TransmitID, "功率放大器" + CStr(i) + " 过激励保护!", "0")
' End If
' End If
'End Sub
'Public Sub SMSalarm(ByVal alarmflag As Integer)
' Dim QueryString As String
' Dim ds As DataSet
' Dim alarmType As Integer
' If isclose() = True Then
' Else
' Select Case alarmflag
' Case 3
' alarmType = 1
' Case 0
' alarmType = 2
' End Select
' QueryString = "select * from SMS_Alarm where equNum=" & Trim(TransmitID) + " order by id desc"
' ds = search.query(QueryString)
' If ds.Tables(0).Rows.Count > 0 Then
' If ds.Tables(0).Rows(0).Item("alarmState") = alarmType Then
' Else
' SaveSMSAlarmLog(TransmitID, alarmType)
' End If
' Else
' If alarmType = 1 Then
' SaveSMSAlarmLog(TransmitID, alarmType)
' End If
' End If
' End If
'End Sub
'''根据当天时间判断是处于开机状态还是关机状态
'Public Function isClose() As Boolean
' Dim NowTime As Date
' NowTime = CDate(CStr(Now.Hour) + ":" + CStr(Now.Minute) + ":" + "00").Date ' CStr(Today.Second)).Date()
' Select Case Today.DayOfWeek
' Case DayOfWeek.Monday
' If Monday(0) Is Nothing Or Monday(1) Is Nothing Then
' Else
' If NowTime > CDate(Monday(1)).Date And NowTime < CDate(Monday(0)).Date Then
' isClose = True
' Else
' isClose = False
' End If
' End If
' Case DayOfWeek.Tuesday
' If Tuesday(0) Is Nothing Or Tuesday(1) Is Nothing Then
' Else
' If NowTime > CDate(Tuesday(3)).Date And NowTime < CDate(Tuesday(0)).Date Then
' isClose = True
' Else
' isClose = False
' End If
' End If
' If Tuesday(2) Is Nothing Or Tuesday(3) Is Nothing Then
' Else
' If NowTime > CDate(Tuesday(2)).Date And NowTime < CDate(Tuesday(3)).Date Then
' isClose = True
' Else
' isClose = False
' End If
' End If
' Case DayOfWeek.Wednesday
' If Wednesday(0) Is Nothing Or Wednesday(1) Is Nothing Then
' Else
' If NowTime > CDate(Wednesday(1)).Date And NowTime < CDate(Wednesday(0)).Date Then
' isClose = True
' Else
' isClose = False
' End If
' End If
' Case DayOfWeek.Thursday
' If Thursday(0) Is Nothing Or Thursday(1) Is Nothing Then
' Else
' If NowTime > CDate(Thursday(1)).Date And NowTime < CDate(Thursday(0)).Date Then
' isClose = True
' Else
' isClose = False
' End If
' End If
' Case DayOfWeek.Friday
' If Friday(0) Is Nothing Or Friday(1) Is Nothing Then
' Else
' If NowTime > CDate(Friday(1)).Date And NowTime < CDate(Friday(0)).Date Then
' isClose = True
' Else
' isClose = False
' End If
' End If
' Case DayOfWeek.Saturday
' If Saturday(0) Is Nothing Or Saturday(1) Is Nothing Then
' Else
' If NowTime > CDate(Saturday(1)).Date And NowTime < CDate(Saturday(0)).Date Then
' isClose = True
' Else
' isClose = False
' End If
' End If
' Case DayOfWeek.Sunday
' If Sunday(0) Is Nothing Or Sunday(1) Is Nothing Then
' Else
' If NowTime > CDate(Sunday(1)).Date And NowTime < CDate(Sunday(0)).Date Then
' isClose = True
' Else
' isClose = False
' End If
' End If
' End Select
'End Function
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -