GSV-2 --- GSVread --- VB6

Antwort erstellen


Diese Frage dient dazu, das automatisierte Versenden von Formularen durch Spam-Bots zu verhindern.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode ist eingeschaltet
[img] ist eingeschaltet
[flash] ist ausgeschaltet
[url] ist eingeschaltet
Smilies sind eingeschaltet

Die letzten Beiträge des Themas
   

Ansicht erweitern Die letzten Beiträge des Themas: GSV-2 --- GSVread --- VB6

Re: GSV-2 --- GSVread --- VB6

Beitrag von Sebastian Wetz » Fr 9. Mär 2012, 17:02

Hello Michael,

that function is called
double WINAPI GSVDispGetNorm(int no);

Regards,
Sebastian

Re: GSV-2 --- GSVread --- VB6

Beitrag von MichaelV » Fr 24. Feb 2012, 10:04

Hallo Holger Kabelitz,

thanks for your answer.
I had searched inside the documentation (MEGSVPGM.PDF and ba-megsv.pdf), but i did not found a function
which is called getnormalization.
Is there a new function name for this ?

Regards
Michael Vogel

Re: GSV-2 --- GSVread --- VB6

Beitrag von Kabelitz » So 12. Feb 2012, 20:08

Hello,
propably you must multiply the value "ad" with the scaling factor, which is stored in the eeprom of the gsv-2.
You get scaling factor with "getnormalization".
Best regards
Holger Kabelitz

GSV-2 --- GSVread --- VB6

Beitrag von MichaelV » Fr 10. Feb 2012, 09:26

Hello,

I had written a smal programm, to read values from the GSV-2.
The programm itselve works fine, but the reveived data are unclear
for me.
The return value is around -0,04...., and the display of the GSV-2
shows -3,6... Nm.
What is the rule to translate the -0,04.. to -3,6..Nm ?
Can anybody help me ?

Regards

Code: Alles auswählen

Option Explicit

'These parameters and functions are declared in the module
'Public Const ComNr As Long = 6 ' Nummer der seriellen Schnittstelle
'Public Const BuffSize As Long = 1000 ' Größe des Puffers, in dem die AD-Werte
                                      ' abgelegt werden, bis sie mit dem Befehl
                                      ' GSVread gelesen werden
'Public Declare Function GSVread Lib "MEGSV" Alias "#21" (ByVal no As Long, ByRef ad As Double) As Long
'Public Declare Function GSVmodel Lib "MEGSV" Alias "#2" (ByVal no As Long) As Long
'Public Declare Function GSVactivate Lib "MEGSV" Alias "#10" (ByVal no As Long, ByVal buffersize As Long) As Long
'Public Declare Sub GSVrelease Lib "MEGSV" Alias "#11" (ByVal no As Long)


Private Sub Command1_Click()
    Dim tmp As String
   
    If GSVactivate(ComNr, BuffSize) <> GSV_OK Then
        Text1.Text = "Initialisierung des GSV fehlgeschlagen"
    Else
        tmp = GSVmodel(ComNr)
        Text1.Text = "Baugruppen-Modell: " & tmp
       
        Timer1.Enabled = True
    End If
End Sub

Private Sub Command2_Click()
    Timer1.Enabled = False
    GSVrelease ComNr
End Sub

Private Sub Timer1_Timer()
    Dim ad As Double

    If GSVread(ComNr, ad) = GSV_TRUE Then
        Text2.Text = CStr(ad)
    End If
End Sub

Nach oben