-
FlexPro
- Auf einen Blick
- Features & Optionen
- Einsatzgebiete
- Alle Vorteile
- Neu in FlexPro 2021
- FlexPro gratis testen
- FlexPro View OEM Freeware
- Kaufberatung
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
- Produkte
- News
- Support
- Unternehmen
- Jobs
- Kontakt
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
Calcul valeur crête crête d’un signal
Home > Community > Automation and VBA > Calcul valeur crête crête d’un signal
- Dieses Thema hat 2 Antworten und 2 Teilnehmer, und wurde zuletzt aktualisiert vor 14 Jahre, 7 Monaten von
Bertrand SIMON.
-
AutorBeiträge
-
Juli 27, 2008 um 9:11 pm Uhr #12389
Bertrand SIMON
TeilnehmerBonjour, voici un code qui me permet de calculer une valeur crête à crête d’un signal.
Private Sub Calcc_Click()
‘configuration des variables
Dim p1 As Long
Dim p2 As Long
Dim voie As String‘Attribution des variables
ActiveDatabase.ActiveObject.Cursor(fpCursorMinX).Active = True
p1 = ActiveDatabase.ActiveObject.ActiveCursor.PositionIndex
ActiveDatabase.ActiveObject.Cursor(fpCursorMaxX).Active = True
p2 = ActiveDatabase.ActiveObject.ActiveCursor.PositionIndex
voie = InputBox(“Entrez le nom de la voie”)‘calcul de la valeur crête à crête
Dim min As StatisticQuantityAnalysis
Set min = ActiveDatabase.ActiveFolder.Add(“min”, fpObjectTypeStatisticQuantity)
With min
.DataSet = voie + “[” & CStr(p1) & “,” & CStr(p2) & “]”
.Quantity = fpStatisticQuantityMinimum
.Update
End WithDim max As StatisticQuantityAnalysis
Set max = ActiveDatabase.ActiveFolder.Add(“max”, fpObjectTypeStatisticQuantity)
With max
.DataSet = voie + “[” & CStr(p3) & “,” & CStr(p4) & “]”
.Quantity = fpStatisticQuantityMaximum
.Update
End WithMi = min.Value
Ma = max.Value
cc = Ma – Mi‘Intégration de la valeur dans le graphique
ActiveDatabase.ActiveObject.Pages(1).Item(1).Select
ActiveDatabase.ActiveObject.Pages(1).Item(1).DocObject.Open = True
With _
ActiveDatabase.ActiveObject.Pages(1).Item(1).DocObject.Shapes.AddTextLabel(130, -55)
.Text = “Valeur cc:” & cc
.Select
End With
ActiveDatabase.ActiveObject.Pages(1).Item(1).DocObject.Selection.Collapse
ActiveDatabase.ActiveObject.Pages(1).Item(1).DocObject.Open = False
End SubLa valeur de “cc” est toujours égale à 0. Pourquoi?
Salutation
Juli 27, 2008 um 9:11 pm Uhr #8072Bertrand SIMON
TeilnehmerBonjour, voici un code qui me permet de calculer une valeur crête à crête d’un signal.
Private Sub Calcc_Click()
‘configuration des variables
Dim p1 As Long
Dim p2 As Long
Dim voie As String‘Attribution des variables
ActiveDatabase.ActiveObject.Cursor(fpCursorMinX).Active = True
p1 = ActiveDatabase.ActiveObject.ActiveCursor.PositionIndex
ActiveDatabase.ActiveObject.Cursor(fpCursorMaxX).Active = True
p2 = ActiveDatabase.ActiveObject.ActiveCursor.PositionIndex
voie = InputBox(“Entrez le nom de la voie”)‘calcul de la valeur crête à crête
Dim min As StatisticQuantityAnalysis
Set min = ActiveDatabase.ActiveFolder.Add(“min”, fpObjectTypeStatisticQuantity)
With min
.DataSet = voie + “[” & CStr(p1) & “,” & CStr(p2) & “]”
.Quantity = fpStatisticQuantityMinimum
.Update
End WithDim max As StatisticQuantityAnalysis
Set max = ActiveDatabase.ActiveFolder.Add(“max”, fpObjectTypeStatisticQuantity)
With max
.DataSet = voie + “[” & CStr(p3) & “,” & CStr(p4) & “]”
.Quantity = fpStatisticQuantityMaximum
.Update
End WithMi = min.Value
Ma = max.Value
cc = Ma – Mi‘Intégration de la valeur dans le graphique
ActiveDatabase.ActiveObject.Pages(1).Item(1).Select
ActiveDatabase.ActiveObject.Pages(1).Item(1).DocObject.Open = True
With _
ActiveDatabase.ActiveObject.Pages(1).Item(1).DocObject.Shapes.AddTextLabel(130, -55)
.Text = “Valeur cc:” & cc
.Select
End With
ActiveDatabase.ActiveObject.Pages(1).Item(1).DocObject.Selection.Collapse
ActiveDatabase.ActiveObject.Pages(1).Item(1).DocObject.Open = False
End SubLa valeur de “cc” est toujours égale à 0. Pourquoi?
Salutation
Juli 29, 2008 um 10:09 pm Uhr #8596Bernhard Kantz
TeilnehmerWhitout the database and without knowing the data this is difficult to say. You should check the values of p1, p2 and p3, p4 (not declared?) in the debugger.
Please note that we can’t give general programming support here.Support
support@weisang.com -
AutorBeiträge
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.